Help us shape the future of Go! Take the 2026 Go Developer Survey

appspacerouter

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppRoutes added in v0.13.2

type AppRoutes struct {
	AppModel interface {
		GetVersion(appID domain.AppID, version domain.Version) (domain.AppVersion, error)
	} `checkinject:"required"`
	AppFilesModel interface {
		ReadRoutes(locationKey string) ([]byte, error)
	} `checkinject:"required"`
	Config *domain.RuntimeConfig `checkinject:"required"`
	// contains filtered or unexported fields
}

func (*AppRoutes) Init added in v0.13.2

func (r *AppRoutes) Init()

func (*AppRoutes) Match added in v0.13.2

func (r *AppRoutes) Match(appID domain.AppID, version domain.Version, method string, reqPath string) (domain.AppRoute, error)

func (*AppRoutes) ValidateRoutes added in v0.13.2

func (r *AppRoutes) ValidateRoutes(routes []domain.AppRoute) error

ValidateRoutes validates routes passed to it

type AppspaceRouter

type AppspaceRouter struct {
	Config   *domain.RuntimeConfig `checkinject:"required"`
	AppModel interface {
		GetFromID(domain.AppID) (domain.App, error)
		GetVersion(domain.AppID, domain.Version) (domain.AppVersion, error)
	} `checkinject:"required"`
	AppspaceUserModel interface {
		Get(appspaceID domain.AppspaceID, proxyID domain.ProxyID) (domain.AppspaceUser, error)
	} `checkinject:"required"`
	AppspaceStatus interface {
		Ready(domain.AppspaceID) bool
	} `checkinject:"required"`
	DropserverRoutes interface {
		Router() http.Handler
	} `checkinject:"required"`
	AppRoutes interface {
		Match(appID domain.AppID, version domain.Version, method string, reqPath string) (domain.AppRoute, error)
	} `checkinject:"required"`
	SandboxProxy   http.Handler `checkinject:"required"` // versioned?
	RouteHitEvents interface {
		Send(*domain.AppspaceRouteHitEvent)
	} `checkinject:"optional"`
	AppLocation2Path interface {
		Files(string) string
	} `checkinject:"required"`
	AppspaceLocation2Path interface {
		Files(string) string
		Avatars(string) string
	} `checkinject:"required"`
	// contains filtered or unexported fields
}

AppspaceRouter handles routes for appspaces.

func (*AppspaceRouter) BuildRoutes added in v0.14.0

func (a *AppspaceRouter) BuildRoutes(mux *chi.Mux)

func (*AppspaceRouter) Init

func (a *AppspaceRouter) Init()

Init initializes the router

func (*AppspaceRouter) SubscribeLiveCount

func (a *AppspaceRouter) SubscribeLiveCount(appspaceID domain.AppspaceID, ch chan<- int) int

SubscribeLiveCount pushes the number of live requests for an appspace each time it changes It returns the current count

func (*AppspaceRouter) UnsubscribeLiveCount

func (a *AppspaceRouter) UnsubscribeLiveCount(appspaceID domain.AppspaceID, ch chan<- int)

UnsubscribeLiveCount unsubscribes

type DropserverRoutes

type DropserverRoutes struct {
	V0DropServerRoutes interface {
		// contains filtered or unexported methods
	} `checkinject:"required"`
}

func (*DropserverRoutes) Router

func (d *DropserverRoutes) Router() http.Handler

type FromPublic added in v0.14.0

type FromPublic struct {
	Authenticator interface {
		AppspaceUserProxyID(http.Handler) http.Handler
		SetForAppspace(http.ResponseWriter, domain.ProxyID, domain.AppspaceID, string) (string, error)
	} `checkinject:"required"`
	V0TokenManager interface {
		CheckToken(appspaceID domain.AppspaceID, token string) (domain.V0AppspaceLoginToken, bool)
	} `checkinject:"required"`
	AppspaceModel interface {
		GetFromDomain(string) (*domain.Appspace, error)
	} `checkinject:"required"`
	AppspaceRouter interface {
		BuildRoutes(mux *chi.Mux)
	} `checkinject:"required"`
	// contains filtered or unexported fields
}

func (*FromPublic) Init added in v0.14.0

func (f *FromPublic) Init()

func (*FromPublic) ServeHTTP added in v0.14.0

func (f *FromPublic) ServeHTTP(w http.ResponseWriter, r *http.Request)

type FromTSNet added in v0.14.0

type FromTSNet struct {
	AppspaceModel interface {
		GetFromID(domain.AppspaceID) (*domain.Appspace, error)
	} `checkinject:"required"`
	AppspaceUserModel interface {
		GetByAuth(appspaceID domain.AppspaceID, authType string, identifier string) (domain.AppspaceUser, error)
	} `checkinject:"required"`
	AppspaceRouter interface {
		BuildRoutes(mux *chi.Mux)
	} `checkinject:"required"`
	// contains filtered or unexported fields
}

func (*FromTSNet) Init added in v0.14.0

func (f *FromTSNet) Init()

func (*FromTSNet) ServeHTTP added in v0.14.0

func (f *FromTSNet) ServeHTTP(w http.ResponseWriter, r *http.Request)

type V0DropserverRoutes

type V0DropserverRoutes struct {
	AppspaceModel interface {
		GetFromDomain(string) (*domain.Appspace, error)
	} `checkinject:"required"`
	Authenticator interface {
		Unset(w http.ResponseWriter, r *http.Request)
	} `checkinject:"required"`
	V0RequestToken interface {
		ReceiveToken(ref, token string)
		ReceiveError(ref string, err error)
	} `checkinject:"required"`
	V0TokenManager interface {
		SendLoginToken(appspaceID domain.AppspaceID, dropID string, ref string) error
	} `checkinject:"required"`
}

V0DropserverRoutes represents struct for /dropserver appspace routes

Jump to

Keyboard shortcuts

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