api

package
v5.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockTilQueueHasRunningItem

func BlockTilQueueHasRunningItem(c *gin.Context)

BlockTilQueueHasRunningItem blocks until the pipeline queue has no running items.

func CancelPipeline

func CancelPipeline(ctx context.Context, input *CancelPipelineInput) (*struct{}, error)

func CancelWorkflow

func CancelWorkflow(ctx context.Context, input *CancelWorkflowInput) (*struct{}, error)

func DeleteAccessToken

func DeleteAccessToken(ctx context.Context, input *DeleteAccessTokenInput) (*struct{}, error)

func DeleteAccessTokenBatch

func DeleteAccessTokenBatch(ctx context.Context, input *DeleteAccessTokenBatchInput) (*struct{}, error)

func DeleteAgent

func DeleteAgent(ctx context.Context, input *DeleteAgentInput) (*struct{}, error)

func DeleteApprovalAlways added in v5.5.0

func DeleteApprovalAlways(ctx context.Context, input *DeleteApprovalAlwaysInput) (*struct{}, error)

func DeleteAutoscaler

func DeleteAutoscaler(ctx context.Context, input *DeleteAutoscalerInput) (*struct{}, error)

func DeleteCron

func DeleteCron(ctx context.Context, input *DeleteCronInput) (*struct{}, error)

func DeleteForge

func DeleteForge(ctx context.Context, input *DeleteForgeInput) (*struct{}, error)

func DeleteGlobalRegistry

func DeleteGlobalRegistry(ctx context.Context, input *DeleteGlobalRegistryInput) (*struct{}, error)

func DeleteGlobalSecret

func DeleteGlobalSecret(ctx context.Context, input *DeleteGlobalSecretInput) (*struct{}, error)

func DeleteIntegration

func DeleteIntegration(ctx context.Context, input *DeleteIntegrationInput) (*struct{}, error)

func DeleteOrg

func DeleteOrg(ctx context.Context, input *DeleteOrgInput) (*struct{}, error)

func DeleteOrgAgent

func DeleteOrgAgent(ctx context.Context, input *DeleteOrgAgentInput) (*struct{}, error)

func DeleteOrgRegistry

func DeleteOrgRegistry(ctx context.Context, input *DeleteOrgRegistryInput) (*struct{}, error)

func DeleteOrgSecret

func DeleteOrgSecret(ctx context.Context, input *DeleteOrgSecretInput) (*struct{}, error)

func DeletePipeline

func DeletePipeline(ctx context.Context, input *DeletePipelineInput) (*struct{}, error)

func DeletePipelineLogs

func DeletePipelineLogs(ctx context.Context, input *DeletePipelineLogsInput) (*struct{}, error)

func DeleteRegistry

func DeleteRegistry(ctx context.Context, input *DeleteRegistryInput) (*struct{}, error)

func DeleteSecret

func DeleteSecret(ctx context.Context, input *DeleteSecretInput) (*struct{}, error)

func DeleteSecretTarget added in v5.10.0

func DeleteSecretTarget(ctx context.Context, input *DeleteSecretTargetInput) (*struct{}, error)

func DeleteStepLogs

func DeleteStepLogs(ctx context.Context, input *DeleteStepLogsInput) (*struct{}, error)

func DeleteUser

func DeleteUser(ctx context.Context, input *DeleteUserInput) (*struct{}, error)

func EventStreamSSE

func EventStreamSSE(c *gin.Context)

EventStreamSSE streams events like pipeline updates via Server-Sent Events.

func GetBadge

func GetBadge(ctx context.Context, input *GetBadgeInput) (*struct{}, error)

func GetBadgeByName added in v5.6.0

func GetBadgeByName(ctx context.Context, input *GetBadgeByNameInput) (*struct{}, error)

func GetCC

func GetCC(ctx context.Context, input *GetCCInput) (*struct{}, error)

func GetCCByName added in v5.6.0

func GetCCByName(ctx context.Context, input *GetCCByNameInput) (*struct{}, error)

func GetHealth

func GetHealth(c *gin.Context)

GetHealth returns the health status of the server.

func GetHealthLive

func GetHealthLive(c *gin.Context)

GetHealthLive is a lightweight liveness probe (no dependencies checked).

func GetHealthReady

func GetHealthReady(c *gin.Context)

GetHealthReady is a readiness probe that checks if the server is ready to serve traffic.

func GetLogout

func GetLogout(c *gin.Context)

func GetQueueInfo

func GetQueueInfo(c *gin.Context)

GetQueueInfo returns pipeline queue information with agent details.

func GetSignaturePublicKey

func GetSignaturePublicKey(ctx context.Context, _ *GetSignaturePublicKeyInput) (*struct{}, error)

func GetUnsubscribe added in v5.8.0

func GetUnsubscribe(ctx context.Context, input *GetUnsubscribeInput) (*struct{}, error)

func GinContextKey added in v5.6.0

func GinContextKey() any

GinContextKey returns the key used to store *gin.Context in context.Context. Used by the router middleware to inject the gin context.

func HandleAuth

func HandleAuth(c *gin.Context)

func LogLevel

func LogLevel(c *gin.Context)

LogLevel serves the current log level (registered on the base route, not the API).

func LogStreamSSE

func LogStreamSSE(c *gin.Context)

LogStreamSSE streams logs of a pipeline step via Server-Sent Events.

func LookupOrgGin added in v5.6.0

func LookupOrgGin(c *gin.Context)

LookupOrgGin is a gin handler wrapper for LookupOrg (needed because the route uses a wildcard path param that huma doesn't support).

func LookupRepoGin added in v5.6.0

func LookupRepoGin(c *gin.Context)

LookupRepoGin is a gin handler wrapper for LookupRepo (needed because the route uses a wildcard path param that huma doesn't support).

func MoveRepo

func MoveRepo(ctx context.Context, input *MoveRepoInput) (*struct{}, error)

func PatchSecretOwner added in v5.10.0

func PatchSecretOwner(ctx context.Context, input *PatchSecretOwnerInput) (*struct{}, error)

func PauseQueue

func PauseQueue(c *gin.Context)

PauseQueue pauses the pipeline queue.

func PostAutoscalerLogs added in v5.12.0

func PostAutoscalerLogs(r *proclog.Receiver) gin.HandlerFunc

PostAutoscalerLogs accepts a newline-delimited JSON body of log entries.

func PostHook

func PostHook(c *gin.Context)

PostHook handles incoming webhook from forge.

func RepairAllRepos

func RepairAllRepos(ctx context.Context, input *RepairAllReposInput) (*struct{}, error)

func RepairRepo

func RepairRepo(ctx context.Context, input *RepairRepoInput) (*struct{}, error)

func ResumeQueue

func ResumeQueue(c *gin.Context)

ResumeQueue resumes the pipeline queue.

func SetLogLevel

func SetLogLevel(c *gin.Context)

SetLogLevel sets the current log level (registered on the base route, not the API).

func StreamAgentLogsSSE added in v5.12.0

func StreamAgentLogsSSE(s *proclog.Stream) gin.HandlerFunc

StreamAgentLogsSSE handles GET /api/v1/agents/:agent_id/logs/stream.

func StreamAutoscalerLogsSSE added in v5.12.0

func StreamAutoscalerLogsSSE(s *proclog.Stream) gin.HandlerFunc

StreamAutoscalerLogsSSE handles GET /api/v1/autoscalers/:autoscaler_id/logs/stream.

func Version

func Version(c *gin.Context)

Version serves the server version (registered on the base route, not the API).

Types

type AccessTokenFields added in v5.6.0

type AccessTokenFields model.AccessToken

AccessTokenFields is a method-free copy of model.AccessToken for clean huma schema generation.

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessTokenFields
	Token string `json:"token"` // Only populated on creation
}

AccessTokenResponse is returned when creating a token (includes the plain token once).

type AvailableForgeResponse

type AvailableForgeResponse struct {
	ID        int64  `json:"id"`
	URL       string `json:"url"`
	Type      string `json:"type"`
	IsLinked  bool   `json:"is_linked"`
	IsPrimary bool   `json:"is_primary,omitempty"`
	LinkedAs  string `json:"linked_as,omitempty"`
}

AvailableForgeResponse represents a forge that can potentially be linked.

type CancelPipelineInput added in v5.6.0

type CancelPipelineInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type CancelWorkflowInput added in v5.6.0

type CancelWorkflowInput struct {
	RepoID     int64 `path:"repo_id" doc:"the repository id"`
	Number     int64 `path:"number" doc:"the number of the pipeline"`
	WorkflowID int64 `path:"workflow_id" doc:"the id of the workflow to cancel"`
}

type ChownRepoInput added in v5.6.0

type ChownRepoInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type ChownRepoOutput added in v5.6.0

type ChownRepoOutput struct {
	Body *model.Repo
}

func ChownRepo

func ChownRepo(ctx context.Context, input *ChownRepoInput) (*ChownRepoOutput, error)

type CreateAccessTokenRequest

type CreateAccessTokenRequest struct {
	Name      string   `json:"name" minLength:"1" doc:"token name"`
	Scopes    []string `json:"scopes" minItems:"1" doc:"token scopes"`
	OrgID     int64    `json:"org_id,omitempty" doc:"optional org scope"`
	RepoID    int64    `json:"repo_id,omitempty" doc:"optional repo scope"`
	ExpiresAt int64    `json:"expires_at,omitempty" doc:"optional expiry timestamp"`
}

CreateAccessTokenRequest is the request body for creating an access token.

type CreatePipelineBody added in v5.6.0

type CreatePipelineBody struct {
	Branch    string            `json:"branch" doc:"branch to run pipeline on"`
	Variables map[string]string `json:"variables,omitempty" doc:"pipeline variables"`
	Workflows []string          `json:"workflows,omitempty" doc:"workflows to filter"`
}

type CreatePipelineInput added in v5.6.0

type CreatePipelineInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Body   CreatePipelineBody
}

type CreatePipelineOutput added in v5.6.0

type CreatePipelineOutput struct {
	Body *model.Pipeline
}

func CreatePipeline

func CreatePipeline(ctx context.Context, input *CreatePipelineInput) (*CreatePipelineOutput, error)

type DeleteAccessTokenBatchInput added in v5.6.0

type DeleteAccessTokenBatchInput struct {
	Body DeleteAccessTokenBatchRequest
}

type DeleteAccessTokenBatchRequest

type DeleteAccessTokenBatchRequest struct {
	IDs []int64 `json:"ids" minItems:"1" doc:"token IDs to delete"`
}

