Documentation
¶
Overview ¶
Package models provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- type Branch
- type BranchesResponse
- type CacheInvalidationResponse
- type Error
- type GetPipelineJobTraceParams
- type GetRepositoryParams
- type GitServerParam
- type InvalidateCacheParams
- type InvalidateCacheParamsEndpoint
- type ListBranchesParams
- type ListOptions
- type ListPipelineJobsParams
- type ListPipelinesParams
- type ListPipelinesParamsStatus
- type ListPullRequestsParams
- type ListPullRequestsParamsState
- type ListRepositoriesParams
- type ListUserOrganizationsParams
- type Organization
- type OrganizationsResponse
- type Owner
- type Pagination
- type Pipeline
- type PipelineJob
- type PipelineJobTraceResponse
- type PipelineJobsResponse
- type PipelineListOptions
- type PipelineResponse
- type PipelineSource
- type PipelineStatus
- type PipelineVariable
- type PipelineVariableVariableType
- type PipelinesResponse
- type PullRequest
- type PullRequestListOptions
- type PullRequestState
- type PullRequestsResponse
- type RepoNameParam
- type RepoNameQueryParam
- type RepoOwnerParam
- type RepositoriesResponse
- type Repository
- type RepositoryDetails
- type RepositoryDetailsVisibility
- type RepositoryVisibility
- type TriggerPipelineParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchesResponse ¶
type BranchesResponse struct {
Data []Branch `json:"data"`
}
BranchesResponse defines model for BranchesResponse.
type CacheInvalidationResponse ¶
type CacheInvalidationResponse struct {
// Endpoint The endpoint for which cache was invalidated
Endpoint string `json:"endpoint"`
// Message A message indicating the result of the cache invalidation
Message string `json:"message"`
}
CacheInvalidationResponse defines model for CacheInvalidationResponse.
type Error ¶
type Error struct {
// Code A short error code representing the type of error
Code string `json:"code"`
// Message A human-readable message providing more details about the error
Message string `json:"message"`
}
Error defines model for Error.
type GetPipelineJobTraceParams ¶ added in v0.6.0
type GetPipelineJobTraceParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Project Project path (e.g., "krci/my-app")
Project string `form:"project" json:"project"`
// JobId Job ID
JobId string `form:"jobId" json:"jobId"`
}
GetPipelineJobTraceParams defines parameters for GetPipelineJobTrace.
type GetRepositoryParams ¶
type GetRepositoryParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Owner The owner of the repository.
Owner RepoOwnerParam `form:"owner" json:"owner"`
// RepoName The name of the repository.
RepoName RepoNameParam `form:"repoName" json:"repoName"`
}
GetRepositoryParams defines parameters for GetRepository.
type InvalidateCacheParams ¶
type InvalidateCacheParams struct {
// Endpoint The endpoint name to invalidate cache for (repositories, organizations, branches, pullrequests, pipelines)
Endpoint InvalidateCacheParamsEndpoint `form:"endpoint" json:"endpoint"`
}
InvalidateCacheParams defines parameters for InvalidateCache.
type InvalidateCacheParamsEndpoint ¶
type InvalidateCacheParamsEndpoint string
InvalidateCacheParamsEndpoint defines parameters for InvalidateCache.
const ( Branches InvalidateCacheParamsEndpoint = "branches" Organizations InvalidateCacheParamsEndpoint = "organizations" Pipelines InvalidateCacheParamsEndpoint = "pipelines" Pullrequests InvalidateCacheParamsEndpoint = "pullrequests" Repositories InvalidateCacheParamsEndpoint = "repositories" )
Defines values for InvalidateCacheParamsEndpoint.
type ListBranchesParams ¶
type ListBranchesParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Owner The owner of the repository.
Owner RepoOwnerParam `form:"owner" json:"owner"`
// RepoName The name of the repository.
RepoName RepoNameParam `form:"repoName" json:"repoName"`
}
ListBranchesParams defines parameters for ListBranches.
type ListOptions ¶
type ListOptions struct {
Name *string
}
type ListPipelineJobsParams ¶ added in v0.6.0
type ListPipelineJobsParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Project Project path (e.g., "krci/my-app")
Project string `form:"project" json:"project"`
// PipelineId Pipeline ID
PipelineId string `form:"pipelineId" json:"pipelineId"`
}
ListPipelineJobsParams defines parameters for ListPipelineJobs.
type ListPipelinesParams ¶ added in v0.3.0
type ListPipelinesParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Project Project path (e.g., "epmd-edp/temp/sk-test")
Project string `form:"project" json:"project"`
// Ref Filter by branch/tag ref
Ref *string `form:"ref,omitempty" json:"ref,omitempty"`
// Status Filter by pipeline status
Status *ListPipelinesParamsStatus `form:"status,omitempty" json:"status,omitempty"`
Page *int `form:"page,omitempty" json:"page,omitempty"`
PerPage *int `form:"perPage,omitempty" json:"perPage,omitempty"`
}
ListPipelinesParams defines parameters for ListPipelines.
type ListPipelinesParamsStatus ¶ added in v0.3.0
type ListPipelinesParamsStatus string
ListPipelinesParamsStatus defines parameters for ListPipelines.
const ( Cancelled ListPipelinesParamsStatus = "cancelled" Failed ListPipelinesParamsStatus = "failed" Manual ListPipelinesParamsStatus = "manual" Pending ListPipelinesParamsStatus = "pending" Running ListPipelinesParamsStatus = "running" Skipped ListPipelinesParamsStatus = "skipped" Success ListPipelinesParamsStatus = "success" )
Defines values for ListPipelinesParamsStatus.
type ListPullRequestsParams ¶ added in v0.2.0
type ListPullRequestsParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Owner The owner of the repository.
Owner RepoOwnerParam `form:"owner" json:"owner"`
// RepoName The name of the repository.
RepoName RepoNameParam `form:"repoName" json:"repoName"`
// State Filter by state. Defaults to open.
State *ListPullRequestsParamsState `form:"state,omitempty" json:"state,omitempty"`
Page *int `form:"page,omitempty" json:"page,omitempty"`
PerPage *int `form:"perPage,omitempty" json:"perPage,omitempty"`
}
ListPullRequestsParams defines parameters for ListPullRequests.
type ListPullRequestsParamsState ¶ added in v0.2.0
type ListPullRequestsParamsState string
ListPullRequestsParamsState defines parameters for ListPullRequests.
const ( ListPullRequestsParamsStateAll ListPullRequestsParamsState = "all" ListPullRequestsParamsStateClosed ListPullRequestsParamsState = "closed" ListPullRequestsParamsStateMerged ListPullRequestsParamsState = "merged" ListPullRequestsParamsStateOpen ListPullRequestsParamsState = "open" )
Defines values for ListPullRequestsParamsState.
type ListRepositoriesParams ¶
type ListRepositoriesParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Owner The owner of the repository.
Owner RepoOwnerParam `form:"owner" json:"owner"`
// RepoName The name of the repository to search for.
RepoName *RepoNameQueryParam `form:"repoName,omitempty" json:"repoName,omitempty"`
}
ListRepositoriesParams defines parameters for ListRepositories.
type ListUserOrganizationsParams ¶
type ListUserOrganizationsParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
}
ListUserOrganizationsParams defines parameters for ListUserOrganizations.
type Organization ¶
type Organization struct {
AvatarUrl *string `json:"avatar_url,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
}
Organization defines model for Organization.
type OrganizationsResponse ¶
type OrganizationsResponse struct {
Data []Organization `json:"data"`
}
OrganizationsResponse defines model for OrganizationsResponse.
type Owner ¶
type Owner struct {
AvatarUrl *string `json:"avatar_url,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
}
Owner defines model for Owner.
type Pagination ¶
type Pagination struct {
Page *int `json:"page,omitempty"`
PerPage *int `json:"per_page,omitempty"`
Total int `json:"total"`
}
Pagination defines model for Pagination.
type Pipeline ¶ added in v0.3.0
type Pipeline struct {
CreatedAt time.Time `json:"created_at"`
// Id Pipeline ID (string to accommodate different providers)
Id string `json:"id"`
// ProjectId Project/repository ID
ProjectId *string `json:"project_id,omitempty"`
// Ref Branch/tag ref
Ref string `json:"ref"`
// Sha Commit SHA
Sha string `json:"sha"`
// Source What triggered the pipeline
Source *PipelineSource `json:"source,omitempty"`
// Status Normalized pipeline status
Status PipelineStatus `json:"status"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// WebUrl URL to view pipeline in provider UI
WebUrl string `json:"web_url"`
}
Pipeline defines model for Pipeline.
type PipelineJob ¶ added in v0.6.0
type PipelineJob struct {
// AllowFailure Whether the job is allowed to fail without failing the pipeline
AllowFailure *bool `json:"allow_failure,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
// Duration Job duration in seconds
Duration *float32 `json:"duration,omitempty"`
// FailureReason Reason the job failed, when applicable
FailureReason *string `json:"failure_reason,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
// Id Job ID (string to accommodate different providers)
Id string `json:"id"`
// Name Job name
Name string `json:"name"`
// Ref Branch/tag ref
Ref *string `json:"ref,omitempty"`
// Stage Pipeline stage the job belongs to
Stage string `json:"stage"`
StartedAt *time.Time `json:"started_at,omitempty"`
// Status Job status (provider-native, e.g. success, failed, running, manual)
Status string `json:"status"`
// WebUrl URL to view the job in the provider UI
WebUrl *string `json:"web_url,omitempty"`
}
PipelineJob defines model for PipelineJob.
type PipelineJobTraceResponse ¶ added in v0.6.0
type PipelineJobTraceResponse struct {
// Content Raw job trace (log) text
Content string `json:"content"`
// JobId Job ID the trace belongs to
JobId string `json:"job_id"`
// Truncated Whether the trace was truncated due to size limit
Truncated *bool `json:"truncated,omitempty"`
}
PipelineJobTraceResponse defines model for PipelineJobTraceResponse.
type PipelineJobsResponse ¶ added in v0.6.0
type PipelineJobsResponse struct {
Data []PipelineJob `json:"data"`
}
PipelineJobsResponse defines model for PipelineJobsResponse.
type PipelineListOptions ¶ added in v0.3.0
type PipelineResponse ¶ added in v0.2.0
type PipelineResponse struct {
// Id Pipeline ID
Id int `json:"id"`
// Ref Branch/tag/commit used
Ref string `json:"ref"`
// Sha Commit SHA
Sha *string `json:"sha,omitempty"`
// Status Pipeline status
Status string `json:"status"`
// WebUrl URL to view pipeline in GitLab UI
WebUrl string `json:"web_url"`
}
PipelineResponse defines model for PipelineResponse.
type PipelineSource ¶ added in v0.3.0
type PipelineSource string
PipelineSource What triggered the pipeline
const ( PipelineSourceManual PipelineSource = "manual" PipelineSourceMergeRequest PipelineSource = "merge_request" PipelineSourceOther PipelineSource = "other" PipelineSourcePush PipelineSource = "push" PipelineSourceSchedule PipelineSource = "schedule" PipelineSourceTrigger PipelineSource = "trigger" )
Defines values for PipelineSource.
type PipelineStatus ¶ added in v0.3.0
type PipelineStatus string
PipelineStatus Normalized pipeline status
const ( PipelineStatusCancelled PipelineStatus = "cancelled" PipelineStatusFailed PipelineStatus = "failed" PipelineStatusManual PipelineStatus = "manual" PipelineStatusPending PipelineStatus = "pending" PipelineStatusRunning PipelineStatus = "running" PipelineStatusSkipped PipelineStatus = "skipped" PipelineStatusSuccess PipelineStatus = "success" )
Defines values for PipelineStatus.
type PipelineVariable ¶ added in v0.2.0
type PipelineVariable struct {
// Key Variable name
Key string `json:"key"`
// Value Variable value
Value string `json:"value"`
// VariableType Type of variable
VariableType *PipelineVariableVariableType `json:"variable_type,omitempty"`
}
PipelineVariable defines model for PipelineVariable.
type PipelineVariableVariableType ¶ added in v0.2.0
type PipelineVariableVariableType string
PipelineVariableVariableType Type of variable
const ( EnvVar PipelineVariableVariableType = "env_var" File PipelineVariableVariableType = "file" )
Defines values for PipelineVariableVariableType.
type PipelinesResponse ¶ added in v0.3.0
type PipelinesResponse struct {
Data []Pipeline `json:"data"`
Pagination Pagination `json:"pagination"`
}
PipelinesResponse defines model for PipelinesResponse.
type PullRequest ¶ added in v0.2.0
type PullRequest struct {
Author *Owner `json:"author,omitempty"`
// CommitSha Head commit SHA of the source branch
CommitSha *string `json:"commit_sha,omitempty"`
CreatedAt time.Time `json:"created_at"`
// Description Pull request body text
Description *string `json:"description,omitempty"`
// Draft Whether this pull request is a draft
Draft *bool `json:"draft,omitempty"`
Id string `json:"id"`
Number int `json:"number"`
SourceBranch string `json:"source_branch"`
State PullRequestState `json:"state"`
TargetBranch string `json:"target_branch"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
PullRequest defines model for PullRequest.
type PullRequestListOptions ¶ added in v0.2.0
type PullRequestState ¶ added in v0.2.0
type PullRequestState string
PullRequestState defines model for PullRequest.State.
const ( PullRequestStateClosed PullRequestState = "closed" PullRequestStateMerged PullRequestState = "merged" PullRequestStateOpen PullRequestState = "open" )
Defines values for PullRequestState.
type PullRequestsResponse ¶ added in v0.2.0
type PullRequestsResponse struct {
Data []PullRequest `json:"data"`
Pagination Pagination `json:"pagination"`
}
PullRequestsResponse defines model for PullRequestsResponse.
type RepoNameQueryParam ¶
type RepoNameQueryParam = string
RepoNameQueryParam defines model for repoNameQueryParam.
type RepositoriesResponse ¶
type RepositoriesResponse struct {
Data []Repository `json:"data"`
}
RepositoriesResponse defines model for RepositoriesResponse.
type Repository ¶
type Repository struct {
DefaultBranch *string `json:"default_branch,omitempty"`
Description *string `json:"description,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
Owner *string `json:"owner,omitempty"`
Url *string `json:"url,omitempty"`
Visibility *RepositoryVisibility `json:"visibility,omitempty"`
}
Repository defines model for Repository.
type RepositoryDetails ¶
type RepositoryDetails struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
DefaultBranch *string `json:"default_branch,omitempty"`
Description *string `json:"description,omitempty"`
ForksCount *int `json:"forks_count,omitempty"`
HttpUrl *string `json:"http_url,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
Owner *Owner `json:"owner,omitempty"`
SshUrl *string `json:"ssh_url,omitempty"`
StarsCount *int `json:"stars_count,omitempty"`
Url *string `json:"url,omitempty"`
Visibility *RepositoryDetailsVisibility `json:"visibility,omitempty"`
}
RepositoryDetails defines model for RepositoryDetails.
type RepositoryDetailsVisibility ¶
type RepositoryDetailsVisibility string
RepositoryDetailsVisibility defines model for RepositoryDetails.Visibility.
const ( RepositoryDetailsVisibilityPrivate RepositoryDetailsVisibility = "private" RepositoryDetailsVisibilityPublic RepositoryDetailsVisibility = "public" )
Defines values for RepositoryDetailsVisibility.
type RepositoryVisibility ¶
type RepositoryVisibility string
RepositoryVisibility defines model for Repository.Visibility.
const ( RepositoryVisibilityPrivate RepositoryVisibility = "private" RepositoryVisibilityPublic RepositoryVisibility = "public" )
Defines values for RepositoryVisibility.
type TriggerPipelineParams ¶ added in v0.2.0
type TriggerPipelineParams struct {
// GitServer The Git server name.
GitServer GitServerParam `form:"gitServer" json:"gitServer"`
// Project Project path (e.g., "epmd-edp/temp/sk-test")
Project string `form:"project" json:"project"`
// Ref Branch/tag/commit (e.g., "main")
Ref string `form:"ref" json:"ref"`
// Variables JSON array of pipeline variables
Variables *string `form:"variables,omitempty" json:"variables,omitempty"`
}
TriggerPipelineParams defines parameters for TriggerPipeline.