apiController

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: EPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountController

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

func (*AccountController) Create

func (controller *AccountController) Create(c echo.Context) error

CreateAccount godoc @Summary CreateAccount @Description Create a new account. @Tags account @Accept json @Produce json @Security Bearer @Param createAccountDto body dto.CreateAccount true "All props are required." @Success 201 {object} object{} "AccountCreated" @Router /v1/account/ [post]

func (*AccountController) CreateSecureAccessPublicKey added in v0.1.7

func (controller *AccountController) CreateSecureAccessPublicKey(c echo.Context) error

CreateSecureAccessPublicKey godoc @Summary CreateSecureAccessPublicKey @Description Create a new secure access public key. @Tags account @Accept json @Produce json @Security Bearer @Param createSecureAccessPublicKey body dto.CreateSecureAccessPublicKey true "'name' is optional. Will only become required if there is no name in 'content'. If the 'name' is provided, it will overwrite the name in the 'content'." @Success 201 {object} object{} "SecureAccessPublicKeyCreated" @Router /v1/account/secure-access-public-key/ [post]

func (*AccountController) Delete

func (controller *AccountController) Delete(c echo.Context) error

DeleteAccount godoc @Summary DeleteAccount @Description Delete an account. @Tags account @Accept json @Produce json @Security Bearer @Param accountId path string true "AccountId to delete." @Success 200 {object} object{} "AccountDeleted" @Router /v1/account/{accountId}/ [delete]

func (*AccountController) DeleteSecureAccessPublicKey added in v0.1.7

func (controller *AccountController) DeleteSecureAccessPublicKey(c echo.Context) error

DeleteSecureAccessPublicKey godoc @Summary DeleteSecureAccessPublicKey @Description Delete a secure access public key. @Tags account @Accept json @Produce json @Security Bearer @Param secureAccessPublicKeyId path string true "SecureAccessPublicKeyId to delete." @Success 200 {object} object{} "SecureAccessPublicKeyDeleted" @Router /v1/account/secure-access-public-key/{secureAccessPublicKeyId}/ [delete]

func (*AccountController) Read

func (controller *AccountController) Read(c echo.Context) error

ReadAccounts godoc @Summary ReadAccounts @Description List accounts. @Tags account @Accept json @Produce json @Security Bearer @Param id query string false "Id" @Param username query string false "Username" @Param shouldIncludeSecureAccessPublicKeys query bool false "ShouldIncludeSecureAccessPublicKeys (only works if OpenSSH service is installed)" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadAccountsResponse @Router /v1/account/ [get]

func (*AccountController) Update

func (controller *AccountController) Update(c echo.Context) error

UpdateAccount godoc @Summary UpdateAccount @Description Update an account. @Tags account @Accept json @Produce json @Security Bearer @Param updateDto body dto.UpdateAccount true "Only id or username is required." @Success 200 {object} object{} "'AccountUpdated' message or new API key in string format" @Router /v1/account/ [put]

type AuthenticationController added in v0.1.2

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

func NewAuthenticationController added in v0.1.2

func NewAuthenticationController(
	persistentDbSvc *internalDbInfra.PersistentDatabaseService,
	trailDbSvc *internalDbInfra.TrailDatabaseService,
) *AuthenticationController

func (*AuthenticationController) Login added in v0.1.2

func (controller *AuthenticationController) Login(c echo.Context) error

CreateSessionTokenWithCredentials godoc @Summary CreateSessionTokenWithCredentials @Description Create a new session token with the provided credentials. @Tags auth @Accept json @Produce json @Param createSessionToken body dto.CreateSessionToken true "CreateSessionToken" @Success 200 {object} entity.AccessToken @Failure 401 {object} string @Router /v1/auth/login/ [post]

type CronController

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

func NewCronController

func NewCronController(
	trailDbSvc *internalDbInfra.TrailDatabaseService,
) *CronController

func (*CronController) Create

func (controller *CronController) Create(c echo.Context) error

