Documentation
¶
Index ¶
- type AddNamespaceMemberRequest
- type AddNamespaceMemberResponse
- type ArtifactItem
- type BuildTagOption
- type Builder
- type BuilderItem
- type BuilderRunnerItem
- type CodeRepositoryBranchItem
- type CodeRepositoryItem
- type CodeRepositoryOwnerItem
- type CommonList
- type CreateBuilderRequest
- type CreateCacheRequest
- type CreateGcArtifactRunnerRequest
- type CreateGcBlobRunnerRequest
- type CreateGcRepositoryRunnerRequest
- type CreateGcTagRunnerRequest
- type CreateRepositoryRequest
- type CreateRepositoryResponse
- type DaemonArtifactPushedPayload
- type DaemonBuilderPayload
- type DaemonCodeRepositoryPayload
- type DaemonGcPayload
- type DaemonGcRepositoryPayload
- type DaemonTagPushedPayload
- type DaemonWebhookArtifact
- type DaemonWebhookNamespace
- type DaemonWebhookPayload
- type DaemonWebhookPayloadArtifact
- type DaemonWebhookPayloadMember
- type DaemonWebhookPayloadNamespace
- type DaemonWebhookPayloadPing
- type DaemonWebhookPayloadRepository
- type DaemonWebhookPayloadTag
- type DaemonWebhookRepository
- type DaemonWebhookTag
- type DeleteArtifactRequest
- type DeleteCacheRequest
- type DeleteNamespaceMemberRequest
- type DeleteNamespaceRequest
- type DeleteRepositoryRequest
- type DeleteTagRequest
- type DeleteWebhookLogRequest
- type DeleteWebhookRequest
- type GcArtifactRecordItem
- type GcArtifactRunnerItem
- type GcBlobRecordItem
- type GcBlobRunnerItem
- type GcRepositoryRecordItem
- type GcRepositoryRunnerItem
- type GcTagRecordItem
- type GcTagRunnerItem
- type GetArtifactRequest
- type GetBuilderRequest
- type GetCacheRequest
- type GetCodeRepositoryBranchRequest
- type GetCodeRepositoryRequest
- type GetCodeRepositoryResyncRequest
- type GetCodeRepositoryUser3rdPartyRequest
- type GetCodeRepositoryUser3rdPartyResponse
- type GetGcArtifactLatestRunnerRequest
- type GetGcArtifactRecordRequest
- type GetGcArtifactRuleRequest
- type GetGcArtifactRuleResponse
- type GetGcArtifactRunnerRequest
- type GetGcBlobLatestRunnerRequest
- type GetGcBlobRecordRequest
- type GetGcBlobRuleRequest
- type GetGcBlobRuleResponse
- type GetGcBlobRunnerRequest
- type GetGcRepositoryLatestRunnerRequest
- type GetGcRepositoryRecordRequest
- type GetGcRepositoryRuleRequest
- type GetGcRepositoryRuleResponse
- type GetGcRepositoryRunnerRequest
- type GetGcTagLatestRunnerRequest
- type GetGcTagRecordRequest
- type GetGcTagRuleRequest
- type GetGcTagRuleResponse
- type GetGcTagRunnerRequest
- type GetNamespaceMemberSelfRequest
- type GetNamespaceRequest
- type GetRepositoryRequest
- type GetRunner
- type GetRunnerLog
- type GetRunnerRerun
- type GetRunnerStop
- type GetSystemConfigDaemon
- type GetSystemConfigOAuth2
- type GetSystemConfigResponse
- type GetSystemEndpointResponse
- type GetSystemVersionResponse
- type GetTagRequest
- type GetUserListRequest
- type GetUserSelfResponse
- type GetValidatorReferenceRequest
- type GetValidatorTagRequest
- type GetWebhookLogRequest
- type GetWebhookLogResendRequest
- type GetWebhookPingRequest
- type GetWebhookRequest
- type ListArtifactRequest
- type ListBuilderRunnersRequest
- type ListCodeRepositoryBranchesRequest
- type ListCodeRepositoryOwnerRequest
- type ListCodeRepositoryProvidersResponse
- type ListCodeRepositoryRequest
- type ListGcArtifactRecordsRequest
- type ListGcArtifactRunnersRequest
- type ListGcBlobRecordsRequest
- type ListGcBlobRunnersRequest
- type ListGcRepositoryRecordsRequest
- type ListGcRepositoryRunnersRequest
- type ListGcTagRecordsRequest
- type ListGcTagRunnersRequest
- type ListNamespaceMemberRequest
- type ListNamespaceRequest
- type ListRepositoryRequest
- type ListTagRequest
- type ListWebhookLogRequest
- type ListWebhookRequest
- type NamespaceItem
- type NamespaceMemberItem
- type Oauth2CallbackRequest
- type Oauth2CallbackResponse
- type Oauth2ClientIDRequest
- type Oauth2ClientIDResponse
- type Oauth2LoginRequest
- type Oauth2RedirectCallbackRequest
- type Oauth2UserInfo
- type Pagination
- type PostCodeRepositorySetupBuilder
- type PostCodeRepositorySetupBuilderSwagger
- type PostNamespaceRequest
- type PostNamespaceResponse
- type PostOrPutBuilderRequest
- type PostRunnerRun
- type PostUserLoginResponse
- type PostUserLogoutRequest
- type PostUserRecoverPasswordRequest
- type PostUserRecoverResetPasswordRequest
- type PostUserRequest
- type PostUserResetPasswordPasswordRequest
- type PostUserSignupRequest
- type PostUserSignupResponse
- type PostUserTokenResponse
- type PostWebhookRequest
- type PutUserRequest
- type PutUserSelfRequest
- type PutUserSelfResetPasswordRequest
- type PutWebhookRequest
- type RepositoryItem
- type RetentionPatternPayload
- type RunOrRerunRunnerResponse
- type Sortable
- type TagItem
- type TagItemArtifact
- type TaskProxyArtifact
- type TaskSbom
- type TaskVulnerability
- type UpdateBuilderRequest
- type UpdateGcArtifactRuleRequest
- type UpdateGcBlobRuleRequest
- type UpdateGcRepositoryRuleRequest
- type UpdateGcTagRuleRequest
- type UpdateNamespaceMemberRequest
- type UpdateNamespaceRequest
- type UpdateRepositoryRequest
- type UserItem
- type ValidateCronRequest
- type ValidatePasswordRequest
- type ValidateRegexpRequest
- type WebhookItem
- type WebhookLogItem
- type WebhookPayload
- type WebhookPayloadGcArtifact
- type WebhookPayloadGcBlob
- type WebhookPayloadGcRepository
- type WebhookPayloadGcTag
- type WebhookPayloadUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddNamespaceMemberRequest ¶
type AddNamespaceMemberRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" swaggerignore:"true"`
UserID int64 `json:"user_id" example:"10"`
Role enums.NamespaceRole `json:"role" validate:"is_valid_namespace_role" example:"NamespaceReader"`
}
AddNamespaceMemberRequest ...
type AddNamespaceMemberResponse ¶
type AddNamespaceMemberResponse struct {
ID int64 `json:"id" example:"10"`
}
AddNamespaceMemberResponse ...
type ArtifactItem ¶
type ArtifactItem struct {
ID int64 `json:"id"`
Digest string `json:"digest"`
ConfigRaw string `json:"config_raw"`
Size int64 `json:"size"`
BlobSize int64 `json:"blob_size"`
LastPull string `json:"last_pull"`
PushedAt string `json:"pushed_at"`
PullTimes int64 `json:"pull_times"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
ArtifactItem represents an artifact.
type BuildTagOption ¶
BuildTagOption ...
type Builder ¶
type Builder struct {
BuilderID int64 `env:"BUILDER_ID,notEmpty"`
RunnerID int64 `env:"RUNNER_ID,notEmpty"`
Authorization string `env:"AUTHORIZATION,notEmpty"`
Endpoint string `env:"ENDPOINT,notEmpty"`
Repository string `env:"REPOSITORY,notEmpty"`
Tag string `env:"TAG,notEmpty"`
Source enums.BuilderSource `env:"SOURCE,notEmpty"`
Dockerfile *string `env:"DOCKERFILE"`
ScmProvider *enums.ScmProvider `env:"SCM_PROVIDER"`
ScmCredentialType *enums.ScmCredentialType `env:"SCM_CREDENTIAL_TYPE"`
ScmSshKey *string `env:"SCM_SSH_KEY"`
ScmToken *string `env:"SCM_TOKEN"`
ScmUsername *string `env:"SCM_USERNAME"`
ScmPassword *string `env:"SCM_PASSWORD"`
ScmRepository *string `env:"SCM_REPOSITORY"`
ScmBranch *string `env:"SCM_BRANCH" envDefault:"main"`
ScmDepth *int `env:"SCM_DEPTH" envDefault:"0"`
ScmSubmodule *bool `env:"SCM_SUBMODULE" envDefault:"false"`
OciRegistryDomain []string `env:"OCI_REGISTRY_DOMAIN" envSeparator:","`
OciRegistryUsername []string `env:"OCI_REGISTRY_USERNAME" envSeparator:","`
OciRegistryPassword []string `env:"OCI_REGISTRY_PASSWORD" envSeparator:","`
BuildkitInsecureRegistries []string `env:"BUILDKIT_INSECURE_REGISTRIES" envSeparator:","`
BuildkitCacheDir string `env:"BUILDKIT_CACHE_DIR" envDefault:"/tmp/buildkit"`
BuildkitContext string `env:"BUILDKIT_CONTEXT" envDefault:"."`
BuildkitDockerfile string `env:"BUILDKIT_DOCKERFILE" envDefault:"Dockerfile"`
BuildkitPlatforms []enums.OciPlatform `env:"BUILDKIT_PLATFORMS" envSeparator:","`
BuildkitBuildArgs []string `env:"BUILDKIT_BUILD_ARGS" envSeparator:","`
SigningPrivateKey string `env:"SIGNING_PRIVATE_KEY,notEmpty"`
}
Builder config for builder
type BuilderItem ¶
type BuilderItem struct {
ID int64 `json:"id" example:"10"`
RepositoryID int64 `json:"repository_id" example:"10"`
Source enums.BuilderSource `json:"source" example:"Dockerfile"`
// source CodeRepository
CodeRepositoryID *int64 `json:"code_repository_id" example:"10"`
// source Dockerfile
Dockerfile *string `json:"dockerfile" example:"xxx"`
// source SelfCodeRepository
ScmRepository *string `json:"scm_repository" example:"https://github.com/go-sigma/sigma.git"`
ScmCredentialType *enums.ScmCredentialType `json:"scm_credential_type" example:"ssh"`
ScmSshKey *string `json:"scm_ssh_key" example:"xxxx"`
ScmToken *string `json:"scm_token" example:"xxxx"`
ScmUsername *string `json:"scm_username" example:"sigma"`
ScmPassword *string `json:"scm_password" example:"sigma"`
ScmProvider *enums.ScmProvider `json:"scm_provider" example:"github"`
ScmBranch *string `json:"scm_branch" example:"main"`
ScmDepth *int `json:"scm_depth" example:"0"`
ScmSubmodule *bool `json:"scm_submodule" example:"false"`
CronRule *string `json:"cron_rule" example:"* * * * *"`
CronBranch *string `json:"cron_branch" example:"main"`
CronTagTemplate *string `json:"cron_tag_template" example:"{.Ref}"`
WebhookBranchName *string `json:"webhook_branch_name" example:"main"`
WebhookBranchTagTemplate *string `json:"webhook_branch_tag_template" example:"{.Ref}"`
WebhookTagTagTemplate *string `json:"webhook_tag_tag_template" example:"{.Ref}"`
BuildkitInsecureRegistries []string `json:"buildkit_insecure_registries,omitempty" example:"test.com,xxx.com@http"`
BuildkitContext *string `json:"buildkit_context"`
BuildkitDockerfile *string `json:"buildkit_dockerfile"`
BuildkitPlatforms []enums.OciPlatform `json:"buildkit_platforms" example:"linux/amd64"`
BuildkitBuildArgs *string `json:"buildkit_build_args" example:"a=b,c=d"`
}
BuilderItem ...
type BuilderRunnerItem ¶
type BuilderRunnerItem struct {
ID int64 `json:"id" example:"10"`
BuilderID int64 `json:"builder_id" example:"10"`
Log []byte `json:"log" example:"log"`
Status enums.BuildStatus `json:"status" example:"Success"`
StatusMessage *string `json:"status_message" example:""`
Tag *string `json:"tag" example:"v1.0"`
RawTag string `json:"raw_tag" example:"v1.0"`
Description *string `json:"description" example:"description"`
ScmBranch *string `json:"scm_branch" example:"main"`
StartedAt *int64 `json:"started_at" example:"1702128050507"`
EndedAt *int64 `json:"ended_at" example:"1702128050507"`
RawDuration *int64 `json:"raw_duration" example:"10"`
Duration *string `json:"duration" example:"1h"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
BuilderRunnerItem ...
type CodeRepositoryBranchItem ¶
type CodeRepositoryBranchItem struct {
ID int64 `json:"id" example:"1"`
Name string `json:"name" example:"main"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
CodeRepositoryBranchItem ...
type CodeRepositoryItem ¶
type CodeRepositoryItem struct {
ID int64 `json:"id" example:"1"`
RepositoryID string `json:"repository_id" example:"1"`
Provider enums.ScmProvider `json:"provider" example:"github"`
Name string `json:"name" example:"sigma"`
OwnerID int64 `json:"owner_id" example:"1"`
Owner string `json:"owner" example:"go-sigma"`
IsOrg bool `json:"is_org" example:"true"`
CloneUrl string `json:"clone_url" example:"https://github.com/go-sigma/sigma.git"`
SshUrl string `json:"ssh_url" example:"git@github.com:go-sigma/sigma.git"`
OciRepoCount int64 `json:"oci_repo_count" example:"1"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
CodeRepositoryItem ...
type CodeRepositoryOwnerItem ¶
type CodeRepositoryOwnerItem struct {
ID int64 `json:"id" example:"1"`
OwnerID string `json:"owner_id" example:"1"`
Owner string `json:"owner" example:"go-sigma"`
IsOrg bool `json:"is_org" example:"true"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
CodeRepositoryOwnerItem ...
type CommonList ¶
CommonList is the common list struct
type CreateBuilderRequest ¶
type CreateBuilderRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10" swaggerignore:"true"`
RepositoryID int64 `json:"repository_id" param:"repository_id" example:"10" swaggerignore:"true"`
PostOrPutBuilderRequest
}
CreateBuilderRequest ...
type CreateCacheRequest ¶
type CreateCacheRequest struct {
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
}
CreateCacheRequest ...
type CreateGcArtifactRunnerRequest ¶
type CreateGcArtifactRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
CreateGcArtifactRunnerRequest ...
type CreateGcBlobRunnerRequest ¶
type CreateGcBlobRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
CreateGcBlobRunnerRequest ...
type CreateGcRepositoryRunnerRequest ¶
type CreateGcRepositoryRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
CreateGcRepositoryRunnerRequest ...
type CreateGcTagRunnerRequest ¶
type CreateGcTagRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
CreateGcTagRunnerRequest ...
type CreateRepositoryRequest ¶
type CreateRepositoryRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10" swaggerignore:"true"`
Name string `json:"name" validate:"required,is_valid_repository" example:"test"`
Description *string `json:"description,omitempty" validate:"omitempty,max=30" example:"i am just description"`
Overview *string `json:"overview,omitempty" validate:"omitempty,max=3000" example:"i am just overview"`
SizeLimit *int64 `json:"size_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
TagLimit *int64 `json:"tag_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
Visibility *enums.Visibility `json:"visibility,omitempty" validate:"omitempty,is_valid_visibility" example:"public"`
}
CreateRepositoryRequest represents the request to create a repository.
type CreateRepositoryResponse ¶
type CreateRepositoryResponse struct {
ID int64 `json:"id" example:"21911"`
}
CreateRepositoryResponse represents the response to create a repository.
type DaemonArtifactPushedPayload ¶
type DaemonArtifactPushedPayload struct {
RepositoryID int64 `json:"repository_id"`
}
DaemonArtifactPushedPayload ...
type DaemonBuilderPayload ¶
type DaemonBuilderPayload struct {
Action enums.DaemonBuilderAction `json:"action"`
BuilderID int64 `json:"builder_id"`
RunnerID int64 `json:"runner_id"`
RepositoryID int64 `json:"repository_id"`
}
DaemonBuilderPayload ...
type DaemonCodeRepositoryPayload ¶
type DaemonCodeRepositoryPayload struct {
User3rdPartyID int64 `json:"user_3rdparty_id"`
}
DaemonCodeRepositoryPayload ...
type DaemonGcPayload ¶
type DaemonGcPayload struct {
RunnerID int64 `json:"runner_id"`
}
DaemonGcPayload is the gc daemon payload
type DaemonGcRepositoryPayload ¶
type DaemonGcRepositoryPayload struct {
RunnerID int64 `json:"runner_id"`
}
DaemonGcRepositoryPayload ...
type DaemonTagPushedPayload ¶
type DaemonTagPushedPayload struct {
RepositoryID int64 `json:"repository_id"`
Tag string `json:"tag"`
}
DaemonTagPushedPayload ...
type DaemonWebhookArtifact ¶ added in v1.2.0
type DaemonWebhookArtifact struct {
}
type DaemonWebhookNamespace ¶ added in v1.2.0
type DaemonWebhookNamespace struct {
ID int64 `json:"id" example:"1"`
Name string `json:"name" example:"test"`
Description *string `json:"description,omitempty" example:"i am just description"`
Overview *string `json:"overview,omitempty" example:"i am just overview"`
Visibility enums.Visibility `json:"visibility" example:"private"`
RepositoryLimit int64 `json:"repository_limit" example:"10"`
RepositoryCount int64 `json:"repository_count" example:"10"`
TagLimit int64 `json:"tag_limit" example:"10"`
TagCount int64 `json:"tag_count" example:"10"`
Size int64 `json:"size" example:"10000"`
SizeLimit int64 `json:"size_limit" example:"10000"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
DaemonWebhookNamespace ...
type DaemonWebhookPayload ¶
type DaemonWebhookPayload struct {
NamespaceID *int64 `json:"namespace_id"`
WebhookID int64 `json:"webhook_id"`
WebhookLogID *int64 `json:"webhook_log_id"`
Type enums.WebhookType `json:"type"`
Action enums.WebhookAction `json:"action"`
ResourceType enums.WebhookResourceType `json:"resource_type"`
Payload []byte `json:"payload"`
}
DaemonWebhookPayload ...
type DaemonWebhookPayloadArtifact ¶ added in v1.2.0
type DaemonWebhookPayloadArtifact struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"artifact"`
Action enums.WebhookAction `json:"action" example:"create"`
Namespace DaemonWebhookNamespace `json:"namespace"`
Repository DaemonWebhookRepository `json:"repository"`
Artifact DaemonWebhookArtifact `json:"artifact"`
}
DaemonWebhookPayloadArtifact ...
type DaemonWebhookPayloadMember ¶
type DaemonWebhookPayloadMember struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"member"`
Action enums.WebhookAction `json:"action" example:"create"`
Namespace *DaemonWebhookNamespace `json:"namespace"`
}
DaemonWebhookPayloadMember ...
type DaemonWebhookPayloadNamespace ¶
type DaemonWebhookPayloadNamespace struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"namespace"`
Action enums.WebhookAction `json:"action" example:"create"`
Namespace DaemonWebhookNamespace `json:"namespace"`
}
DaemonWebhookPayloadNamespace ...
type DaemonWebhookPayloadPing ¶
type DaemonWebhookPayloadPing struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"webhook"`
Action enums.WebhookAction `json:"action" example:"ping"`
Namespace *DaemonWebhookNamespace `json:"namespace"`
}
DaemonWebhookPayloadPing ...
type DaemonWebhookPayloadRepository ¶
type DaemonWebhookPayloadRepository struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"repository"`
Action enums.WebhookAction `json:"action" example:"create"`
Namespace DaemonWebhookNamespace `json:"namespace"`
Repository DaemonWebhookRepository `json:"repository"`
}
DaemonWebhookPayloadRepository ...
type DaemonWebhookPayloadTag ¶
type DaemonWebhookPayloadTag struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"tag"`
Action enums.WebhookAction `json:"action" example:"create"`
Namespace DaemonWebhookNamespace `json:"namespace"`
Repository DaemonWebhookRepository `json:"repository"`
Tag DaemonWebhookTag `json:"tag"`
}
DaemonWebhookPayloadTag ...
type DaemonWebhookRepository ¶ added in v1.2.0
type DaemonWebhookRepository struct {
ID int64 `json:"id" example:"1"`
NamespaceID int64 `json:"namespace_id" example:"1"`
Name string `json:"name" example:"busybox"`
Description *string `json:"description,omitempty" example:"i am just description"`
Overview *string `json:"overview,omitempty" example:"i am just overview"`
Visibility enums.Visibility `json:"visibility" example:"private"`
TagCount int64 `json:"tag_count" example:"100"`
TagLimit *int64 `json:"tag_limit" example:"1000"`
SizeLimit *int64 `json:"size_limit" example:"10000"`
Size *int64 `json:"size" example:"10000"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
DaemonWebhookRepository ...
type DaemonWebhookTag ¶ added in v1.2.0
type DaemonWebhookTag struct {
}
type DeleteArtifactRequest ¶
type DeleteArtifactRequest struct {
Namespace string `json:"namespace" param:"namespace" validate:"required,min=2,max=20,is_valid_namespace"`
Repository string `json:"repository" query:"repository" validate:"required,is_valid_repository"`
Digest string `json:"digest" param:"digest" validate:"required,is_valid_digest"`
}
DeleteArtifactRequest represents the request to delete an artifact.
type DeleteCacheRequest ¶
type DeleteCacheRequest struct {
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
}
DeleteCacheRequest ...
type DeleteNamespaceMemberRequest ¶
type DeleteNamespaceMemberRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" swaggerignore:"true"`
UserID int64 `json:"user_id" param:"user_id" example:"10" swaggerignore:"true"`
}
DeleteNamespaceMemberRequest ...
type DeleteNamespaceRequest ¶
type DeleteNamespaceRequest struct {
ID int64 `json:"id" param:"id" validate:"required,number" example:"1"`
}
DeleteNamespaceRequest represents the request to delete a namespace.
type DeleteRepositoryRequest ¶
type DeleteRepositoryRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10"`
ID int64 `json:"id" param:"id" validate:"required,number" example:"1"`
}
DeleteRepositoryRequest represents the request to delete a repository.
type DeleteTagRequest ¶
type DeleteTagRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required" example:"10"`
ID int64 `param:"id" validate:"required,number"`
}
DeleteTagRequest represents the request to delete a tag.
type DeleteWebhookLogRequest ¶ added in v1.2.0
type DeleteWebhookLogRequest struct {
WebhookID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
WebhookLogID int64 `json:"webhook_log_id" param:"webhook_log_id" example:"1"`
}
DeleteWebhookLogRequest ...
type DeleteWebhookRequest ¶
type DeleteWebhookRequest struct {
ID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
}
DeleteWebhookRequest ...
type GcArtifactRecordItem ¶
type GcArtifactRecordItem struct {
ID int64 `json:"id" example:"1"`
Digest string `json:"digest" example:"sha256:87508bf3e050b975770b142e62db72eeb345a67d82d36ca166300d8b27e45744"`
Status enums.GcRecordStatus `json:"status" example:"Success"`
Message string `json:"message" example:"log"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcArtifactRecordItem ...
type GcArtifactRunnerItem ¶
type GcArtifactRunnerItem struct {
ID int64 `json:"id" example:"1"`
Status enums.TaskCommonStatus `json:"status" example:"Pending"`
Message string `json:"message" example:"log"`
SuccessCount *int64 `json:"success_count" example:"1"`
FailedCount *int64 `json:"failed_count" example:"1"`
StartedAt *string `json:"started_at" example:"2006-01-02 15:04:05"`
EndedAt *string `json:"ended_at" example:"2006-01-02 15:04:05"`
RawDuration *int64 `json:"raw_duration" example:"10"`
Duration *string `json:"duration" example:"1h"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcArtifactRunnerItem ...
type GcBlobRecordItem ¶
type GcBlobRecordItem struct {
ID int64 `json:"id" example:"1"`
Digest string `json:"digest" example:"sha256:87508bf3e050b975770b142e62db72eeb345a67d82d36ca166300d8b27e45744"`
Status enums.GcRecordStatus `json:"status" example:"Success"`
Message string `json:"message" example:"log"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcBlobRecordItem ...
type GcBlobRunnerItem ¶
type GcBlobRunnerItem struct {
ID int64 `json:"id" example:"1"`
Status enums.TaskCommonStatus `json:"status" example:"Pending"`
Message string `json:"message" example:"log"`
SuccessCount *int64 `json:"success_count" example:"1"`
FailedCount *int64 `json:"failed_count" example:"1"`
StartedAt *string `json:"started_at" example:"2006-01-02 15:04:05"`
EndedAt *string `json:"ended_at" example:"2006-01-02 15:04:05"`
RawDuration *int64 `json:"raw_duration" example:"10"`
Duration *string `json:"duration" example:"1h"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcBlobRunnerItem ...
type GcRepositoryRecordItem ¶
type GcRepositoryRecordItem struct {
ID int64 `json:"id" example:"1"`
Repository string `json:"repository" example:"library/busybox"`
Status enums.GcRecordStatus `json:"status" example:"Success"`
Message string `json:"message" example:"log"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcRepositoryRecordItem ...
type GcRepositoryRunnerItem ¶
type GcRepositoryRunnerItem struct {
ID int64 `json:"id" example:"1"`
Status enums.TaskCommonStatus `json:"status" example:"Pending"`
Message string `json:"message" example:"log"`
SuccessCount *int64 `json:"success_count" example:"1"`
FailedCount *int64 `json:"failed_count" example:"1"`
StartedAt *string `json:"started_at" example:"2006-01-02 15:04:05"`
EndedAt *string `json:"ended_at" example:"2006-01-02 15:04:05"`
RawDuration *int64 `json:"raw_duration" example:"10"`
Duration *string `json:"duration" example:"1h"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcRepositoryRunnerItem ...
type GcTagRecordItem ¶
type GcTagRecordItem struct {
ID int64 `json:"id" example:"1"`
Tag string `json:"digest" example:"sha256:87508bf3e050b975770b142e62db72eeb345a67d82d36ca166300d8b27e45744"`
Status enums.GcRecordStatus `json:"status" example:"Success"`
Message string `json:"message" example:"log"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcTagRecordItem ...
type GcTagRunnerItem ¶
type GcTagRunnerItem struct {
ID int64 `json:"id" example:"1"`
Status enums.TaskCommonStatus `json:"status" example:"Pending"`
Message string `json:"message" example:"log"`
SuccessCount *int64 `json:"success_count" example:"1"`
FailedCount *int64 `json:"failed_count" example:"1"`
StartedAt *string `json:"started_at" example:"2006-01-02 15:04:05"`
EndedAt *string `json:"ended_at" example:"2006-01-02 15:04:05"`
RawDuration *int64 `json:"raw_duration" example:"10"`
Duration *string `json:"duration" example:"1h"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GcTagRunnerItem ...
type GetArtifactRequest ¶
type GetArtifactRequest struct {
Namespace string `json:"namespace" param:"namespace" validate:"required,min=2,max=20,is_valid_namespace"`
Repository string `json:"repository" query:"repository" validate:"required,is_valid_repository"`
Digest string `json:"digest" param:"digest" validate:"required,is_valid_digest"`
}
GetArtifactRequest represents the request to get an artifact.
type GetBuilderRequest ¶
type GetBuilderRequest struct {
Namespace string `json:"namespace" param:"namespace" validate:"required,min=2,max=20,is_valid_namespace" example:"library"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
}
GetBuilderRequest represents the request to get a builder.
type GetCacheRequest ¶
type GetCacheRequest struct {
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
}
GetCacheRequest ...
type GetCodeRepositoryBranchRequest ¶
type GetCodeRepositoryBranchRequest struct {
ID int64 `json:"id" param:"id" validate:"required,number"`
Name string `json:"name" param:"name" validate:"required"`
}
GetCodeRepositoryBranchRequest ...
type GetCodeRepositoryRequest ¶
type GetCodeRepositoryRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
ID int64 `json:"id" param:"id" validate:"required,number"`
}
GetCodeRepositoryRequest ...
type GetCodeRepositoryResyncRequest ¶
type GetCodeRepositoryResyncRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
}
GetCodeRepositoryResyncRequest ...
type GetCodeRepositoryUser3rdPartyRequest ¶
type GetCodeRepositoryUser3rdPartyRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
}
GetCodeRepositoryUser3rdPartyRequest ...
type GetCodeRepositoryUser3rdPartyResponse ¶
type GetCodeRepositoryUser3rdPartyResponse struct {
ID int64 `json:"id" example:"1"`
AccountID string `json:"account_id" example:"1"`
CrLastUpdateTimestamp string `json:"cr_last_update_timestamp"`
CrLastUpdateStatus enums.TaskCommonStatus `json:"cr_last_update_status"`
CrLastUpdateMessage *string `json:"cr_last_update_message"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
type GetGcArtifactLatestRunnerRequest ¶
type GetGcArtifactLatestRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcArtifactLatestRunnerRequest ...
type GetGcArtifactRecordRequest ¶
type GetGcArtifactRecordRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
RecordID int64 `json:"record_id" param:"record_id" validate:"required,number"`
}
GetGcArtifactRecordRequest ...
type GetGcArtifactRuleRequest ¶
type GetGcArtifactRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcArtifactRuleRequest ...
type GetGcArtifactRuleResponse ¶
type GetGcArtifactRuleResponse struct {
IsRunning bool `json:"is_running" example:"true"`
RetentionDay int `json:"retention_day" example:"10"`
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" example:"0 0 * * 6"`
CronNextTrigger *string `json:"cron_next_trigger,omitempty" example:"2021-01-01 00:00:00"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GetGcArtifactRuleResponse ...
type GetGcArtifactRunnerRequest ¶
type GetGcArtifactRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
}
GetGcArtifactRunnerRequest ...
type GetGcBlobLatestRunnerRequest ¶
type GetGcBlobLatestRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcBlobLatestRunnerRequest ...
type GetGcBlobRecordRequest ¶
type GetGcBlobRecordRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
RecordID int64 `json:"record_id" param:"record_id" validate:"required,number"`
}
GetGcBlobRecordRequest ...
type GetGcBlobRuleRequest ¶
type GetGcBlobRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcBlobRuleRequest ...
type GetGcBlobRuleResponse ¶
type GetGcBlobRuleResponse struct {
RetentionDay int `json:"retention_day" example:"10"`
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" example:"0 0 * * 6"`
CronNextTrigger *string `json:"cron_next_trigger,omitempty" example:"2021-01-01 00:00:00"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GetGcBlobRuleResponse ...
type GetGcBlobRunnerRequest ¶
type GetGcBlobRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
}
GetGcBlobRunnerRequest ...
type GetGcRepositoryLatestRunnerRequest ¶
type GetGcRepositoryLatestRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcRepositoryLatestRunnerRequest ...
type GetGcRepositoryRecordRequest ¶
type GetGcRepositoryRecordRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
RecordID int64 `json:"record_id" param:"record_id" validate:"required,number"`
}
GetGcRepositoryRecordRequest ...
type GetGcRepositoryRuleRequest ¶
type GetGcRepositoryRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcRepositoryRuleRequest ...
type GetGcRepositoryRuleResponse ¶
type GetGcRepositoryRuleResponse struct {
RetentionDay int `json:"retention_day" example:"10"`
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" example:"0 0 * * 6"`
CronNextTrigger *string `json:"cron_next_trigger,omitempty" example:"2021-01-01 00:00:00"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GetGcRepositoryRuleResponse ...
type GetGcRepositoryRunnerRequest ¶
type GetGcRepositoryRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
}
GetGcRepositoryRunnerRequest ...
type GetGcTagLatestRunnerRequest ¶
type GetGcTagLatestRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcTagLatestRunnerRequest ...
type GetGcTagRecordRequest ¶
type GetGcTagRecordRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
RecordID int64 `json:"record_id" param:"record_id" validate:"required,number"`
}
GetGcTagRecordRequest ...
type GetGcTagRuleRequest ¶
type GetGcTagRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
}
GetGcTagRuleRequest ...
type GetGcTagRuleResponse ¶
type GetGcTagRuleResponse struct {
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" example:"0 0 * * 6"`
CronNextTrigger *string `json:"cron_next_trigger,omitempty" example:"2021-01-01 00:00:00"`
RetentionRuleType enums.RetentionRuleType `json:"retention_rule_type,omitempty" example:"Day"`
RetentionRuleAmount int64 `json:"retention_rule_amount,omitempty" example:"1"`
RetentionPattern *string `json:"retention_pattern,omitempty" example:"v*,1.*"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
GetGcTagRuleResponse ...
type GetGcTagRunnerRequest ¶
type GetGcTagRunnerRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
}
GetGcTagRunnerRequest ...
type GetNamespaceMemberSelfRequest ¶
type GetNamespaceMemberSelfRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" swaggerignore:"true"`
}
GetNamespaceMemberSelfRequest ...
type GetNamespaceRequest ¶
type GetNamespaceRequest struct {
ID int64 `json:"id" param:"id" validate:"required,number"`
}
GetNamespaceRequest represents the request to get a namespace.
type GetRepositoryRequest ¶
type GetRepositoryRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10"`
ID int64 `json:"name" param:"id" validate:"required,number" example:"1"`
}
GetRepositoryRequest represents the request to get a repository.
type GetRunner ¶
type GetRunner struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number" example:"10"`
}
GetRunner ...
type GetRunnerLog ¶
type GetRunnerLog struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number" example:"10"`
}
GetRunnerLog ...
type GetRunnerRerun ¶
type GetRunnerRerun struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number" example:"10"`
}
GetRunnerRerun ...
type GetRunnerStop ¶
type GetRunnerStop struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number" example:"10"`
}
GetRunnerStop ...
type GetSystemConfigDaemon ¶ added in v1.1.0
type GetSystemConfigDaemon struct {
Builder bool `json:"builder" example:"false"`
}
GetSystemConfigDaemon ...
type GetSystemConfigOAuth2 ¶ added in v1.3.0
type GetSystemConfigOAuth2 struct {
GitHub bool `json:"github" example:"false"`
GitLab bool `json:"gitlab" example:"false"`
}
GetSystemConfigOAuth2 ...
type GetSystemConfigResponse ¶ added in v1.1.0
type GetSystemConfigResponse struct {
Daemon GetSystemConfigDaemon `json:"daemon"`
Anonymous bool `json:"anonymous" example:"false"`
OAuth2 GetSystemConfigOAuth2 `json:"oauth2"`
}
GetSystemConfigResponse ...
type GetSystemEndpointResponse ¶
type GetSystemEndpointResponse struct {
Endpoint string `json:"endpoint" example:"https://example.com:3000"`
}
GetSystemEndpointResponse ...
type GetSystemVersionResponse ¶
type GetSystemVersionResponse struct {
Version string `json:"version" example:"v1.0.0"`
GitHash string `json:"git_hash" example:"4225b69a"`
BuildDate string `json:"build_date" example:"2023-10-16T11:25:45Z"`
}
GetSystemVersionResponse ...
type GetTagRequest ¶
type GetTagRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10"`
RepositoryID string `json:"repository_id" param:"repository_id" validate:"required" example:"10"`
ID int64 `json:"id" param:"id" validate:"required,number"`
}
GetTagRequest represents the request to get a tag.
type GetUserListRequest ¶
type GetUserListRequest struct {
Pagination
Sortable
// Name query the user by username.
Name *string `json:"name" query:"name"`
WithoutAdmin bool `json:"without_admin" query:"without_admin"`
}
GetUserListRequest ...
type GetUserSelfResponse ¶
type GetValidatorReferenceRequest ¶
type GetValidatorReferenceRequest struct {
Reference string `json:"reference" query:"reference" validate:"required"`
}
GetValidatorReferenceRequest ...
type GetValidatorTagRequest ¶
type GetValidatorTagRequest struct {
Tag string `json:"tag" query:"tag" validate:"required"`
}
GetValidatorTagRequest ...
type GetWebhookLogRequest ¶
type GetWebhookLogRequest struct {
WebhookID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
WebhookLogID int64 `json:"webhook_log_id" param:"webhook_log_id" example:"1"`
}
GetWebhookLogRequest ...
type GetWebhookLogResendRequest ¶ added in v1.2.0
type GetWebhookLogResendRequest struct {
WebhookID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
WebhookLogID int64 `json:"webhook_log_id" param:"webhook_log_id" example:"1"`
}
GetWebhookLogResendRequest ...
type GetWebhookPingRequest ¶ added in v1.2.0
type GetWebhookPingRequest struct {
WebhookID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
}
GetWebhookPingRequest ...
type GetWebhookRequest ¶
type GetWebhookRequest struct {
ID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
}
GetWebhookRequest ...
type ListArtifactRequest ¶
type ListArtifactRequest struct {
Pagination
Namespace string `json:"namespace" param:"namespace" validate:"required,min=2,max=20,is_valid_namespace"`
Repository string `json:"repository" query:"repository" validate:"required,is_valid_repository"`
}
ListArtifactRequest represents the request to list artifacts.
type ListBuilderRunnersRequest ¶
type ListBuilderRunnersRequest struct {
Pagination
Sortable
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
}
ListBuilderRunnersRequest ...
type ListCodeRepositoryBranchesRequest ¶
type ListCodeRepositoryBranchesRequest struct {
ID int64 `json:"id" param:"id" validate:"required,number"`
}
ListCodeRepositoryBranchesRequest ...
type ListCodeRepositoryOwnerRequest ¶
type ListCodeRepositoryOwnerRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
Name *string `json:"name,omitempty" query:"name" validate:"omitempty,min=1"`
}
ListCodeRepositoryOwnerRequest ....
type ListCodeRepositoryProvidersResponse ¶
type ListCodeRepositoryProvidersResponse struct {
Provider enums.Provider `json:"provider" example:"github"`
}
ListCodeRepositoryProvidersResponse ...
type ListCodeRepositoryRequest ¶
type ListCodeRepositoryRequest struct {
Pagination
Sortable
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
Owner *string `json:"owner,omitempty" query:"owner" validate:"omitempty,min=1"`
Name *string `json:"name,omitempty" query:"name" validate:"omitempty,min=1"`
}
ListCodeRepositoryRequest represents the request to list code repository.
type ListGcArtifactRecordsRequest ¶
type ListGcArtifactRecordsRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
Pagination
Sortable
}
ListGcArtifactRecordsRequest ...
type ListGcArtifactRunnersRequest ¶
type ListGcArtifactRunnersRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
Pagination
Sortable
}
ListGcArtifactRunnersRequest ...
type ListGcBlobRecordsRequest ¶
type ListGcBlobRecordsRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
Pagination
Sortable
}
ListGcBlobRecordsRequest ...
type ListGcBlobRunnersRequest ¶
type ListGcBlobRunnersRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
Pagination
Sortable
}
ListGcBlobRunnersRequest ...
type ListGcRepositoryRecordsRequest ¶
type ListGcRepositoryRecordsRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
Pagination
Sortable
}
ListGcRepositoryRecordsRequest ...
type ListGcRepositoryRunnersRequest ¶
type ListGcRepositoryRunnersRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
Pagination
Sortable
}
ListGcRepositoryRunnersRequest ...
type ListGcTagRecordsRequest ¶
type ListGcTagRecordsRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
RunnerID int64 `json:"runner_id" param:"runner_id" validate:"required,number"`
Pagination
Sortable
}
ListGcTagRecordsRequest ...
type ListGcTagRunnersRequest ¶
type ListGcTagRunnersRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number"`
Pagination
Sortable
}
ListGcTagRunnersRequest ...
type ListNamespaceMemberRequest ¶
type ListNamespaceMemberRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" swaggerignore:"true"`
// Name query the namespace member by name.
Name *string `json:"name" query:"name" example:"test" swaggerignore:"true"`
Pagination
Sortable
}
ListNamespaceMemberRequest represents the request to list namespace members.
type ListNamespaceRequest ¶
type ListNamespaceRequest struct {
Pagination
Sortable
// Name query the namespace by name.
Name *string `json:"name" query:"name" example:"test"`
}
ListNamespaceRequest represents the request to list namespaces.
type ListRepositoryRequest ¶
type ListRepositoryRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10"`
Pagination
Sortable
Name *string `json:"name" query:"name"`
}
ListRepositoryRequest represents the request to list repositories.
type ListTagRequest ¶
type ListTagRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required" example:"10"`
Pagination
Sortable
Name *string `json:"name" query:"name"`
Type []enums.ArtifactType `json:"type" query:"type"`
}
ListTagRequest represents the request to list tags.
type ListWebhookLogRequest ¶
type ListWebhookLogRequest struct {
Pagination
Sortable
WebhookID int64 `json:"webhook_id" param:"webhook_id" example:"1"`
}
ListWebhookLogRequest ...
type ListWebhookRequest ¶
type ListWebhookRequest struct {
Pagination
Sortable
NamespaceID *int64 `json:"namespace_id,omitempty" query:"namespace_id" validate:"omitempty,numeric" example:"1"`
}
ListWebhookRequest ...
type NamespaceItem ¶
type NamespaceItem struct {
ID int64 `json:"id" example:"1"`
Name string `json:"name" example:"test"`
Description *string `json:"description,omitempty" example:"i am just description"`
Overview *string `json:"overview,omitempty" example:"i am just overview"`
Visibility enums.Visibility `json:"visibility" example:"private"`
Role *enums.NamespaceRole `json:"role" example:"NamespaceAdmin"`
RepositoryLimit int64 `json:"repository_limit" example:"10"`
RepositoryCount int64 `json:"repository_count" example:"10"`
TagLimit int64 `json:"tag_limit" example:"10"`
TagCount int64 `json:"tag_count" example:"10"`
Size int64 `json:"size" example:"10000"`
SizeLimit int64 `json:"size_limit" example:"10000"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
NamespaceItem represents a namespace.
type NamespaceMemberItem ¶
type NamespaceMemberItem struct {
ID int64 `json:"id" example:"1"`
Username string `json:"username" example:"admin"`
UserID int64 `json:"user_id" example:"1"`
Role enums.NamespaceRole `json:"role" example:"NamespaceAdmin"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
NamespaceMemberItem ...
type Oauth2CallbackRequest ¶
type Oauth2CallbackRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider" example:"gitlab"`
Code string `json:"code" query:"code" validate:"required" example:"123456"`
Endpoint string `json:"endpoint" query:"endpoint" example:"http://localhost:5173"`
}
Oauth2CallbackRequest represents the request to callback.
type Oauth2CallbackResponse ¶
type Oauth2CallbackResponse struct {
RefreshToken string `` /* 1629-byte string literal not displayed */
Token string `` /* 1621-byte string literal not displayed */
ID int64 `json:"id" example:"1"`
Email string `json:"email" example:"test@email.com"`
Username string `json:"username" example:"sigma"`
}
Oauth2CallbackResponse ...
type Oauth2ClientIDRequest ¶
type Oauth2ClientIDRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
}
Oauth2ClientIDRequest ...
type Oauth2ClientIDResponse ¶
type Oauth2ClientIDResponse struct {
ClientID string `json:"client_id" example:"1234567890"`
}
Oauth2ClientIDResponse ...
type Oauth2LoginRequest ¶
type Oauth2LoginRequest struct {
Provider enums.Provider `json:"provider" param:"provider" validate:"required,is_valid_provider"`
}
Oauth2LoginRequest represents the request to login.
type Oauth2RedirectCallbackRequest ¶
type Oauth2RedirectCallbackRequest struct {
Code string `json:"code" query:"code"`
}
Oauth2RedirectCallbackRequest ...
type Oauth2UserInfo ¶
type Oauth2UserInfo struct {
Provider enums.Provider `json:"provider"`
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Token string `json:"token"`
RefreshToken string `json:"refresh_token"`
}
Oauth2UserInfo represents the user info.
type Pagination ¶
type Pagination struct {
Page *int `json:"page" query:"page" example:"1"`
Limit *int `json:"limit" query:"limit" example:"10"`
}
Pagination is the pagination struct
type PostCodeRepositorySetupBuilder ¶
type PostCodeRepositorySetupBuilder struct {
ID int64 `json:"id" param:"id" validate:"required,number"`
NamespaceID int64 `json:"namespace_id" validate:"required,number"`
RepositoryName string `json:"repository_name" validate:"required,is_valid_repository" example:"library/test"`
ScmBranch string `json:"scm_branch" example:"main"`
ScmDepth int `json:"scm_depth" example:"0"`
ScmSubmodule bool `json:"scm_submodule" example:"false"`
BuildkitContext string `json:"buildkit_context" example:"."`
BuildkitDockerfile string `json:"buildkit_dockerfile" example:"Dockerfile"`
BuildkitPlatforms []enums.OciPlatform `json:"buildkit_platforms" example:"linux/amd64"`
}
PostCodeRepositorySetupBuilder ...
type PostCodeRepositorySetupBuilderSwagger ¶
type PostCodeRepositorySetupBuilderSwagger struct {
NamespaceID int64 `json:"namespace_id" validate:"required,number"`
RepositoryName string `json:"repository_name" validate:"required,is_valid_repository" example:"library/test"`
ScmBranch string `json:"scm_branch" example:"main"`
ScmDepth int `json:"scm_depth" example:"0"`
ScmSubmodule bool `json:"scm_submodule" example:"false"`
BuildkitContext string `json:"buildkit_context" example:"."`
BuildkitDockerfile string `json:"buildkit_dockerfile" example:"Dockerfile"`
BuildkitPlatforms []enums.OciPlatform `json:"buildkit_platforms" example:"linux/amd64"`
}
PostCodeRepositorySetupBuilderSwagger ...
type PostNamespaceRequest ¶
type PostNamespaceRequest struct {
Name string `json:"name" validate:"required,min=2,max=20,is_valid_namespace" example:"test"`
Description *string `json:"description,omitempty" validate:"omitempty,max=30" example:"i am just description"`
SizeLimit *int64 `json:"size_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
RepositoryLimit *int64 `json:"repository_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
TagLimit *int64 `json:"tag_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
Visibility *enums.Visibility `json:"visibility,omitempty" validate:"omitempty,is_valid_visibility" example:"public"`
}
PostNamespaceRequest represents the request to create a namespace.
type PostNamespaceResponse ¶
type PostNamespaceResponse struct {
ID int64 `json:"id" example:"21911"`
}
PostNamespaceResponse represents the response to create a namespace.
type PostOrPutBuilderRequest ¶
type PostOrPutBuilderRequest struct {
Source enums.BuilderSource `json:"source" example:"Dockerfile"`
ScmProvider *enums.ScmProvider `json:"scm_provider"`
// source CodeRepository
CodeRepositoryID *int64 `json:"code_repository_id" example:"10"`
// source Dockerfile
Dockerfile *string `json:"dockerfile" example:"xxx"`
// source SelfCodeRepository
ScmRepository *string `json:"scm_repository" example:"https://github.com/go-sigma/sigma.git"`
ScmCredentialType *enums.ScmCredentialType `json:"scm_credential_type,omitempty" validate:"omitempty,is_valid_scm_credential_type" example:"ssh"`
ScmSshKey *string `json:"scm_ssh_key" example:"xxxx"`
ScmToken *string `json:"scm_token" example:"xxxx"`
ScmUsername *string `json:"scm_username" example:"sigma"`
ScmPassword *string `json:"scm_password" example:"sigma"`
ScmBranch *string `json:"scm_branch,omitempty" validate:"omitempty,min=1,max=50" example:"main"`
ScmDepth *int `json:"scm_depth,omitempty" validate:"omitempty,min=0" example:"0"`
ScmSubmodule *bool `json:"scm_submodule,omitempty" example:"false"`
CronRule *string `json:"cron_rule" example:"* * * * *"` // TODO: validate
CronBranch *string `json:"cron_branch" example:"main"`
CronTagTemplate *string `json:"cron_tag_template" example:"{.Ref}"`
WebhookBranchName *string `json:"webhook_branch_name" example:"main"`
WebhookBranchTagTemplate *string `json:"webhook_branch_tag_template" example:"{.Ref}"`
WebhookTagTagTemplate *string `json:"webhook_tag_tag_template" example:"{.Ref}"` // TODO: validate
BuildkitInsecureRegistries []string `json:"buildkit_insecure_registries,omitempty" example:"test.com,xxx.com@http" validate:"omitempty,max=3"`
BuildkitContext *string `json:"buildkit_context,omitempty" validate:"omitempty,min=1,max=255"`
BuildkitDockerfile *string `json:"buildkit_dockerfile,omitempty" validate:"omitempty,min=1,max=255"`
BuildkitPlatforms []enums.OciPlatform `json:"buildkit_platforms" validate:"required,min=1,is_valid_oci_platforms" example:"linux/amd64"`
BuildkitBuildArgs *string `json:"buildkit_build_args" example:"a=b,c=d"` // TODO: validate
}
PostOrPutBuilderRequest ...
type PostRunnerRun ¶
type PostRunnerRun struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10"`
RepositoryID int64 `json:"repository_id" param:"repository_id" validate:"required,number" example:"10"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10"`
RawTag string `json:"raw_tag" example:"test"` // TODO: validate
Description *string `json:"description,omitempty" validate:"omitempty,max=50"`
ScmBranch *string `json:"scm_branch,omitempty" validate:"omitempty,min=1,max=64" example:"main"`
}
PostRunnerRun ...
type PostUserLoginResponse ¶
type PostUserLoginResponse struct {
RefreshToken string `json:"refresh_token"`
Token string `json:"token"`
ID int64 `json:"id"`
Email string `json:"email"`
Username string `json:"username"`
}
PostUserLoginResponse ...
type PostUserLogoutRequest ¶
type PostUserLogoutRequest struct {
Tokens []string `json:"tokens" validate:"required,min=1" example:"123,234"`
}
PostUserLogoutRequest ...
type PostUserRecoverPasswordRequest ¶
type PostUserRecoverPasswordRequest struct {
Username string `json:"username" validate:"required,is_valid_username,min=2,max=20" example:"test"`
Email string `json:"email" validate:"required,is_valid_email" email:"test@email.com"`
}
PostUserRecoverPasswordRequest ...
type PostUserRecoverResetPasswordRequest ¶
type PostUserRecoverResetPasswordRequest struct {
Code string `json:"code" param:"code" validate:"required" example:"123456"`
Password string `json:"password" validate:"required,min=5,max=20,is_valid_password" example:"sigma2023X"`
}
PostUserRecoverResetPasswordRequest...
type PostUserRequest ¶
type PostUserRequest struct {
Username string `json:"username" validate:"required,is_valid_username,min=2,max=20" example:"sigma"`
Password string `json:"password" validate:"required,min=5,max=20,is_valid_password" example:"Admin@123"`
Email string `json:"email" validate:"required,is_valid_email" example:"test@gmail.com"`
NamespaceLimit *int64 `json:"namespace_limit,omitempty" validate:"omitempty,min=0" example:"10"`
Role enums.UserRole `json:"role" validate:"omitempty,is_valid_user_role" example:"Admin"`
}
PostUserRequest ...
type PostUserResetPasswordPasswordRequest ¶
type PostUserResetPasswordPasswordRequest struct {
ID int64 `json:"id" param:"id" validate:"required" example:"123"`
Password string `json:"password" validate:"required,min=5,max=20,is_valid_password" example:"sigma2023X"`
}
PostUserResetPasswordPasswordRequest ...
type PostUserSignupRequest ¶
type PostUserSignupRequest struct {
Username string `json:"username" validate:"required,is_valid_username,min=2,max=20" example:"sigma"`
Password string `json:"password" validate:"required,min=5,max=20,is_valid_password" example:"sigma2023X"`
Email string `json:"email" validate:"required,is_valid_email" example:"test@gmail.com"`
}
PostUserSignupRequest ...
type PostUserSignupResponse ¶
type PostUserSignupResponse struct {
RefreshToken string `json:"refresh_token"`
Token string `json:"token"`
}
PostUserSignupResponse ...
type PostUserTokenResponse ¶
type PostUserTokenResponse struct {
Token string `` /* 1621-byte string literal not displayed */
ExpiresIn int `json:"expires_in" example:"3600"`
IssuedAt string `json:"issued_at" example:"2023-07-16T17:51:51+08:00"`
}
PostUserTokenRequest ...
type PostWebhookRequest ¶
type PostWebhookRequest struct {
NamespaceID *int64 `json:"namespace_id,omitempty" validate:"omitempty,numeric" example:"1"`
URL string `json:"url" validate:"required,url,max=128" example:"http://example.com/webhook"`
Secret *string `json:"secret,omitempty" validate:"omitempty,max=63" example:"secret"`
SslVerify bool `json:"ssl_verify" example:"true"`
RetryTimes int `json:"retry_times" validate:"required" example:"3"`
RetryDuration int `json:"retry_duration" validate:"required" example:"5"`
Enable bool `json:"enable" example:"true"`
EventNamespace *bool `json:"event_namespace,omitempty" example:"true"`
EventRepository bool `json:"event_repository" example:"true"`
EventTag bool `json:"event_tag" example:"true"`
EventArtifact bool `json:"event_artifact" example:"true"`
EventMember bool `json:"event_member" example:"true"`
EventDaemonTaskGc bool `json:"event_daemon_task_gc" example:"true"`
}
PostWebhookRequest ...
type PutUserRequest ¶
type PutUserRequest struct {
UserID int64 `param:"id" validate:"required,number" example:"10" swaggerignore:"true"`
Username *string `json:"username,omitempty" validate:"omitempty,is_valid_username,min=2,max=20" example:"sigma"`
Password *string `json:"password,omitempty" validate:"omitempty,min=5,max=20,is_valid_password" example:"Admin@123"`
Email *string `json:"email,omitempty" validate:"omitempty,is_valid_email" example:"test@gmail.com"`
Status *enums.UserStatus `json:"status,omitempty" validate:"omitempty,is_valid_user_status" example:"Active"`
NamespaceLimit *int64 `json:"namespace_limit,omitempty" validate:"omitempty,min=0" example:"10"`
Role *enums.UserRole `json:"role,omitempty" validate:"omitempty,is_valid_user_role" example:"Admin"`
}
PutUserRequest ...
type PutUserSelfRequest ¶
type PutUserSelfRequest struct {
Username *string `json:"username,omitempty" validate:"omitempty,is_valid_username,min=2,max=20" example:"sigma"`
Email *string `json:"email,omitempty" validate:"omitempty,is_valid_email" example:"test@mail.com"`
}
PutUserSelfRequest ...
type PutUserSelfResetPasswordRequest ¶
type PutUserSelfResetPasswordRequest struct {
Password string `json:"password" validate:"required,min=5,max=20,is_valid_password" example:"Admin@123"`
}
PutUserSelfResetPasswordRequest ...
type PutWebhookRequest ¶
type PutWebhookRequest struct {
ID int64 `json:"webhook_id" param:"webhook_id" validate:"required,number" swaggerignore:"true"`
Url *string `json:"url,omitempty" validate:"omitempty,url,max=128" example:"http://example.com/webhook"`
Secret *string `json:"secret,omitempty" validate:"omitempty,max=63" example:"secret"`
SslVerify *bool `json:"ssl_verify,omitempty" validate:"omitempty,boolean" example:"true"`
RetryTimes *int `json:"retry_times,omitempty" validate:"omitempty,number" example:"3"`
RetryDuration *int `json:"retry_duration,omitempty" validate:"omitempty,number" example:"5"`
Enable *bool `json:"enable,omitempty" validate:"omitempty,boolean" example:"true"`
EventNamespace *bool `json:"event_namespace,omitempty" validate:"omitempty,boolean" example:"true"`
EventRepository *bool `json:"event_repository,omitempty" validate:"omitempty,boolean" example:"true"`
EventTag *bool `json:"event_tag,omitempty" validate:"omitempty,boolean" example:"true"`
EventArtifact *bool `json:"event_artifact,omitempty" validate:"omitempty,boolean" example:"true"`
EventMember *bool `json:"event_member,omitempty" validate:"omitempty,boolean" example:"true"`
EventDaemonTaskGc *bool `json:"event_daemon_task_gc,omitempty" validate:"omitempty,boolean" example:"true"`
}
type RepositoryItem ¶
type RepositoryItem struct {
ID int64 `json:"id" example:"1"`
NamespaceID int64 `json:"namespace_id" example:"1"`
Name string `json:"name" example:"busybox"`
Description *string `json:"description,omitempty" example:"i am just description"`
Overview *string `json:"overview,omitempty" example:"i am just overview"`
Visibility enums.Visibility `json:"visibility" example:"private"`
TagCount int64 `json:"tag_count" example:"100"`
TagLimit *int64 `json:"tag_limit" example:"1000"`
SizeLimit *int64 `json:"size_limit" example:"10000"`
Size *int64 `json:"size" example:"10000"`
Builder *BuilderItem `json:"builder"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
RepositoryItem represents a repository.
type RetentionPatternPayload ¶
type RetentionPatternPayload struct {
Patterns []string `json:"patterns"`
}
RetentionPatternPayload ...
type RunOrRerunRunnerResponse ¶
type RunOrRerunRunnerResponse struct {
RunnerID int64 `json:"runner_id" example:"10"`
}
RunOrRerunRunnerResponse ...
type Sortable ¶
type Sortable struct {
Sort *string `json:"sort" query:"sort" example:"created_at"`
Method *enums.SortMethod `json:"method" query:"method" example:"desc"`
}
Sortable is the sort struct
type TagItem ¶
type TagItem struct {
ID int64 `json:"id" example:"1"`
Name string `json:"name" example:"latest"`
PushedAt string `json:"pushed_at" example:"2006-01-02 15:04:05"`
PullTimes int64 `json:"pull_times" example:"10"`
Artifact TagItemArtifact `json:"artifact"`
Artifacts []TagItemArtifact `json:"artifacts"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
TagItem represents an tag.
type TagItemArtifact ¶
type TagItemArtifact struct {
ID int64 `json:"id" example:"1"`
Digest string `json:"digest" example:"sha256:87508bf3e050b975770b142e62db72eeb345a67d82d36ca166300d8b27e45744"`
MediaType string `json:"media_type" example:"application/vnd.oci.image.manifest.v1+json"`
Raw string `` /* 594-byte string literal not displayed */
ConfigMediaType string `json:"config_media_type" example:"application/vnd.oci.image.config.v1+json"`
ConfigRaw string `` /* 1664-byte string literal not displayed */
Type string `json:"type" example:"image"`
Size int64 `json:"size" example:"10201"`
BlobSize int64 `json:"blob_size" example:"100210"`
LastPull string `json:"last_pull" example:"2006-01-02 15:04:05"`
PushedAt string `json:"pushed_at" example:"2006-01-02 15:04:05"`
PullTimes int64 `json:"pull_times" example:"10"`
Vulnerability string `json:"vulnerability" example:"{\"critical\":0,\"high\":0,\"medium\":0,\"low\":0}"`
Sbom string `json:"sbom" example:"{\"distro\":{\"name\":\"alpine\",\"version\":\"3.18.2\"},\"os\":\"linux\",\"architecture\":\"amd64\"}"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
TagItemArtifact ...
type TaskProxyArtifact ¶
type TaskProxyArtifact struct {
BlobDigest string `json:"blob_digest"`
}
TaskProxyArtifact is the task proxy artifact
type TaskSbom ¶
type TaskSbom struct {
ArtifactID int64 `json:"artifact_id"`
}
TaskSbom is the task sbom struct
type TaskVulnerability ¶
type TaskVulnerability struct {
ArtifactID int64 `json:"artifact_id"`
}
TaskVulnerability is the task scan struct
type UpdateBuilderRequest ¶
type UpdateBuilderRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" example:"10" swaggerignore:"true"`
RepositoryID int64 `json:"repository_id" param:"repository_id" example:"10" swaggerignore:"true"`
BuilderID int64 `json:"builder_id" param:"builder_id" validate:"required,number" example:"10" swaggerignore:"true"`
PostOrPutBuilderRequest
}
UpdateBuilderRequest represents the request to get a builder.
type UpdateGcArtifactRuleRequest ¶
type UpdateGcArtifactRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number" example:"10"`
RetentionDay int `json:"retention_day" validate:"gte=0,lte=180" example:"10" minimum:"0" maximum:"180"`
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" validate:"omitempty,is_valid_cron_rule" example:"0 0 * * 6"`
}
UpdateGcArtifactRuleRequest ...
type UpdateGcBlobRuleRequest ¶
type UpdateGcBlobRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number" example:"10"`
RetentionDay int `json:"retention_day" validate:"gte=0,lte=180" example:"10" minimum:"0" maximum:"180"`
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" validate:"omitempty,is_valid_cron_rule" example:"0 0 * * 6"`
}
UpdateGcBlobRuleRequest ...
type UpdateGcRepositoryRuleRequest ¶
type UpdateGcRepositoryRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number" example:"10"`
RetentionDay int `json:"retention_day" validate:"gte=0,lte=180" example:"10" minimum:"0" maximum:"180"`
CronEnabled *bool `json:"cron_enabled,omitempty" example:"true"`
CronRule *string `json:"cron_rule,omitempty" validate:"omitempty,is_valid_cron_rule" example:"0 0 * * 6"`
}
UpdateGcRepositoryRuleRequest ...
type UpdateGcTagRuleRequest ¶
type UpdateGcTagRuleRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"number" example:"10"`
CronEnabled bool `json:"cron_enabled" example:"true"`
CronRule *string `json:"cron_rule,omitempty" validate:"omitempty,is_valid_cron_rule" example:"0 0 * * 6"`
RetentionRuleType enums.RetentionRuleType `json:"retention_rule_type" validate:"is_valid_retention_rule_type" example:"Day"`
RetentionRuleAmount int64 `json:"retention_rule_amount" validate:"number,gte=1,lte=180" example:"1" minimum:"1" maximum:"180"`
RetentionPattern *string `json:"retention_pattern,omitempty" validate:"omitempty,is_valid_retention_pattern" example:"v*,1.*"`
}
UpdateGcTagRuleRequest ...
type UpdateNamespaceMemberRequest ¶
type UpdateNamespaceMemberRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required,number" swaggerignore:"true"`
UserID int64 `json:"user_id" param:"user_id" swaggerignore:"true"`
Role enums.NamespaceRole `json:"role" validate:"is_valid_namespace_role" example:"NamespaceReader"`
}
UpdateNamespaceMemberRequest ...
type UpdateNamespaceRequest ¶
type UpdateNamespaceRequest struct {
ID int64 `json:"id" param:"id" validate:"required,number" swaggerignore:"true"`
SizeLimit *int64 `json:"size_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
RepositoryLimit *int64 `json:"repository_limit" validate:"omitempty,numeric" example:"10000"`
TagLimit *int64 `json:"tag_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
Visibility *enums.Visibility `json:"visibility,omitempty" validate:"omitempty,is_valid_visibility" example:"public"`
Description *string `json:"description,omitempty" validate:"omitempty,max=30" example:"i am just description"`
Overview *string `json:"overview,omitempty" validate:"omitempty,max=100000" example:"i am just overview"`
}
UpdateNamespaceRequest represents the request to update a namespace.
type UpdateRepositoryRequest ¶
type UpdateRepositoryRequest struct {
NamespaceID int64 `json:"namespace_id" param:"namespace_id" validate:"required" example:"10" swaggerignore:"true"`
ID int64 `json:"id" param:"id" validate:"required,number" example:"1" swaggerignore:"true"`
Description *string `json:"description,omitempty" validate:"omitempty,max=300" example:"i am just description"`
Overview *string `json:"overview,omitempty" validate:"omitempty,max=100000" example:"i am just overview"`
SizeLimit *int64 `json:"size_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
TagLimit *int64 `json:"tag_limit,omitempty" validate:"omitempty,numeric" example:"10000"`
}
UpdateRepositoryRequest represents the request to update a repository.
type UserItem ¶
type UserItem struct {
ID int64 `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Status enums.UserStatus `json:"status"`
LastLogin string `json:"last_login"`
Role enums.UserRole `json:"role"`
NamespaceLimit int64 `json:"namespace_limit"`
NamespaceCount int64 `json:"namespace_count"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
UserItem ...
type ValidateCronRequest ¶
type ValidateCronRequest struct {
Cron string `json:"cron" validate:"required" example:"0 0 * * 6"`
}
ValidateCronRequest ...
type ValidatePasswordRequest ¶
type ValidatePasswordRequest struct {
Password string `json:"password" validate:"required" example:"Admin@123"`
}
ValidatePasswordRequest ...
type ValidateRegexpRequest ¶
type ValidateRegexpRequest struct {
Regexp string `json:"regexp" validate:"required" example:"^v.*$"`
}
ValidateRegexpRequest ...
type WebhookItem ¶
type WebhookItem struct {
ID int64 `json:"id" example:"1"`
NamespaceID *int64 `json:"namespace_id,omitempty" example:"1"`
URL string `json:"url" example:"http://example.com/webhook"`
Secret *string `json:"secret,omitempty" example:"secret"`
SslVerify bool `json:"ssl_verify" example:"true"`
RetryTimes int `json:"retry_times" example:"3"`
RetryDuration int `json:"retry_duration" example:"5"`
Enable bool `json:"enable" example:"true"`
EventNamespace *bool `json:"event_namespace,omitempty" example:"true"`
EventRepository bool `json:"event_repository" example:"true"`
EventTag bool `json:"event_tag" example:"true"`
EventArtifact bool `json:"event_artifact" example:"true"`
EventMember bool `json:"event_member" example:"true"`
EventDaemonTaskGc bool `json:"event_daemon_task_gc" example:"true"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
WebhookItem ...
type WebhookLogItem ¶
type WebhookLogItem struct {
ID int64 `json:"id" example:"1"`
Action enums.WebhookAction `json:"action" example:"action"`
ResourceType enums.WebhookResourceType `json:"resource_type" example:"event"`
StatusCode int `json:"status_code" example:"200"`
ReqHeader string `json:"req_header" example:""`
ReqBody string `json:"req_body" example:""`
RespHeader string `json:"resp_header" example:""`
RespBody string `json:"resp_body" example:""`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
WebhookLogItem ...
type WebhookPayload ¶ added in v1.2.0
type WebhookPayload struct {
ResourceType enums.WebhookResourceType `json:"resource_type" example:"Namespace"`
Action enums.WebhookAction `json:"action" example:"Create"`
}
WebhookPayload ...
type WebhookPayloadGcArtifact ¶ added in v1.2.0
type WebhookPayloadGcArtifact struct {
WebhookPayload
NamespaceID *int64 `json:"namespace_id"`
OperateType enums.OperateType `json:"operate_type" example:"Automatic"`
OperateUser *WebhookPayloadUser `json:"operate_user"`
SuccessCount int64 `json:"success_count"`
FailedCount int64 `json:"failed_count"`
}
WebhookPayloadGcArtifact ...
type WebhookPayloadGcBlob ¶ added in v1.2.0
type WebhookPayloadGcBlob struct {
WebhookPayload
OperateType enums.OperateType `json:"operate_type" example:"Automatic"`
OperateUser *WebhookPayloadUser `json:"operate_user"`
SuccessCount int64 `json:"success_count"`
FailedCount int64 `json:"failed_count"`
}
WebhookPayloadGcBlob ...
type WebhookPayloadGcRepository ¶ added in v1.2.0
type WebhookPayloadGcRepository struct {
WebhookPayload
NamespaceID *int64 `json:"namespace_id"`
OperateType enums.OperateType `json:"operate_type" example:"Automatic"`
OperateUser *WebhookPayloadUser `json:"operate_user"`
SuccessCount int64 `json:"success_count"`
FailedCount int64 `json:"failed_count"`
}
WebhookPayloadGcRepository ...
type WebhookPayloadGcTag ¶ added in v1.2.0
type WebhookPayloadGcTag struct {
WebhookPayload
NamespaceID *int64 `json:"namespace_id"`
OperateType enums.OperateType `json:"operate_type" example:"Automatic"`
OperateUser *WebhookPayloadUser `json:"operate_user"`
SuccessCount int64 `json:"success_count"`
FailedCount int64 `json:"failed_count"`
}
WebhookPayloadGcTag ...
type WebhookPayloadUser ¶ added in v1.2.0
type WebhookPayloadUser struct {
ID int64 `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Status enums.UserStatus `json:"status"`
LastLogin string `json:"last_login"`
CreatedAt string `json:"created_at" example:"2006-01-02 15:04:05"`
UpdatedAt string `json:"updated_at" example:"2006-01-02 15:04:05"`
}
WebhookPayloadUser ...