Documentation ¶
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 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 CreateContainerGET(c echo.Context, a *server.App) error
- func CreateContainerPOST(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 PostDeploy(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 HumanReadableContainer
- type HumanReadableContainerImage
- type InfoResponse
- type MapOperation
- type NoDirFile
- type NoDirFileSys
- type RollbackStep
- type Sessions
- 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 = 1024 * 1024 * 1024 // 1GB
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 CompareGordonToken ¶
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 CreateContainerGET ¶
CreateContainerRoute is the route for creating a new container
func CreateContainerPOST ¶
CreateContainerPOST handles the create container form submission
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 PostDeploy ¶
func RenderLoginPage ¶
RenderLoginPage renders the login.html template
func StartOAuthGithub ¶
StartOAuthGithub starts the Github OAuth flow.
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 HumanReadableContainer ¶
type InfoResponse ¶
func (*InfoResponse) Populate ¶
func (info *InfoResponse) Populate(a *server.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 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 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