web

package
v0.0.0-...-706fd46 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogHandler

func GetLogHandler(PupID string, dbx dogeboxd.Dogeboxd) (*websocket.Server, error)

Types

type AddSSHKeyRequest

type AddSSHKeyRequest struct {
	Key string `json:"key"`
}

type AdminRouter

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

func (AdminRouter) Run

func (t AdminRouter) Run(started, stopped chan bool, stop chan context.Context) error

type AuthenticateRequestBody

type AuthenticateRequestBody struct {
	Password string `json:"password"`
}

type BootstrapFacts

type BootstrapFacts struct {
	InstallationMode                 dogeboxd.BootstrapInstallationMode `json:"installationMode"`
	HasGeneratedKey                  bool                               `json:"hasGeneratedKey"`
	HasConfiguredNetwork             bool                               `json:"hasConfiguredNetwork"`
	HasCompletedInitialConfiguration bool                               `json:"hasCompletedInitialConfiguration"`
}

type BootstrapResponse

type BootstrapResponse struct {
	Version    *version.DBXVersionInfo      `json:"version"`
	DevMode    bool                         `json:"devMode"`
	Assets     map[string]dogeboxd.PupAsset `json:"assets"`
	States     map[string]dogeboxd.PupState `json:"states"`
	Stats      map[string]dogeboxd.PupStats `json:"stats"`
	SetupFacts BootstrapFacts               `json:"setupFacts"`
}

type CreateMasterKeyRequestBody

type CreateMasterKeyRequestBody struct {
	Password string `json:"password"`
}

type CreateSourceRequest

type CreateSourceRequest struct {
	Location string `json:"location"`
}

type InitialSystemBootstrapRequestBody

type InitialSystemBootstrapRequestBody struct {
	ReflectorToken string `json:"reflectorToken"`
	ReflectorHost  string `json:"reflectorHost"`
	InitialSSHKey  string `json:"initialSSHKey"`
}

type InstallPupRequest

type InstallPupRequest struct {
	PupName      string `json:"pupName"`
	PupVersion   string `json:"pupVersion"`
	SourceId     string `json:"sourceId"`
	SessionToken string
}

type InstallToDiskRequest

type InstallToDiskRequest struct {
	Disk   string `json:"disk"`
	Secret string `json:"secret"`
}

type InternalRouter

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

func (InternalRouter) Run

func (t InternalRouter) Run(started, stopped chan bool, stop chan context.Context) error

func (InternalRouter) ServeHTTP

func (t InternalRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Session

type Session struct {
	Token      string
	Expiration time.Time
	DKM_TOKEN  string
}

type SetHostnameRequestBody

type SetHostnameRequestBody struct {
	Hostname string `json:"hostname"`
}

type SetKeyMapRequestBody

type SetKeyMapRequestBody struct {
	KeyMap string `json:"keyMap"`
}

type SetSSHStateRequest

type SetSSHStateRequest struct {
	Enabled string `json:"enabled"`
}

type SetStorageDeviceRequestBody

type SetStorageDeviceRequestBody struct {
	StorageDevice string `json:"storageDevice"`
}

type StoreListSourceEntry

type StoreListSourceEntry struct {
	Name        string                             `json:"name"`
	Description string                             `json:"description"`
	Location    string                             `json:"location"`
	Type        string                             `json:"type"`
	LastChecked string                             `json:"lastChecked"`
	Pups        map[string]StoreListSourceEntryPup `json:"pups"`
}

type StoreListSourceEntryPup

type StoreListSourceEntryPup struct {
	LatestVersion string                          `json:"latestVersion"`
	LogoBase64    string                          `json:"logoBase64"`
	Versions      map[string]dogeboxd.PupManifest `json:"versions"`
}

type WSCONN

type WSCONN struct {
	WS   *websocket.Conn
	Stop chan bool
}

Represents a websocket connection from a client

func (*WSCONN) Close

func (t *WSCONN) Close()

func (*WSCONN) IsClosed

func (t *WSCONN) IsClosed() bool

type WSRelay

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

func NewWSRelay

func NewWSRelay(config dogeboxd.ServerConfig, relay chan dogeboxd.Change) WSRelay

func (WSRelay) GetWSHandler

func (t WSRelay) GetWSHandler(initialPayloader func() any) *websocket.Server

func (WSRelay) Run

func (t WSRelay) Run(started, stopped chan bool, stop chan context.Context) error

Jump to

Keyboard shortcuts

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