web

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FoundationPupCollections = map[string][]CollectionPup{
	"core": {
		{
			Name:     "Dogecoin Core",
			Version:  "0.0.7",
			SourceId: "dogeorg.pups",
		},
	},
	"essentials": {
		{
			Name:     "Dogecoin Core",
			Version:  "0.0.7",
			SourceId: "dogeorg.pups",
		},
		{
			Name:     "Dogenet",
			Version:  "0.0.2",
			SourceId: "dogeorg.pups",
		},
		{
			Name:     "Dogemap",
			Version:  "0.0.2",
			SourceId: "dogeorg.pups",
		},
		{
			Name:     "Identity",
			Version:  "0.0.3",
			SourceId: "dogeorg.pups",
		},
	},
	"custom": {},
}

FoundationPupCollections maps collection names to their respective pups

Functions

func GetJobLogHandler added in v0.8.0

func GetJobLogHandler(JobID string, dbx dogeboxd.Dogeboxd) (*websocket.Server, error)

GetJobLogHandler creates a WebSocket handler for streaming job logs Uses the same log streaming mechanism as pup logs (ActionLogger)

func GetLogHandler

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

Types

type AddBinaryCacheRequest

type AddBinaryCacheRequest struct {
	Host string `json:"host"`
	Key  string `json:"key"`
}

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 {
	HasGeneratedKey                  bool `json:"hasGeneratedKey"`
	HasConfiguredNetwork             bool `json:"hasConfiguredNetwork"`
	HasCompletedInitialConfiguration bool `json:"hasCompletedInitialConfiguration"`
}

type BootstrapFlags

type BootstrapFlags struct {
	IsFirstTimeWelcomeComplete bool `json:"isFirstTimeWelcomeComplete"`
	IsDeveloperMode            bool `json:"isDeveloperMode"`
}

type BootstrapRecoveryResponse

type BootstrapRecoveryResponse struct {
	RecoveryFacts RecoveryFacts `json:"recoveryFacts"`
}

type BootstrapResponse

type BootstrapResponse struct {
	TS                 int64                        `json:"ts"`
	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"`
	Flags              BootstrapFlags               `json:"flags"`
	SetupFacts         BootstrapFacts               `json:"setupFacts"`
	SidebarPreferences SidebarPreferencesResponse   `json:"sidebarPreferences"`
}

type ChangePasswordRequestBody

type ChangePasswordRequestBody struct {
	CurrentPassword string `json:"current_password"`
	Seedphrase      string `json:"seedphrase"`
	NewPassword     string `json:"new_password"`
}

type CollectionPup

type CollectionPup struct {
	Name     string
	Version  string
	SourceId string
}

CollectionPup represents a pup that belongs to a collection

type CommenceUpdateRequest added in v0.8.0

type CommenceUpdateRequest struct {
	Package string `json:"package"`
	Version string `json:"version"`
}

type CreateMasterKeyRequestBody

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

type CreateSourceRequest

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

type GetCustomNixResponse added in v0.9.0

type GetCustomNixResponse struct {
	Content string `json:"content"`
	Exists  bool   `json:"exists"`
}

type InitialSystemBootstrapRequestBody

type InitialSystemBootstrapRequestBody struct {
	ReflectorToken              string `json:"reflectorToken"`
	ReflectorHost               string `json:"reflectorHost"`
	InitialSSHKey               string `json:"initialSSHKey"`
	UseFoundationOSBinaryCache  bool   `json:"useFoundationOSBinaryCache"`
	UseFoundationPupBinaryCache bool   `json:"useFoundationPupBinaryCache"`
}

type InstallPupCollectionRequest

type InstallPupCollectionRequest struct {
	CollectionName string `json:"collectionName"`
}

type InstallPupRequest

type InstallPupRequest struct {
	PupName                 string `json:"pupName"`
	PupVersion              string `json:"pupVersion"`
	SourceId                string `json:"sourceId"`
	SessionToken            string
	AutoInstallDependencies bool `json:"autoInstallDependencies"`
	EnableDevMode           bool `json:"installWithDevModeEnabled"`
}

