api

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockTilQueueHasRunningItem

func BlockTilQueueHasRunningItem(c *gin.Context)

BlockTilQueueHasRunningItem

@Summary	Block til pipeline queue has a running item
@Router		/queue/norunningpipelines [get]
@Produce	plain
@Success	204
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func CancelPipeline

func CancelPipeline(c *gin.Context)

CancelPipeline

@Summary	Cancels a pipeline
@Router		/repos/{repo_id}/pipelines/{number}/cancel [post]
@Produce	plain
@Success	200
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func ChownRepo

func ChownRepo(c *gin.Context)

ChownRepo

@Summary	Change a repository's owner, to the one holding the access token
@Router		/repos/{repo_id}/chown [post]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func CreatePipeline

func CreatePipeline(c *gin.Context)

CreatePipeline

@Summary	Run/trigger a pipelines
@Router		/repos/{repo_id}/pipelines [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string			true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int				true	"the repository id"
@Param		options			body	PipelineOptions	true	"the options for the pipeline to run"

func DeleteAgent

func DeleteAgent(c *gin.Context)

DeleteAgent

@Summary	Delete an agent
@Router		/agents/{agent} [delete]
@Produce	plain
@Success	200
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent			path	int		true	"the agent's id"

func DeleteCron

func DeleteCron(c *gin.Context)

DeleteCron

@Summary	Delete a cron job by id
@Router		/repos/{repo_id}/cron/{cron} [delete]
@Produce	plain
@Success	204
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"

func DeleteGlobalSecret

func DeleteGlobalSecret(c *gin.Context)

DeleteGlobalSecret

@Summary	Delete a global secret by name
@Router		/secrets/{secret} [delete]
@Produce	plain
@Success	204
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			path	string	true	"the secret's name"

func DeleteOrg

func DeleteOrg(c *gin.Context)

DeleteOrg

@Summary		Delete an org
@Description	Deletes the given org. Requires admin rights.
@Router			/orgs/{id} [delete]
@Produce		plain
@Success		204
@Tags			Orgs
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			id				path	string	true	"the org's id"

func DeleteOrgSecret

func DeleteOrgSecret(c *gin.Context)

DeleteOrgSecret

@Summary	Delete the named secret from an organization
@Router		/orgs/{org_id}/secrets/{secret} [delete]
@Produce	plain
@Success	204
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secret			path	string	true	"the secret's name"

func DeletePipelineLogs

func DeletePipelineLogs(c *gin.Context)

DeletePipelineLogs

@Summary	Deletes log
@Router		/repos/{repo_id}/logs/{number} [delete]
@Produce	plain
@Success	204
@Tags		Pipeline logs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func DeleteRegistry

func DeleteRegistry(c *gin.Context)

DeleteRegistry

@Summary	Delete a named registry
@Router		/repos/{repo_id}/registry/{registry} [delete]
@Produce	plain
@Success	204
@Tags		Repository registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		registry		path	string	true	"the registry name"

func DeleteRepo

func DeleteRepo(c *gin.Context)

DeleteRepo

@Summary	Delete a repository
@Router		/repos/{repo_id} [delete]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func DeleteSecret

func DeleteSecret(c *gin.Context)

DeleteSecret

@Summary	Delete a named secret
@Router		/repos/{repo_id}/secrets/{secretName} [delete]
@Produce	plain
@Success	204
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secretName		path	string	true	"the secret name"

func DeleteToken

func DeleteToken(c *gin.Context)

DeleteToken

@Summary		Reset a token
@Description	Reset's the current personal access token of the user and returns a new one.
@Router			/user/token [delete]
@Produce		plain
@Success		200
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func DeleteUser

func DeleteUser(c *gin.Context)

DeleteUser

@Summary		Delete a user
@Description	Deletes the given user. Requires admin rights.
@Router			/users/{login} [delete]
@Produce		plain
@Success		204
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			login			path	string	true	"the user's login name"

func EventStreamSSE

func EventStreamSSE(c *gin.Context)

EventStreamSSE

@Summary		Event stream
@Description	event source streaming for compatibility with quic and http2
@Router			/stream/events [get]
@Produce		plain
@Success		200
@Tags			Events

func GetAgent

func GetAgent(c *gin.Context)

GetAgent

@Summary	Get agent information
@Router		/agents/{agent} [get]
@Produce	json
@Success	200	{object}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent			path	int		true	"the agent's id"

func GetAgentTasks

func GetAgentTasks(c *gin.Context)

GetAgentTasks

@Summary	Get agent tasks
@Router		/agents/{agent}/tasks [get]
@Produce	json
@Success	200	{array}	Task
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent			path	int		true	"the agent's id"

func GetAgents

func GetAgents(c *gin.Context)

GetAgents

@Summary	Get agent list
@Router		/agents [get]
@Produce	json
@Success	200	{array}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetAllRepos

func GetAllRepos(c *gin.Context)

GetAllRepos

@Summary	List all repositories on the server. Requires admin rights.
@Router		/repos [get]
@Produce	json
@Success	200	{array}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		active			query	bool	false	"only list active repos"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetBadge

func GetBadge(c *gin.Context)

GetBadge

@Summary	Get status badge, SVG format
@Router		/badges/{repo_id}/status.svg [get]
@Produce	image/svg+xml
@Success	200
@Tags		Badges
@Param		repo_id	path	int	true	"the repository id"

func GetCC

func GetCC(c *gin.Context)

GetCC

@Summary		Provide pipeline status information to the CCMenu tool
@Description	CCMenu displays the pipeline status of projects on a CI server as an item in the Mac's menu bar.
@Description	More details on how to install, you can find at http://ccmenu.org/
@Description	The response format adheres to CCTray v1 Specification, https://cctray.org/v1/
@Router			/badges/{repo_id}/cc.xml [get]
@Produce		xml
@Success		200
@Tags			Badges
@Param			repo_id	path	int	true	"the repository id"

func GetCron

func GetCron(c *gin.Context)

GetCron

@Summary	Get a cron job by id
@Router		/repos/{repo_id}/cron/{cron} [get]
@Produce	json
@Success	200	{object}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"

func GetCronList

func GetCronList(c *gin.Context)

GetCronList

@Summary	Get the cron job list
@Router		/repos/{repo_id}/cron [get]
@Produce	json
@Success	200	{array}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetFeed

func GetFeed(c *gin.Context)

GetFeed

@Summary		A feed entry for a build.
@Description	Feed entries can be used to display information on the latest builds.
@Router			/user/feed [get]
@Produce		json
@Success		200	{object}	Feed
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetGlobalSecret

func GetGlobalSecret(c *gin.Context)

GetGlobalSecret

@Summary	Get a global secret by name
@Router		/secrets/{secret} [get]
@Produce	json
@Success	200	{object}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			path	string	true	"the secret's name"

func GetGlobalSecretList

func GetGlobalSecretList(c *gin.Context)

GetGlobalSecretList

@Summary	Get the global secret list
@Router		/secrets [get]
@Produce	json
@Success	200	{array}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetLoginToken

func GetLoginToken(c *gin.Context)

func GetLogout

func GetLogout(c *gin.Context)

func GetOrg

func GetOrg(c *gin.Context)

GetOrg

@Summary	Get organization by id
@Router		/orgs/{org_id} [get]
@Produce	json
@Success	200	{array}	Org
@Tags		Organization
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the organziation's id"

func GetOrgPermissions

func GetOrgPermissions(c *gin.Context)

GetOrgPermissions

@Summary	Get the permissions of the current user in the given organization
@Router		/orgs/{org_id}/permissions [get]
@Produce	json
@Success	200	{array}	OrgPerm
@Tags		Organization permissions
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the organziation's id"

func GetOrgSecret

func GetOrgSecret(c *gin.Context)

GetOrgSecret

@Summary	Get the named organization secret
@Router		/orgs/{org_id}/secrets/{secret} [get]
@Produce	json
@Success	200	{object}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secret			path	string	true	"the secret's name"

func GetOrgSecretList

func GetOrgSecretList(c *gin.Context)

GetOrgSecretList

@Summary	Get the organization secret list
@Router		/orgs/{org_id}/secrets [get]
@Produce	json
@Success	200	{array}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetOrgs

func GetOrgs(c *gin.Context)

GetOrgs

@Summary		Get all orgs
@Description	Returns all registered orgs in the system. Requires admin rights.
@Router			/orgs [get]
@Produce		json
@Success		200	{array}	Org
@Tags			Orgs
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetPipeline

func GetPipeline(c *gin.Context)

GetPipeline

@Summary	Pipeline information by number
@Router		/repos/{repo_id}/pipelines/{number} [get]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline, OR 'latest'"

func GetPipelineConfig

func GetPipelineConfig(c *gin.Context)

GetPipelineConfig

@Summary	Pipeline configuration
@Router		/repos/{repo_id}/pipelines/{number}/config [get]
@Produce	json
@Success	200	{array}	Config
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func GetPipelineLast

func GetPipelineLast(c *gin.Context)

func GetPipelineQueue

func GetPipelineQueue(c *gin.Context)

GetPipelineQueue

@Summary	List pipeline queues
@Router		/pipelines [get]
@Produce	json
@Success	200	{array}	Feed
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetPipelines

func GetPipelines(c *gin.Context)

GetPipelines

@Summary	Get pipelines, current running and past ones
@Router		/repos/{repo_id}/pipelines [get]
@Produce	json
@Success	200	{array}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetQueueInfo

func GetQueueInfo(c *gin.Context)

GetQueueInfo

@Summary		Get pipeline queue information
@Description	TODO: link the InfoT response object - this is blocked, until the `swaggo/swag` tool dependency is v1.18.12 or newer
@Router			/queue/info [get]
@Produce		json
@Success		200	{object}	map[string]string
@Tags			Pipeline queues
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetRegistry

func GetRegistry(c *gin.Context)

GetRegistry

@Summary	Get a named registry
@Router		/repos/{repo_id}/registry/{registry} [get]
@Produce	json
@Success	200	{object}	Registry
@Tags		Repository registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		registry		path	string	true	"the registry name"

func GetRegistryList

func GetRegistryList(c *gin.Context)

GetRegistryList

@Summary	Get the registry list
@Router		/repos/{repo_id}/registry [get]
@Produce	json
@Success	200	{array}	Registry
@Tags		Repository registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetRepo

func GetRepo(c *gin.Context)

GetRepo

@Summary	Get repository information
@Router		/repos/{repo_id} [get]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func GetRepoBranches

func GetRepoBranches(c *gin.Context)

GetRepoBranches

@Summary	Get repository branches
@Router		/repos/{repo_id}/branches [get]
@Produce	json
@Success	200	{array}	string
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetRepoPermissions

func GetRepoPermissions(c *gin.Context)

GetRepoPermissions

@Summary		Repository permission information
@Description	The repository permission, according to the used access token.
@Router			/repos/{repo_id}/permissions [get]
@Produce		json
@Success		200	{object}	Perm
@Tags			Repositories
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the repository id"

func GetRepoPullRequests

func GetRepoPullRequests(c *gin.Context)

GetRepoPullRequests

@Summary	List active pull requests
@Router		/repos/{repo_id}/pull_requests [get]
@Produce	json
@Success	200	{array}	PullRequest
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetRepos

func GetRepos(c *gin.Context)

GetRepos

@Summary		Get user's repos
@Description	Retrieve the currently authenticated User's Repository list
@Router			/user/repos [get]
@Produce		json
@Success		200	{array}	Repo
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			all				query	bool	false	"query all repos, including inactive ones"

func GetSecret

func GetSecret(c *gin.Context)

GetSecret

@Summary	Get a named secret
@Router		/repos/{repo_id}/secrets/{secretName} [get]
@Produce	json
@Success	200	{object}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secretName		path	string	true	"the secret name"

func GetSecretList

func GetSecretList(c *gin.Context)

GetSecretList

@Summary	Get the secret list
@Router		/repos/{repo_id}/secrets [get]
@Produce	json
@Success	200	{array}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetSelf

func GetSelf(c *gin.Context)

GetSelf

@Summary	Returns the currently authenticated user.
@Router		/user [get]
@Produce	json
@Success	200	{object}	User
@Tags		User
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetSignaturePublicKey

func GetSignaturePublicKey(c *gin.Context)

GetSignaturePublicKey

@Summary	Get server's signature public key
@Router		/signature/public-key [get]
@Produce	plain
@Success	200
@Tags		System
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetStepLogs

func GetStepLogs(c *gin.Context)

GetStepLogs

@Summary	Log information
@Router		/repos/{repo_id}/logs/{number}/{stepID} [get]
@Produce	json
@Success	200	{array}	LogEntry
@Tags		Pipeline logs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"
@Param		stepID			path	int		true	"the step id"

func GetUser

func GetUser(c *gin.Context)

GetUser

@Summary		Get a user
@Description	Returns a user with the specified login name. Requires admin rights.
@Router			/users/{login} [get]
@Produce		json
@Success		200	{object}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			login			path	string	true	"the user's login name"

func GetUsers

func GetUsers(c *gin.Context)

GetUsers

@Summary		Get all users
@Description	Returns all registered, active users in the system. Requires admin rights.
@Router			/users [get]
@Produce		json
@Success		200	{array}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func HandleAuth

func HandleAuth(c *gin.Context)

func HandleLogin

func HandleLogin(c *gin.Context)

func Health

func Health(c *gin.Context)

Health

@Summary		Health information
@Description	If everything is fine, just a 204 will be returned, a 500 signals server state is unhealthy.
@Router			/healthz [get]
@Produce		plain
@Success		204
@Failure		500
@Tags			System

func LogLevel

func LogLevel(c *gin.Context)

LogLevel

@Summary		Current log level
@Description	Endpoint returns the current logging level. Requires admin rights.
@Router			/log-level [get]
@Produce		json
@Success		200	{object}	string{log-level=string}
@Tags			System

func LogStreamSSE

func LogStreamSSE(c *gin.Context)

LogStreamSSE

@Summary	Log stream
@Router		/stream/logs/{repo_id}/{pipeline}/{stepID} [get]
@Produce	plain
@Success	200
@Tags		Pipeline logs
@Param		repo_id		path	int	true	"the repository id"
@Param		pipeline	path	int	true	"the number of the pipeline"
@Param		stepID		path	int	true	"the step id"

func LookupOrg

func LookupOrg(c *gin.Context)

LookupOrg

@Summary	Lookup organization by full-name
@Router		/org/lookup/{org_full_name} [get]
@Produce	json
@Success	200	{object}	Org
@Tags		Organizations
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_full_name	path	string	true	"the organizations full-name / slug"

func LookupRepo

func LookupRepo(c *gin.Context)

LookupRepo

@Summary	Get repository by full-name
@Router		/repos/lookup/{repo_full_name} [get]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_full_name	path	string	true	"the repository full-name / slug"

func MoveRepo

func MoveRepo(c *gin.Context)

MoveRepo

@Summary	Move a repository to a new owner
@Router		/repos/{repo_id}/move [post]
@Produce	plain
@Success	204
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		to				query	string	true	"the username to move the repository to"

func PatchAgent

func PatchAgent(c *gin.Context)

PatchAgent

@Summary	Update agent information
@Router		/agents/{agent} [patch]
@Produce	json
@Success	200	{object}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent			path	int		true	"the agent's id"
@Param		agentData		body	Agent	true	"the agent's data"

func PatchCron

func PatchCron(c *gin.Context)

PatchCron

@Summary	Update a cron job
@Router		/repos/{repo_id}/cron/{cron} [patch]
@Produce	json
@Success	200	{object}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"
@Param		cronJob			body	Cron	true	"the cron job data"

func PatchGlobalSecret

func PatchGlobalSecret(c *gin.Context)

PatchGlobalSecret

@Summary	Update a global secret by name
@Router		/secrets/{secret} [patch]
@Produce	json
@Success	200	{object}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			path	string	true	"the secret's name"
@Param		secretData		body	Secret	true	"the secret's data"

func PatchOrgSecret

func PatchOrgSecret(c *gin.Context)

PatchOrgSecret

@Summary	Update an organization secret
@Router		/orgs/{org_id}/secrets/{secret} [patch]
@Produce	json
@Success	200	{object}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secret			path	string	true	"the secret's name"
@Param		secretData		body	Secret	true	"the update secret data"

func PatchRegistry

func PatchRegistry(c *gin.Context)

PatchRegistry

@Summary	Update a named registry
@Router		/repos/{repo_id}/registry/{registry} [patch]
@Produce	json
@Success	200	{object}	Registry
@Tags		Repository registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int			true	"the repository id"
@Param		registry		path	string		true	"the registry name"
@Param		registryData	body	Registry	true	"the attributes for the registry"

func PatchRepo

func PatchRepo(c *gin.Context)

PatchRepo

@Summary	Change a repository
@Router		/repos/{repo_id} [patch]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int			true	"the repository id"
@Param		repo			body	RepoPatch	true	"the repository's information"

func PatchSecret

func PatchSecret(c *gin.Context)

PatchSecret

@Summary	Update a named secret
@Router		/repos/{repo_id}/secrets/{secretName} [patch]
@Produce	json
@Success	200	{object}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secretName		path	string	true	"the secret name"
@Param		secret			body	Secret	true	"the secret itself"

func PatchUser

func PatchUser(c *gin.Context)

PatchUser

@Summary		Change a user
@Description	Changes the data of an existing user. Requires admin rights.
@Router			/users/{login} [patch]
@Produce		json
@Accept			json
@Success		200	{object}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			login			path	string	true	"the user's login name"
@Param			user			body	User	true	"the user's data"

func PauseQueue

func PauseQueue(c *gin.Context)

PauseQueue

@Summary	Pause a pipeline queue
@Router		/queue/pause [post]
@Produce	plain
@Success	204
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func PostAgent

func PostAgent(c *gin.Context)

PostAgent

@Summary	Create a new agent with a random token so a new agent can connect to the server
@Router		/agents [post]
@Produce	json
@Success	200	{object}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent			body	Agent	true	"the agent's data (only 'name' and 'no_schedule' are read)"

func PostApproval

func PostApproval(c *gin.Context)

PostApproval

@Summary	Start pipelines in gated repos
@Router		/repos/{repo_id}/pipelines/{number}/approve [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func PostCron

func PostCron(c *gin.Context)

PostCron

@Summary	Persist/creat a cron job
@Router		/repos/{repo_id}/cron [post]
@Produce	json
@Success	200	{object}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cronJob			body	Cron	true	"the new cron job"

func PostDecline

func PostDecline(c *gin.Context)

PostDecline

@Summary	Decline pipelines in gated repos
@Router		/repos/{repo_id}/pipelines/{number}/decline [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func PostGlobalSecret

func PostGlobalSecret(c *gin.Context)

PostGlobalSecret

@Summary	Persist/create a global secret
@Router		/secrets [post]
@Produce	json
@Success	200	{object}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			body	Secret	true	"the secret object data"

func PostHook

func PostHook(c *gin.Context)

PostHook

@Summary	Incoming webhook from forge
@Router		/hook [post]
@Produce	plain
@Success	200
@Tags		System
@Param		hook	body	object	true	"the webhook payload; forge is automatically detected"

func PostOrgSecret

func PostOrgSecret(c *gin.Context)

PostOrgSecret

@Summary	Persist/create an organization secret
@Router		/orgs/{org_id}/secrets [post]
@Produce	json
@Success	200	{object}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secretData		body	Secret	true	"the new secret"

func PostPipeline

func PostPipeline(c *gin.Context)

PostPipeline

@Summary		Restart a pipeline
@Description	Restarts a pipeline optional with altered event, deploy or environment
@Router			/repos/{repo_id}/pipelines/{number} [post]
@Produce		json
@Success		200	{object}	Pipeline
@Tags			Pipelines
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the repository id"
@Param			number			path	int		true	"the number of the pipeline"
@Param			event			query	string	false	"override the event type"
@Param			deploy_to		query	string	false	"override the target deploy value"

func PostRegistry

func PostRegistry(c *gin.Context)

PostRegistry

@Summary	Persist/create a registry
@Router		/repos/{repo_id}/registry [post]
@Produce	json
@Success	200	{object}	Registry
@Tags		Repository registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int			true	"the repository id"
@Param		registry		body	Registry	true	"the new registry data"

func PostRepo

func PostRepo(c *gin.Context)

PostRepo

@Summary	Activate a repository
@Router		/repos [post]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		forge_remote_id	query	string	true	"the id of a repository at the forge"

func PostSecret

func PostSecret(c *gin.Context)

PostSecret

@Summary	Persist/create a secret
@Router		/repos/{repo_id}/secrets [post]
@Produce	json
@Success	200	{object}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secret			body	Secret	true	"the new secret"

func PostToken

func PostToken(c *gin.Context)

PostToken

@Summary	Return the token of the current user as string
@Router		/user/token [post]
@Produce	plain
@Success	200
@Tags		User
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func PostUser

func PostUser(c *gin.Context)

PostUser

@Summary		Create a user
@Description	Creates a new user account with the specified external login. Requires admin rights.
@Router			/users [post]
@Produce		json
@Success		200	{object}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			user			body	User	true	"the user's data"

func RepairAllRepos

func RepairAllRepos(c *gin.Context)

RepairAllRepos

@Summary	Repair all repositories on the server. Requires admin rights.
@Router		/repos/repair [post]
@Produce	plain
@Success	204
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func RepairRepo

func RepairRepo(c *gin.Context)

RepairRepo

@Summary	Repair a repository
@Router		/repos/{repo_id}/repair [post]
@Produce	plain
@Success	204
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func ResumeQueue

func ResumeQueue(c *gin.Context)

ResumeQueue

@Summary	Resume a pipeline queue
@Router		/queue/resume [post]
@Produce	plain
@Success	204
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func RunCron

func RunCron(c *gin.Context)

RunCron

@Summary	Start a cron job now
@Router		/repos/{repo_id}/cron/{cron} [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"

func SetLogLevel

func SetLogLevel(c *gin.Context)

SetLogLevel

@Summary		Set log level
@Description	Endpoint sets the current logging level. Requires admin rights.
@Router			/log-level [post]
@Produce		json
@Success		200	{object}	string{log-level=string}
@Tags			System
@Param			Authorization	header	string						true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			log-level		body	string{log-level=string}	true	"the new log level, one of <debug,trace,info,warn,error,fatal,panic,disabled>"

func Version

func Version(c *gin.Context)

Version

@Summary		Get version
@Description	Endpoint returns the server version and build information.
@Router			/version [get]
@Produce		json
@Success		200	{object}	string{source=string,version=string}
@Tags			System

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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