DeleteAccessTokenBatchRequest is the request body for batch deleting access tokens.

type DeleteAccessTokenInput added in v5.6.0

type DeleteAccessTokenInput struct {
	TokenID int64 `path:"token_id" doc:"the token's id"`
}

type DeleteAgentInput added in v5.6.0

type DeleteAgentInput struct {
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
}

type DeleteApprovalAlwaysInput added in v5.6.0

type DeleteApprovalAlwaysInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type DeleteAutoscalerInput added in v5.6.0

type DeleteAutoscalerInput struct {
	AutoscalerID int64 `path:"autoscaler_id" doc:"the autoscaler's id"`
}

type DeleteCronInput added in v5.6.0

type DeleteCronInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Cron   int64 `path:"cron" doc:"the cron job id"`
}

type DeleteForgeInput added in v5.6.0

type DeleteForgeInput struct {
	ForgeID int64 `path:"forgeId" doc:"the forge's id"`
}

type DeleteGlobalRegistryInput added in v5.6.0

type DeleteGlobalRegistryInput struct {
	Registry string `path:"registry" doc:"the registry's name"`
}

type DeleteGlobalSecretInput added in v5.6.0

type DeleteGlobalSecretInput struct {
	Secret string `path:"secret" doc:"the secret's name"`
}

type DeleteIntegrationInput added in v5.6.0

type DeleteIntegrationInput struct {
	IntegrationID int64 `path:"integration_id" doc:"the integration's id"`
}

type DeleteOrgAgentInput added in v5.6.0

type DeleteOrgAgentInput struct {
	OrgID   int64 `path:"org_id" doc:"the organization's id"`
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
}

type DeleteOrgInput added in v5.6.0

type DeleteOrgInput struct {
	OrgID int64 `path:"org_id" doc:"the org's id"`
}

type DeleteOrgRegistryInput added in v5.6.0

type DeleteOrgRegistryInput struct {
	OrgID    int64  `path:"org_id" doc:"the org's id"`
	Registry string `path:"registry" doc:"the registry's name"`
}

type DeleteOrgSecretInput added in v5.6.0

type DeleteOrgSecretInput struct {
	OrgID  int64  `path:"org_id" doc:"the org's id"`
	Secret string `path:"secret" doc:"the secret's name"`
}

type DeletePipelineInput added in v5.6.0

type DeletePipelineInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type DeletePipelineLogsInput added in v5.6.0

type DeletePipelineLogsInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type DeleteRegistryInput added in v5.6.0

type DeleteRegistryInput struct {
	RepoID   int64  `path:"repo_id" doc:"the repository id"`
	Registry string `path:"registry" doc:"the registry name"`
}

type DeleteRepoInput added in v5.6.0

type DeleteRepoInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Remove bool  `query:"remove" doc:"permanently delete the repository"`
}

type DeleteRepoNotificationConfigInput added in v5.6.0

type DeleteRepoNotificationConfigInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type DeleteRepoNotificationConfigOutput added in v5.6.0

type DeleteRepoNotificationConfigOutput struct {
	Body struct{}
}

type DeleteRepoOutput added in v5.6.0

type DeleteRepoOutput struct {
	Body *model.Repo
}

func DeleteRepo

func DeleteRepo(ctx context.Context, input *DeleteRepoInput) (*DeleteRepoOutput, error)

type DeleteSecretInput added in v5.6.0

type DeleteSecretInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	Secret string `path:"secret" doc:"the secret name"`
}

type DeleteSecretTargetInput added in v5.10.0

type DeleteSecretTargetInput struct {
	SecretID int64 `path:"secret_id" doc:"secret ID"`
	TargetID int64 `path:"target_id" doc:"target ID"`
}

type DeleteStepLogsInput added in v5.6.0

type DeleteStepLogsInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
	StepID int64 `path:"stepId" doc:"the step id"`
}

type DeleteTokenInput added in v5.6.0

type DeleteTokenInput struct{}

type DeleteTokenOutput added in v5.6.0

type DeleteTokenOutput struct {
	Body string
}

type DeleteUserForgeInput added in v5.6.0

type DeleteUserForgeInput struct {
	ForgeID int64 `path:"forge_id" doc:"the forge's id"`
}

type DeleteUserForgeOutput added in v5.6.0

type DeleteUserForgeOutput struct {
	Body UnlinkForgeResponse
}

type DeleteUserInput added in v5.6.0

type DeleteUserInput struct {
	Login string `path:"login" doc:"the user's login name"`
}

type ForgeBody added in v5.6.0

type ForgeBody struct {
	URL               string          `json:"url" doc:"forge URL"`
	Type              model.ForgeType `json:"type" doc:"forge type"`
	Client            string          `json:"client,omitempty" doc:"OAuth client ID"`
	ClientSecret      string          `json:"client_secret,omitempty" doc:"OAuth client secret"`
	OAuthHost         string          `json:"oauth_host,omitempty" doc:"OAuth host"`
	SkipVerify        bool            `json:"skip_verify,omitempty" doc:"skip TLS verification"`
	AdditionalOptions map[string]any  `json:"additional_options,omitempty" doc:"additional forge options"`
}

type GetAccessTokenInput added in v5.6.0

type GetAccessTokenInput struct {
	TokenID int64 `path:"token_id" doc:"the token's id"`
}

type GetAccessTokenListInput added in v5.6.0

type GetAccessTokenListInput struct {
	PaginationParams
}

type GetAccessTokenListOutput added in v5.6.0

type GetAccessTokenListOutput struct {
	Body []*model.AccessToken
}

type GetAccessTokenOutput added in v5.6.0

type GetAccessTokenOutput struct {
	Body *model.AccessToken
}

func GetAccessToken

func GetAccessToken(ctx context.Context, input *GetAccessTokenInput) (*GetAccessTokenOutput, error)

type GetAccessibleIntegrationsInput added in v5.6.0

type GetAccessibleIntegrationsInput struct {
	PaginationParams
}

type GetAccessibleIntegrationsOutput added in v5.6.0

type GetAccessibleIntegrationsOutput struct {
	Body []*model.Integration
}

type GetActiveReposInput added in v5.11.0

type GetActiveReposInput struct{}

type GetActiveReposOutput added in v5.11.0

type GetActiveReposOutput struct {
	Body []*model.RepoLastPipeline
}

func GetActiveRepos added in v5.11.0

func GetActiveRepos(ctx context.Context, _ *GetActiveReposInput) (*GetActiveReposOutput, error)

GetActiveRepos returns the user's active repos with last pipeline info. Same data as GET /user/repos (default), but with a concrete OpenAPI schema.

type GetAdminSMTPStatusInput added in v5.6.0

type GetAdminSMTPStatusInput struct{}

type GetAdminSMTPStatusOutput added in v5.6.0

type GetAdminSMTPStatusOutput struct {
	Body notification.SMTPStatus
}

func GetAdminSMTPStatus added in v5.6.0

type GetAgentInput added in v5.6.0

type GetAgentInput struct {
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
}

type GetAgentOutput added in v5.6.0

type GetAgentOutput struct {
	Body *model.AgentWithStats
}

func GetAgent

func GetAgent(ctx context.Context, input *GetAgentInput) (*GetAgentOutput, error)

type GetAgentTasksInput added in v5.6.0

type GetAgentTasksInput struct {
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
}

type GetAgentTasksOutput added in v5.6.0

type GetAgentTasksOutput struct {
	Body []model.QueueTask
}

func GetAgentTasks

func GetAgentTasks(ctx context.Context, input *GetAgentTasksInput) (*GetAgentTasksOutput, error)

type GetAgentWorkflowsInput added in v5.13.0

type GetAgentWorkflowsInput struct {
	PaginationParams
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
}

type GetAgentWorkflowsOutput added in v5.13.0

type GetAgentWorkflowsOutput struct {
	Body []*model.AgentWorkflow
}

func GetAgentWorkflows added in v5.13.0

func GetAgentWorkflows(ctx context.Context, input *GetAgentWorkflowsInput) (*GetAgentWorkflowsOutput, error)

GetAgentWorkflows returns the historic workflows processed by an agent, most recently finished first, paginated.

type GetAgentsInput added in v5.6.0

type GetAgentsInput struct {
	PaginationParams
	Search   string `query:"search" doc:"search in name, platform, backend, custom labels, ID"`
	Platform string `query:"platform" doc:"filter by platform"`
	Backend  string `query:"backend" doc:"filter by backend"`
	Sort     string `query:"sort" default:"id" doc:"sort field: id, name, platform, backend, last_contact, capacity"`
	Order    string `query:"order" default:"asc" doc:"sort order: asc or desc"`
}

type GetAgentsOutput added in v5.6.0

type GetAgentsOutput struct {
	Body []model.AgentWithStats
}

func GetAgents

func GetAgents(ctx context.Context, input *GetAgentsInput) (*GetAgentsOutput, error)

func GetOrgAgents

func GetOrgAgents(ctx context.Context, input *GetOrgAgentsInput) (*GetAgentsOutput, error)

type GetAllReposInput added in v5.6.0

type GetAllReposInput struct {
	PaginationParams
	Active bool `query:"active" doc:"only list active repos"`
}

type GetAllReposOutput added in v5.6.0

type GetAllReposOutput struct {
	Body []*model.Repo
}

func GetAllRepos

func GetAllRepos(ctx context.Context, input *GetAllReposInput) (*GetAllReposOutput, error)

type GetAutoscalerInput added in v5.6.0

type GetAutoscalerInput struct {
	AutoscalerID int64 `path:"autoscaler_id" doc:"the autoscaler's id"`
}

type GetAutoscalerOutput added in v5.6.0

type GetAutoscalerOutput struct {
	Body *model.Autoscaler
}

func GetAutoscaler

func GetAutoscaler(ctx context.Context, input *GetAutoscalerInput) (*GetAutoscalerOutput, error)

type GetAutoscalerSelfInput added in v5.6.0

type GetAutoscalerSelfInput struct{}

type GetAutoscalerSelfOutput added in v5.6.0

type GetAutoscalerSelfOutput struct {
	Body *model.Autoscaler
}

type GetAutoscalersInput added in v5.6.0

type GetAutoscalersInput struct {
	PaginationParams
	Search   string `query:"search" doc:"search in name, provider, region, ID"`
	Provider string `query:"provider" doc:"filter by provider"`
	Enabled  string `query:"enabled" doc:"filter by enabled status (true/false, empty=all)"`
	Sort     string `query:"sort" default:"id" doc:"sort field: id, name, provider, last_contact"`
	Order    string `query:"order" default:"asc" doc:"sort order: asc or desc"`
}

