Documentation ¶
Index ¶
- func AuthMiddleware(roleAuth *AuthConfig) echo.MiddlewareFunc
- func GitWebHook(c echo.Context) error
- func ListSecrets(c echo.Context) error
- func PermissionGetAll(c echo.Context) error
- func RemoveSecret(c echo.Context) error
- func SetSecret(c echo.Context) error
- func SettingsPollGet(c echo.Context) error
- func SettingsPollOff(c echo.Context) error
- func SettingsPollOn(c echo.Context) error
- func UserAdd(c echo.Context) error
- func UserChangePassword(c echo.Context) error
- func UserDelete(c echo.Context) error
- func UserGetAll(c echo.Context) error
- func UserGetPermissions(c echo.Context) error
- func UserLogin(c echo.Context) error
- func UserPutPermissions(c echo.Context) error
- func UserResetTriggerToken(c echo.Context) error
- type AuthConfig
- type Dependencies
- type GaiaHandler
- type Hook
- type Payload
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶ added in v0.2.3
func AuthMiddleware(roleAuth *AuthConfig) echo.MiddlewareFunc
AuthMiddleware is middleware used for each request. Includes functionality that validates the JWT tokens and user permissions.
func GitWebHook ¶ added in v0.2.1
GitWebHook handles callbacks from GitHub's webhook system.
func ListSecrets ¶ added in v0.2.1
ListSecrets retrieves all secrets from the vault.
func PermissionGetAll ¶ added in v0.2.3
PermissionGetAll simply returns a list of all the roles available.
func RemoveSecret ¶ added in v0.2.1
RemoveSecret removes a secret from the vault.
func SettingsPollGet ¶ added in v0.2.4
SettingsPollGet get status of polling functionality.
func SettingsPollOff ¶ added in v0.2.4
SettingsPollOff turn off polling functionality.
func SettingsPollOn ¶ added in v0.2.4
SettingsPollOn turn on polling functionality.
func UserChangePassword ¶
UserChangePassword changes the password from a user.
func UserGetAll ¶
UserGetAll returns all users stored in store.
func UserGetPermissions ¶ added in v0.2.3
UserGetPermissions returns the permissions for a user.
func UserPutPermissions ¶ added in v0.2.3
UserPutPermissions adds or updates permissions for a user.
func UserResetTriggerToken ¶ added in v0.2.3
UserResetTriggerToken will generate and save a new Remote trigger token for a given user.
Types ¶
type AuthConfig ¶ added in v0.2.3
type AuthConfig struct {
RoleCategories []*gaia.UserRoleCategory
}
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.Service Certificate security.CAAPI }
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.
type Payload ¶ added in v0.2.1
type Payload struct {
Repo Repository `json:"repository"`
}
Payload contains information about the event like, user, commit id and so on. All we care about for the sake of identification is the repository.
type Repository ¶ added in v0.2.1
type Repository struct { GitURL string `json:"git_url"` SSHURL string `json:"ssh_url"` HTMLURL string `json:"html_url"` }
Repository contains information about the repository. All we care about here are the possible urls for identification.