CreateCron godoc @Summary CreateCron @Description Create a new cron. @Tags cron @Accept json @Produce json @Security Bearer @Param createCronDto body dto.CreateCron true "comment is optional." @Success 201 {object} object{} "CronCreated" @Router /v1/cron/ [post]

func (*CronController) Delete

func (controller *CronController) Delete(c echo.Context) error

DeleteCron godoc @Summary DeleteCron @Description Delete a cron. @Tags cron @Accept json @Produce json @Security Bearer @Param cronId path string true "CronId to delete." @Success 200 {object} object{} "CronDeleted" @Router /v1/cron/{cronId}/ [delete]

func (*CronController) Read

func (controller *CronController) Read(c echo.Context) error

ReadCrons godoc @Summary ReadCrons @Description List crons. @Tags cron @Accept json @Produce json @Security Bearer @Param id query uint false "Id" @Param comment query string false "Comment" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadCronsResponse @Router /v1/cron/ [get]

func (*CronController) Update

func (controller *CronController) Update(c echo.Context) error

UpdateCron godoc @Summary UpdateCron @Description Update a cron. @Tags cron @Accept json @Produce json @Security Bearer @Param updateCronDto body dto.UpdateCron true "Only id is required." @Success 200 {object} object{} "CronUpdated message" @Router /v1/cron/ [put]

type DatabaseController

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

func NewDatabaseController

func NewDatabaseController(
	persistentDbService *internalDbInfra.PersistentDatabaseService,
	trailDbSvc *internalDbInfra.TrailDatabaseService,
) *DatabaseController

func (*DatabaseController) Create

func (controller *DatabaseController) Create(c echo.Context) error

CreateDatabase godoc @Summary CreateDatabase @Description Create a new database. @Tags database @Accept json @Produce json @Security Bearer @Param dbType path string true "DatabaseType (like mysql, postgres)" @Param createDatabaseDto body dto.CreateDatabase true "All props are required." @Success 201 {object} object{} "DatabaseCreated" @Router /v1/database/{dbType}/ [post]

func (*DatabaseController) CreateUser

func (controller *DatabaseController) CreateUser(c echo.Context) error

CreateDatabaseUser godoc @Summary CreateDatabaseUser @Description Create a new database user. @Tags database @Accept json @Produce json @Security Bearer @Param dbType path string true "DatabaseType (like mysql, postgres)" @Param dbName path string true "DatabaseName" @Param createDatabaseUserDto body dto.CreateDatabaseUser true "privileges is optional. When not provided, privileges will be 'ALL'." @Success 201 {object} object{} "DatabaseUserCreated" @Router /v1/database/{dbType}/{dbName}/user/ [post]

func (*DatabaseController) Delete

func (controller *DatabaseController) Delete(c echo.Context) error

DeleteDatabase godoc @Summary DeleteDatabase @Description Delete a database. @Tags database @Accept json @Produce json @Security Bearer @Param dbType path string true "DatabaseType (like mysql, postgres)" @Param dbName path string true "DatabaseName" @Success 200 {object} object{} "DatabaseDeleted" @Router /v1/database/{dbType}/{dbName}/ [delete]

func (*DatabaseController) DeleteUser

func (controller *DatabaseController) DeleteUser(c echo.Context) error

DeleteDatabaseUser godoc @Summary DeleteDatabaseUser @Description Delete a database user. @Tags database @Accept json @Produce json @Security Bearer @Param dbType path string true "DatabaseType (like mysql, postgres)" @Param dbName path string true "DatabaseName" @Param dbUser path string true "DatabaseUsername to delete." @Success 200 {object} object{} "DatabaseUserDeleted" @Router /v1/database/{dbType}/{dbName}/user/{dbUser}/ [delete]

func (*DatabaseController) Read

func (controller *DatabaseController) Read(c echo.Context) error

GetDatabases godoc @Summary GetDatabases @Description List databases names, users and sizes. @Tags database @Security Bearer @Accept json @Produce json @Param dbType path string true "DatabaseType (like mysql, postgres)" @Success 200 {array} entity.Database @Router /v1/database/{dbType}/ [get]

