api

package
v1.6.15 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiManagerCtx

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

func New

func New(
	sessions types.SessionManager,
	members types.MemberManager,
	desktop types.DesktopManager,
	capture types.CaptureManager,
) *ApiManagerCtx

func (*ApiManagerCtx) AddRouter

func (api *ApiManagerCtx) AddRouter(path string, router func(types.Router))

func (*ApiManagerCtx) Authenticate

func (api *ApiManagerCtx) Authenticate(w http.ResponseWriter, r *http.Request) (context.Context, error)

func (*ApiManagerCtx) Login

func (api *ApiManagerCtx) Login(w http.ResponseWriter, r *http.Request) error

func (*ApiManagerCtx) Logout

func (api *ApiManagerCtx) Logout(w http.ResponseWriter, r *http.Request) error

func (*ApiManagerCtx) Route

func (api *ApiManagerCtx) Route(r types.Router)

func (*ApiManagerCtx) Sessions added in v1.6.12

func (api *ApiManagerCtx) Sessions(w http.ResponseWriter, r *http.Request) error

func (*ApiManagerCtx) Whoami

func (api *ApiManagerCtx) Whoami(w http.ResponseWriter, r *http.Request) error

type SessionDataPayload

type SessionDataPayload struct {
	ID      string              `json:"id"`
	Token   string              `json:"token,omitempty"`
	Profile types.MemberProfile `json:"profile"`
	State   types.SessionState  `json:"state"`
}

type SessionLoginPayload

type SessionLoginPayload struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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