handlers

package
v0.6.4-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocsServer

func DocsServer(contentFS fs.FS) http.Handler

func GetBrickPortInfoByID

func GetBrickPortInfoByID(bricks []app.Brick, bricksIndex *bricksindex.BricksIndex) (map[string]BrickPortInfo, error)

func HandleAppBrickInstanceDetails

func HandleAppBrickInstanceDetails(
	brickService *bricks.Service,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleAppBrickInstancesList

func HandleAppBrickInstancesList(
	brickService *bricks.Service,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleAppClone

func HandleAppClone(
	dockerClient command.Cli,
	idProvider *app.IDProvider,
	cfg config.Configuration,
) http.HandlerFunc

func HandleAppCreate

func HandleAppCreate(
	idProvider *app.IDProvider,
	cfg config.Configuration,
) http.HandlerFunc

func HandleAppDelete

func HandleAppDelete(idProvider *app.IDProvider) http.HandlerFunc

func HandleAppDetails

func HandleAppDetails(
	dockerClient command.Cli,
	bricksIndex *bricksindex.BricksIndex,
	idProvider *app.IDProvider,
	cfg config.Configuration,
) http.HandlerFunc

func HandleAppDetailsEdits

func HandleAppDetailsEdits(
	dockerClient command.Cli,
	bricksIndex *bricksindex.BricksIndex,
	idProvider *app.IDProvider,
	cfg config.Configuration,
) http.HandlerFunc

func HandleAppList

func HandleAppList(
	dockerCli command.Cli,
	idProvider *app.IDProvider,
	cfg config.Configuration,
) http.HandlerFunc

func HandleAppLogs

func HandleAppLogs(
	dockerClient command.Cli,
	idProvider *app.IDProvider,
	staticStore *store.StaticStore,
) http.HandlerFunc

func HandleAppPorts

func HandleAppPorts(
	bricksIndex *bricksindex.BricksIndex,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleAppStart

func HandleAppStart(
	dockerCli command.Cli,
	provisioner *orchestrator.Provision,
	modelsIndex *modelsindex.ModelsIndex,
	bricksIndex *bricksindex.BricksIndex,
	idProvider *app.IDProvider,
	cfg config.Configuration,
	staticStore *store.StaticStore,
) http.HandlerFunc

func HandleAppStop

func HandleAppStop(
	dockerClient command.Cli,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleBrickCreate

func HandleBrickCreate(
	brickService *bricks.Service,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleBrickDelete

func HandleBrickDelete(
	brickService *bricks.Service,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleBrickDetails

func HandleBrickDetails(brickService *bricks.Service) http.HandlerFunc

func HandleBrickList

func HandleBrickList(brickService *bricks.Service) http.HandlerFunc

func HandleBrickUpdates

func HandleBrickUpdates(
	brickService *bricks.Service,
	idProvider *app.IDProvider,
) http.HandlerFunc

func HandleCheckUpgradable

func HandleCheckUpgradable(updater *update.Manager) http.HandlerFunc

func HandleConfig

func HandleConfig(cfg config.Configuration) http.HandlerFunc

func HandleLibraryList

func HandleLibraryList(target *url.URL, version string) http.Handler

HandleLibraryList is a proxy to the List libraries API

func HandleModelsList

func HandleModelsList(modelsIndex *modelsindex.ModelsIndex) http.HandlerFunc

func HandleMonitorWS

func HandleMonitorWS(allowedOrigins []string) http.HandlerFunc

func HandlePropertyDelete

func HandlePropertyDelete(cfg config.Configuration) http.HandlerFunc

func HandlePropertyGet

func HandlePropertyGet(cfg config.Configuration) http.HandlerFunc

func HandlePropertyKeys

func HandlePropertyKeys(cfg config.Configuration) http.HandlerFunc

func HandlePropertyUpsert

func HandlePropertyUpsert(cfg config.Configuration) http.HandlerFunc

func HandleSketchAddLibrary

func HandleSketchAddLibrary(idProvider *app.IDProvider) http.HandlerFunc

func HandleSketchListLibraries

func HandleSketchListLibraries(idProvider *app.IDProvider) http.HandlerFunc

func HandleSketchRemoveLibrary

func HandleSketchRemoveLibrary(idProvider *app.IDProvider) http.HandlerFunc

func HandleSystemResources

func HandleSystemResources() http.HandlerFunc

func HandleUpdateApply

func HandleUpdateApply(updater *update.Manager) http.HandlerFunc

func HandleUpdateEvents

func HandleUpdateEvents(updater *update.Manager) http.HandlerFunc

func HandlerAppStatus

func HandlerAppStatus(
	dockerCli command.Cli,
	idProvider *app.IDProvider,
	cfg config.Configuration,
) http.HandlerFunc

func HandlerModelByID

func HandlerModelByID(modelsIndex *modelsindex.ModelsIndex) http.HandlerFunc

func HandlerVersion

func HandlerVersion(version string) http.HandlerFunc

Types

type AppListResponse

type AppListResponse struct {
	Apps       []orchestrator.AppInfo       `json:"apps" description:"List of applications"`
	BrokenApps []orchestrator.BrokenAppInfo `json:"broken_apps,omitempty" description:"List of applications that are broken and couldn't be parsed"`
}

type AppPortResponse

type AppPortResponse struct {
	Ports []port `json:"ports" example:"80" description:"exposed port of the app"`
}

type BrickPortInfo

type BrickPortInfo struct {
	Ports           []string
	RequiresDisplay string
}

type CloneRequest

type CloneRequest struct {
	Name *string `json:"name" description:"application name" example:"My Awesome App"`
	Icon *string `json:"icon" description:"application icon"`
}

type CreateAppRequest

type CreateAppRequest struct {
	Name        string `json:"name" description:"application name" example:"My Awesome App" required:"true"`
	Icon        string `json:"icon" description:"application icon" `
	Description string `json:"description" description:"application description" `
}

type EditRequest

type EditRequest struct {
	Name        *string `json:"name" example:"My Awesome App" description:"application name"`
	Icon        *string `json:"icon" example:"💻" description:"application icon"`
	Description *string `json:"description" example:"This is my awesome app" description:"application description"`
	Default     *bool   `json:"default"`
}

type Library

type Library struct {
	Name string `json:"name"`
	ID   string `json:"id"`

	Repository *struct {
		URL       string `json:"url"`
		Stars     int    `json:"stars"`
		Forks     int    `json:"forks"`
		UpdatedAt string `json:"updated_at"`
	} `json:"repository"`
	Website string `json:"website"`
	License string `json:"license"`

	Platform      *string  `json:"platform"`
	Architectures []string `json:"architectures"`
	Types         []string `json:"types"`
	Category      string   `json:"category"`

	Maintainer string `json:"maintainer"`
	Author     string `json:"author"`
	Sentence   string `json:"sentence"`
	Paragraph  string `json:"paragraph"`

	Includes     []string `json:"includes"`
	Dependencies []struct {
		Name string `json:"name"`
	} `json:"dependencies"`

	ExampleCount int `json:"example_count"`

	Releases []struct {
		ID      string `json:"id"`
		Version string `json:"version"`
	} `json:"releases"`
}

type LibraryListResponse

type LibraryListResponse struct {
	Libraries  []Library  `json:"libraries"`
	Pagination Pagination `json:"pagination"`
}

NOTE: this is only to generate the openapi docs.

type Pagination

type Pagination struct {
	TotalPages int `json:"total_pages"`
	TotalItems int `json:"total_items"`
	Page       int `json:"page"`
	PerPage    int `json:"per_page"`
	NextPage   int `json:"next_page"`
	PrevPage   int `json:"prev_page"`
}

type SketchAddLibraryResponse

type SketchAddLibraryResponse struct {
	AddedLibraries []orchestrator.LibraryReleaseID `json:"libraries"`
}

NOTE: this is only to generate the openapi docs.

type SketchListLibraryResponse

type SketchListLibraryResponse struct {
	Libraries []orchestrator.LibraryReleaseID `json:"libraries"`
}

NOTE: this is only to generate the openapi docs.

type SketchRemoveLibraryResponse

type SketchRemoveLibraryResponse struct {
	RemovedLibraries []orchestrator.LibraryReleaseID `json:"libraries"`
}

NOTE: this is only to generate the openapi docs.

type UpdateCheckResult

type UpdateCheckResult struct {
	Packages []update.UpgradablePackage `json:"updates"`
}

type VersionResponse

type VersionResponse struct {
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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