type FilesController added in v0.1.5

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

func NewFilesController added in v0.1.5

func NewFilesController(
	trailDbSvc *internalDbInfra.TrailDatabaseService,
) *FilesController

func (*FilesController) Compress added in v0.1.5

func (controller *FilesController) Compress(c echo.Context) error

CompressFiles godoc @Summary CompressFiles @Description Compress directories and files. @Tags files @Accept json @Produce json @Security Bearer @Param compressFilesDto body dto.CompressUnixFiles true "All props are required." @Success 200 {object} object{} "FilesCompressed" @Success 207 {object} object{} "FilesArePartialCompressed" @Router /v1/files/compress/ [post]

func (*FilesController) Copy added in v0.1.5

func (controller *FilesController) Copy(c echo.Context) error

CopyFile godoc @Summary CopyFile @Description Copy a dir/file. @Tags files @Accept json @Produce json @Security Bearer @Param copyFileDto body dto.CopyUnixFile true "All props are required." @Success 201 {object} object{} "FileCopied" @Router /v1/files/copy/ [post]

func (*FilesController) Create added in v0.1.5

func (controller *FilesController) Create(c echo.Context) error

CreateFile godoc @Summary CreateNewFile @Description Create a new dir/file. @Tags files @Accept json @Produce json @Security Bearer @Param createFileDto body dto.CreateUnixFile true "permissions is optional. When not provided, permissions will be '644' for files and '755' for directories." @Success 201 {object} object{} "FileCreated/DirectoryCreated" @Router /v1/files/ [post]

func (*FilesController) Delete added in v0.1.5

func (controller *FilesController) Delete(c echo.Context) error

DeleteFiles godoc @Summary DeleteFiles @Description Delete one or more directories/files. @Tags files @Accept json @Produce json @Security Bearer @Param sourcePaths body []string true "FilePaths to deleted." @Success 200 {object} object{} "FilesDeleted" @Router /v1/files/delete/ [put]

func (*FilesController) Download added in v0.1.5

func (controller *FilesController) Download(c echo.Context) error

DownloadFile godoc @Summary DownloadFile @Description Download a file. @Tags files @Accept json @Produce octet-stream @Security Bearer @Param sourcePath query string true "SourcePath" @Success 200 {file} file @Router /v1/files/download/ [get]

func (*FilesController) Extract added in v0.1.5

func (controller *FilesController) Extract(c echo.Context) error

ExtractFiles godoc @Summary ExtractFiles @Description Extract directories and files. @Tags files @Accept json @Produce json @Security Bearer @Param extractFilesDto body dto.ExtractUnixFiles true "All props are required." @Success 200 {object} object{} "FilesExtracted" @Router /v1/files/extract/ [put]

func (*FilesController) Read added in v0.1.5

func (controller *FilesController) Read(c echo.Context) error

ReadFiles godoc @Summary ReadFiles @Description List dir/files. @Tags files @Accept json @Produce json @Security Bearer @Param sourcePath query string true "SourcePath" @Success 200 {array} entity.UnixFile @Router /v1/files/ [get]

func (*FilesController) Update added in v0.1.5

func (controller *FilesController) Update(c echo.Context) error

UpdateFile godoc @Summary UpdateFile @Description Move a dir/file, update name and/or permissions (Only sourcePath is required). @Tags files @Accept json @Produce json @Security Bearer @Param updateUnixFilesDto body dto.UpdateUnixFiles true "Only sourcePaths are required." @Success 200 {object} object{} "FileUpdated" @Success 207 {object} object{} "FilesArePartialUpdated" @Router /v1/files/ [put]

func (*FilesController) Upload added in v0.1.5

func (controller *FilesController) Upload(c echo.Context) error

UploadFiles godoc @Summary UploadFiles @Description Upload files. @Tags files @Accept mpfd @Produce json @Security Bearer @Param destinationPath formData string true "DestinationPath" @Param file formData file true "FileToUpload" @Success 200 {object} object{} "FilesUploaded" @Success 207 {object} object{} "FilesPartialUploaded" @Router /v1/files/upload/ [post]

