webui

package
v0.0.0-...-19f3900 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: GPL-3.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(ctx context.Context, log *slog.Logger, mux *http.ServeMux, prefix string, cfg Config, o Options)

Types

type Config

type Config struct {
	Keeper              *roomkeeper.Keeper
	UserManager         *userauth.Manager
	SessionStoreFactory SessionStoreFactory
	Scheduler           *scheduler.Scheduler
	// contains filtered or unexported fields
}

type Options

type Options struct {
	WebSocket         websockutil.Options `toml:"websocket"`
	ReadCursorTimeout time.Duration       `toml:"read-cursor-timeout"`
	RoomRPSLimit      float64             `toml:"room-rps-limit"`
	RoomRPSBurst      int                 `toml:"room-rps-burst"`
	ServerID          string              `toml:"server-id"`
	Session           SessionOptions      `toml:"session"`
	CSRFKey           []byte              `toml:"-"`
	Compression       string              `toml:"compression"`
}

func (Options) Clone

func (o Options) Clone() Options

func (*Options) FillDefaults

func (o *Options) FillDefaults()

type SessionOptions

type SessionOptions struct {
	Key             []byte        `toml:"-"`
	CleanupInterval time.Duration `toml:"cleanup-interval"`
	Insecure        bool          `toml:"insecure"`
	MaxAge          time.Duration `toml:"max-age"`
}

func (*SessionOptions) AssignSessionOptions

func (o *SessionOptions) AssignSessionOptions(s *sessions.Options)

func (SessionOptions) Clone

func (o SessionOptions) Clone() SessionOptions

func (*SessionOptions) FillDefaults

func (o *SessionOptions) FillDefaults()

type SessionStoreFactory

type SessionStoreFactory interface {
	NewSessionStore(ctx context.Context, opts SessionOptions) sessions.Store
}

Jump to

Keyboard shortcuts

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