instance

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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) error
	RestorePath(*http.Request) bool
	TriggerHook(uint64, uint64, http.ResponseWriter, *http.Request, uint64) bool
	Connect(w http.ResponseWriter, r *http.Request)
	// contains filtered or unexported methods
}

func NewInstance

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

type App

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

type Core

type Core interface {
	Spawn(func()) bool
	Thread() *shredder.Thread
	CSPCollector() *common.CSPCollector
	ImportRegistry() *resources.Registry
	SessionId() string
	Conf() *common.SystemConf
	Id() string
	NewId() uint64
	Cinema() *door.Cinema
	NewLink(any) (*Link, error)
	SessionExpire(d time.Duration)
	SessionEnd()
	Call(call action.Call)
	CallCtx(ctx context.Context, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams) context.CancelFunc
	CallCheck(check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)
	End()
	IsDetached() bool
	License() license.License
}

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]) RestorePath

func (inst *Instance[M]) RestorePath(r *http.Request) bool

func (*Instance[M]) Serve

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

func (*Instance[M]) TriggerHook

func (inst *Instance[M]) TriggerHook(doorId uint64, hookId uint64, w http.ResponseWriter, r *http.Request, track uint64) bool
type Link struct {
	// contains filtered or unexported fields
}

func (*Link) ClickHandler

func (h *Link) ClickHandler() (func(context.Context), bool)

func (*Link) Path

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

type Options

type Options struct {
	Detached bool
	Rerouted bool
}

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