type GetAutoscalersOutput added in v5.6.0

type GetAutoscalersOutput struct {
	Body []*model.Autoscaler
}

func GetAutoscalers

func GetAutoscalers(ctx context.Context, input *GetAutoscalersInput) (*GetAutoscalersOutput, error)

type GetAvailableForgesInput added in v5.6.0

type GetAvailableForgesInput struct{}

type GetAvailableForgesOutput added in v5.6.0

type GetAvailableForgesOutput struct {
	Body []*AvailableForgeResponse
}

type GetAvailableReposInput added in v5.11.0

type GetAvailableReposInput struct {
	ForgeID       int64 `query:"forge_id"       doc:"only return repos from this forge id (0 = all linked forges)"`
	OnlyUnenabled bool  `query:"only_unenabled" doc:"omit repos already enabled in Crow"`
}

type GetAvailableReposOutput added in v5.11.0

type GetAvailableReposOutput struct {
	Body []*model.Repo
}

func GetAvailableRepos added in v5.11.0

func GetAvailableRepos(ctx context.Context, input *GetAvailableReposInput) (*GetAvailableReposOutput, error)

GetAvailableRepos returns repos visible to the user across linked forges, including both already-enabled and enableable ones (distinguished by IsActive). Optional filters narrow by forge or to unenabled-only.

type GetAvailableScopesInput added in v5.6.0

type GetAvailableScopesInput struct{}

type GetAvailableScopesOutput added in v5.6.0

type GetAvailableScopesOutput struct {
	Body map[string][]model.AccessTokenScope
}

type GetBadgeByNameInput added in v5.6.0

type GetBadgeByNameInput struct {
	Owner    string `path:"repo_id_or_owner" doc:"the repository owner"`
	RepoName string `path:"repo_name" doc:"the repository name"`
	Branch   string `query:"branch" doc:"the branch name"`
}

type GetBadgeInput added in v5.6.0

type GetBadgeInput struct {
	RepoID string `path:"repo_id_or_owner" doc:"the repository id"`
	Branch string `query:"branch" doc:"the branch name"`
}

type GetCCByNameInput added in v5.6.0

type GetCCByNameInput struct {
	Owner    string `path:"repo_id_or_owner" doc:"the repository owner"`
	RepoName string `path:"repo_name" doc:"the repository name"`
}

type GetCCInput added in v5.6.0

type GetCCInput struct {
	RepoID string `path:"repo_id_or_owner" doc:"the repository id"`
}

type GetCronInput added in v5.6.0

type GetCronInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Cron   int64 `path:"cron" doc:"the cron job id"`
}

type GetCronListInput added in v5.6.0

type GetCronListInput struct {
	PaginationParams
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetCronListOutput added in v5.6.0

type GetCronListOutput struct {
	Body []*model.Cron
}

func GetCronList

func GetCronList(ctx context.Context, input *GetCronListInput) (*GetCronListOutput, error)

type GetCronOutput added in v5.6.0

type GetCronOutput struct {
	Body *model.Cron
}

func GetCron

func GetCron(ctx context.Context, input *GetCronInput) (*GetCronOutput, error)

type GetEntitiesInput added in v5.6.0

type GetEntitiesInput struct {
	Page       int    `query:"page" default:"1" minimum:"1" doc:"for response pagination, page offset number"`
	PerPage    int    `query:"perPage" default:"15" minimum:"1" maximum:"50" doc:"for response pagination, max items per page"`
	EntityType string `query:"entity_type" doc:"filter by entity type (user, org, or comma-separated)"`
	IsAdmin    string `query:"is_admin" doc:"filter by admin status (true, false, or empty for all)"`
	Search     string `query:"search" doc:"search term for name/login/email"`
}

type GetEntitiesOutput added in v5.6.0

type GetEntitiesOutput struct {
	Body []*model.Entity
}

func GetEntities

func GetEntities(ctx context.Context, input *GetEntitiesInput) (*GetEntitiesOutput, error)

type GetFeedInput added in v5.6.0

type GetFeedInput struct {
	Latest bool `query:"latest" doc:"return only the latest pipeline per repo"`
}

type GetFeedOutput added in v5.6.0

type GetFeedOutput struct {
	Body any
}

func GetFeed

func GetFeed(ctx context.Context, input *GetFeedInput) (*GetFeedOutput, error)

type GetForgeInput added in v5.6.0

type GetForgeInput struct {
	ForgeID int64 `path:"forgeId" doc:"the forge's id"`
}

type GetForgeOutput added in v5.6.0

type GetForgeOutput struct {
	Body *model.Forge
}

func GetForge

func GetForge(ctx context.Context, input *GetForgeInput) (*GetForgeOutput, error)

type GetForgesInput added in v5.6.0

type GetForgesInput struct {
	PaginationParams
}

type GetForgesOutput added in v5.6.0

type GetForgesOutput struct {
	Body []*model.Forge
}

func GetForges

func GetForges(ctx context.Context, input *GetForgesInput) (*GetForgesOutput, error)

type GetGlobalRegistryInput added in v5.6.0

type GetGlobalRegistryInput struct {
	Registry string `path:"registry" doc:"the registry's name"`
}

type GetGlobalRegistryListInput added in v5.6.0

type GetGlobalRegistryListInput struct {
	PaginationParams
}

type GetGlobalRegistryListOutput added in v5.6.0

type GetGlobalRegistryListOutput struct {
	Body []*model.Registry
}

type GetGlobalRegistryOutput added in v5.6.0

type GetGlobalRegistryOutput struct {
	Body *model.Registry
}

type GetGlobalSecretAbbreviatedInput added in v5.6.0

type GetGlobalSecretAbbreviatedInput struct {
	Secret string `path:"secret" doc:"the secret's name"`
}

type GetGlobalSecretAbbreviatedOutput added in v5.6.0

type GetGlobalSecretAbbreviatedOutput struct {
	Body *model.Secret
}

type GetGlobalSecretInput added in v5.6.0

type GetGlobalSecretInput struct {
	Secret string `path:"secret" doc:"the secret's name"`
}

type GetGlobalSecretListInput added in v5.6.0

type GetGlobalSecretListInput struct {
	PaginationParams
}

type GetGlobalSecretListOutput added in v5.6.0

type GetGlobalSecretListOutput struct {
	Body []*model.Secret
}

type GetGlobalSecretOutput added in v5.6.0

type GetGlobalSecretOutput struct {
	Body *model.Secret
}

type GetImportableReposInput added in v5.6.0

type GetImportableReposInput struct {
	RepoID int64 `path:"repo_id" doc:"the target repository id"`
}

type GetImportableReposOutput added in v5.6.0

type GetImportableReposOutput struct {
	Body []*model.Repo
}

type GetIntegrationInput added in v5.6.0

type GetIntegrationInput struct {
	IntegrationID int64 `path:"integration_id" doc:"the integration's id"`
}

type GetIntegrationListInput added in v5.6.0

type GetIntegrationListInput struct {
	PaginationParams
}

type GetIntegrationListOutput added in v5.6.0

type GetIntegrationListOutput struct {
	Body []*model.Integration
}

type GetIntegrationOutput added in v5.6.0

type GetIntegrationOutput struct {
	Body *model.Integration
}

func GetIntegration

func GetIntegration(ctx context.Context, input *GetIntegrationInput) (*GetIntegrationOutput, error)

type GetIntegrationTypesInput added in v5.6.0

type GetIntegrationTypesInput struct{}

type GetIntegrationTypesOutput added in v5.6.0

type GetIntegrationTypesOutput struct {
	Body []IntegrationTypeInfo
}

type GetMaintenanceConfigByActionInput added in v5.6.0

type GetMaintenanceConfigByActionInput struct {
	Action string `path:"action" doc:"Action type (vacuum, kubernetes_cleanup, stale_agent_cleanup, docker_cleanup, orphaned_data_cleanup)"`
}

type GetMaintenanceConfigByActionOutput added in v5.6.0

type GetMaintenanceConfigByActionOutput struct {
	Body *model.MaintenanceConfig
}

type GetMaintenanceConfigInput added in v5.6.0

type GetMaintenanceConfigInput struct{}

type GetMaintenanceConfigOutput added in v5.6.0

type GetMaintenanceConfigOutput struct {
	Body *model.MaintenanceConfig
}

type GetMaintenanceLogsInput added in v5.6.0

type GetMaintenanceLogsInput struct {
	Limit int `query:"limit" default:"50" doc:"Number of logs to return"`
}

type GetMaintenanceLogsOutput added in v5.6.0

type GetMaintenanceLogsOutput struct {
	Body []*model.MaintenanceLog
}

type GetMaintenanceStatsInput added in v5.6.0

type GetMaintenanceStatsInput struct{}

type GetMaintenanceStatsOutput added in v5.6.0

type GetMaintenanceStatsOutput struct {
	Body *model.MaintenanceStats
}

type GetMetricsInput added in v5.6.0

type GetMetricsInput struct {
	After  int64  `query:"after" doc:"Unix timestamp - filter metrics after this time"`
	Before int64  `query:"before" doc:"Unix timestamp - filter metrics before this time"`
	All    bool   `query:"all" doc:"Show all instance metrics (admin only)"`
	Repos  string `query:"repos" doc:"Comma-separated list of repo IDs to filter by"`
}

type GetMetricsOutput added in v5.6.0

type GetMetricsOutput struct {
	Body *model.Metrics
}

func GetMetrics

func GetMetrics(ctx context.Context, input *GetMetricsInput) (*GetMetricsOutput, error)

type GetOrgAgentsInput added in v5.6.0

type GetOrgAgentsInput struct {
	PaginationParams
	OrgID int64 `path:"org_id" doc:"the organization's id"`
}

type GetOrgInput added in v5.6.0

type GetOrgInput struct {
	OrgID int64 `path:"org_id" doc:"the organization's id"`
}

type GetOrgOutput added in v5.6.0

type GetOrgOutput struct {
	Body *model.Org
}

func GetOrg

func GetOrg(ctx context.Context, input *GetOrgInput) (*GetOrgOutput, error)

type GetOrgPermissionsInput added in v5.6.0

type GetOrgPermissionsInput struct {
	OrgID int64 `path:"org_id" doc:"the organization's id"`
}

type GetOrgPermissionsOutput added in v5.6.0

type GetOrgPermissionsOutput struct {
	Body *model.OrgPerm
}

type GetOrgRegistryInput added in v5.6.0

type GetOrgRegistryInput struct {
	OrgID    int64  `path:"org_id" doc:"the org's id"`
	Registry string `path:"registry" doc:"the registry's address"`
}

type GetOrgRegistryListInput added in v5.6.0

type GetOrgRegistryListInput struct {
	PaginationParams
	OrgID int64 `path:"org_id" doc:"the org's id"`
}

type GetOrgRegistryListOutput added in v5.6.0

type GetOrgRegistryListOutput struct {
	Body []*model.Registry
}

type GetOrgRegistryOutput added in v5.6.0

type GetOrgRegistryOutput struct {
	Body *model.Registry
}

func GetOrgRegistry

func GetOrgRegistry(ctx context.Context, input *GetOrgRegistryInput) (*GetOrgRegistryOutput, error)

type GetOrgSecretAbbreviatedInput added in v5.6.0

type GetOrgSecretAbbreviatedInput struct {
	OrgID  int64  `path:"org_id" doc:"the org's id"`
	Secret string `path:"secret" doc:"the secret's name"`
}

type GetOrgSecretAbbreviatedOutput added in v5.6.0

type GetOrgSecretAbbreviatedOutput struct {
	Body *model.Secret
}

type GetOrgSecretInput added in v5.6.0

type GetOrgSecretInput struct {
	OrgID  int64  `path:"org_id" doc:"the org's id"`
	Secret string `path:"secret" doc:"the secret's name"`
}

type GetOrgSecretListInput added in v5.6.0

type GetOrgSecretListInput struct {
	PaginationParams
	OrgID int64 `path:"org_id" doc:"the org's id"`
}

type GetOrgSecretListOutput added in v5.6.0

type GetOrgSecretListOutput struct {
	Body []*model.Secret
}

type GetOrgSecretOutput added in v5.6.0

type GetOrgSecretOutput struct {
	Body *model.Secret
}

func GetOrgSecret

func GetOrgSecret(ctx context.Context, input *GetOrgSecretInput) (*GetOrgSecretOutput, error)

type GetOrgsInput added in v5.6.0

type GetOrgsInput struct {
	PaginationParams
}

type GetOrgsOutput added in v5.6.0

type GetOrgsOutput struct {
	Body []*model.Org
}

func GetOrgs

func GetOrgs(ctx context.Context, input *GetOrgsInput) (*GetOrgsOutput, error)

type GetPipelineConfigInput added in v5.6.0

type GetPipelineConfigInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type GetPipelineConfigOutput added in v5.6.0

type GetPipelineConfigOutput struct {
	Body []*model.Config
}

type GetPipelineInput added in v5.6.0

type GetPipelineInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	Number string `path:"number" doc:"the number of the pipeline, OR 'latest'"`
}

