gaia: Index | Files

package handlers

import ""


Package Files

auth.go handler.go hook.go permission.go pipeline.go pipeline_run.go settings.go user.go vault.go workers.go

func AuthMiddleware Uses

func AuthMiddleware(roleAuth *AuthConfig) echo.MiddlewareFunc

AuthMiddleware is middleware used for each request. Includes functionality that validates the JWT tokens and user permissions.

func CreatePipeline Uses

func CreatePipeline(c echo.Context) error

CreatePipeline accepts all data needed to create a pipeline. It then starts the create pipeline execution process async.

func CreatePipelineGetAll Uses

func CreatePipelineGetAll(c echo.Context) error

CreatePipelineGetAll returns a json array of all pipelines which are about to get compiled and all pipelines which have been compiled.

func DeregisterWorker Uses

func DeregisterWorker(c echo.Context) error

DeregisterWorker deregister a registered worker.

func GetJobLogs Uses

func GetJobLogs(c echo.Context) error

GetJobLogs returns logs from a pipeline run.

Required parameters: pipelineid - Related pipeline id pipelinerunid - Related pipeline run id

func GetWorker Uses

func GetWorker(c echo.Context) error

GetWorker returns all workers.

func GetWorkerRegisterSecret Uses

func GetWorkerRegisterSecret(c echo.Context) error

GetWorkerRegisterSecret returns the global secret for registering new worker.

func GetWorkerStatusOverview Uses

func GetWorkerStatusOverview(c echo.Context) error

GetWorkerStatusOverview returns general status information about all workers.

func GitWebHook Uses

func GitWebHook(c echo.Context) error

GitWebHook handles callbacks from GitHub's webhook system.

func InitHandlers Uses

func InitHandlers(e *echo.Echo) error

InitHandlers initializes(registers) all handlers.

func ListSecrets Uses

func ListSecrets(c echo.Context) error

ListSecrets retrieves all secrets from the vault.

func PermissionGetAll Uses

func PermissionGetAll(c echo.Context) error

PermissionGetAll simply returns a list of all the roles available.

func PipelineCheckPeriodicSchedules Uses

func PipelineCheckPeriodicSchedules(c echo.Context) error

PipelineCheckPeriodicSchedules validates the added periodic schedules.

func PipelineDelete Uses

func PipelineDelete(c echo.Context) error

PipelineDelete accepts a pipeline id and deletes it from the store. It also removes the binary inside the pipeline folder.

func PipelineGet Uses

func PipelineGet(c echo.Context) error

PipelineGet accepts a pipeline id and returns the pipeline object.

func PipelineGetAll Uses

func PipelineGetAll(c echo.Context) error

PipelineGetAll returns all registered pipelines.

func PipelineGetAllRuns Uses

func PipelineGetAllRuns(c echo.Context) error

PipelineGetAllRuns returns all runs about the given pipeline.

func PipelineGetAllWithLatestRun Uses

func PipelineGetAllWithLatestRun(c echo.Context) error

PipelineGetAllWithLatestRun returns the latest of all registered pipelines included with the latest run.

func PipelineGetLatestRun Uses

func PipelineGetLatestRun(c echo.Context) error

PipelineGetLatestRun returns the latest run of a pipeline, given by id.

func PipelineGitLSRemote Uses

func PipelineGitLSRemote(c echo.Context) error

PipelineGitLSRemote checks for available git remote branches. This is the perfect way to check if we have access to a given repo.

func PipelineNameAvailable Uses

func PipelineNameAvailable(c echo.Context) error

PipelineNameAvailable looks up if the given pipeline name is available and valid.

func PipelineResetToken Uses

func PipelineResetToken(c echo.Context) error

PipelineResetToken generates a new remote trigger token for a given pipeline.

func PipelineRunGet Uses

func PipelineRunGet(c echo.Context) error

PipelineRunGet returns details about a specific pipeline run. Required parameters are pipelineid and runid.

func PipelineStart Uses

func PipelineStart(c echo.Context) error

PipelineStart starts a pipeline by the given id. It accepts arguments for the given pipeline. Afterwards it returns the created/scheduled pipeline run.

func PipelineStop Uses

func PipelineStop(c echo.Context) error

PipelineStop stops a running pipeline.

func PipelineTrigger Uses

func PipelineTrigger(c echo.Context) error

PipelineTrigger allows for a remote running of a pipeline. This endpoint does not require authentication. It will use a TOKEN that is specific to a pipeline. It can only be used by the `auto` user.

func PipelineTriggerAuth Uses

func PipelineTriggerAuth(c echo.Context) error

PipelineTriggerAuth is a barrier before remote trigger which checks if the user is `auto`.

func PipelineUpdate Uses

func PipelineUpdate(c echo.Context) error

PipelineUpdate updates the given pipeline.

func RegisterWorker Uses

func RegisterWorker(c echo.Context) error

RegisterWorker allows new workers to register themself at this Gaia instance. It accepts a secret and returns valid certificates (base64 encoded) for further mTLS connection.

func RemoveSecret Uses

func RemoveSecret(c echo.Context) error

RemoveSecret removes a secret from the vault.

func ResetWorkerRegisterSecret Uses

func ResetWorkerRegisterSecret(c echo.Context) error

ResetWorkerRegisterSecret generates a new global worker registration secret

func SetSecret Uses

func SetSecret(c echo.Context) error

SetSecret creates or updates a given secret

func SettingsPollGet Uses

func SettingsPollGet(c echo.Context) error

SettingsPollGet get status of polling functionality.

func SettingsPollOff Uses

func SettingsPollOff(c echo.Context) error

SettingsPollOff turn off polling functionality.

func SettingsPollOn Uses

func SettingsPollOn(c echo.Context) error

SettingsPollOn turn on polling functionality.

func UserAdd Uses

func UserAdd(c echo.Context) error

UserAdd adds a new user to the store.

func UserChangePassword Uses

func UserChangePassword(c echo.Context) error

UserChangePassword changes the password from a user.

func UserDelete Uses

func UserDelete(c echo.Context) error

UserDelete deletes the given user

func UserGetAll Uses

func UserGetAll(c echo.Context) error

UserGetAll returns all users stored in store.

func UserGetPermissions Uses

func UserGetPermissions(c echo.Context) error

UserGetPermissions returns the permissions for a user.

func UserLogin Uses

func UserLogin(c echo.Context) error

UserLogin authenticates the user with the given credentials.

func UserPutPermissions Uses

func UserPutPermissions(c echo.Context) error

UserPutPermissions adds or updates permissions for a user.

func UserResetTriggerToken Uses

func UserResetTriggerToken(c echo.Context) error

UserResetTriggerToken will generate and save a new Remote trigger token for a given user.

type AuthConfig Uses

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 Hook Uses

type Hook struct {
    Signature string
    Event     string
    ID        string
    Payload   []byte

Hook represent a github based webhook context.

type Payload Uses

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 Uses

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.

Package handlers imports 28 packages (graph) and is imported by 1 packages. Updated 2019-12-30. Refresh now. Tools for package owners.