Documentation
¶
Index ¶
- Constants
- type Avatar
- type BindImageLabels
- type CallGithubRequest
- type CallKubernetesTagRequest
- type CallMetaRequest
- type CallResult
- type CallSearchRequest
- type Category
- type ChartDetail
- type ChartFiles
- type ChartInfo
- type ChartMetaRequest
- type ChartMetadata
- type ChartSaved
- type ChartVersion
- type CommonSearchRepositoryResult
- type CommonSearchTagInfoResult
- type CommonSearchTagResult
- type CommonTag
- type CreateAccessRequest
- type CreateAgentRequest
- type CreateBuildMessageRequest
- type CreateBuildRequest
- type CreateImageRequest
- type CreateImagesRequest
- type CreateLabelRequest
- type CreateLogoRequest
- type CreateNamespaceRequest
- type CreateNotificationRequest
- type CreateRegistryRequest
- type CreateSubscribeRequest
- type CreateTaskMessageRequest
- type CreateTaskRequest
- type CreateUserRequest
- type CreateUsersRequest
- type CustomMeta
- type Dependency
- type DingtalkConfig
- type DockerToken
- type DockerhubSearchTagResult
- type DownflowMeta
- type EmailConfig
- type EnableChartRepoRequest
- type FixImageSpec
- type FixRequest
- type GCRSearchTagResult
- type GetRepositoryResult
- type GitHubRepository
- type HubSearchResponse
- type HubTagResponse
- type IdMeta
- type IdMetaRequest
- type IdNameMeta
- type Image
- type ImageManifest
- type ImageTag
- type ImmutableTagsSettings
- type ListOptions
- type Maintainer
- type Manifest
- type NameMeta
- type Namespace
- type NotificationResult
- type PageRequest
- type PageResult
- type Permissions
- type Platform
- type PushConfig
- type QiWeiConfig
- type QuaySearchTagResult
- type QuayTag
- type QueryOption
- type RemoteMetaRequest
- type RemoteSearchRequest
- type RemoteTagInfoSearchRequest
- type RemoteTagSearchRequest
- type Repository
- type RepositoryResult
- type Response
- type RunSubscribeRequest
- type SearchConfig
- type SearchCustomConfig
- type SearchDockerhubTagInfoResult
- type SearchGCRResult
- type SearchQuayResult
- type SearchResult
- type Security
- type SecuritySignature
- type SendNotificationRequest
- type SyncNamespaceRequest
- type TagResult
- type TaskMeta
- type UpdateAgentRequest
- type UpdateAgentStatusRequest
- type UpdateBuildRequest
- type UpdateBuildStatusRequest
- type UpdateImageRequest
- type UpdateImageStatusRequest
- type UpdateLabelRequest
- type UpdateLogoRequest
- type UpdateNamespaceRequest
- type UpdateNotificationRequest
- type UpdateRegistryRequest
- type UpdateSubscribeRequest
- type UpdateTaskRequest
- type UpdateTaskStatusRequest
- type UpdateUserRequest
- type UserMeta
- type UserMetaRequest
- type WebhookConfig
Constants ¶
View Source
const ( SyncImageInitializing = "Initializing" SyncImageRunning = "Running" SyncImageError = "Error" SyncImageComplete = "Completed" )
View Source
const ( SyncNamespaceLogoType = 0 SyncNamespaceLabelType = 1 SyncNamespaceDefaultLogoType = 2 )
View Source
const ( AddImageLabelType = 0 DeleteImageLabelType = 1 IdempotentImageLabelType = 2 )
View Source
const ( SkopeoDriver = "skopeo" DockerDriver = "docker" )
View Source
const ( FreeUserType = 0 PayUserType = 1 )
View Source
const ( ImageHubDocker = "dockerhub" ImageHubGCR = "gcr.io" ImageHubQuay = "quay.io" ImageHubAll = "all" )
View Source
const ( FuzzySearch = 0 // 模糊查询 AccurateSearch = 1 // 精准查询 )
View Source
const ( DefaultGCRNamespace = "google-containers" DefaultDockerhubNamespace = "library" )
View Source
const ( OpCreateAction = iota + 1 OpGetAction OpCreateIfNotAction )
View Source
const ( SearchTypeRepo = iota + 1 SearchTypeTag SearchTypeTagInfo GetTypeRepo )
View Source
const ( CallGithubType = 5 CallKubernetesTagType = 6 CallSearchType = 7 )
View Source
const ( UserNotifyRole = 0 SystemNotifyRole = 1 DingtalkNotifyType = "dingtalk" QiWeiNotifyType = "qiwei" FeiShuNotifyType = "feishu" EmailNotifyType = "email" WebhookNotifyType = "webhook" )
View Source
const (
GithubAPIBase = "https://api.github.com"
)
View Source
const (
SyncTaskInitializing = "initializing"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindImageLabels ¶
type CallGithubRequest ¶
type CallMetaRequest ¶
type CallMetaRequest struct {
Type int `json:"type"` // 操作类型,必填
Uid string `json:"uid"`
CallGithubRequest *CallGithubRequest `json:"callGithubRequest,omitempty"`
CallKubernetesTagRequest *CallKubernetesTagRequest `json:"callKubernetesTagRequest,omitempty"`
CallSearchRequest *CallSearchRequest `json:"callSearchRequest,omitempty"`
}
type CallResult ¶
type CallSearchRequest ¶
type CallSearchRequest struct {
ClientId string `json:"client_id" form:"client_id"` // 指定后端执行 clientId
Hub string `json:"hub" form:"hub"`
SearchType int `json:"search_type" form:"search_type"` // 搜索类型,镜像搜索,kubernetesTag 等
TargetType int `json:"target_type" form:"target_type"` // 目标类型,搜索镜像,搜索镜像版本,查询镜像详情
Namespace string `json:"namespace" form:"namespace"`
Repository string `json:"repository" form:"repository"`
Tag string `json:"tag" form:"tag"`
Query string `json:"query" form:"query"`
Page int `json:"page" form:"page"`
PageSize int `json:"page_size" form:"page_size"`
CustomConfig *SearchCustomConfig `json:"custom_config,omitempty" form:"custom_config,omitempty"`
}
func (*CallSearchRequest) SetDefaultPageOption ¶
func (o *CallSearchRequest) SetDefaultPageOption()
func (*CallSearchRequest) SetNamespace ¶
func (o *CallSearchRequest) SetNamespace()
type ChartDetail ¶
type ChartDetail struct {
Metadata ChartMetadata `json:"metadata"`
Dependencies []Dependency `json:"dependencies"`
Values interface{} `json:"values"`
Files ChartFiles `json:"files"`
Security Security `json:"security"`
Labels []string `json:"labels"`
}
ChartDetail Chart 详情
type ChartFiles ¶
type ChartFiles struct {
READMEMD string `json:"README.md"`
ValuesYAML string `json:"values.yaml"`
}
ChartFiles Chart 文件
type ChartMetaRequest ¶
type ChartMetadata ¶
type ChartMetadata struct {
Name string `json:"name"`
Sources []string `json:"sources"`
Version string `json:"version"`
Description string `json:"description"`
Maintainers []Maintainer `json:"maintainers"`
Icon string `json:"icon"`
APIVersion string `json:"apiVersion"`
AppVersion string `json:"appVersion"`
Annotations map[string]string `json:"annotations"`
Dependencies []Dependency `json:"dependencies"`
Type string `json:"type"`
URLs []string `json:"urls"`
Created time.Time `json:"created"`
Digest string `json:"digest"`
}
ChartMetadata Chart 元数据
type ChartSaved ¶
type ChartSaved struct {
Saved bool `json:"saved"`
}
type ChartVersion ¶
type ChartVersion struct {
Name string `json:"name"`
Sources []string `json:"sources"`
Version string `json:"version"`
Description string `json:"description"`
Maintainers []Maintainer `json:"maintainers"`
Icon string `json:"icon"`
APIVersion string `json:"apiVersion"`
AppVersion string `json:"appVersion"`
Annotations map[string]string `json:"annotations"`
Dependencies []Dependency `json:"dependencies"`
Type string `json:"type"`
URLs []string `json:"urls"`
Created time.Time `json:"created"`
Digest string `json:"digest"`
Labels []string `json:"labels"`
}
ChartVersion 表示 Chart 的版本信息
type CommonSearchRepositoryResult ¶
type CommonSearchRepositoryResult struct {
Name string `json:"name"`
Registry string `json:"registry"`
Stars int `json:"stars"` // 点赞数
LastModified int64 `json:"last_modified"`
Pull int64 `json:"pull"` // 下载数量
IsOfficial bool `json:"is_official"` // 在 dockerhub 时生效
ShortDesc *string `json:"short_desc"`
}
type CommonSearchTagInfoResult ¶
type CommonSearchTagInfoResult struct {
Name string `json:"name"`
FullSize int64 `json:"full_size"`
Digest string `json:"digest"`
Images []Image `json:"images"`
}
CommonSearchTagInfoResult TODO
type CommonSearchTagResult ¶
type CreateAccessRequest ¶
type CreateAgentRequest ¶
type CreateAgentRequest struct {
AgentName string `json:"agent_name"`
Type string `json:"type"`
GithubUser string `json:"github_user"` // github 后端用户名
GithubRepository string `json:"github_repository"` // github 仓库地址
GithubToken string `json:"github_token"` // github token
GithubEmail string `json:"github_email"`
RainbowdName string `json:"rainbowd_name"`
}
type CreateBuildRequest ¶
type CreateBuildRequest struct {
UserId string `json:"user_id"`
Name string `json:"name"`
Arch string `json:"arch"` // 架构
Dockerfile string `json:"dockerfile"` // 镜像构建 dockerfile
RegistryId int64 `json:"registry_id"` // 推送镜像仓库
AgentName string `json:"agent_name"` // 执行代理
Namespace string `json:"namespace"`
Repo string `json:"repo"` // 构建完成后的镜像名称
DockerfilePath string `yaml:"dockerfile_path"`
}
type CreateImageRequest ¶
type CreateImageRequest struct {
TaskId int64 `json:"task_id"`
TaskName string `json:"task_name"`
UserId string `json:"user_id"`
RegisterId int64 `json:"register_id"`
Name string `json:"name"`
Status string `json:"status"`
Message string `json:"message"`
IsPublic bool `json:"is_public"`
IsLocked bool `json:"is_locked"`
Arch string `json:"arch"`
}
type CreateImagesRequest ¶
type CreateLabelRequest ¶
type CreateLogoRequest ¶
type CreateNamespaceRequest ¶
type CreateNotificationRequest ¶
type CreateNotificationRequest struct {
UserMetaRequest `json:",inline"`
Name string `json:"name"`
Role int `json:"role"` // 1 管理员 0 普通用户
Enable bool `json:"enable"`
Type string `json:"type"` // 支持 webhook, dingtalk, wecom
PushCfg *PushConfig `json:"push_cfg,omitempty"`
ShortDesc string `json:"short_desc"`
}
type CreateRegistryRequest ¶
type CreateSubscribeRequest ¶
type CreateSubscribeRequest struct {
UserMetaRequest `json:",inline"`
Path string `json:"path"` // 默认会自动填充命名空间,比如 nginx 表示 library/nginx, jenkins/jenkins 则直接使用
Enable bool `json:"enable"` // 启动或者关闭
Size int `json:"size"` // 同步最新多少个版本, 最多 100 个,普通用户 5
RegisterId int64 `json:"register_id"`
Namespace string `json:"namespace"`
Interval time.Duration `json:"interval"` // 间隔多久同步一次
ImageFrom string `json:"image_from"` // 镜像来源,支持 dockerhub, gcr, quay.io
Policy string `json:"policy"` // 默认定义所有版本镜像,支持正则表达式,比如 v1.*
Arch string `json:"arch"` // 支持的架构,默认不限制 linux/amd64
Rewrite bool `json:"rewrite"` // 是否覆盖推送
}
type CreateTaskRequest ¶
type CreateTaskRequest struct {
Name string `json:"name"`
UserId string `json:"user_id"`
UserName string `json:"user_name"`
RegisterId int64 `json:"register_id"`
Type int `json:"type"` // 0:直接指定镜像列表 1: 指定 kubernetes 版本
KubernetesVersion string `json:"kubernetes_version"`
Images []string `json:"images"` // 镜像列表中含镜像和架构,格式类似 nginx:1.0.1/amd64,直接指定架构优先级高于任务 arch
AgentName string `json:"agent_name"`
Mode int64 `json:"mode"`
PublicImage bool `json:"public_image"`
Driver string `json:"driver"`
Logo string `json:"logo"`
Namespace string `json:"namespace"`
IsOfficial bool `json:"is_official"`
Architecture string `json:"architecture"`
OwnerRef int `json:"owner_ref"` // 任务所属,直接创建 0,订阅创建 1
SubscribeId int64 `json:"subscribe_id"`
}
type CreateUserRequest ¶
type CreateUsersRequest ¶
type CreateUsersRequest struct {
Users []CreateUserRequest
}
type CustomMeta ¶
type CustomMeta struct {
Status int `form:"status"`
Namespace string `form:"namespace"`
Agent string `form:"agent"`
OwnerRef string `form:"ownerRef"`
SubscribeId int64 `form:"subscribe_id"`
Project string `form:"project"`
AgentStatus string `form:"agent_status"`
CustomStatus string `form:"custom_status"`
LabelIds string `form:"label_ids"`
Trusted int `form:"trusted"`
ExtendLimit int `form:"extend_limit"`
Arch string `form:"arch"`
AccessKey string `form:"access_key"`
}
type Dependency ¶
type Dependency struct {
Name string `json:"name"`
Version string `json:"version"`
Repository string `json:"repository"`
Condition string `json:"condition"`
Alias string `json:"alias,omitempty"` // omitempty 表示别名可选
}
Dependency 依赖项
type DingtalkConfig ¶
type DingtalkConfig struct {
URL string `json:"url"`
}
type DockerToken ¶
type DockerToken struct {
Token string `json:"token"`
}
type DownflowMeta ¶
type EmailConfig ¶
type EmailConfig struct {
}
type EnableChartRepoRequest ¶
type FixImageSpec ¶
type FixRequest ¶
type FixRequest struct {
Type string `json:"type"` // 修复资源类型
UserId string `json:"user_id"`
Image FixImageSpec `json:"image"`
}
type GCRSearchTagResult ¶
type GetRepositoryResult ¶
type GetRepositoryResult struct {
User string `json:"user"`
Name string `json:"name"`
Namespace string `json:"namespace"`
RepositoryType string `json:"repository_type"`
Status int `json:"status"`
StatusDescription string `json:"status_description"`
Description string `json:"description"`
IsPrivate bool `json:"is_private"`
IsAutomated bool `json:"is_automated"`
StarCount int `json:"star_count"`
PullCount int64 `json:"pull_count"`
LastUpdated string `json:"last_updated"`
LastModified string `json:"last_modified"`
DateRegistered string `json:"date_registered"`
CollaboratorCount int `json:"collaborator_count"`
Affiliation interface{} `json:"affiliation"` // can be null
HubUser string `json:"hub_user"`
HasStarred bool `json:"has_starred"`
//FullDescription string `json:"full_description"`
Permissions Permissions `json:"permissions"`
MediaTypes []string `json:"media_types"`
ContentTypes []string `json:"content_types"`
Categories []Category `json:"categories"`
ImmutableTagsSettings ImmutableTagsSettings `json:"immutable_tags_settings"`
StorageSize int64 `json:"storage_size"`
Source interface{} `json:"source"` // can be null
}
type GitHubRepository ¶
type HubSearchResponse ¶
type HubSearchResponse struct {
Count int `json:"count"`
Next string `json:"next"`
Previous string `json:"previous"`
Results []RepositoryResult `json:"results"`
}
type HubTagResponse ¶
type IdMetaRequest ¶
type IdNameMeta ¶
type Image ¶
type Image struct {
Features string `json:"features,omitempty"`
Variant *string `json:"variant,omitempty"` // 可能是 null
Digest string `json:"digest,omitempty"`
OS string `json:"os,omitempty"`
OSFeatures string `json:"os_features,omitempty"`
OSVersion *string `json:"os_version,omitempty"` // 可能是 null
Size int64 `json:"size,omitempty"`
Status string `json:"status,omitempty"`
LastPulled time.Time `json:"last_pulled,omitempty"`
LastPushed time.Time `json:"last_pushed,omitempty"`
Architecture string `json:"architecture,omitempty"`
}
type ImageManifest ¶
type ImageTag ¶
type ImageTag struct {
Features string `json:"features"`
Variant *string `json:"variant"` // 可能是 null
Digest string `json:"digest"`
OS string `json:"os"`
OSFeatures string `json:"os_features"`
OSVersion *string `json:"os_version"` // 可能是 null
Size int64 `json:"size"`
Status string `json:"status"`
LastPulled time.Time `json:"last_pulled"`
LastPushed time.Time `json:"last_pushed"`
Architecture string `json:"architecture"`
}
type ImmutableTagsSettings ¶
type ListOptions ¶
type ListOptions struct {
CustomMeta `json:",inline"`
UserMeta `json:",inline"`
TaskMeta `json:",inline"`
PageRequest `json:",inline"` // 分页请求属性
QueryOption `json:",inline"` // 搜索内容
}
ListOptions is the query options to a standard REST list call.
func (*ListOptions) SetDefaultPageOption ¶
func (o *ListOptions) SetDefaultPageOption()
type Maintainer ¶
type Maintainer struct {
Name string `json:"name"`
Email string `json:"email,omitempty"` // omitempty 表示如果 email 为空则不包含在 JSON 中
}
Maintainer 维护者信息
type NotificationResult ¶
type PageRequest ¶
type PageRequest struct {
Page int `form:"page" json:"page"` // 页数,表示第几页
Limit int `form:"limit" json:"limit"` // 每页数量,表示每页几个对象
}
PageRequest 分页配置
type PageResult ¶
type PageResult struct {
PageRequest `json:",inline"`
Total int64 `json:"total"` // 总记录数
Items interface{} `json:"items"` // 数据列表
Message string `json:"message"` // 正常或异常信息
}
type Permissions ¶
type PushConfig ¶
type PushConfig struct {
Webhook *WebhookConfig `json:"webhook,omitempty"`
Dingtalk *DingtalkConfig `json:"dingtalk,omitempty"`
QiWei *QiWeiConfig `json:"qiwei,omitempty"`
Email *EmailConfig `json:"email,omitempty"`
}
func (*PushConfig) Marshal ¶
func (pc *PushConfig) Marshal() (string, error)
func (*PushConfig) Unmarshal ¶
func (pc *PushConfig) Unmarshal(s string) error
type QiWeiConfig ¶
type QiWeiConfig struct {
URL string `json:"url"`
}
type QuaySearchTagResult ¶
type QuayTag ¶
type QuayTag struct {
Name string `json:"name"`
Reversion bool `json:"reversion"`
StartTS int64 `json:"start_ts"`
EndTS int64 `json:"end_ts"`
ManifestDigest string `json:"manifest_digest"`
IsManifestList bool `json:"is_manifest_list"`
Size *int64 `json:"size"` // 使用指针处理可能的null值
LastModified string `json:"last_modified"`
}
type QueryOption ¶
type QueryOption struct {
LabelSelector string `form:"labelSelector" json:"labelSelector"` // 标签搜索
NameSelector string `form:"nameSelector" json:"nameSelector"` // 名称搜索
}
QueryOption 搜索配置
type RemoteMetaRequest ¶
type RemoteMetaRequest struct {
Type int
Uid string `json:"uid"`
RepositorySearchRequest RemoteSearchRequest
TagSearchRequest RemoteTagSearchRequest
TagInfoSearchRequest RemoteTagInfoSearchRequest
}
type RemoteSearchRequest ¶
type RemoteSearchRequest struct {
Hub string `json:"hub" form:"hub"`
ClientId string `json:"client_id" form:"client_id"` // 指定后端执行 clientId
Namespace string `json:"namespace" form:"namespace"`
Query string `json:"query" form:"query"`
Page string `json:"page" form:"page"`
PageSize string `json:"page_size" form:"page_size"`
}
type RemoteTagSearchRequest ¶
type RemoteTagSearchRequest struct {
Hub string `json:"hub" form:"hub"`
ClientId string `json:"client_id" form:"client_id"`
Namespace string `json:"namespace" form:"namespace"`
Repository string `json:"repository" form:"repository"` // repo_name <namespace>/<repository_name>
Query string `json:"query" form:"query"`
Page int `json:"page" form:"page"`
PageSize int `json:"page_size" form:"page_size"`
SearchType int `json:"search_type" form:"search_type"` // 0 模糊搜索 1 精准查询
Config *SearchConfig `json:"config"`
}
type Repository ¶
type Repository struct {
Kind string `json:"kind"`
Title string `json:"title"`
Namespace Namespace `json:"namespace"`
Name string `json:"name"`
Description *string `json:"description"` // 使用指针来处理可能的 null 值
IsPublic bool `json:"is_public"`
Score float64 `json:"score"`
Href string `json:"href"`
LastModified int64 `json:"last_modified"`
Stars int `json:"stars"`
Popularity int `json:"popularity"`
}
type RepositoryResult ¶
type RepositoryResult struct {
RepoName string `json:"repo_name"`
ShortDescription string `json:"short_description"`
StarCount int `json:"star_count"`
PullCount int64 `json:"pull_count"` // 使用 int64 因为拉取计数可能非常大
RepoOwner string `json:"repo_owner"`
IsAutomated bool `json:"is_automated"`
IsOfficial bool `json:"is_official"`
}
type RunSubscribeRequest ¶
type RunSubscribeRequest struct {
UserMetaRequest `json:",inline"`
SubscribeId int64 `json:"subscribe_id"`
}
type SearchConfig ¶
type SearchCustomConfig ¶
type SearchDockerhubTagInfoResult ¶
type SearchDockerhubTagInfoResult struct {
Name string `json:"name"`
Creator int64 `json:"creator,omitempty"`
ID int64 `json:"id,omitempty"`
Images []Image `json:"images"`
LastUpdated time.Time `json:"last_updated"`
LastUpdater int64 `json:"last_updater"`
LastUpdaterUsername string `json:"last_updater_username"`
Repository int64 `json:"repository"`
FullSize int64 `json:"full_size"`
V2 bool `json:"v2"`
TagStatus string `json:"tag_status"`
TagLastPulled time.Time `json:"tag_last_pulled"`
TagLastPushed time.Time `json:"tag_last_pushed"`
MediaType string `json:"media_type"`
ContentType string `json:"content_type"`
Digest string `json:"digest"`
}
type SearchGCRResult ¶
type SearchQuayResult ¶
type SearchQuayResult struct {
Results []Repository `json:"results"`
HasAdditional bool `json:"has_additional"`
Page int `json:"page"`
PageSize int `json:"page_size"`
StartIndex int `json:"start_index"`
}
type SearchResult ¶
type Security ¶
type Security struct {
Signature SecuritySignature `json:"signature"`
}
type SecuritySignature ¶
SecuritySignature 安全签名
type SendNotificationRequest ¶
type SendNotificationRequest struct {
CreateNotificationRequest `json:",inline"`
Email string `json:"email"` // 系统通知,用户注册时使用
DryRun bool `json:"dry_run"` // 测试连通性
Content string `json:"content"` // 用户通知,用于存储镜像内容
}
type SyncNamespaceRequest ¶
type TagResult ¶
type TagResult struct {
Images []Image `json:"images,omitempty"`
LastUpdated time.Time `json:"last_updated,omitempty"`
LastUpdater int64 `json:"last_updater,omitempty"`
LastUpdaterUsername string `json:"last_updater_username,omitempty"`
Name string `json:"name,omitempty"`
Repository int64 `json:"repository,omitempty"`
FullSize int64 `json:"full_size,omitempty"`
V2 bool `json:"v2,omitempty"`
TagStatus string `json:"tag_status,omitempty"`
TagLastPulled time.Time `json:"tag_last_pulled,omitempty"`
TagLastPushed time.Time `json:"tag_last_pushed,omitempty"`
MediaType string `json:"media_type,omitempty"`
ContentType string `json:"content_type,omitempty"`
Digest string `json:"digest,omitempty"`
}
type UpdateAgentRequest ¶
type UpdateAgentRequest struct {
AgentName string `json:"agent_name"`
GithubUser string `json:"github_user"` // github 后端用户名
GithubRepository string `json:"github_repository"` // github 仓库地址
GithubToken string `json:"github_token"` // github token
GithubEmail string `json:"github_email"`
RainbowdName string `json:"rainbowd_name"`
}
type UpdateBuildRequest ¶
type UpdateBuildRequest struct {
Id int64 `json:"id"`
Status string `json:"status"`
ResourceVersion int64 `json:"resource_version"`
CreateBuildRequest `json:",inline"`
}
type UpdateImageRequest ¶
type UpdateImageRequest struct {
Id int64 `json:"id"`
ResourceVersion int64 `json:"resource_version"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Label string `json:"label"`
IsPublic bool `json:"is_public"`
Logo string `json:"logo"`
Description string `json:"description"`
IsLocked bool `json:"is_locked"`
}
type UpdateLabelRequest ¶
type UpdateLogoRequest ¶
type UpdateNamespaceRequest ¶
type UpdateNotificationRequest ¶
type UpdateNotificationRequest struct {
IdMetaRequest `json:",inline"`
UserMetaRequest `json:",inline"`
Name string `json:"name"`
Role int `json:"role"` // 1 管理员 0 普通用户
Enable bool `json:"enable"`
Type string `json:"type"` // 支持 webhook, dingtalk, wecom
PushCfg *PushConfig `json:"push_cfg,omitempty"`
ShortDesc string `json:"short_desc"`
}
type UpdateRegistryRequest ¶
type UpdateRegistryRequest struct {
Id int64 `json:"id"`
ResourceVersion int64 `json:"resource_version"`
Name string `json:"name"`
UserId string `json:"user_id"`
Repository string `json:"repository"`
Namespace string `json:"namespace"`
Username string `json:"username"`
Password string `json:"password"`
}
type UpdateSubscribeRequest ¶
type UpdateSubscribeRequest struct {
Id int64 `json:"id"`
ResourceVersion int64 `json:"resource_version"`
UserMetaRequest `json:",inline"`
Enable bool `json:"enable"` // 启动或者关闭
Size int `json:"size"` // 同步最新多少个版本
Interval time.Duration `json:"interval"` // 间隔多久同步一次
ImageFrom string `json:"image_from"` // 镜像来源,支持 dockerhub, gcr, quay.io
Policy string `json:"policy"` // 默认定义所有版本镜像,支持正则表达式,比如 v1.*
Arch string `json:"arch"` // 支持的架构,默认不限制 linux/amd64
Rewrite bool `json:"rewrite"` // 是否覆盖推送
Namespace string `json:"namespace"`
}
type UpdateTaskRequest ¶
type UpdateTaskRequest struct {
Id int64 `json:"id"`
ResourceVersion int64 `json:"resource_version"`
Name string `json:"name"`
UserId string `json:"user_id"`
RegisterId int64 `json:"register_id"`
Type int `json:"type"` // 0:直接指定镜像列表 1: 指定 kubernetes 版本
KubernetesVersion string `json:"kubernetes_version"`
AgentName string `json:"agent_name"`
Status string `json:"status"`
Images []string `json:"images"`
Mode int64 `json:"mode"`
PublicImage bool `json:"public_image"`
OnlyPushError bool `json:"only_push_error"` // 仅同步推送异常
}
type UpdateTaskStatusRequest ¶
type UpdateUserRequest ¶
type UpdateUserRequest struct {
ResourceVersion int64 `json:"resource_version"`
CreateUserRequest `json:",inline"`
}
type UserMetaRequest ¶
type WebhookConfig ¶
Click to show internal directories.
Click to hide internal directories.