type GetPipelineMetadataInput added in v5.6.0

type GetPipelineMetadataInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type GetPipelineMetadataOutput added in v5.6.0

type GetPipelineMetadataOutput struct {
	Body *metadata.Metadata
}

type GetPipelineOutput added in v5.6.0

type GetPipelineOutput struct {
	Body *model.Pipeline
}

func GetPipeline

func GetPipeline(ctx context.Context, input *GetPipelineInput) (*GetPipelineOutput, error)

type GetPipelineQueueInput added in v5.6.0

type GetPipelineQueueInput struct{}

type GetPipelineQueueOutput added in v5.6.0

type GetPipelineQueueOutput struct {
	Body []*model.Feed
}

type GetPipelinesInput added in v5.6.0

type GetPipelinesInput struct {
	PaginationParams
	RepoID   int64  `path:"repo_id" doc:"the repository id"`
	Before   string `query:"before" doc:"only return pipelines before this RFC3339 date"`
	After    string `query:"after" doc:"only return pipelines after this RFC3339 date"`
	Branch   string `query:"branch" doc:"filter pipelines by branch"`
	Event    string `query:"event" doc:"filter pipelines by webhook events (comma separated)"`
	Ref      string `query:"ref" doc:"filter pipelines by strings contained in ref"`
	Status   string `query:"status" doc:"filter pipelines by status"`
	Search   string `query:"search" doc:"search pipelines by number, message, branch, or author"`
	Workflow string `query:"workflow" doc:"filter pipelines by workflow name"`
}

type GetPipelinesOutput added in v5.6.0

type GetPipelinesOutput struct {
	Body []*model.Pipeline
}

func GetPipelines

func GetPipelines(ctx context.Context, input *GetPipelinesInput) (*GetPipelinesOutput, error)

type GetPublicReposInput added in v5.6.0

type GetPublicReposInput struct {
	PaginationParams
}

type GetPublicReposOutput added in v5.6.0

type GetPublicReposOutput struct {
	Body []*model.RepoLastPipeline
}

func GetPublicRepos

func GetPublicRepos(ctx context.Context, input *GetPublicReposInput) (*GetPublicReposOutput, error)

type GetRegistryInput added in v5.6.0

type GetRegistryInput struct {
	RepoID   int64  `path:"repo_id" doc:"the repository id"`
	Registry string `path:"registry" doc:"the registry name"`
}

type GetRegistryListInput added in v5.6.0

type GetRegistryListInput struct {
	PaginationParams
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetRegistryListOutput added in v5.6.0

type GetRegistryListOutput struct {
	Body []*model.Registry
}

type GetRegistryOutput added in v5.6.0

type GetRegistryOutput struct {
	Body *model.Registry
}

func GetRegistry

func GetRegistry(ctx context.Context, input *GetRegistryInput) (*GetRegistryOutput, error)

type GetRepoBranchesInput added in v5.6.0

type GetRepoBranchesInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	PaginationParams
}

type GetRepoBranchesOutput added in v5.6.0

type GetRepoBranchesOutput struct {
	Body []string
}

type GetRepoConfigsInput added in v5.6.0

type GetRepoConfigsInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	Branch string `query:"branch" doc:"the branch to get configs from"`
	Filter string `query:"filter" doc:"filter workflows by event type (e.g., 'manual')"`
}

type GetRepoConfigsOutput added in v5.6.0

type GetRepoConfigsOutput struct {
	Body ManualWorkflowsResponse
}

func GetRepoConfigs

func GetRepoConfigs(ctx context.Context, input *GetRepoConfigsInput) (*GetRepoConfigsOutput, error)

type GetRepoForImportInput added in v5.6.0

type GetRepoForImportInput struct {
	RepoID       int64 `path:"repo_id" doc:"the target repository id"`
	SourceRepoID int64 `path:"source_repo_id" doc:"the source repository id"`
}

type GetRepoForImportOutput added in v5.6.0

type GetRepoForImportOutput struct {
	Body ImportPreviewResponse
}

type GetRepoInput added in v5.6.0

type GetRepoInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetRepoNotificationConfigInput added in v5.6.0

type GetRepoNotificationConfigInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetRepoNotificationConfigOutput added in v5.6.0

type GetRepoNotificationConfigOutput struct {
	Body *model.NotificationConfig
}

func GetRepoNotificationConfig added in v5.6.0

func GetRepoNotificationConfig(ctx context.Context, input *GetRepoNotificationConfigInput) (*GetRepoNotificationConfigOutput, error)

type GetRepoOutput added in v5.6.0

type GetRepoOutput struct {
	Body *model.Repo
}

func GetRepo

func GetRepo(ctx context.Context, input *GetRepoInput) (*GetRepoOutput, error)

type GetRepoPermissionsInput added in v5.6.0

type GetRepoPermissionsInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetRepoPermissionsOutput added in v5.6.0

type GetRepoPermissionsOutput struct {
	Body *model.Perm
}

type GetRepoPullRequestsInput added in v5.6.0

type GetRepoPullRequestsInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	PaginationParams
}

type GetRepoPullRequestsOutput added in v5.6.0

type GetRepoPullRequestsOutput struct {
	Body []*model.PullRequest
}

type GetReposInput added in v5.6.0

type GetReposInput struct {
	All bool `query:"all" doc:"query all repos, including inactive ones"`
}

type GetReposOutput added in v5.6.0

type GetReposOutput struct {
	Body any
}

func GetRepos

func GetRepos(ctx context.Context, input *GetReposInput) (*GetReposOutput, error)

type GetSecretAbbreviatedInput added in v5.6.0

type GetSecretAbbreviatedInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	Secret string `path:"secret" doc:"the secret name"`
}

type GetSecretAbbreviatedOutput added in v5.6.0

type GetSecretAbbreviatedOutput struct {
	CacheControl string `header:"Cache-Control"`
	Body         *model.Secret
}

type GetSecretInput added in v5.6.0

type GetSecretInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	Secret string `path:"secret" doc:"the secret name"`
}

type GetSecretListInput added in v5.6.0

type GetSecretListInput struct {
	PaginationParams
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetSecretListOutput added in v5.6.0

type GetSecretListOutput struct {
	Body []*model.Secret
}

func GetSecretList

func GetSecretList(ctx context.Context, input *GetSecretListInput) (*GetSecretListOutput, error)

type GetSecretOutput added in v5.6.0

type GetSecretOutput struct {
	Body *model.Secret
}

func GetSecret

func GetSecret(ctx context.Context, input *GetSecretInput) (*GetSecretOutput, error)

type GetSecretTargetListInput added in v5.10.0

type GetSecretTargetListInput struct {
	SecretID int64 `path:"secret_id" doc:"secret ID"`
}

type GetSecretTargetListOutput added in v5.10.0

type GetSecretTargetListOutput struct {
	Body []*model.SecretTarget
}

func GetSecretTargetList added in v5.10.0

func GetSecretTargetList(ctx context.Context, input *GetSecretTargetListInput) (*GetSecretTargetListOutput, error)

type GetSelfInput added in v5.6.0

type GetSelfInput struct{}

type GetSelfOutput added in v5.6.0

type GetSelfOutput struct {
	Body *model.User
}

func GetSelf

func GetSelf(ctx context.Context, _ *GetSelfInput) (*GetSelfOutput, error)

type GetSignaturePublicKeyInput added in v5.6.0

type GetSignaturePublicKeyInput struct{}

type GetStepLogsInput added in v5.6.0

type GetStepLogsInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
	StepID int64 `path:"stepId" doc:"the step id"`
}

type GetStepLogsOutput added in v5.6.0

type GetStepLogsOutput struct {
	Body []*model.LogEntry
}

func GetStepLogs

func GetStepLogs(ctx context.Context, input *GetStepLogsInput) (*GetStepLogsOutput, error)

type GetTimezonesInput added in v5.6.0

type GetTimezonesInput struct{}

type GetTimezonesOutput added in v5.6.0

type GetTimezonesOutput struct {
	Body []string
}