type InstallPupsRequest

type InstallPupsRequest struct {
	Pups []InstallPupRequest `json:"pups"`
}

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 PackageInfo added in v0.8.0

type PackageInfo struct {
	Name           string              `json:"name"`
	CurrentVersion string              `json:"currentVersion"`
	LatestUpdate   string              `json:"latestUpdate"`
	Updates        []UpgradableRelease `json:"updates"`
}

type RecoveryFacts

type RecoveryFacts struct {
	InstallationBootMedia dogeboxd.BootstrapInstallationBootMedia `json:"installationBootMedia"`
	InstallationState     dogeboxd.BootstrapInstallationState     `json:"installationState"`
}

type SaveCustomNixRequest added in v0.9.0

type SaveCustomNixRequest struct {
	Content string `json:"content"`
}

type ServiceInfo added in v0.9.0

type ServiceInfo struct {
	ID         string        `json:"id"`
	Name       string        `json:"name"`
	Configured bool          `json:"configured"`
	Status     ServiceStatus `json:"status,omitempty"`
}

ServiceInfo represents an external service's status

type ServiceStatus added in v0.9.0

type ServiceStatus struct {
	IP        string `json:"ip,omitempty"`
	Connected bool   `json:"connected"`
	Hostname  string `json:"hostname,omitempty"`
}

ServiceStatus holds service-specific status information

type ServicesResponse added in v0.9.0

type ServicesResponse struct {
	Available []ServiceInfo `json:"available"`
}

ServicesResponse represents the list of available external services

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 bool `json:"enabled"`
}

type SetStorageDeviceRequestBody

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

type SetTimezoneRequestBody added in v0.9.0

type SetTimezoneRequestBody struct {
	Timezone string `json:"timezone"`
}

type SidebarPreferencesResponse added in v0.9.0

type SidebarPreferencesResponse struct {
	SidebarPups []string `json:"sidebarPups"`
}

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"`
	Error       string                             `json:"error,omitempty"`
}

type StoreListSourceEntryPup

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

type SystemStatMetric added in v0.9.0

type SystemStatMetric struct {
	Label   string    `json:"label"`
	Type    string    `json:"type"`
	Values  []float64 `json:"values"`
	Current float64   `json:"current"`
	Total   uint64    `json:"total,omitempty"` // For RAM/Disk in MB
	Used    uint64    `json:"used,omitempty"`  // For RAM/Disk in MB
}

type SystemStats added in v0.9.0

type SystemStats struct {
	CPU  SystemStatMetric `json:"cpu"`
	RAM  SystemStatMetric `json:"ram"`
	Disk SystemStatMetric `json:"disk"`
}

SystemStats represents system-level resource usage

type TailscaleStatus added in v0.9.0

type TailscaleStatus struct {
	BackendState string `json:"BackendState"`
	Self         struct {
		DNSName      string   `json:"DNSName"`
		TailscaleIPs []string `json:"TailscaleIPs"`
		Online       bool     `json:"Online"`
		HostName     string   `json:"HostName"`
	} `json:"Self"`
}

TailscaleStatus represents the JSON output from `tailscale status --json`

type UpdatesResponse added in v0.8.0

type UpdatesResponse struct {
	Packages map[string]PackageInfo `json:"packages"`
}

type UpgradableRelease added in v0.8.0

type UpgradableRelease struct {
	Version    string `json:"version"`
	ReleaseURL string `json:"releaseURL"`
	Summary    string `json:"summary"`
}

type UpgradePupRequest added in v0.9.0

type UpgradePupRequest struct {
	TargetVersion string `json:"targetVersion"`
}

UpgradePupRequest is the request body for the upgrade endpoint

type ValidateCustomNixRequest added in v0.9.0

type ValidateCustomNixRequest struct {
	Content string `json:"content"`
}

type ValidateCustomNixResponse added in v0.9.0

type ValidateCustomNixResponse struct {
	Valid bool   `json:"valid"`
	Error string `json:"error,omitempty"`
}

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