type MarketplaceController

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

func (*MarketplaceController) AutoRefreshMarketplaceCatalogItems added in v0.1.5

func (controller *MarketplaceController) AutoRefreshMarketplaceCatalogItems()

func (*MarketplaceController) DeleteInstalledItem

func (controller *MarketplaceController) DeleteInstalledItem(c echo.Context) error

DeleteInstalledItem godoc @Summary DeleteInstalledItem @Description Delete/Uninstall an installed item. @Tags marketplace @Accept json @Produce json @Security Bearer @Param installedId path uint true "MarketplaceInstalledItemId to delete." @Param shouldUninstallServices query boolean false "Should uninstall all services not being used? Default is 'true'." @Success 200 {object} object{} "MarketplaceInstalledItemDeleted" @Router /v1/marketplace/installed/{installedId}/ [delete]

func (*MarketplaceController) InstallCatalogItem

func (controller *MarketplaceController) InstallCatalogItem(c echo.Context) error

InstallCatalogItem godoc @Summary InstallCatalogItem @Description Install a marketplace catalog item. @Tags marketplace @Accept json @Produce json @Param InstallMarketplaceCatalogItem body dto.InstallMarketplaceCatalogItem true "urlPath is both the install directory and HTTP sub-directory." @Success 201 {object} object{} "MarketplaceCatalogItemInstallationScheduled" @Router /v1/marketplace/catalog/ [post]

func (*MarketplaceController) ReadCatalog

func (controller *MarketplaceController) ReadCatalog(c echo.Context) error

ReadCatalog godoc @Summary ReadCatalog @Description List marketplace catalog items. @Tags marketplace @Security Bearer @Accept json @Produce json @Param id query uint false "Id" @Param slug query string false "Slug" @Param name query string false "Name" @Param type query string false "Type" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadMarketplaceCatalogItemsResponse @Router /v1/marketplace/catalog/ [get]

func (*MarketplaceController) ReadInstalledItems

func (controller *MarketplaceController) ReadInstalledItems(c echo.Context) error

ReadInstalledItems godoc @Summary ReadInstalledItems @Description List marketplace installed items. @Tags marketplace @Security Bearer @Accept json @Produce json @Param id query uint false "Id" @Param hostname query string false "Hostname" @Param type query string false "Type" @Param installationUuid query string false "InstallUuid" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadMarketplaceInstalledItemsResponse @Router /v1/marketplace/installed/ [get]

type O11yController

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

func NewO11yController

func NewO11yController(
	transientDbService *internalDbInfra.TransientDatabaseService,
) *O11yController

func (*O11yController) ReadOverview

func (controller *O11yController) ReadOverview(c echo.Context) error

O11yOverview godoc @Summary O11yOverview @Description Show system information and resource usage. @Tags o11y @Accept json @Produce json @Security Bearer @Success 200 {object} entity.O11yOverview @Router /v1/o11y/overview/ [get]

type RuntimeController

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

func NewRuntimeController

func NewRuntimeController(
	persistentDbService *internalDbInfra.PersistentDatabaseService,
	trailDbService *internalDbInfra.TrailDatabaseService,
) *RuntimeController

func (*RuntimeController) ReadPhpConfigs

func (controller *RuntimeController) ReadPhpConfigs(c echo.Context) error

ReadPhpConfigs godoc @Summary ReadPhpConfigs @Description Get php version, modules and settings for a hostname. @Tags runtime @Accept json @Produce json @Security Bearer @Param hostname path string true "Hostname" @Success 200 {object} entity.PhpConfigs @Router /v1/runtime/php/{hostname}/ [get]

func (*RuntimeController) UpdatePhpConfigs

func (controller *RuntimeController) UpdatePhpConfigs(c echo.Context) error

UpdatePhpConfigs godoc @Summary UpdatePhpConfigs @Description Update php version, modules and settings for a hostname. @Tags runtime @Accept json @Produce json @Security Bearer @Param hostname path string true "Hostname" @Param updatePhpConfigsDto body dto.UpdatePhpConfigs true "modules and settings are optional." @Success 200 {object} object{} "PhpConfigsUpdated" @Router /v1/runtime/php/{hostname}/ [put]

type ScheduledTaskController

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

func NewScheduledTaskController

func NewScheduledTaskController(
	persistentDbSvc *internalDbInfra.PersistentDatabaseService,
) *ScheduledTaskController

func (*ScheduledTaskController) Read

func (controller *ScheduledTaskController) Read(c echo.Context) error

ReadScheduledTasks godoc @Summary ReadScheduledTasks @Description List scheduled tasks. @Tags scheduled-task @Accept json @Produce json @Security Bearer @Param taskId query string false "TaskId" @Param taskName query string false "TaskName" @Param taskStatus query string false "TaskStatus" @Param taskTags query string false "TaskTags (semicolon separated)" @Param startedBeforeAt query string false "StartedBeforeAt" @Param startedAfterAt query string false "StartedAfterAt" @Param finishedBeforeAt query string false "FinishedBeforeAt" @Param finishedAfterAt query string false "FinishedAfterAt" @Param createdBeforeAt query string false "CreatedBeforeAt" @Param createdAfterAt query string false "CreatedAfterAt" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadScheduledTasksResponse @Router /v1/scheduled-task/ [get]

func (*ScheduledTaskController) Run

func (controller *ScheduledTaskController) Run()

func (*ScheduledTaskController) Update

func (controller *ScheduledTaskController) Update(c echo.Context) error

UpdateScheduledTask godoc @Summary UpdateScheduledTask @Description Reschedule a task or change its status. @Tags scheduled-task @Accept json @Produce json @Security Bearer @Param updateScheduledTaskDto body dto.UpdateScheduledTask true "UpdateScheduledTask (Only id is required.)" @Success 200 {object} object{} "ScheduledTaskUpdated" @Router /v1/scheduled-task/ [put]

type ServicesController

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

func NewServicesController

func NewServicesController(
	persistentDbService *internalDbInfra.PersistentDatabaseService,
	trailDbSvc *internalDbInfra.TrailDatabaseService,
) *ServicesController

func (*ServicesController) AutoRefreshServiceInstallableItems added in v0.1.5

func (controller *ServicesController) AutoRefreshServiceInstallableItems()

func (*ServicesController) CreateCustom

func (controller *ServicesController) CreateCustom(c echo.Context) error

CreateCustomService godoc @Summary CreateCustomService @Description Install a new custom service. @Tags services @Accept json @Produce json @Security Bearer @Param createCustomServiceDto body dto.CreateCustomService true "name, type and startCmd is required.<br />If version is not provided, it will be 'lts'.<br />If portBindings is not provided, it wil be default service port bindings.<br />If autoCreateMapping is not provided, it will be 'true'." @Success 201 {object} object{} "CustomServiceCreated" @Router /v1/services/custom/ [post]

func (*ServicesController) CreateInstallable

func (controller *ServicesController) CreateInstallable(c echo.Context) error

CreateInstallableService godoc @Summary CreateInstallableService @Description Install a new installable service. @Tags services @Accept json @Produce json @Security Bearer @Param createInstallableServiceDto body dto.CreateInstallableService true "Only name is required.<br />If version is not provided, it will be 'lts'.<br />If portBindings is not provided, it wil be default service port bindings.<br />If autoCreateMapping is not provided, it will be 'true'." @Success 201 {object} object{} "InstallableServiceCreated" @Router /v1/services/installables/ [post]

func (*ServicesController) Delete

func (controller *ServicesController) Delete(c echo.Context) error

DeleteService godoc @Summary DeleteService @Description Delete/Uninstall a service. @Tags services @Accept json @Produce json @Security Bearer @Param svcName path string true "ServiceName to delete" @Success 200 {object} object{} "ServiceDeleted" @Router /v1/services/{svcName}/ [delete]

func (*ServicesController) ReadInstallablesItems added in v0.1.5

func (controller *ServicesController) ReadInstallablesItems(c echo.Context) error

ReadInstallableItems godoc @Summary ReadInstallableItems @Description List installable services. @Tags services @Security Bearer @Accept json @Produce json @Param id query uint false "Id" @Param name query string false "Name" @Param nature query string false "Nature" @Param type query string false "Type" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadInstallableServicesItemsResponse @Router /v1/services/installables/ [get]

func (*ServicesController) ReadInstalledItems added in v0.1.5

func (controller *ServicesController) ReadInstalledItems(c echo.Context) error

ReadInstalledItems godoc @Summary ReadInstalledItems @Description List installed services and their status. @Tags services @Security Bearer @Accept json @Produce json @Param id query uint false "Id" @Param name query string false "Name" @Param nature query string false "Nature" @Param type query string false "Type" @Param pageNumber query uint false "PageNumber (Pagination)" @Param itemsPerPage query uint false "ItemsPerPage (Pagination)" @Param sortBy query string false "SortBy (Pagination)" @Param sortDirection query string false "SortDirection (Pagination)" @Param lastSeenId query string false "LastSeenId (Pagination)" @Success 200 {object} dto.ReadInstalledServicesItemsResponse @Router /v1/services/ [get]

func (*ServicesController) Update

func (controller *ServicesController) Update(c echo.Context) error

UpdateService godoc @Summary UpdateService @Description Update service details. @Tags services @Accept json @Produce json @Security Bearer @Param updateServiceDto body dto.UpdateService true "Only name is required.<br />Solo services can only change status.<br />status may be 'running', 'stopped', 'uninstalled' or 'restarting'." @Success 200 {object} object{} "ServiceUpdated" @Router /v1/services/ [put]

type SetupController added in v0.1.7

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

func NewSetupController added in v0.1.7

func NewSetupController(
	persistentDbSvc *internalDbInfra.PersistentDatabaseService,
	trailDbSvc *internalDbInfra.TrailDatabaseService,
) *SetupController

func (*SetupController) Setup added in v0.1.7

func (controller *SetupController) Setup(c echo.Context) error

SetupInfiniteOs godoc @Summary SetupInfiniteOs @Description Creates the first Infinite OS account without requiring authentication.<br />This can only be used when the Infinite OS interface is accessed for the first time with no accounts created. @Tags setup @Accept json @Produce json @Param createFirstAccount body dto.CreateAccount true "CreateFirstAccount" @Success 201 {object} object{} "FirstAccountCreated" @Router /v1/setup/ [post]

type SslController

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

func (*SslController) Create

func (controller *SslController) Create(c echo.Context) error

CreateSslPair godoc @Summary CreateSslPair @Description Create a new ssl pair. @Tags ssl @Accept json @Produce json @Security Bearer @Param createSslPairDto body dto.CreateSslPair true "All props are required.<br />virtualHosts may be string or []string. Alias is not allowed.<br />certificate is a string field, i.e. ignore the structure shown.<br />certificate and key must be base64 encoded." @Success 201 {object} object{} "SslPairCreated" @Router /v1/ssl/ [post]

func (*SslController) Delete

func (controller *SslController) Delete(c echo.Context) error

DeleteSslPair godoc @Summary DeleteSslPair @Description Delete a ssl pair. @Tags ssl @Accept json @Produce json @Security Bearer @Param sslPairId path string true "SslPairId to delete." @Success 200 {object} object{} "SslPairDeleted" @Router /v1/ssl/{sslPairId}/ [delete]

func (*SslController) DeleteVhosts

func (controller *SslController) DeleteVhosts(c echo.Context) error

DeleteSslPairVhosts godoc @Summary DeleteSslPairVhosts @Description Delete vhosts from a ssl pair. @Tags ssl @Accept json @Produce json @Security Bearer @Param deleteSslPairVhostsDto body dto.DeleteSslPairVhosts true "All props are required." @Success 200 {object} object{} "SslPairVhostsRemoved" @Router /v1/ssl/vhost/ [put]

func (*SslController) Read

func (controller *SslController) Read(c echo.Context) error

ReadSslPairs godoc @Summary ReadSslPairs @Description List ssl pairs. @Tags ssl @Accept json @Produce json @Security Bearer @Success 200 {array} entity.SslPair @Router /v1/ssl/ [get]

func (*SslController) SslCertificateWatchdog

func (controller *SslController) SslCertificateWatchdog()

type VirtualHostController

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

func (*VirtualHostController) Create

func (controller *VirtualHostController) Create(c echo.Context) error

CreateVirtualHost godoc @Summary CreateVirtualHost @Description Create a new vhost. @Tags vhosts @Accept json @Produce json @Security Bearer @Param createVirtualHostDto body dto.CreateVirtualHost true "Only hostname is required.<br />type may be 'top-level', 'subdomain', 'wildcard' or 'alias'. If is not provided, it will be 'top-level'. If type is 'alias', 'parentHostname' will be required." @Success 201 {object} object{} "VirtualHostCreated" @Router /v1/vhosts/ [post]

func (*VirtualHostController) CreateMapping

func (controller *VirtualHostController) CreateMapping(c echo.Context) error

CreateVirtualHostMapping godoc @Summary CreateVirtualHostMapping @Description Create a new vhost mapping. @Tags vhosts @Accept json @Produce json @Security Bearer @Param createMappingDto body dto.CreateMapping true "hostname, path and targetType are required.<br />matchPattern may be 'begins-with', 'contains', 'equals' or 'ends-with'. If is not provided, it will be 'begins-with'.<br />targetType may be 'url', 'service', 'response-code', 'inline-html' or 'static-files'. If targetType is 'url', targetHttpResponseCode may be provided. If is not provided, targetHttpResponseCode will be '200'. If targetType is 'response-code', targetHttpResponseCode may be provided. If is not provided, targetValue will be required. If both were provided, targetValue will have priority.<br />targetValue must have the same value as the targetType requires." @Success 201 {object} object{} "MappingCreated" @Router /v1/vhosts/mapping/ [post]

func (*VirtualHostController) Delete

func (controller *VirtualHostController) Delete(c echo.Context) error

DeleteVirtualHost godoc @Summary DeleteVirtualHost @Description Delete a vhost. @Tags vhosts @Accept json @Produce json @Security Bearer @Param hostname path string true "Hostname to delete" @Success 200 {object} object{} "VirtualHostDeleted" @Router /v1/vhosts/{hostname}/ [delete]

func (*VirtualHostController) DeleteMapping

func (controller *VirtualHostController) DeleteMapping(c echo.Context) error

DeleteVirtualHostMapping godoc @Summary DeleteVirtualHostMapping @Description Delete a vhost mapping. @Tags vhosts @Accept json @Produce json @Security Bearer @Param mappingId path uint true "MappingId to delete." @Success 200 {object} object{} "MappingDeleted" @Router /v1/vhosts/mapping/{mappingId}/ [delete]

func (*VirtualHostController) Read

func (controller *VirtualHostController) Read(c echo.Context) error

ReadVirtualHosts godoc @Summary ReadVirtualHosts @Description List virtual hosts. @Tags vhosts @Security Bearer @Accept json @Produce json @Success 200 {array} entity.VirtualHost @Router /v1/vhosts/ [get]

func (*VirtualHostController) ReadWithMappings

func (controller *VirtualHostController) ReadWithMappings(c echo.Context) error

ReadVirtualHostsWithMappings godoc @Summary ReadVirtualHostsWithMappings @Description List virtual hosts with mappings. @Tags vhosts @Security Bearer @Accept json @Produce json @Success 200 {array} dto.VirtualHostWithMappings @Router /v1/vhosts/mapping/ [get]

Jump to

Keyboard shortcuts

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