type GetUnsubscribeInput added in v5.8.0

type GetUnsubscribeInput struct {
	Token string `query:"token" required:"true" doc:"signed unsubscribe token"`
}

type GetUserCronListInput added in v5.6.0

type GetUserCronListInput struct {
	PaginationParams
	Search string `query:"search" doc:"Search term for cron name"`
}

type GetUserCronListOutput added in v5.6.0

type GetUserCronListOutput struct {
	Body []*model.CronWithRepo
}

type GetUserForgeAffectedReposInput added in v5.6.0

type GetUserForgeAffectedReposInput struct {
	ForgeID int64 `path:"forge_id" doc:"the forge's id"`
}

type GetUserForgeAffectedReposOutput added in v5.6.0

type GetUserForgeAffectedReposOutput struct {
	Body []*model.Repo
}

type GetUserForgeInput added in v5.6.0

type GetUserForgeInput struct {
	ForgeID int64 `path:"forge_id" doc:"the forge's id"`
}

type GetUserForgeOutput added in v5.6.0

type GetUserForgeOutput struct {
	Body *UserForgeResponse
}

func GetUserForge

func GetUserForge(ctx context.Context, input *GetUserForgeInput) (*GetUserForgeOutput, error)

type GetUserForgesInput added in v5.6.0

type GetUserForgesInput struct{}

type GetUserForgesOutput added in v5.6.0

type GetUserForgesOutput struct {
	Body []*UserForgeResponse
}

type GetUserInput added in v5.6.0

type GetUserInput struct {
	Login string `path:"login" doc:"the user's login name"`
}

type GetUserOrgListInput added in v5.6.0

type GetUserOrgListInput struct{}

type GetUserOrgListOutput added in v5.6.0

type GetUserOrgListOutput struct {
	Body []*model.Org
}

type GetUserOutput added in v5.6.0

type GetUserOutput struct {
	Body *model.User
}

func GetUser

func GetUser(ctx context.Context, input *GetUserInput) (*GetUserOutput, error)

type GetUserPendingApprovalsBody added in v5.13.0

type GetUserPendingApprovalsBody struct {
	Approvals []*PendingApprovalItem `json:"approvals"`
}

GetUserPendingApprovalsBody is the response shape for the user-pending list.

type GetUserPendingApprovalsOutput added in v5.13.0

type GetUserPendingApprovalsOutput struct {
	Body GetUserPendingApprovalsBody
}

GetUserPendingApprovalsOutput wraps the response body for huma.

func GetUserPendingApprovals added in v5.13.0

func GetUserPendingApprovals(ctx context.Context, _ *struct{}) (*GetUserPendingApprovalsOutput, error)

GetUserPendingApprovals lists pending approval gates that the current user is authorized to act on. The store returns all pending candidates; the handler filters them via authz.CanApproveWorkflow because that requires forge.Teams() calls we don't want in raw SQL.

Each entry carries the pipeline number plus the repo id and full name so the pipeline-feed sidebar can render a row with the repo label and link straight to the gated pipeline without issuing N additional fetches.

type GetUserRegistryListInput added in v5.6.0

type GetUserRegistryListInput struct {
	PaginationParams
	Scope  string `query:"scope" default:"user,org,global" doc:"Comma-separated scopes: user,org,global"`
	Search string `query:"search" doc:"Search term for registry address"`
}

type GetUserRegistryListOutput added in v5.6.0

type GetUserRegistryListOutput struct {
	Body []*model.RegistryWithOrg
}

type GetUserSecretListInput added in v5.6.0

type GetUserSecretListInput struct {
	PaginationParams
	Scope  string `query:"scope" default:"user,org,global" doc:"Comma-separated scopes: user,org,global"`
	Search string `query:"search" doc:"Search term for secret name"`
}

type GetUserSecretListOutput added in v5.6.0

type GetUserSecretListOutput struct {
	Body []*model.SecretWithOrg
}

type GetUsersInput added in v5.6.0

type GetUsersInput struct {
	PaginationParams
}

type GetUsersOutput added in v5.6.0

type GetUsersOutput struct {
	Body []*model.User
}

func GetUsers

func GetUsers(ctx context.Context, input *GetUsersInput) (*GetUsersOutput, error)

type GetWorkflowApprovalBody added in v5.13.0

type GetWorkflowApprovalBody struct {
	Workflow *model.Workflow                `json:"workflow"`
	Events   []*model.WorkflowApprovalEvent `json:"events"`
}

GetWorkflowApprovalBody is the response shape for the approval-state endpoint.

type GetWorkflowApprovalInput added in v5.13.0

type GetWorkflowApprovalInput struct {
	RepoID         int64 `path:"repo_id"     doc:"the repository id"`
	PipelineNumber int64 `path:"number"      doc:"the pipeline number"`
	WorkflowID     int64 `path:"workflow_id" doc:"the workflow id"`
}

GetWorkflowApprovalInput identifies a workflow gate by repo + pipeline number + workflow id.

type GetWorkflowApprovalOutput added in v5.13.0

type GetWorkflowApprovalOutput struct {
	Body GetWorkflowApprovalBody
}

GetWorkflowApprovalOutput wraps the response body for huma.

func GetWorkflowApproval added in v5.13.0

func GetWorkflowApproval(ctx context.Context, input *GetWorkflowApprovalInput) (*GetWorkflowApprovalOutput, error)

GetWorkflowApproval returns the workflow row plus its full audit trail.

type GetWorkflowNamesInput added in v5.9.0

type GetWorkflowNamesInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type GetWorkflowNamesOutput added in v5.9.0

type GetWorkflowNamesOutput struct {
	Body []string
}

func GetWorkflowNames added in v5.9.0

func GetWorkflowNames(ctx context.Context, input *GetWorkflowNamesInput) (*GetWorkflowNamesOutput, error)

type HealthStatus

type HealthStatus struct {
	Status     string            `json:"status"`
	InstanceID string            `json:"instance_id"`
	Timestamp  int64             `json:"timestamp"`
	Checks     map[string]string `json:"checks"`
	Version    string            `json:"version"`
	Uptime     float64           `json:"uptime_seconds"`

} //	@name	HealthStatus

HealthStatus represents the health status of the server.

type HeartbeatBody added in v5.6.0

type HeartbeatBody struct {
	ActiveAgents      int32             `json:"active_agents"`
	PendingAgents     int32             `json:"pending_agents"`
	Version           string            `json:"version"`
	MinAgents         int32             `json:"min_agents"`
	MaxAgents         int32             `json:"max_agents"`
	WorkflowsPerAgent int32             `json:"workflows_per_agent"`
	Provider          string            `json:"provider"`
	InstanceType      string            `json:"instance_type"`
	Region            string            `json:"region"`
	AgentLabels       map[string]string `json:"agent_labels"`
	LimitCPUQuota     string            `json:"limit_cpu_quota"`
	LimitMem          string            `json:"limit_mem"`
}

type HeartbeatResponse added in v5.6.0

type HeartbeatResponse struct {
	Success     bool  `json:"success"`
	LastContact int64 `json:"last_contact"`
}

type ImportPreviewResponse

type ImportPreviewResponse struct {
	Repo          *model.Repo `json:"repo"`
	SecretCount   int         `json:"secret_count"`
	RegistryCount int         `json:"registry_count"`
	CronCount     int         `json:"cron_count"`
	PipelineCount int         `json:"pipeline_count"`
	// Org-level assets that would be migrated from same-named orgs on other forges
	OrgSecretCount   int    `json:"org_secret_count"`
	OrgRegistryCount int    `json:"org_registry_count"`
	OrgName          string `json:"org_name,omitempty"`
	OrgSourceForge   string `json:"org_source_forge,omitempty"`
}

ImportPreviewResponse contains repo info and counts for import preview.

type ImportSettingsInput added in v5.6.0

type ImportSettingsInput struct {
	RepoID int64 `path:"repo_id" doc:"the target repository id"`
	Body   ImportSettingsRequest
}

type ImportSettingsOutput added in v5.6.0

type ImportSettingsOutput struct {
	Body ImportSettingsResponse
}

func ImportSettings

func ImportSettings(ctx context.Context, input *ImportSettingsInput) (*ImportSettingsOutput, error)

type ImportSettingsRequest

type ImportSettingsRequest struct {
	SourceRepoID int64 `json:"source_repo_id"`
	Settings     bool  `json:"settings"`
	Secrets      bool  `json:"secrets"`
	Registries   bool  `json:"registries"`
	Crons        bool  `json:"crons"`
	Pipelines    bool  `json:"pipelines"`
	DeleteSource bool  `json:"delete_source"`
}

ImportSettingsRequest represents the request body for importing settings.

type ImportSettingsResponse

type ImportSettingsResponse struct {
	Message            string `json:"message"`
	SettingsImported   bool   `json:"settings_imported"`
	SecretsImported    int    `json:"secrets_imported"`
	RegistriesImported int    `json:"registries_imported"`
	CronsImported      int    `json:"crons_imported"`
	PipelinesImported  int    `json:"pipelines_imported"`
	SourceDeleted      bool   `json:"source_deleted"`
}

ImportSettingsResponse represents the response after importing settings.

type IntegrationTypeInfo added in v5.6.0

type IntegrationTypeInfo struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

type LookupOrgInput added in v5.6.0

type LookupOrgInput struct {
	OrgFullName string `path:"org_full_name" doc:"the organization's full name / slug"`
}

type LookupOrgOutput added in v5.6.0

type LookupOrgOutput struct {
	Body *model.Org
}

func LookupOrg

func LookupOrg(ctx context.Context, input *LookupOrgInput) (*LookupOrgOutput, error)

type LookupRepoInput added in v5.6.0

type LookupRepoInput struct {
	RepoFullName string `path:"repo_full_name" doc:"the repository full name / slug"`
}

type LookupRepoOutput added in v5.6.0

type LookupRepoOutput struct {
	Body *model.Repo
}

func LookupRepo

func LookupRepo(ctx context.Context, input *LookupRepoInput) (*LookupRepoOutput, error)

type ManualWorkflow

type ManualWorkflow struct {
	Name         string   `json:"name"`
	PipelineName string   `json:"pipeline_name"`
	DependsOn    []string `json:"depends_on,omitempty"`
	HasManual    bool     `json:"has_manual"`
}

ManualWorkflow represents a workflow that can be manually triggered.

type ManualWorkflowsResponse

type ManualWorkflowsResponse struct {
	Workflows []ManualWorkflow `json:"workflows"`
	Warnings  []string         `json:"warnings,omitempty"`
}

