handlers

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 22 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSecret added in v0.2.7

func CreateSecret(c echo.Context) error

CreateSecret creates a secret @Summary Create a secret. @Description Creates a secret. @Tags secrets @Accept json @Produce json @Security ApiKeyAuth @Param secret body addSecret true "The secret to create" @Success 201 {string} string "secret successfully set" @Failure 400 {string} string "Error binding or key is reserved." @Failure 500 {string} string "Cannot get or load secrets" @Router /secret [post]

func ListSecrets added in v0.2.1

func ListSecrets(c echo.Context) error

ListSecrets retrieves all secrets from the vault. @Summary List all secrets. @Description Retrieves all secrets from the vault. @Tags secrets @Produce json @Security ApiKeyAuth @Success 200 {array} addSecret "Secrets" @Failure 500 {string} string "Cannot get or load secrets" @Router /secrets [get]

func PermissionGetAll added in v0.2.3

func PermissionGetAll(c echo.Context) error

PermissionGetAll simply returns a list of all the roles available. @Summary Returns a list of default roles. @Description Returns a list of all the roles available. @Tags rbac @Security ApiKeyAuth @Success 200 {array} gaia.UserRoleCategory @Router /permission [get]

func RemoveSecret added in v0.2.1

func RemoveSecret(c echo.Context) error

RemoveSecret removes a secret from the vault. @Summary Removes a secret from the vault.. @Description Removes a secret from the vault. @Tags secrets @Produce plain @Security ApiKeyAuth @Param key body string true "Key" @Success 200 {string} string "secret successfully deleted" @Failure 400 {string} string "key is reserved and cannot be deleted" @Failure 500 {string} string "Cannot get or load secrets" @Router /secret/:key [delete]

func UpdateSecret added in v0.2.7

func UpdateSecret(c echo.Context) error

UpdateSecret updates a given secret @Summary Update a secret. @Description Update a secret. @Tags secrets @Accept json @Produce json @Security ApiKeyAuth @Param secret body updateSecret true "The secret to update with the new value" @Success 201 {string} string "secret successfully set" @Failure 400 {string} string "Error binding or key is reserved." @Failure 500 {string} string "Cannot get or load secrets"

Types

type AuthConfig added in v0.2.3

type AuthConfig struct {
	RoleCategories []*gaia.UserRoleCategory
	// contains filtered or unexported fields
}

AuthConfig is a simple config struct to be passed into AuthMiddleware. Currently allows the ability to specify the permission roles required for each echo endpoint.

type Dependencies added in v0.2.4

type Dependencies struct {
	Scheduler        service.GaiaScheduler
	PipelineService  pipeline.Servicer
	PipelineProvider pipelines.PipelineProviderer
	UserProvider     providers.UserProvider
	RBACProvider     providers.RBACProvider
	WorkerProvider   workers.WorkerProviderer
	Certificate      security.CAAPI
	RBACService      rbac.Service
	Store            store.GaiaStore
}

Dependencies define dependencies for this service.

type GaiaHandler added in v0.2.4

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

GaiaHandler defines handler functions throughout Gaia.

func NewGaiaHandler added in v0.2.4

func NewGaiaHandler(deps Dependencies) *GaiaHandler

NewGaiaHandler creates a new handler service with the required dependencies.

func (*GaiaHandler) InitHandlers added in v0.2.4

func (s *GaiaHandler) InitHandlers(e *echo.Echo) error

InitHandlers initializes(registers) all handlers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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