Documentation ¶
Index ¶
- Constants
- func CleanCache() error
- func CleanImageCache(logger *zap.SugaredLogger) error
- func CreateAnnouncement(creater string, ctx *systemmodel.Announcement, log *zap.SugaredLogger) error
- func CreateBasicImage(args *commonmodels.BasicImage, log *zap.SugaredLogger) error
- func CreateHelmRepo(args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
- func CreateInstall(args *commonmodels.Install, log *zap.SugaredLogger) error
- func CreateJenkinsIntegration(args *commonmodels.JenkinsIntegration, log *zap.SugaredLogger) error
- func CreatePrivateKey(args *commonmodels.PrivateKey, log *zap.SugaredLogger) error
- func CreateProxy(args *commonmodels.Proxy, log *zap.SugaredLogger) error
- func CreateRegistryNamespace(username string, args *commonmodels.RegistryNamespace, log *zap.SugaredLogger) error
- func CreateS3Storage(updateBy string, storage *commonmodels.S3Storage, logger *zap.SugaredLogger) error
- func DeleteAnnouncement(user, id string, log *zap.SugaredLogger) error
- func DeleteBasicImage(id string, log *zap.SugaredLogger) error
- func DeleteHelmRepo(id string, log *zap.SugaredLogger) error
- func DeleteInstall(name, version string, log *zap.SugaredLogger) error
- func DeleteJenkinsIntegration(ID string, log *zap.SugaredLogger) error
- func DeleteNotifies(user string, notifyIDs []string, log *zap.SugaredLogger) error
- func DeletePrivateKey(id string, log *zap.SugaredLogger) error
- func DeleteProxy(id string, log *zap.SugaredLogger) error
- func DeleteRegistryNamespace(id string, log *zap.SugaredLogger) error
- func DeleteS3Storage(deleteBy string, id string, logger *zap.SugaredLogger) error
- func FindOperation(args *OperationLogArgs, log *zap.SugaredLogger) ([]*models.OperationLog, int, error)
- func GetBasicImage(id string, log *zap.SugaredLogger) (*commonmodels.BasicImage, error)
- func GetCapacityStrategy(target commonmodels.CapacityTarget) (*commonmodels.CapacityStrategy, error)
- func GetInstall(name, version string, log *zap.SugaredLogger) (*commonmodels.Install, error)
- func GetOrCreateCleanCacheState() (*commonmodels.DindClean, error)
- func GetPrivateKey(id string, log *zap.SugaredLogger) (*commonmodels.PrivateKey, error)
- func GetProxy(id string, log *zap.SugaredLogger) (*commonmodels.Proxy, error)
- func GetRegistryNamespace(regOps *commonrepo.FindRegOps, log *zap.SugaredLogger) (*commonmodels.RegistryNamespace, error)
- func GetRegistryNamespaces(regOps *commonrepo.FindRegOps, log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
- func GetRepoTags(registryInfo *commonmodels.RegistryNamespace, name string, ...) (*registry.ImagesResp, error)
- func GetS3Storage(id string, logger *zap.SugaredLogger) (*commonmodels.S3Storage, error)
- func GithubAppAdd(args *commonmodels.GithubApp) error
- func GithubAppDelete(id string) error
- func GithubAppList() ([]*commonmodels.GithubApp, error)
- func HandleSystemGC(dryRun bool) error
- func InitInstallMap() map[string]*commonmodels.Install
- func InitbasicImageInfos() []*commonmodels.BasicImage
- func ListAvaiableInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
- func ListBasicImages(imageFrom string, log *zap.SugaredLogger) ([]*commonmodels.BasicImage, error)
- func ListHelmRepos(log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
- func ListInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
- func ListJenkinsIntegration(log *zap.SugaredLogger) ([]*commonmodels.JenkinsIntegration, error)
- func ListJobNames(log *zap.SugaredLogger) ([]string, error)
- func ListPrivateKeys(log *zap.SugaredLogger) ([]*commonmodels.PrivateKey, error)
- func ListProxies(log *zap.SugaredLogger) ([]*commonmodels.Proxy, error)
- func ListRegistries(log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
- func ListS3Storage(logger *zap.SugaredLogger) ([]*commonmodels.S3Storage, error)
- func ListSubscriptions(user string, log *zap.SugaredLogger) ([]*commonmodels.Subscription, error)
- func PullAllAnnouncement(user string, log *zap.SugaredLogger) ([]*systemmodel.Announcement, error)
- func PullNotify(user string, log *zap.SugaredLogger) ([]*commonmodels.Notify, error)
- func PullNotifyAnnouncement(user string, log *zap.SugaredLogger) ([]*systemmodel.Announcement, error)
- func ReadNotify(user string, notifyIDs []string, log *zap.SugaredLogger) error
- func SetProxyConfig()
- func TestConnection(args *commonmodels.Proxy, log *zap.SugaredLogger) error
- func TestJenkinsConnection(args *JenkinsArgs, log *zap.SugaredLogger) error
- func Unsubscribe(user string, notifyType int, log *zap.SugaredLogger) error
- func UpdateAnnouncement(user string, notifyID string, ctx *systemmodel.Announcement, ...) error
- func UpdateBasicImage(id string, args *commonmodels.BasicImage, log *zap.SugaredLogger) error
- func UpdateHelmRepo(id string, args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
- func UpdateInstall(name, version string, args *commonmodels.Install, log *zap.SugaredLogger) error
- func UpdateJenkinsIntegration(ID string, args *commonmodels.JenkinsIntegration, log *zap.SugaredLogger) error
- func UpdateOperation(id string, status int, log *zap.SugaredLogger) error
- func UpdatePrivateKey(id string, args *commonmodels.PrivateKey, log *zap.SugaredLogger) error
- func UpdateProxy(id string, args *commonmodels.Proxy, log *zap.SugaredLogger) error
- func UpdateRegistryNamespace(username, id string, args *commonmodels.RegistryNamespace, ...) error
- func UpdateRegistryNamespaceDefault(args *commonmodels.RegistryNamespace, log *zap.SugaredLogger) error
- func UpdateS3Storage(updateBy, id string, storage *commonmodels.S3Storage, ...) error
- func UpdateSubscribe(user string, notifyType int, subscription *commonmodels.Subscription, ...) error
- func UpdateSysCapStrategy(strategy *commonmodels.CapacityStrategy) error
- func UpsertSubscription(user string, subscription *commonmodels.Subscription, log *zap.SugaredLogger) error
- type AddAuditLogResp
- type JenkinsArgs
- type JenkinsBuildArgs
- type MessageCtx
- type OperationLogArgs
- type RepoImgResp
- type RepoInfo
Constants ¶
View Source
const ( PERPAGE = 100 PAGE = 1 )
View Source
const ( CleanStatusUnStart = "unStart" CleanStatusSuccess = "success" CleanStatusCleaning = "cleaning" CleanStatusFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
func CleanCache ¶ added in v1.2.0
func CleanCache() error
func CreateAnnouncement ¶ added in v1.4.0
func CreateAnnouncement(creater string, ctx *systemmodel.Announcement, log *zap.SugaredLogger) error
func CreateBasicImage ¶
func CreateBasicImage(args *commonmodels.BasicImage, log *zap.SugaredLogger) error
func CreateHelmRepo ¶ added in v1.2.0
func CreateHelmRepo(args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
func CreateInstall ¶
func CreateInstall(args *commonmodels.Install, log *zap.SugaredLogger) error
func CreateJenkinsIntegration ¶
func CreateJenkinsIntegration(args *commonmodels.JenkinsIntegration, log *zap.SugaredLogger) error
func CreatePrivateKey ¶ added in v1.2.0
func CreatePrivateKey(args *commonmodels.PrivateKey, log *zap.SugaredLogger) error
func CreateProxy ¶
func CreateProxy(args *commonmodels.Proxy, log *zap.SugaredLogger) error
func CreateRegistryNamespace ¶
func CreateRegistryNamespace(username string, args *commonmodels.RegistryNamespace, log *zap.SugaredLogger) error
func CreateS3Storage ¶
func CreateS3Storage(updateBy string, storage *commonmodels.S3Storage, logger *zap.SugaredLogger) error
func DeleteAnnouncement ¶ added in v1.4.0
func DeleteAnnouncement(user, id string, log *zap.SugaredLogger) error
func DeleteBasicImage ¶
func DeleteBasicImage(id string, log *zap.SugaredLogger) error
func DeleteHelmRepo ¶ added in v1.2.0
func DeleteHelmRepo(id string, log *zap.SugaredLogger) error
func DeleteInstall ¶
func DeleteInstall(name, version string, log *zap.SugaredLogger) error
func DeleteJenkinsIntegration ¶
func DeleteJenkinsIntegration(ID string, log *zap.SugaredLogger) error
func DeleteNotifies ¶ added in v1.2.0
func DeleteNotifies(user string, notifyIDs []string, log *zap.SugaredLogger) error
func DeletePrivateKey ¶ added in v1.2.0
func DeletePrivateKey(id string, log *zap.SugaredLogger) error
func DeleteProxy ¶
func DeleteProxy(id string, log *zap.SugaredLogger) error
func DeleteRegistryNamespace ¶
func DeleteRegistryNamespace(id string, log *zap.SugaredLogger) error
func DeleteS3Storage ¶
func DeleteS3Storage(deleteBy string, id string, logger *zap.SugaredLogger) error
func FindOperation ¶ added in v1.4.0
func FindOperation(args *OperationLogArgs, log *zap.SugaredLogger) ([]*models.OperationLog, int, error)
func GetBasicImage ¶
func GetBasicImage(id string, log *zap.SugaredLogger) (*commonmodels.BasicImage, error)
func GetCapacityStrategy ¶ added in v1.2.0
func GetCapacityStrategy(target commonmodels.CapacityTarget) (*commonmodels.CapacityStrategy, error)
func GetInstall ¶
func GetInstall(name, version string, log *zap.SugaredLogger) (*commonmodels.Install, error)
func GetOrCreateCleanCacheState ¶
func GetOrCreateCleanCacheState() (*commonmodels.DindClean, error)
GetOrCreateCleanCacheState 获取清理镜像缓存状态,如果数据库中没有数据返回一个临时对象
func GetPrivateKey ¶ added in v1.2.0
func GetPrivateKey(id string, log *zap.SugaredLogger) (*commonmodels.PrivateKey, error)
func GetProxy ¶
func GetProxy(id string, log *zap.SugaredLogger) (*commonmodels.Proxy, error)
func GetRegistryNamespace ¶
func GetRegistryNamespace(regOps *commonrepo.FindRegOps, log *zap.SugaredLogger) (*commonmodels.RegistryNamespace, error)
func GetRegistryNamespaces ¶
func GetRegistryNamespaces(regOps *commonrepo.FindRegOps, log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
func GetRepoTags ¶
func GetRepoTags(registryInfo *commonmodels.RegistryNamespace, name string, log *zap.SugaredLogger) (*registry.ImagesResp, error)
func GetS3Storage ¶
func GetS3Storage(id string, logger *zap.SugaredLogger) (*commonmodels.S3Storage, error)
func GithubAppAdd ¶
func GithubAppAdd(args *commonmodels.GithubApp) error
func GithubAppDelete ¶
func GithubAppList ¶
func GithubAppList() ([]*commonmodels.GithubApp, error)
func HandleSystemGC ¶ added in v1.2.0
func InitInstallMap ¶
func InitInstallMap() map[string]*commonmodels.Install
func InitbasicImageInfos ¶
func InitbasicImageInfos() []*commonmodels.BasicImage
func ListAvaiableInstalls ¶
func ListAvaiableInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
func ListBasicImages ¶
func ListBasicImages(imageFrom string, log *zap.SugaredLogger) ([]*commonmodels.BasicImage, error)
func ListHelmRepos ¶ added in v1.2.0
func ListHelmRepos(log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
func ListInstalls ¶
func ListInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
func ListJenkinsIntegration ¶
func ListJenkinsIntegration(log *zap.SugaredLogger) ([]*commonmodels.JenkinsIntegration, error)
func ListJobNames ¶
func ListJobNames(log *zap.SugaredLogger) ([]string, error)
func ListPrivateKeys ¶ added in v1.2.0
func ListPrivateKeys(log *zap.SugaredLogger) ([]*commonmodels.PrivateKey, error)
func ListProxies ¶
func ListProxies(log *zap.SugaredLogger) ([]*commonmodels.Proxy, error)
func ListRegistries ¶
func ListRegistries(log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
ListRegistries 为了抹掉ak和sk的数据
func ListS3Storage ¶
func ListS3Storage(logger *zap.SugaredLogger) ([]*commonmodels.S3Storage, error)
func ListSubscriptions ¶ added in v1.2.0
func ListSubscriptions(user string, log *zap.SugaredLogger) ([]*commonmodels.Subscription, error)
func PullAllAnnouncement ¶ added in v1.4.0
func PullAllAnnouncement(user string, log *zap.SugaredLogger) ([]*systemmodel.Announcement, error)
func PullNotify ¶ added in v1.2.0
func PullNotify(user string, log *zap.SugaredLogger) ([]*commonmodels.Notify, error)
func PullNotifyAnnouncement ¶ added in v1.4.0
func PullNotifyAnnouncement(user string, log *zap.SugaredLogger) ([]*systemmodel.Announcement, error)
func ReadNotify ¶ added in v1.2.0
func ReadNotify(user string, notifyIDs []string, log *zap.SugaredLogger) error
func SetProxyConfig ¶
func SetProxyConfig()
func TestConnection ¶
func TestConnection(args *commonmodels.Proxy, log *zap.SugaredLogger) error
func TestJenkinsConnection ¶
func TestJenkinsConnection(args *JenkinsArgs, log *zap.SugaredLogger) error
func Unsubscribe ¶ added in v1.2.0
func Unsubscribe(user string, notifyType int, log *zap.SugaredLogger) error
func UpdateAnnouncement ¶ added in v1.4.0
func UpdateAnnouncement(user string, notifyID string, ctx *systemmodel.Announcement, log *zap.SugaredLogger) error
func UpdateBasicImage ¶
func UpdateBasicImage(id string, args *commonmodels.BasicImage, log *zap.SugaredLogger) error
func UpdateHelmRepo ¶ added in v1.2.0
func UpdateHelmRepo(id string, args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
func UpdateInstall ¶
func UpdateInstall(name, version string, args *commonmodels.Install, log *zap.SugaredLogger) error
func UpdateJenkinsIntegration ¶
func UpdateJenkinsIntegration(ID string, args *commonmodels.JenkinsIntegration, log *zap.SugaredLogger) error
func UpdateOperation ¶ added in v1.4.0
func UpdateOperation(id string, status int, log *zap.SugaredLogger) error
func UpdatePrivateKey ¶ added in v1.2.0
func UpdatePrivateKey(id string, args *commonmodels.PrivateKey, log *zap.SugaredLogger) error
func UpdateProxy ¶
func UpdateProxy(id string, args *commonmodels.Proxy, log *zap.SugaredLogger) error
func UpdateRegistryNamespace ¶
func UpdateRegistryNamespace(username, id string, args *commonmodels.RegistryNamespace, log *zap.SugaredLogger) error
func UpdateRegistryNamespaceDefault ¶
func UpdateRegistryNamespaceDefault(args *commonmodels.RegistryNamespace, log *zap.SugaredLogger) error
func UpdateS3Storage ¶
func UpdateS3Storage(updateBy, id string, storage *commonmodels.S3Storage, logger *zap.SugaredLogger) error
func UpdateSubscribe ¶ added in v1.2.0
func UpdateSubscribe(user string, notifyType int, subscription *commonmodels.Subscription, log *zap.SugaredLogger) error
func UpdateSysCapStrategy ¶ added in v1.2.0
func UpdateSysCapStrategy(strategy *commonmodels.CapacityStrategy) error
func UpsertSubscription ¶ added in v1.2.0
func UpsertSubscription(user string, subscription *commonmodels.Subscription, log *zap.SugaredLogger) error
Types ¶
type AddAuditLogResp ¶ added in v1.4.0
type AddAuditLogResp struct {
OperationLogID string `json:"id"`
}
func InsertOperation ¶ added in v1.4.0
func InsertOperation(args *models.OperationLog, log *zap.SugaredLogger) (*AddAuditLogResp, error)
type JenkinsArgs ¶
type JenkinsBuildArgs ¶
type JenkinsBuildArgs struct { Name string `json:"name"` Value interface{} `json:"value"` }
func ListJobBuildArgs ¶
func ListJobBuildArgs(jobName string, log *zap.SugaredLogger) ([]*JenkinsBuildArgs, error)
type MessageCtx ¶ added in v1.2.0
type OperationLogArgs ¶ added in v1.4.0
type RepoImgResp ¶
type RepoImgResp struct { Host string `json:"host"` Owner string `json:"owner"` Name string `json:"name"` Tag string `json:"tag"` }
func ListReposTags ¶
func ListReposTags(registryInfo *commonmodels.RegistryNamespace, names []string, logger *zap.SugaredLogger) ([]*RepoImgResp, error)
Click to show internal directories.
Click to hide internal directories.