ManualWorkflowsResponse is the response for the GetManualWorkflows endpoint.

type MoveRepoInput added in v5.6.0

type MoveRepoInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	To     string `query:"to" required:"true" doc:"the username to move the repository to"`
}

type PaginationParams added in v5.6.0

type PaginationParams struct {
	Page    int `query:"page" default:"1" minimum:"1" doc:"for response pagination, page offset number"`
	PerPage int `query:"perPage" default:"50" minimum:"1" maximum:"50" doc:"for response pagination, max items per page"`
}

PaginationParams are reusable query parameters for paginated endpoints.

type PatchAccessTokenInput added in v5.6.0

type PatchAccessTokenInput struct {
	TokenID int64 `path:"token_id" doc:"the token's id"`
	Body    UpdateAccessTokenRequest
}

type PatchAccessTokenOutput added in v5.6.0

type PatchAccessTokenOutput struct {
	Body *model.AccessToken
}

type PatchAgentBody added in v5.6.0

type PatchAgentBody struct {
	Name       string `json:"name" doc:"name of the agent"`
	NoSchedule bool   `json:"no_schedule" doc:"disable scheduling for this agent"`
	Priority   int32  `json:"priority" doc:"agent priority"`
}

type PatchAgentInput added in v5.6.0

type PatchAgentInput struct {
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
	Body    PatchAgentBody
}

type PatchAgentOutput added in v5.6.0

type PatchAgentOutput struct {
	Body *model.Agent
}

func PatchAgent

func PatchAgent(ctx context.Context, input *PatchAgentInput) (*PatchAgentOutput, error)

func PatchOrgAgent

func PatchOrgAgent(ctx context.Context, input *PatchOrgAgentInput) (*PatchAgentOutput, error)

type PatchAutoscalerBody added in v5.6.0

type PatchAutoscalerBody struct {
	Enabled bool `json:"enabled" doc:"whether the autoscaler is enabled"`
}

type PatchAutoscalerInput added in v5.6.0

type PatchAutoscalerInput struct {
	AutoscalerID int64 `path:"autoscaler_id" doc:"the autoscaler's id"`
	Body         PatchAutoscalerBody
}

type PatchAutoscalerOutput added in v5.6.0

type PatchAutoscalerOutput struct {
	Body *model.Autoscaler
}

type PatchCronBody added in v5.6.0

type PatchCronBody struct {
	Name     string `json:"name,omitempty" doc:"cron job name"`
	Schedule string `json:"schedule,omitempty" doc:"cron schedule expression"`
	Branch   string `json:"branch,omitempty" doc:"branch to run cron on"`
}

type PatchCronInput added in v5.6.0

type PatchCronInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Cron   int64 `path:"cron" doc:"the cron job id"`
	Body   PatchCronBody
}

type PatchCronOutput added in v5.6.0

type PatchCronOutput struct {
	Body *model.Cron
}

func PatchCron

func PatchCron(ctx context.Context, input *PatchCronInput) (*PatchCronOutput, error)

type PatchForgeInput added in v5.6.0

type PatchForgeInput struct {
	ForgeID int64 `path:"forgeId" doc:"the forge's id"`
	Body    ForgeBody
}

type PatchForgeOutput added in v5.6.0

type PatchForgeOutput struct {
	Body *model.Forge
}

func PatchForge

func PatchForge(ctx context.Context, input *PatchForgeInput) (*PatchForgeOutput, error)

type PatchGlobalRegistryInput added in v5.6.0

type PatchGlobalRegistryInput struct {
	Registry string `path:"registry" doc:"the registry's name"`
	Body     PatchRegistryBody
}

type PatchGlobalRegistryOutput added in v5.6.0

type PatchGlobalRegistryOutput struct {
	Body *model.Registry
}

type PatchGlobalSecretInput added in v5.6.0

type PatchGlobalSecretInput struct {
	Secret string `path:"secret" doc:"the secret's name"`
	Body   PatchSecretBody
}

type PatchGlobalSecretOutput added in v5.6.0

type PatchGlobalSecretOutput struct {
	Body *model.Secret
}

type PatchIntegrationBody added in v5.6.0

type PatchIntegrationBody struct {
	Name           string  `json:"name,omitempty" doc:"integration name"`
	Description    string  `json:"description,omitempty" doc:"integration description"`
	Config         string  `json:"config,omitempty" doc:"integration configuration"`
	IsActive       bool    `json:"is_active" doc:"whether integration is active"`
	AllowedUserIDs []int64 `json:"allowed_user_ids,omitempty" doc:"allowed user IDs"`
	AllowedOrgIDs  []int64 `json:"allowed_org_ids,omitempty" doc:"allowed org IDs"`
	AllowedRepoIDs []int64 `json:"allowed_repo_ids,omitempty" doc:"allowed repo IDs"`
}

type PatchIntegrationInput added in v5.6.0

type PatchIntegrationInput struct {
	IntegrationID int64 `path:"integration_id" doc:"the integration's id"`
	Body          PatchIntegrationBody
}

type PatchIntegrationOutput added in v5.6.0

type PatchIntegrationOutput struct {
	Body *model.Integration
}

type PatchOrgAgentInput added in v5.6.0

type PatchOrgAgentInput struct {
	OrgID   int64 `path:"org_id" doc:"the organization's id"`
	AgentID int64 `path:"agent_id" doc:"the agent's id"`
	Body    PatchAgentBody
}

type PatchOrgRegistryInput added in v5.6.0

type PatchOrgRegistryInput struct {
	OrgID    int64  `path:"org_id" doc:"the org's id"`
	Registry string `path:"registry" doc:"the registry's name"`
	Body     PatchRegistryBody
}

type PatchOrgRegistryOutput added in v5.6.0

type PatchOrgRegistryOutput struct {
	Body *model.Registry
}

type PatchOrgSecretInput added in v5.6.0

type PatchOrgSecretInput struct {
	OrgID  int64  `path:"org_id" doc:"the org's id"`
	Secret string `path:"secret" doc:"the secret's name"`
	Body   PatchSecretBody
}

type PatchOrgSecretOutput added in v5.6.0

type PatchOrgSecretOutput struct {
	Body *model.Secret
}

func PatchOrgSecret

func PatchOrgSecret(ctx context.Context, input *PatchOrgSecretInput) (*PatchOrgSecretOutput, error)

type PatchRegistryBody added in v5.6.0

type PatchRegistryBody struct {
	Address  string `json:"address,omitempty" doc:"registry address"`
	Username string `json:"username,omitempty" doc:"registry username"`
	Password string `json:"password,omitempty" doc:"registry password"`
}

type PatchRegistryInput added in v5.6.0

type PatchRegistryInput struct {
	RepoID   int64  `path:"repo_id" doc:"the repository id"`
	Registry string `path:"registry" doc:"the registry name"`
	Body     PatchRegistryBody
}

type PatchRegistryOutput added in v5.6.0

type PatchRegistryOutput struct {
	Body *model.Registry
}

func PatchRegistry

func PatchRegistry(ctx context.Context, input *PatchRegistryInput) (*PatchRegistryOutput, error)

type PatchRepoInput added in v5.6.0

type PatchRepoInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Body   model.RepoPatch
}

type PatchRepoOutput added in v5.6.0

type PatchRepoOutput struct {
	Body *model.Repo
}

func PatchRepo

func PatchRepo(ctx context.Context, input *PatchRepoInput) (*PatchRepoOutput, error)

type PatchSecretBody added in v5.6.0

type PatchSecretBody struct {
	Value  string               `json:"value,omitempty" doc:"secret value"`
	Events []model.WebhookEvent `json:"events,omitempty" doc:"events that trigger the secret"`
	Images []string             `json:"images,omitempty" doc:"container images allowed to use the secret"`
}

type PatchSecretInput added in v5.6.0

type PatchSecretInput struct {
	RepoID int64  `path:"repo_id" doc:"the repository id"`
	Secret string `path:"secret" doc:"the secret name"`
	Body   PatchSecretBody
}

type PatchSecretOutput added in v5.6.0

type PatchSecretOutput struct {
	Body *model.Secret
}

func PatchSecret

func PatchSecret(ctx context.Context, input *PatchSecretInput) (*PatchSecretOutput, error)

type PatchSecretOwnerBody added in v5.10.0

type PatchSecretOwnerBody struct {
	OrgID        int64 `json:"org_id"         doc:"new owner org ID"`
	RepoID       int64 `json:"repo_id"        doc:"new owner repo ID"`
	KeepAsTarget bool  `json:"keep_as_target" doc:"keep old owner as a shared target"`
}

type PatchSecretOwnerInput added in v5.10.0

type PatchSecretOwnerInput struct {
	SecretID int64 `path:"secret_id" doc:"secret ID"`
	Body     PatchSecretOwnerBody
}

type PatchUserBody added in v5.6.0

type PatchUserBody struct {
	Email       string `json:"email,omitempty" doc:"user email"`
	Avatar      string `json:"avatar_url,omitempty" doc:"user avatar URL"`
	Admin       bool   `json:"admin,omitempty" doc:"whether user is admin"`
	Description string `json:"description,omitempty" doc:"user description"`
	Timezone    string `json:"timezone,omitempty" doc:"user timezone"`
}

type PatchUserInput added in v5.6.0

type PatchUserInput struct {
	Login string `path:"login" doc:"the user's login name"`
	Body  PatchUserBody
}

type PatchUserOutput added in v5.6.0

type PatchUserOutput struct {
	Body *model.User
}

func PatchUser

func PatchUser(ctx context.Context, input *PatchUserInput) (*PatchUserOutput, error)

type PendingApprovalItem added in v5.13.0

type PendingApprovalItem struct {
	Workflow       *model.Workflow `json:"workflow"`
	PipelineNumber int64           `json:"pipeline_number"`
	RepoID         int64           `json:"repo_id"`
	RepoFullName   string          `json:"repo_full_name"`
}

PendingApprovalItem bundles a workflow gate with the minimal pipeline+repo context the UI needs to deep-link back to the pipeline detail page without issuing per-item lookups.

type PostAccessTokenInput added in v5.6.0

type PostAccessTokenInput struct {
	Body CreateAccessTokenRequest
}

type PostAccessTokenOutput added in v5.6.0

type PostAccessTokenOutput struct {
	Body AccessTokenResponse
}

type PostAdminTestSMTPInput added in v5.6.0

type PostAdminTestSMTPInput struct{}

type PostAdminTestSMTPOutput added in v5.6.0

type PostAdminTestSMTPOutput struct {
	Body struct {
		Success bool   `json:"success"`
		Message string `json:"message"`
	}
}

func PostAdminTestSMTP added in v5.6.0

type PostAgentBody added in v5.6.0

type PostAgentBody struct {
	Name         string            `json:"name" minLength:"1" doc:"name of the agent"`
	NoSchedule   bool              `json:"no_schedule,omitempty" doc:"disable scheduling for this agent"`
	Priority     int32             `json:"priority,omitempty" doc:"agent priority"`
	CustomLabels map[string]string `json:"custom_labels,omitempty" doc:"custom labels for the agent"`
}

type PostAgentInput added in v5.6.0

type PostAgentInput struct {
	Body PostAgentBody
}

type PostAgentOutput added in v5.6.0

type PostAgentOutput struct {
	Body *model.Agent
}

func PostAgent

func PostAgent(ctx context.Context, input *PostAgentInput) (*PostAgentOutput, error)

func PostOrgAgent

func PostOrgAgent(ctx context.Context, input *PostOrgAgentInput) (*PostAgentOutput, error)

type PostApprovalAlwaysInput added in v5.6.0

type PostApprovalAlwaysInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type PostApprovalAlwaysOutput added in v5.6.0

type PostApprovalAlwaysOutput struct {
	Body *model.Pipeline
}

func PostApprovalAlways added in v5.5.0

func PostApprovalAlways(ctx context.Context, input *PostApprovalAlwaysInput) (*PostApprovalAlwaysOutput, error)

type PostApprovalInput added in v5.6.0

type PostApprovalInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type PostApprovalOutput added in v5.6.0

type PostApprovalOutput struct {
	Body *model.Pipeline
}

func PostApproval

func PostApproval(ctx context.Context, input *PostApprovalInput) (*PostApprovalOutput, error)

type PostAutoscalerBody added in v5.6.0

type PostAutoscalerBody struct {
	Name string `json:"name" minLength:"1" doc:"name of the autoscaler"`
}

type PostAutoscalerHeartbeatInput added in v5.6.0

type PostAutoscalerHeartbeatInput struct {
	AutoscalerID int64 `path:"autoscaler_id" doc:"the autoscaler's id"`
	Body         HeartbeatBody
}

type PostAutoscalerHeartbeatOutput added in v5.6.0

type PostAutoscalerHeartbeatOutput struct {
	Body HeartbeatResponse
}

type PostAutoscalerInput added in v5.6.0

type PostAutoscalerInput struct {
	Body PostAutoscalerBody
}

type PostAutoscalerOutput added in v5.6.0

type PostAutoscalerOutput struct {
	Body *model.AutoscalerWithToken
}

func PostAutoscaler

func PostAutoscaler(ctx context.Context, input *PostAutoscalerInput) (*PostAutoscalerOutput, error)

type PostAutoscalerTokenInput added in v5.6.0

type PostAutoscalerTokenInput struct {
	AutoscalerID int64 `path:"autoscaler_id" doc:"the autoscaler's id"`
}

type PostAutoscalerTokenOutput added in v5.6.0

type PostAutoscalerTokenOutput struct {
	Body TokenResponse
}

type PostCronBody added in v5.6.0

type PostCronBody struct {
	Name     string `json:"name" minLength:"1" doc:"cron job name"`
	Schedule string `json:"schedule" minLength:"1" doc:"cron schedule expression"`
	Branch   string `json:"branch,omitempty" doc:"branch to run cron on"`
}

type PostCronInput added in v5.6.0

type PostCronInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Body   PostCronBody
}

type PostCronOutput added in v5.6.0

type PostCronOutput struct {
	Body *model.Cron
}

func PostCron

func PostCron(ctx context.Context, input *PostCronInput) (*PostCronOutput, error)

type PostDeclineInput added in v5.6.0

type PostDeclineInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Number int64 `path:"number" doc:"the number of the pipeline"`
}

type PostDeclineOutput added in v5.6.0

type PostDeclineOutput struct {
	Body *model.Pipeline
}

func PostDecline

func PostDecline(ctx context.Context, input *PostDeclineInput) (*PostDeclineOutput, error)

type PostForgeInput added in v5.6.0

type PostForgeInput struct {
	Body ForgeBody
}

type PostForgeOutput added in v5.6.0

type PostForgeOutput struct {
	Body *model.Forge
}

func PostForge

func PostForge(ctx context.Context, input *PostForgeInput) (*PostForgeOutput, error)

type PostGlobalRegistryInput added in v5.6.0

type PostGlobalRegistryInput struct {
	Body PostRegistryBody
}

type PostGlobalRegistryOutput added in v5.6.0

type PostGlobalRegistryOutput struct {
	Body *model.Registry
}

type PostGlobalSecretInput added in v5.6.0

type PostGlobalSecretInput struct {
	Body PostSecretBody
}

type PostGlobalSecretOutput added in v5.6.0

type PostGlobalSecretOutput struct {
	Body *model.Secret
}

type PostIntegrationBody added in v5.6.0

type PostIntegrationBody struct {
	Name           string                `json:"name" minLength:"1" doc:"integration name"`
	Type           model.IntegrationType `json:"type" doc:"integration type"`
	Description    string                `json:"description,omitempty" doc:"integration description"`
	Config         string                `json:"config,omitempty" doc:"integration configuration"`
	AllowedUserIDs []int64               `json:"allowed_user_ids,omitempty" doc:"allowed user IDs"`
	AllowedOrgIDs  []int64               `json:"allowed_org_ids,omitempty" doc:"allowed org IDs"`
	AllowedRepoIDs []int64               `json:"allowed_repo_ids,omitempty" doc:"allowed repo IDs"`
}

type PostIntegrationInput added in v5.6.0

type PostIntegrationInput struct {
	Body PostIntegrationBody
}

type PostIntegrationOutput added in v5.6.0

type PostIntegrationOutput struct {
	Body *model.Integration
}

type PostOrgAgentInput added in v5.6.0

type PostOrgAgentInput struct {
	OrgID int64 `path:"org_id" doc:"the organization's id"`
	Body  PostAgentBody
}

type PostOrgRegistryInput added in v5.6.0

type PostOrgRegistryInput struct {
	OrgID int64 `path:"org_id" doc:"the org's id"`
	Body  PostRegistryBody
}

type PostOrgRegistryOutput added in v5.6.0

type PostOrgRegistryOutput struct {
	Body *model.Registry
}

type PostOrgSecretInput added in v5.6.0

type PostOrgSecretInput struct {
	OrgID int64 `path:"org_id" doc:"the org's id"`
	Body  PostSecretBody
}

type PostOrgSecretOutput added in v5.6.0

type PostOrgSecretOutput struct {
	Body *model.Secret
}

func PostOrgSecret

func PostOrgSecret(ctx context.Context, input *PostOrgSecretInput) (*PostOrgSecretOutput, error)

type PostPipelineInput added in v5.6.0

type PostPipelineInput struct {
	RepoID     int64  `path:"repo_id" doc:"the repository id"`
	Number     int64  `path:"number" doc:"the number of the pipeline"`
	Event      string `query:"event" doc:"override the event type"`
	DeployTo   string `query:"deploy_to" doc:"override the target deploy value"`
	DeployTask string `query:"deploy_task" doc:"override the deploy task"`
}

type PostPipelineOutput added in v5.6.0

type PostPipelineOutput struct {
	Body *model.Pipeline
}

func PostPipeline

func PostPipeline(ctx context.Context, input *PostPipelineInput) (*PostPipelineOutput, error)

type PostRegistryBody added in v5.6.0

type PostRegistryBody struct {
	Address  string `json:"address" minLength:"1" doc:"registry address"`
	Username string `json:"username" minLength:"1" doc:"registry username"`
	Password string `json:"password" minLength:"1" doc:"registry password"`
}

type PostRegistryInput added in v5.6.0

type PostRegistryInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Body   PostRegistryBody
}

type PostRegistryOutput added in v5.6.0

type PostRegistryOutput struct {
	Body *model.Registry
}

func PostRegistry

func PostRegistry(ctx context.Context, input *PostRegistryInput) (*PostRegistryOutput, error)

type PostRepoInput added in v5.6.0

type PostRepoInput struct {
	ForgeRemoteID string `query:"forge_remote_id" doc:"the id of a repository at the forge"`
	ForgeID       int64  `query:"forge_id" doc:"the forge id (for multi-forge users)"`
}

type PostRepoOutput added in v5.6.0

type PostRepoOutput struct {
	Body *RepoResponse
}

func PostRepo

func PostRepo(ctx context.Context, input *PostRepoInput) (*PostRepoOutput, error)

type PostSecretBody added in v5.6.0

type PostSecretBody struct {
	Name   string               `json:"name" minLength:"1" doc:"secret name"`
	Value  string               `json:"value" minLength:"1" doc:"secret value"`
	Events []model.WebhookEvent `json:"events" doc:"events that trigger the secret"`
	Images []string             `json:"images,omitempty" doc:"container images allowed to use the secret"`
}

type PostSecretInput added in v5.6.0

type PostSecretInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Body   PostSecretBody
}

type PostSecretOutput added in v5.6.0

type PostSecretOutput struct {
	Body *model.Secret
}

func PostSecret

func PostSecret(ctx context.Context, input *PostSecretInput) (*PostSecretOutput, error)

type PostSecretTargetBody added in v5.10.0

type PostSecretTargetBody struct {
	OrgID  int64 `json:"org_id"  doc:"organization ID to share with (0 if sharing with repo)"`
	RepoID int64 `json:"repo_id" doc:"repository ID to share with (0 if sharing with org)"`
}

type PostSecretTargetInput added in v5.10.0

type PostSecretTargetInput struct {
	SecretID int64 `path:"secret_id" doc:"secret ID"`
	Body     PostSecretTargetBody
}

type PostSecretTargetOutput added in v5.10.0

type PostSecretTargetOutput struct {
	Body *model.SecretTarget
}

func PostSecretTarget added in v5.10.0

func PostSecretTarget(ctx context.Context, input *PostSecretTargetInput) (*PostSecretTargetOutput, error)

type PostTokenInput added in v5.6.0

type PostTokenInput struct{}

type PostTokenOutput added in v5.6.0

type PostTokenOutput struct {
	Body string
}

func PostToken

func PostToken(ctx context.Context, _ *PostTokenInput) (*PostTokenOutput, error)

type PostUserBody added in v5.6.0

type PostUserBody struct {
	Login  string `json:"login" minLength:"1" doc:"user login name"`
	Email  string `json:"email" doc:"user email"`
	Avatar string `json:"avatar_url,omitempty" doc:"user avatar URL"`
}

type PostUserInput added in v5.6.0

type PostUserInput struct {
	Body PostUserBody
}

type PostUserOutput added in v5.6.0

type PostUserOutput struct {
	Body *model.User
}

func PostUser

func PostUser(ctx context.Context, input *PostUserInput) (*PostUserOutput, error)

type PutNotificationConfigBody added in v5.6.0

type PutNotificationConfigBody struct {
	IsEnabled bool                      `json:"is_enabled" doc:"whether notifications are enabled"`
	Events    []model.NotificationEvent `json:"events,omitempty" doc:"events to notify on"`
}

type PutRepoNotificationConfigInput added in v5.6.0

type PutRepoNotificationConfigInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Body   PutNotificationConfigBody
}

type PutRepoNotificationConfigOutput added in v5.6.0

type PutRepoNotificationConfigOutput struct {
	Body *model.NotificationConfig
}

func PutRepoNotificationConfig added in v5.6.0

func PutRepoNotificationConfig(ctx context.Context, input *PutRepoNotificationConfigInput) (*PutRepoNotificationConfigOutput, error)

type RepairAllReposInput added in v5.6.0

type RepairAllReposInput struct{}

type RepairRepoInput added in v5.6.0

type RepairRepoInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
}

type RepoFields added in v5.6.0

type RepoFields model.Repo

RepoFields is a method-free copy of model.Repo for clean huma schema generation.

type RepoResponse

type RepoResponse struct {
	RepoFields
	Messages []string `json:"messages,omitempty"`
}

RepoResponse wraps a Repo with optional messages for the frontend.

type RerunStepInput added in v5.9.0

type RerunStepInput struct {
	RepoID     int64 `path:"repo_id" doc:"the repository id"`
	Number     int64 `path:"number" doc:"the pipeline's number"`
	WorkflowID int64 `path:"workflow_id" doc:"the workflow's id"`
	StepID     int64 `path:"step_id" doc:"the step's id"`
}

type RerunStepOutput added in v5.9.0

type RerunStepOutput struct {
	Body *model.Pipeline
}

func RerunStep added in v5.9.0

func RerunStep(ctx context.Context, input *RerunStepInput) (*RerunStepOutput, error)

type RerunWorkflowInput added in v5.6.0

type RerunWorkflowInput struct {
	RepoID     int64 `path:"repo_id" doc:"the repository id"`
	Number     int64 `path:"number" doc:"the pipeline's number"`
	WorkflowID int64 `path:"workflow_id" doc:"the workflow's id"`
}

type RerunWorkflowOutput added in v5.6.0

type RerunWorkflowOutput struct {
	Body *model.Pipeline
}

func RerunWorkflow added in v5.5.0

func RerunWorkflow(ctx context.Context, input *RerunWorkflowInput) (*RerunWorkflowOutput, error)

type RunCronInput added in v5.6.0

type RunCronInput struct {
	RepoID int64 `path:"repo_id" doc:"the repository id"`
	Cron   int64 `path:"cron" doc:"the cron job id"`
}

type RunCronOutput added in v5.6.0

type RunCronOutput struct {
	Body *model.Pipeline
}

func RunCron

func RunCron(ctx context.Context, input *RunCronInput) (*RunCronOutput, error)

type RunMaintenanceNowInput added in v5.6.0

type RunMaintenanceNowInput struct {
	Body RunMaintenanceRequest
}

type RunMaintenanceNowOutput added in v5.6.0

type RunMaintenanceNowOutput struct {
	Body RunMaintenanceResponse
}

type RunMaintenanceRequest

type RunMaintenanceRequest struct {
	Job    string `json:"job" doc:"The maintenance job to run"`
	DryRun bool   `json:"dry_run,omitempty" doc:"Run in dry-run mode (applicable to kubernetesCleanup and orphanedDataCleanup)"`
}

RunMaintenanceRequest represents the request payload for running maintenance.

type RunMaintenanceResponse added in v5.6.0

type RunMaintenanceResponse struct {
	Message string `json:"message"`
	Job     string `json:"job"`
}

type SecretViewAuthorizer

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

SecretViewAuthorizer handles authorization for viewing abbreviated secret values. This is separate from the standard middleware permission checks because viewing secret values requires explicit permissions, not auto-granted admin permissions.

func NewSecretViewAuthorizer

func NewSecretViewAuthorizer(store store.Store, membership cache.MembershipService) *SecretViewAuthorizer

NewSecretViewAuthorizer creates a new SecretViewAuthorizer instance.

func NewSecretViewAuthorizerFromContext

func NewSecretViewAuthorizerFromContext(c *gin.Context, membership cache.MembershipService) *SecretViewAuthorizer

NewSecretViewAuthorizerFromContext creates a SecretViewAuthorizer from gin context.

func (*SecretViewAuthorizer) CanViewGlobalSecret

func (a *SecretViewAuthorizer) CanViewGlobalSecret(user *model.User) bool

CanViewGlobalSecret checks if user is an instance admin. Only instance admins can view global secret values.

func (*SecretViewAuthorizer) CanViewOrgSecret

func (a *SecretViewAuthorizer) CanViewOrgSecret(c context.Context, user *model.User, org *model.Org, _forge forge.Forge) bool

CanViewOrgSecret checks if user is an org admin via forge membership. Org admin membership (as determined by the forge) is sufficient to view org secrets.

func (*SecretViewAuthorizer) CanViewRepoSecret

func (a *SecretViewAuthorizer) CanViewRepoSecret(user *model.User, repo *model.Repo) bool

CanViewRepoSecret checks if user has EXPLICIT write access to view repo secrets. Instance admins without explicit forge-granted push access cannot view secret values. This ensures that instance admins can only view secrets for repos they have explicit access to via the forge (GitHub/GitLab/etc.), not just by virtue of being admins.

type TestIntegrationInput added in v5.6.0

type TestIntegrationInput struct {
	IntegrationID int64 `path:"integration_id" doc:"the integration's id"`
}

type TestIntegrationOutput added in v5.6.0

type TestIntegrationOutput struct {
	Body TestIntegrationResponse
}

type TestIntegrationResponse added in v5.6.0

type TestIntegrationResponse struct {
	Status string `json:"status"`
}

type TokenResponse added in v5.6.0

type TokenResponse struct {
	Token string `json:"token"`
}

type UnlinkForgeResponse

type UnlinkForgeResponse struct {
	Message       string `json:"message"`
	DisabledRepos int    `json:"disabled_repos"`
}

UnlinkForgeResponse represents the response when unlinking a forge.

type UpdateAccessTokenRequest

type UpdateAccessTokenRequest struct {
	Name   string   `json:"name,omitempty" doc:"token name"`
	Scopes []string `json:"scopes,omitempty" doc:"token scopes"`
}

UpdateAccessTokenRequest is the request body for updating an access token.

type UpdateMaintenanceConfigBody added in v5.6.0

type UpdateMaintenanceConfigBody struct {
	Enabled        bool   `json:"enabled" doc:"whether maintenance is enabled"`
	Schedule       string `json:"schedule,omitempty" doc:"cron schedule"`
	DryRun         bool   `json:"dry_run,omitempty" doc:"dry run mode"`
	StaleThreshold int64  `json:"stale_threshold,omitempty" doc:"stale threshold in seconds"`
}

type UpdateMaintenanceConfigByActionInput added in v5.6.0

type UpdateMaintenanceConfigByActionInput struct {
	Action string `path:"action" doc:"Action type (vacuum, kubernetes_cleanup, stale_agent_cleanup, docker_cleanup, orphaned_data_cleanup)"`
	Body   UpdateMaintenanceConfigBody
}

type UpdateMaintenanceConfigByActionOutput added in v5.6.0

type UpdateMaintenanceConfigByActionOutput struct {
	Body *model.MaintenanceConfig
}

type UpdateMaintenanceConfigInput added in v5.6.0

type UpdateMaintenanceConfigInput struct {
	Body UpdateMaintenanceConfigBody
}

type UpdateMaintenanceConfigOutput added in v5.6.0

type UpdateMaintenanceConfigOutput struct {
	Body *model.MaintenanceConfig
}

type UserForgeResponse

type UserForgeResponse struct {
	ID          int64           `json:"id"`
	ForgeID     int64           `json:"forge_id"`
	ForgeName   string          `json:"forge_name,omitempty"`
	ForgeType   string          `json:"forge_type,omitempty"`
	ForgeIcon   string          `json:"forge_icon,omitempty"`
	IsPrimary   bool            `json:"is_primary"`
	ForgeLogin  string          `json:"forge_login"`
	ForgeEmail  string          `json:"forge_email,omitempty"`
	ForgeAvatar string          `json:"forge_avatar,omitempty"`
	LinkedAt    int64           `json:"linked_at"`
	LastUsed    int64           `json:"last_used,omitempty"`
	Status      UserForgeStatus `json:"status"`
	Expiry      int64           `json:"expiry,omitempty"`
}

UserForgeResponse represents a user's forge connection in API responses.

type UserForgeStatus

type UserForgeStatus string

UserForgeStatus represents the connection status of a linked forge.

const (
	// UserForgeStatusActive means the token is valid and not expired.
	UserForgeStatusActive UserForgeStatus = "active"
	// UserForgeStatusExpired means the token has expired and needs re-authentication.
	UserForgeStatusExpired UserForgeStatus = "expired"
)

type WorkflowApprovalInput added in v5.13.0

type WorkflowApprovalInput struct {
	RepoID         int64 `path:"repo_id"     doc:"the repository id"`
	PipelineNumber int64 `path:"number"      doc:"the pipeline number"`
	WorkflowID     int64 `path:"workflow_id" doc:"the workflow id"`
	Body           *struct {
		Reason string `json:"reason,omitempty" doc:"optional human-readable note recorded in the audit trail"`
	}
}

WorkflowApprovalInput describes the path/body shape for approve and decline.

type WorkflowApprovalOutput added in v5.13.0

type WorkflowApprovalOutput struct {
	Body *model.Workflow
}

WorkflowApprovalOutput returns the updated workflow row.

func PostWorkflowApprove added in v5.13.0

func PostWorkflowApprove(ctx context.Context, input *WorkflowApprovalInput) (*WorkflowApprovalOutput, error)

PostWorkflowApprove approves a per-workflow approval gate.

func PostWorkflowDecline added in v5.13.0

func PostWorkflowDecline(ctx context.Context, input *WorkflowApprovalInput) (*WorkflowApprovalOutput, error)

PostWorkflowDecline declines a per-workflow approval gate.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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