Documentation ¶
Index ¶
- func AuthMiddleware(roleAuth *AuthConfig) echo.MiddlewareFunc
- func CreatePipeline(c echo.Context) error
- func CreatePipelineGetAll(c echo.Context) error
- func GetJobLogs(c echo.Context) error
- func GitWebHook(c echo.Context) error
- func InitHandlers(e *echo.Echo) error
- func ListSecrets(c echo.Context) error
- func PermissionGetAll(c echo.Context) error
- func PipelineCheckPeriodicSchedules(c echo.Context) error
- func PipelineDelete(c echo.Context) error
- func PipelineGet(c echo.Context) error
- func PipelineGetAll(c echo.Context) error
- func PipelineGetAllRuns(c echo.Context) error
- func PipelineGetAllWithLatestRun(c echo.Context) error
- func PipelineGetLatestRun(c echo.Context) error
- func PipelineGitLSRemote(c echo.Context) error
- func PipelineNameAvailable(c echo.Context) error
- func PipelineResetToken(c echo.Context) error
- func PipelineRunGet(c echo.Context) error
- func PipelineStart(c echo.Context) error
- func PipelineStop(c echo.Context) error
- func PipelineTrigger(c echo.Context) error
- func PipelineTriggerAuth(c echo.Context) error
- func PipelineUpdate(c echo.Context) error
- func RemoveSecret(c echo.Context) error
- func SetSecret(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 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 CreatePipeline ¶
CreatePipeline accepts all data needed to create a pipeline. It then starts the create pipeline execution process async.
func CreatePipelineGetAll ¶
CreatePipelineGetAll returns a json array of all pipelines which are about to get compiled and all pipelines which have been compiled.
func GetJobLogs ¶
GetJobLogs returns logs from a pipeline run.
Required parameters: pipelineid - Related pipeline id pipelinerunid - Related pipeline run id
func GitWebHook ¶ added in v0.2.1
GitWebHook handles callbacks from GitHub's webhook system.
func InitHandlers ¶
InitHandlers initializes(registers) all handlers
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 PipelineCheckPeriodicSchedules ¶ added in v0.2.3
PipelineCheckPeriodicSchedules validates the added periodic schedules.
func PipelineDelete ¶ added in v0.2.1
PipelineDelete accepts a pipeline id and deletes it from the store. It also removes the binary inside the pipeline folder.
func PipelineGet ¶
PipelineGet accepts a pipeline id and returns the pipeline object.
func PipelineGetAll ¶
PipelineGetAll returns all registered pipelines.
func PipelineGetAllRuns ¶
PipelineGetAllRuns returns all runs about the given pipeline.
func PipelineGetAllWithLatestRun ¶
PipelineGetAllWithLatestRun returns the latest of all registered pipelines included with the latest run.
func PipelineGetLatestRun ¶
PipelineGetLatestRun returns the latest run of a pipeline, given by id.
func PipelineGitLSRemote ¶
PipelineGitLSRemote checks for available git remote branches. This is the perfect way to check if we have access to a given repo.
func PipelineNameAvailable ¶
PipelineNameAvailable looks up if the given pipeline name is available and valid.
func PipelineResetToken ¶ added in v0.2.3
PipelineResetToken generates a new remote trigger token for a given pipeline.
func PipelineRunGet ¶
PipelineRunGet returns details about a specific pipeline run. Required parameters are pipelineid and runid.
func PipelineStart ¶
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 ¶ added in v0.2.2
PipelineStop stops a running pipeline.
func PipelineTrigger ¶ added in v0.2.3
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 ¶ added in v0.2.3
PipelineTriggerAuth is a barrier before remote trigger which checks if the user is `auto`.
func PipelineUpdate ¶ added in v0.2.1
PipelineUpdate updates the given pipeline.
func RemoveSecret ¶ added in v0.2.1
RemoveSecret removes a secret from the vault.
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 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.