Documentation
¶
Overview ¶
endpoint_deploy.go
endpoint_helpers.go
endpoint_push.go
Index ¶
- Constants
- func ActionSuccess(a *server.App) string
- func AdminManagerRoute(c echo.Context, a *server.App) error
- func AdminRoute(c echo.Context, a *server.App) error
- func CheckDeployConflict(c echo.Context, a *server.App) error
- func CompareGordonToken(c echo.Context, a *server.App) error
- func ContainerManagerComponent(c echo.Context, a *server.App) error
- func ContainerManagerDelete(c echo.Context, a *server.App) error
- func ContainerManagerEditGET(c echo.Context, a *server.App) error
- func ContainerManagerEditPOST(c echo.Context, a *server.App) error
- func ContainerManagerStart(c echo.Context, a *server.App) error
- func ContainerManagerStop(c echo.Context, a *server.App) error
- func CreateContainerFullGET(c echo.Context, a *server.App) error
- func CreateContainerGET(c echo.Context, a *server.App) error
- func CreateContainerPOST(c echo.Context, a *server.App) error
- func DeviceCodeRequest(c echo.Context, a *server.App) error
- func DeviceTokenRequest(c echo.Context, a *server.App) error
- func FromShortIDToImageID(ShortID string) (string, error)
- func GetInfos(c echo.Context, a *server.App) error
- func GetLocalizedData(c echo.Context, a *server.App) (map[string]interface{}, error)
- func ImageManagerComponent(c echo.Context, a *server.App) error
- func ImageManagerDelete(c echo.Context, a *server.App) error
- func IsAccountIDInDB(a *server.App, accountID string) (bool, error)
- func IsSessionExpiredInDB(a *server.App, accountID string, sessionID string) (bool, error)
- func Logout(c echo.Context, a *server.App) error
- func OAuthCallback(c echo.Context, a *server.App) error
- func PostContainerRemove(c echo.Context, a *server.App) error
- func PostContainerStop(c echo.Context, a *server.App) error
- func PostDeploy(c echo.Context, a *server.App) error
- func PostDeployChunked(c echo.Context, a *server.App) error
- func PostPush(c echo.Context, a *server.App) error
- func PostPushChunked(c echo.Context, a *server.App) error
- func RenderLoginPage(c echo.Context, a *server.App) error
- func StartOAuthGithub(c echo.Context, a *server.App) error
- func StaticRoute(c echo.Context, a *server.App) error
- func UploadImageGETHandler(c echo.Context, a *server.App) error
- func UploadImagePOSTHandler(c echo.Context, a *server.App) error
- func ValidateSessionAndUser(c echo.Context, a *server.App) error
- type ChunkMetadata
- type ChunkStore
- type ConflictCheckResponse
- type DeployResponse
- type HumanReadableContainer
- type HumanReadableContainerImage
- type InfoResponse
- type MapOperation
- type NoDirFile
- type NoDirFileSys
- type PushResponse
- type RemoveResponse
- type RollbackStep
- type Sessions
- type StopResponse
- type TransactionQueue
- type TransactionStep
- func CreateNewContainerStep(tq *TransactionQueue, cmdParams docker.ContainerCommandParams) TransactionStep
- func RemoveOldContainerStep(tq *TransactionQueue) TransactionStep
- func RenameNewContainerStep(tq *TransactionQueue) TransactionStep
- func StartNewContainerStep(tq *TransactionQueue) TransactionStep
- func StopOldContainerStep(tq *TransactionQueue) TransactionStep
Constants ¶
const MaxUploadSize = 10 * 1024 * 1024 * 1024 // 10GB
10G
Variables ¶
This section is empty.
Functions ¶
func ActionSuccess ¶
ActionSuccess returns the success HTML fragment
func AdminManagerRoute ¶
AdminManagerRoute is the route of the manager page
func AdminRoute ¶
AdminRoute is the route for the admin panel
func CheckDeployConflict ¶ added in v0.1.15
func CompareGordonToken ¶
ClLI : compareGordonToken compares the token from the URL query parameter with the one from the config.yml
func ContainerManagerComponent ¶
ContainerManagerComponent handles the /container-manager route
func ContainerManagerDelete ¶
ContainerManagerDelete handles the /container-manager/delete route
func ContainerManagerEditGET ¶
ContainerManagerEditGET displays the edit container view
func ContainerManagerEditPOST ¶
ContainerManagerEditPOST handles the edit container form submission
func ContainerManagerStart ¶
ContainerManagerStart handles the /container-manager/start route
func ContainerManagerStop ¶
ContainerManagerStop handles the /container-manager/stop route
func CreateContainerFullGET ¶
CreateContainerFullGET handles the full HTML page for creating a new container
func CreateContainerGET ¶
CreateContainerRoute is the route for creating a new container
func CreateContainerPOST ¶
CreateContainerPOST handles the create container form submission
func DeviceCodeRequest ¶
func DeviceTokenRequest ¶
func FromShortIDToImageID ¶
FromShortIDToImageID converts a short image ID to a full image ID
func GetLocalizedData ¶
GetLocalizedData returns the data for the localization
func ImageManagerComponent ¶
ImageManagerComponent handles the /image-manager route (HTMX route)
func ImageManagerDelete ¶
ImageManagerDelete handles the /image-manager/delete route
func IsSessionExpiredInDB ¶
func OAuthCallback ¶
OAuthCallback handles the callback response from Github OAuth
func PostContainerRemove ¶ added in v0.1.14
PostContainerRemove handles the container remove request
func PostContainerStop ¶ added in v0.1.14
PostContainerStop handles the container stop request
func PostDeploy ¶
PostDeploy handles the container deployment request
func PostDeployChunked ¶ added in v0.1.15
PostDeployChunked handles the chunked container deployment request
func PostPushChunked ¶ added in v0.1.15
PostPushChunked handles chunked (large) image pushes
func RenderLoginPage ¶
RenderLoginPage renders the login.html template
func StartOAuthGithub ¶
func StaticRoute ¶
StaticRoute serves static files from the embedded filesystem
func UploadImageGETHandler ¶
UploadImageHandler handles the /upload-image route to show the form
func UploadImagePOSTHandler ¶
UploadImageHandler handles the /upload-image
func ValidateSessionAndUser ¶
Types ¶
type ChunkMetadata ¶ added in v0.1.15
type ChunkMetadata common.ChunkMetadata
type ChunkStore ¶ added in v0.1.15
type ChunkStore struct {
// contains filtered or unexported fields
}
type ConflictCheckResponse ¶ added in v0.1.15
type ConflictCheckResponse = common.ConflictCheckResponse
type DeployResponse ¶
type DeployResponse = common.DeployResponse
type HumanReadableContainer ¶
type InfoResponse ¶
func (*InfoResponse) Populate ¶
func (info *InfoResponse) Populate(a *server.App)
Populate fills the InfoResponse struct with data from the App
type MapOperation ¶
type MapOperation string
const ( Fetch MapOperation = "Fetch" Update MapOperation = "Update" Delete MapOperation = "Delete" )
type NoDirFileSys ¶
type NoDirFileSys struct {
// contains filtered or unexported fields
}
NoDirFileSys restricts directory listing
type PushResponse ¶
type PushResponse = common.PushResponse
type RemoveResponse ¶ added in v0.1.14
type RemoveResponse = common.RemoveResponse
type RollbackStep ¶
type RollbackStep func() error
func RemoveNewContainerRollback ¶
func RemoveNewContainerRollback(tq *TransactionQueue) RollbackStep
RemoveNewContainerRollback removes the new container if the transaction fails
func RenameNewContainerRollback ¶
func RenameNewContainerRollback(tq *TransactionQueue) RollbackStep
RenameNewContainerRollback renames the new container back to the temporary name if it fails
func StartOldContainerRollback ¶
func StartOldContainerRollback(tq *TransactionQueue) RollbackStep
StartOldContainerRollback starts the old container if the transaction fails
func StopNewContainerRollback ¶
func StopNewContainerRollback(tq *TransactionQueue) RollbackStep
StopNewContainerRollback stops the new container if the transaction fails
type StopResponse ¶ added in v0.1.14
type StopResponse = common.StopResponse
type TransactionQueue ¶
type TransactionQueue struct { NewContainerID string NewContainerName string TempContainerName string OldContainerID string OldContainerName string // contains filtered or unexported fields }
func (*TransactionQueue) Add ¶
func (tq *TransactionQueue) Add(step TransactionStep, rollback RollbackStep)
func (*TransactionQueue) Execute ¶
func (tq *TransactionQueue) Execute() error
type TransactionStep ¶
type TransactionStep func() error
func CreateNewContainerStep ¶
func CreateNewContainerStep(tq *TransactionQueue, cmdParams docker.ContainerCommandParams) TransactionStep
CreateNewContainerStep creates a new container with the given parameters
func RemoveOldContainerStep ¶
func RemoveOldContainerStep(tq *TransactionQueue) TransactionStep
RemoveOldContainerStep removes the old container
func RenameNewContainerStep ¶
func RenameNewContainerStep(tq *TransactionQueue) TransactionStep
RenameNewContainerStep renames the new temporary container to the original name
func StartNewContainerStep ¶
func StartNewContainerStep(tq *TransactionQueue) TransactionStep
StartNewContainerStep starts the new container
func StopOldContainerStep ¶
func StopOldContainerStep(tq *TransactionQueue) TransactionStep
StopOldContainerStep stops the old container