handlers

package
v0.0.0-...-5bae4c0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(c pwd.PWDApi, ev event.EventApi)

func CloseSession

func CloseSession(rw http.ResponseWriter, req *http.Request)

func DeleteInstance

func DeleteInstance(rw http.ResponseWriter, req *http.Request)

func Exec

func Exec(rw http.ResponseWriter, req *http.Request)

func FileUpload

func FileUpload(rw http.ResponseWriter, req *http.Request)

func GetCurrentPlayground

func GetCurrentPlayground(rw http.ResponseWriter, req *http.Request)

func GetInstanceImages

func GetInstanceImages(rw http.ResponseWriter, req *http.Request)

func GetSession

func GetSession(rw http.ResponseWriter, req *http.Request)

func GetUser

func GetUser(rw http.ResponseWriter, req *http.Request)

func Home

func Home(w http.ResponseWriter, r *http.Request)

func Landing

func Landing(rw http.ResponseWriter, req *http.Request)

func ListPlaygrounds

func ListPlaygrounds(rw http.ResponseWriter, req *http.Request)

func ListProviders

func ListProviders(rw http.ResponseWriter, req *http.Request)

func LoggedInUser

func LoggedInUser(rw http.ResponseWriter, req *http.Request)

func Login

func Login(rw http.ResponseWriter, req *http.Request)

func LoginCallback

func LoginCallback(rw http.ResponseWriter, req *http.Request)

func NewInstance

func NewInstance(rw http.ResponseWriter, req *http.Request)

func NewManager

func NewManager(s *types.Session) (*manager, error)

func NewPlayground

func NewPlayground(rw http.ResponseWriter, req *http.Request)

func NewSession

func NewSession(rw http.ResponseWriter, req *http.Request)

func Ping

func Ping(rw http.ResponseWriter, req *http.Request)

func Register

func Register(extend HandlerExtender)

func SessionSetup

func SessionSetup(rw http.ResponseWriter, req *http.Request)

func ValidateToken

func ValidateToken(req *http.Request) bool

func WSH

func WSH(w http.ResponseWriter, r *http.Request)

Types

type CookieID

type CookieID struct {
	Id         string `json:"id"`
	UserName   string `json:"user_name"`
	UserAvatar string `json:"user_avatar"`
	ProviderId string `json:"provider_id"`
}

func ReadCookie

func ReadCookie(r *http.Request) (*CookieID, error)

func (*CookieID) SetCookie

func (c *CookieID) SetCookie(rw http.ResponseWriter, host string) error

type HandlerExtender

type HandlerExtender func(h *mux.Router)

type NewSessionResponse

type NewSessionResponse struct {
	SessionId string `json:"session_id"`
	Hostname  string `json:"hostname"`
}

type PlaygroundConfigurationResponse

type PlaygroundConfigurationResponse struct {
	Id                          string        `json:"id"`
	Domain                      string        `json:"domain"`
	DefaultDinDInstanceImage    string        `json:"default_dind_instance_image"`
	AvailableDinDInstanceImages []string      `json:"available_dind_instance_images"`
	AllowWindowsInstances       bool          `json:"allow_windows_instances"`
	DefaultSessionDuration      time.Duration `json:"default_session_duration"`
	DindVolumeSize              string        `json:"dind_volume_size"`
}

type PublicUserInfo

type PublicUserInfo struct {
	Id     string `json:"id"`
	Avatar string `json:"avatar"`
	Name   string `json:"name"`
}

type SessionInfo

type SessionInfo struct {
	*types.Session
	Instances map[string]*types.Instance `json:"instances"`
}

Jump to

Keyboard shortcuts

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