instance

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2025 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyInstance

type AnyInstance interface {
	Id() string
	Serve(http.ResponseWriter, *http.Request, int) error
	UpdatePath(m any, adapter path.AnyAdapter) bool
	TriggerHook(uint64, uint64, http.ResponseWriter, *http.Request) bool
	Connect(w http.ResponseWriter, r *http.Request)
	// contains filtered or unexported methods
}

func NewInstance

func NewInstance[M any](sess *Session, page Page[M], adapter *path.Adapter[M], m *M, opt *Options) (AnyInstance, bool)

type Core

type Core interface {
	Thread() *shredder.Thread
	Detached() bool
	InlineNonce() (string, bool)
	CSPCollector() (*common.CSPCollector, bool)
	ImportRegistry() *resources.Registry
	SessionId() string
	Include() bool
	ClientConf() *common.ClientConf
	Id() string
	NewId() uint64
	Cinema() *door.Cinema
	NewLink(context.Context, any) (*Link, error)
	SessionExpire(d time.Duration)
	SessionEnd()
	Call(call common.Call)
	End()
}

type Instance

type Instance[M any] struct {
	// contains filtered or unexported fields
}

func (*Instance[M]) Connect

func (inst *Instance[M]) Connect(w http.ResponseWriter, r *http.Request)

func (*Instance[M]) Id

func (inst *Instance[M]) Id() string

func (*Instance[M]) OnPanic

func (inst *Instance[M]) OnPanic(err error)

func (*Instance[M]) Serve

func (inst *Instance[M]) Serve(w http.ResponseWriter, r *http.Request, code int) error

func (*Instance[M]) TriggerHook

func (inst *Instance[M]) TriggerHook(doorId uint64, hookId uint64, w http.ResponseWriter, r *http.Request) bool

func (*Instance[M]) UpdatePath

func (inst *Instance[M]) UpdatePath(m any, adapter path.AnyAdapter) bool
type Link struct {
	// contains filtered or unexported fields
}

func (*Link) ClickHandler

func (h *Link) ClickHandler() (func(), bool)

func (*Link) Path

func (h *Link) Path() (string, bool)

type LocatinReload

type LocatinReload struct {
}

func (*LocatinReload) Data

func (l *LocatinReload) Data() *common.CallData

func (*LocatinReload) Result

func (t *LocatinReload) Result(error)

type LocationAssign

type LocationAssign struct {
	Href   string
	Origin bool
}

func (*LocationAssign) Data

func (l *LocationAssign) Data() *common.CallData

func (*LocationAssign) Result

func (t *LocationAssign) Result(error)

type LocationReplace

type LocationReplace struct {
	Href   string
	Origin bool
}

func (*LocationReplace) Data

func (l *LocationReplace) Data() *common.CallData

func (*LocationReplace) Result

func (t *LocationReplace) Result(error)

type Options

type Options struct {
	Detached bool
	Rerouted bool
}

type Page

type Page[M any] interface {
	Render(s beam.SourceBeam[M]) templ.Component
}

type ScriptOptions

type ScriptOptions struct {
	Minify bool
	Gzip   bool
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession(r router) *Session

func (*Session) AddInstance

func (sess *Session) AddInstance(inst AnyInstance) bool

func (*Session) GetInstance

func (sess *Session) GetInstance(id string) (AnyInstance, bool)

func (*Session) Id

func (sess *Session) Id() string

func (*Session) Kill

func (sess *Session) Kill()

func (*Session) SetExpiration

func (sess *Session) SetExpiration(d time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL