api

package
v0.0.0-...-c35b4de Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func NewApp

func NewApp(repository *postgres.Repository, settings ServerSettings) *App

func (*App) InitApi

func (a *App) InitApi() *echo.Echo

type AuthRoutes

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

func NewAuthRoutes

func NewAuthRoutes(repo *postgres.Repository, config *config.AppConfig) *AuthRoutes

func (*AuthRoutes) Login

func (ar *AuthRoutes) Login(ctx echo.Context) error

Login godoc @Summary Login @Param loginRequest body model.LoginRequest true "Login request body" @Failure 400,401,404,422 @Success 200 @Router /v1/login [post]

type EnvironmentRoutes

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

func NewEnvironmentRoutes

func NewEnvironmentRoutes(repo *postgres.Repository) *EnvironmentRoutes

func (*EnvironmentRoutes) CreateEnvironment

func (er *EnvironmentRoutes) CreateEnvironment(ctx echo.Context) error

CreateEnvironment godoc @Summary Create an environment @Param environmentRequest body model.EnvironmentRequest true "Environment request body" @Failure 400,422,500 @Success 201 @Router /v1/environments [post]

func (*EnvironmentRoutes) GetAllEnvironments

func (er *EnvironmentRoutes) GetAllEnvironments(ctx echo.Context) error

GetAllEnvironments godoc @Summary Get all environments @Failure 404 @Success 200 @Router /v1/environments [get]

type ServerSettings

type ServerSettings struct {
	Config *config.AppConfig
	DB     *gorm.DB
	Cache  cache.Internal
}

type ServiceRoutes

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

func NewServiceRoutes

func NewServiceRoutes(repo *postgres.Repository, taskScheduler *task.Scheduler) *ServiceRoutes

func (*ServiceRoutes) CreateService

func (sr *ServiceRoutes) CreateService(ctx echo.Context) error

CreateService godoc @Summary Create a service @Param serviceRequest body model.ServiceRequest true "Service request body" @Failure 400,404,409,422,500 @Success 201 @Router /v1/services [post]

func (*ServiceRoutes) DeleteById

func (sr *ServiceRoutes) DeleteById(ctx echo.Context) error

DeleteById godoc @Summary Delete a service @Produce json @Param id path string true "Service ID" @Failure 400,404 @Success 204 @Router /v1/services/{id} [delete]

func (*ServiceRoutes) GetAllServices

func (sr *ServiceRoutes) GetAllServices(ctx echo.Context) error

GetAllServices godoc @Summary Get all services @Failure 404 @Success 200 @Router /v1/services [get]

func (*ServiceRoutes) GetById

func (sr *ServiceRoutes) GetById(ctx echo.Context) error

GetById godoc @Summary Get a service by id @Param id path string true "Service ID" @Failure 404 @Success 200 @Router /v1/services/{id} [get]

func (*ServiceRoutes) UpdateService

func (sr *ServiceRoutes) UpdateService(ctx echo.Context) error

UpdateService godoc @Summary Update a service @Param serviceRequest body model.ServiceRequest true "Service request body" @Failure 400,404,422,500 @Success 200 @Router /v1/services/{id} [post]

type ServiceStatusRoutes

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

func NewServiceStatusRoutes

func NewServiceStatusRoutes(cache cache.Internal) *ServiceStatusRoutes

func (*ServiceStatusRoutes) GetStatus

func (lr *ServiceStatusRoutes) GetStatus(ctx echo.Context) error

GetStatus godoc @Summary Get status @Failure 404 @Success 200 @Router /v1/status [get]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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