Documentation ¶
Overview ¶
Copyright 2023 The KodeRover Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023 The KodeRover Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func BatchCreatePrivateKey(args []*commonmodels.PrivateKey, option, username string, ...) error
- func CheckLLMIntegration(ctx context.Context) (bool, error)
- func CheckReqLimit(key string) bool
- 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 CreateConfigurationManagement(args *commonmodels.ConfigurationManagement, log *zap.SugaredLogger) error
- func CreateExternalLink(args *commonmodels.ExternalLink, log *zap.SugaredLogger) error
- func CreateExternalSystem(args *ExternalSystemDetail, log *zap.SugaredLogger) error
- func CreateHelmRepo(args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
- func CreateIMApp(args *commonmodels.IMApp, log *zap.SugaredLogger) error
- func CreateInstall(args *commonmodels.Install, log *zap.SugaredLogger) error
- func CreateJenkinsIntegration(args *commonmodels.JenkinsIntegration, log *zap.SugaredLogger) error
- func CreateLLMIntegration(ctx context.Context, args *commonmodels.LLMIntegration) error
- func CreateObservability(args *models.Observability) error
- func CreateOrUpdateDashboardConfiguration(username, userID string, config *DashBoardConfig, log *zap.SugaredLogger) error
- func CreateOrUpdateSecuritySettings(args *SecurityAndPrivacySettings, logger *zap.SugaredLogger) error
- func CreateProjectManagement(pm *models.ProjectManagement, 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 CreateSonarIntegration(args *SonarIntegration, log *zap.SugaredLogger) error
- func DeleteAnnouncement(user, id string, log *zap.SugaredLogger) error
- func DeleteBasicImage(id string, log *zap.SugaredLogger) error
- func DeleteConfigurationManagement(id string, log *zap.SugaredLogger) error
- func DeleteExternalLink(id string, log *zap.SugaredLogger) error
- func DeleteExternalSystem(id string, log *zap.SugaredLogger) error
- func DeleteHelmRepo(id string, log *zap.SugaredLogger) error
- func DeleteIMApp(id string, log *zap.SugaredLogger) error
- func DeleteInstall(name, version string, log *zap.SugaredLogger) error
- func DeleteJenkinsIntegration(ID string, log *zap.SugaredLogger) error
- func DeleteLLMIntegration(ctx context.Context, ID string) error
- func DeleteNotifies(user string, notifyIDs []string, log *zap.SugaredLogger) error
- func DeleteObservability(id string) error
- func DeletePrivateKey(id, userName string, log *zap.SugaredLogger) error
- func DeleteProjectManagement(idHex 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 DeleteSonarIntegration(id string, log *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 GetConfigurationManagement(id string, log *zap.SugaredLogger) (*commonmodels.ConfigurationManagement, error)
- func GetInstall(name, version string, log *zap.SugaredLogger) (*commonmodels.Install, error)
- func GetJiraAllStatus(id, project string) ([]string, error)
- func GetJiraTypes(id, project string) ([]*jira.IssueTypeWithStatus, error)
- func GetLLMIntegration(ctx context.Context, id string) (*commonmodels.LLMIntegration, 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 GetRepoTags(registryInfo *commonmodels.RegistryNamespace, name string, ...) (*registry.ImagesResp, error)
- func GetS3Storage(id string, logger *zap.SugaredLogger) (*commonmodels.S3Storage, error)
- func GetThemeInfos(log *zap.SugaredLogger) (*types.Theme, error)
- func GithubAppAdd(args *commonmodels.GithubApp) error
- func GithubAppDelete(id string) error
- func GithubAppList() ([]*commonmodels.GithubApp, error)
- func HandleJiraHookEvent(workflowName, hookName string, event *jira.Event, logger *zap.SugaredLogger) error
- func HandleMeegoHookEvent(workflowName, hookName string, event *meego.GeneralWebhookRequest, ...) error
- func HandleSystemGC(dryRun bool) error
- func InitInstallMap() map[string]*commonmodels.Install
- func InitbasicImageInfos() []*commonmodels.BasicImage
- func InitializeUser(username, password, company, email string, phone int64, reason, address string, ...) error
- func ListApolloApps(id string, log *zap.SugaredLogger) ([]string, error)
- func ListApolloEnvAndClusters(id string, appID string, log *zap.SugaredLogger) ([]*apollo.EnvAndCluster, error)
- func ListApolloNamespaces(id string, appID string, env string, cluster string, log *zap.SugaredLogger) ([]string, error)
- func ListAvaiableInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
- func ListBasicImages(imageFrom string, imageType string, log *zap.SugaredLogger) ([]*commonmodels.BasicImage, error)
- func ListConfigurationManagement(_type string, log *zap.SugaredLogger) ([]*commonmodels.ConfigurationManagement, error)
- func ListExternalLinks(log *zap.SugaredLogger) ([]*commonmodels.ExternalLink, error)
- func ListGuanceyunMonitor(id, search string) ([]guanceyun.MonitorContent, error)
- func ListHelmRepos(log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
- func ListIMApp(_type string, log *zap.SugaredLogger) ([]*commonmodels.IMApp, error)
- func ListInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
- func ListJenkinsIntegration(encryptedKey string, log *zap.SugaredLogger) ([]*commonmodels.JenkinsIntegration, error)
- func ListJobNames(id string, log *zap.SugaredLogger) ([]string, error)
- func ListLLMIntegration(ctx context.Context) ([]*commonmodels.LLMIntegration, error)
- func ListLabels() ([]string, error)
- func ListObservability(_type string, isAdmin bool) ([]*models.Observability, error)
- func ListPrivateKeys(encryptedKey, projectName, keyword string, systemOnly bool, ...) ([]*commonmodels.PrivateKey, error)
- func ListPrivateKeysInternal(log *zap.SugaredLogger) ([]*commonmodels.PrivateKey, error)
- func ListProjectManagement(log *zap.SugaredLogger) ([]*models.ProjectManagement, error)
- func ListProxies(log *zap.SugaredLogger) ([]*commonmodels.Proxy, error)
- func ListRegistries(log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
- func ListRegistriesByProject(projectName string, log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
- func ListS3Storage(encryptedKey string, logger *zap.SugaredLogger) ([]*commonmodels.S3Storage, error)
- func ListS3StorageByProject(projectName string, logger *zap.SugaredLogger) ([]*commonmodels.S3Storage, error)
- func ListSubscriptions(user string, log *zap.SugaredLogger) ([]*commonmodels.Subscription, error)
- func ListTars(id, kind string, serviceNames []string, logger *zap.SugaredLogger) ([]*commonmodels.TarInfo, error)
- func OpenAPICreateRegistry(username string, req *OpenAPICreateRegistryReq, logger *zap.SugaredLogger) 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 SearchJiraIssues(id, project, _type, status, summary string, ne bool) ([]*jira.Issue, error)
- func SearchJiraProjectIssuesWithJQL(id, project, jql, summary string) ([]*jira.Issue, error)
- func SetCron(cron string, cronEnabled bool, logger *zap.SugaredLogger) error
- func SetProxyConfig()
- func SyncDinDForRegistries() error
- 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 UpdateConfigurationManagement(id string, args *commonmodels.ConfigurationManagement, log *zap.SugaredLogger) error
- func UpdateDefaultLogin(defaultLogin string, _ *zap.SugaredLogger) error
- func UpdateExternalLink(id string, args *commonmodels.ExternalLink, log *zap.SugaredLogger) error
- func UpdateExternalSystem(id string, system *ExternalSystemDetail, log *zap.SugaredLogger) error
- func UpdateHelmRepo(id string, args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
- func UpdateIMApp(id string, args *commonmodels.IMApp, 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 UpdateLLMIntegration(ctx context.Context, ID string, args *commonmodels.LLMIntegration) error
- func UpdateObservability(id string, args *models.Observability) error
- func UpdateOperation(id string, status int, log *zap.SugaredLogger) error
- func UpdatePrivateKey(id string, args *commonmodels.PrivateKey, log *zap.SugaredLogger) error
- func UpdateProjectManagement(idHex string, pm *models.ProjectManagement, 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 UpdateSonarIntegration(id string, integration *SonarIntegration, log *zap.SugaredLogger) error
- func UpdateSubscribe(user string, notifyType int, subscription *commonmodels.Subscription, ...) error
- func UpdateSysCapStrategy(strategy *commonmodels.CapacityStrategy) error
- func UpdateThemeInfo(theme *models.Theme, log *zap.SugaredLogger) error
- func UpdateWorkflowConcurrency(workflowConcurrency, buildConcurrency int64, log *zap.SugaredLogger) error
- func UpsertSubscription(user string, subscription *commonmodels.Subscription, log *zap.SugaredLogger) error
- func ValidateConfigurationManagement(rawData string, log *zap.SugaredLogger) error
- func ValidateIMApp(im *commonmodels.IMApp, log *zap.SugaredLogger) error
- func ValidateJira(info *models.ProjectManagement) error
- func ValidateMeego(info *models.ProjectManagement) error
- func ValidateObservability(args *models.Observability) error
- func ValidateSonarIntegration(arg *SonarIntegration, log *zap.SugaredLogger) error
- type AddAuditLogResp
- type ChartVersion
- type CreatePrivateKeyResp
- type DashBoardCardConfig
- type DashBoardConfig
- type EnvResponse
- type EnvService
- type ExternalSystemDetail
- type GetDefaultLoginResponse
- type GetWebhookConfigReponse
- type IndexFileResp
- type InitializeInfo
- type JenkinsArgs
- type JenkinsBuildArgs
- type JiraProjectsResp
- type MeegoProject
- type MeegoProjectResp
- type MeegoTransitionResp
- type MeegoWorkItem
- type MeegoWorkItemResp
- type MeegoWorkItemStatusTransition
- type MeegoWorkItemType
- type MeegoWorkItemTypeResp
- type MessageCtx
- type MyEnvCardConfig
- type MyWorkflowCardConfig
- type OpenAPICluster
- type OpenAPICreateRegistryReq
- type OpenAPIRegistry
- type Operation
- type OperationLogArgs
- type RepoImgResp
- type RepoInfo
- type SecurityAndPrivacySettings
- type SonarIntegration
- type SystemInitializationStatus
- type UpdateDefaultLoginParams
- type VMEnvService
- type WorkflowConcurrencySettings
- type WorkflowConfig
- type WorkflowResponse
Constants ¶
const ( CardNameRunningWorkflow = "运行中的工作流" CardNameServiceUpdateFrequency = "服务热力图" )
const ( CardTypeRunningWorkflow = "running_workflow" CardTypeServiceUpdateFrequency = "service_update_frequency" CardTypeMyWorkflow = "my_workflow" CardTypeMyEnv = "my_env" )
const ( PERPAGE = 100 PAGE = 1 )
const ( CleanStatusUnStart = "unStart" CleanStatusSuccess = "success" CleanStatusCleaning = "cleaning" CleanStatusFailed = "failed" )
Variables ¶
var ClusterProviderValueNames map[int8]string = map[int8]string{
1: "阿里云 ACK",
2: "腾讯云 TKE",
3: "华为云 CCE",
4: "Amazon EKS",
5: "腾讯云 TKE Serverless",
0: "其它",
}
var ImageTagsReqStatus = struct { M sync.Mutex List map[string]struct{} }{ M: sync.Mutex{}, List: make(map[string]struct{}), }
ImageTagsReqStatus its a global map to store the status of the image list request
Functions ¶
func BatchCreatePrivateKey ¶ added in v1.6.0
func BatchCreatePrivateKey(args []*commonmodels.PrivateKey, option, username string, log *zap.SugaredLogger) error
override: Full coverage (temporarily reserved) increment: Incremental coverage patch: Overwrite existing
func CheckLLMIntegration ¶ added in v1.9.9
func CheckReqLimit ¶ added in v1.9.9
func CleanCache ¶ added in v1.2.0
func CleanCache() error
func CleanImageCache ¶
func CleanImageCache(logger *zap.SugaredLogger) 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 CreateConfigurationManagement ¶ added in v1.9.9
func CreateConfigurationManagement(args *commonmodels.ConfigurationManagement, log *zap.SugaredLogger) error
func CreateExternalLink ¶ added in v1.7.0
func CreateExternalLink(args *commonmodels.ExternalLink, log *zap.SugaredLogger) error
func CreateExternalSystem ¶ added in v1.8.0
func CreateExternalSystem(args *ExternalSystemDetail, log *zap.SugaredLogger) error
func CreateHelmRepo ¶ added in v1.2.0
func CreateHelmRepo(args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
func CreateIMApp ¶ added in v1.9.9
func CreateIMApp(args *commonmodels.IMApp, 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 CreateLLMIntegration ¶ added in v1.9.9
func CreateLLMIntegration(ctx context.Context, args *commonmodels.LLMIntegration) error
func CreateObservability ¶ added in v1.9.9
func CreateObservability(args *models.Observability) error
func CreateOrUpdateDashboardConfiguration ¶ added in v1.9.9
func CreateOrUpdateDashboardConfiguration(username, userID string, config *DashBoardConfig, log *zap.SugaredLogger) error
func CreateOrUpdateSecuritySettings ¶ added in v1.9.9
func CreateOrUpdateSecuritySettings(args *SecurityAndPrivacySettings, logger *zap.SugaredLogger) error
func CreateProjectManagement ¶ added in v1.9.9
func CreateProjectManagement(pm *models.ProjectManagement, 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 CreateSonarIntegration ¶ added in v1.9.9
func CreateSonarIntegration(args *SonarIntegration, log *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 DeleteConfigurationManagement ¶ added in v1.9.9
func DeleteConfigurationManagement(id string, log *zap.SugaredLogger) error
func DeleteExternalLink ¶ added in v1.7.0
func DeleteExternalLink(id string, log *zap.SugaredLogger) error
func DeleteExternalSystem ¶ added in v1.8.0
func DeleteExternalSystem(id string, log *zap.SugaredLogger) error
func DeleteHelmRepo ¶ added in v1.2.0
func DeleteHelmRepo(id string, log *zap.SugaredLogger) error
func DeleteIMApp ¶ added in v1.9.9
func DeleteIMApp(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 DeleteLLMIntegration ¶ added in v1.9.9
func DeleteNotifies ¶ added in v1.2.0
func DeleteNotifies(user string, notifyIDs []string, log *zap.SugaredLogger) error
func DeleteObservability ¶ added in v1.9.9
func DeletePrivateKey ¶ added in v1.2.0
func DeletePrivateKey(id, userName string, log *zap.SugaredLogger) error
func DeleteProjectManagement ¶ added in v1.9.9
func DeleteProjectManagement(idHex 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 DeleteSonarIntegration ¶ added in v1.9.9
func DeleteSonarIntegration(id string, log *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 GetConfigurationManagement ¶ added in v1.9.9
func GetConfigurationManagement(id string, log *zap.SugaredLogger) (*commonmodels.ConfigurationManagement, error)
func GetInstall ¶
func GetInstall(name, version string, log *zap.SugaredLogger) (*commonmodels.Install, error)
func GetJiraAllStatus ¶ added in v1.9.9
func GetJiraTypes ¶ added in v1.9.9
func GetJiraTypes(id, project string) ([]*jira.IssueTypeWithStatus, error)
func GetLLMIntegration ¶ added in v1.9.9
func GetLLMIntegration(ctx context.Context, id string) (*commonmodels.LLMIntegration, 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 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 GetThemeInfos ¶ added in v1.9.9
func GetThemeInfos(log *zap.SugaredLogger) (*types.Theme, error)
func GithubAppAdd ¶
func GithubAppAdd(args *commonmodels.GithubApp) error
func GithubAppDelete ¶
func GithubAppList ¶
func GithubAppList() ([]*commonmodels.GithubApp, error)
func HandleJiraHookEvent ¶ added in v1.9.9
func HandleMeegoHookEvent ¶ added in v1.9.9
func HandleMeegoHookEvent(workflowName, hookName string, event *meego.GeneralWebhookRequest, logger *zap.SugaredLogger) error
func HandleSystemGC ¶ added in v1.2.0
func InitInstallMap ¶
func InitInstallMap() map[string]*commonmodels.Install
func InitbasicImageInfos ¶
func InitbasicImageInfos() []*commonmodels.BasicImage
func InitializeUser ¶ added in v1.9.9
func ListApolloApps ¶ added in v1.9.9
func ListApolloApps(id string, log *zap.SugaredLogger) ([]string, error)
func ListApolloEnvAndClusters ¶ added in v1.9.9
func ListApolloEnvAndClusters(id string, appID string, log *zap.SugaredLogger) ([]*apollo.EnvAndCluster, error)
func ListApolloNamespaces ¶ added in v1.9.9
func ListAvaiableInstalls ¶
func ListAvaiableInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
func ListBasicImages ¶
func ListBasicImages(imageFrom string, imageType string, log *zap.SugaredLogger) ([]*commonmodels.BasicImage, error)
func ListConfigurationManagement ¶ added in v1.9.9
func ListConfigurationManagement(_type string, log *zap.SugaredLogger) ([]*commonmodels.ConfigurationManagement, error)
func ListExternalLinks ¶ added in v1.7.0
func ListExternalLinks(log *zap.SugaredLogger) ([]*commonmodels.ExternalLink, error)
func ListGuanceyunMonitor ¶ added in v1.9.9
func ListGuanceyunMonitor(id, search string) ([]guanceyun.MonitorContent, error)
func ListHelmRepos ¶ added in v1.2.0
func ListHelmRepos(log *zap.SugaredLogger) ([]*commonmodels.HelmRepo, error)
func ListIMApp ¶ added in v1.9.9
func ListIMApp(_type string, log *zap.SugaredLogger) ([]*commonmodels.IMApp, error)
func ListInstalls ¶
func ListInstalls(log *zap.SugaredLogger) ([]*commonmodels.Install, error)
func ListJenkinsIntegration ¶
func ListJenkinsIntegration(encryptedKey string, log *zap.SugaredLogger) ([]*commonmodels.JenkinsIntegration, error)
func ListJobNames ¶
func ListJobNames(id string, log *zap.SugaredLogger) ([]string, error)
func ListLLMIntegration ¶ added in v1.9.9
func ListLLMIntegration(ctx context.Context) ([]*commonmodels.LLMIntegration, error)
func ListLabels ¶ added in v1.6.0
func ListObservability ¶ added in v1.9.9
func ListObservability(_type string, isAdmin bool) ([]*models.Observability, error)
func ListPrivateKeys ¶ added in v1.2.0
func ListPrivateKeys(encryptedKey, projectName, keyword string, systemOnly bool, log *zap.SugaredLogger) ([]*commonmodels.PrivateKey, error)
func ListPrivateKeysInternal ¶ added in v1.9.9
func ListPrivateKeysInternal(log *zap.SugaredLogger) ([]*commonmodels.PrivateKey, error)
func ListProjectManagement ¶ added in v1.9.9
func ListProjectManagement(log *zap.SugaredLogger) ([]*models.ProjectManagement, 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 ListRegistriesByProject ¶ added in v1.9.9
func ListRegistriesByProject(projectName string, log *zap.SugaredLogger) ([]*commonmodels.RegistryNamespace, error)
func ListS3Storage ¶
func ListS3Storage(encryptedKey string, logger *zap.SugaredLogger) ([]*commonmodels.S3Storage, error)
func ListS3StorageByProject ¶ added in v1.9.9
func ListS3StorageByProject(projectName string, logger *zap.SugaredLogger) ([]*commonmodels.S3Storage, error)
func ListSubscriptions ¶ added in v1.2.0
func ListSubscriptions(user string, log *zap.SugaredLogger) ([]*commonmodels.Subscription, error)
func ListTars ¶ added in v1.6.0
func ListTars(id, kind string, serviceNames []string, logger *zap.SugaredLogger) ([]*commonmodels.TarInfo, error)
func OpenAPICreateRegistry ¶ added in v1.9.9
func OpenAPICreateRegistry(username string, req *OpenAPICreateRegistryReq, logger *zap.SugaredLogger) 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 SearchJiraIssues ¶ added in v1.9.9
func SearchJiraProjectIssuesWithJQL ¶ added in v1.9.9
func SetCron ¶ added in v1.9.9
func SetCron(cron string, cronEnabled bool, logger *zap.SugaredLogger) error
SetCron set the docker clean cron
func SetProxyConfig ¶
func SetProxyConfig()
func SyncDinDForRegistries ¶ added in v1.9.9
func SyncDinDForRegistries() error
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 UpdateConfigurationManagement ¶ added in v1.9.9
func UpdateConfigurationManagement(id string, args *commonmodels.ConfigurationManagement, log *zap.SugaredLogger) error
func UpdateDefaultLogin ¶ added in v1.9.9
func UpdateDefaultLogin(defaultLogin string, _ *zap.SugaredLogger) error
func UpdateExternalLink ¶ added in v1.7.0
func UpdateExternalLink(id string, args *commonmodels.ExternalLink, log *zap.SugaredLogger) error
func UpdateExternalSystem ¶ added in v1.8.0
func UpdateExternalSystem(id string, system *ExternalSystemDetail, log *zap.SugaredLogger) error
func UpdateHelmRepo ¶ added in v1.2.0
func UpdateHelmRepo(id string, args *commonmodels.HelmRepo, log *zap.SugaredLogger) error
func UpdateIMApp ¶ added in v1.9.9
func UpdateIMApp(id string, args *commonmodels.IMApp, 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 UpdateLLMIntegration ¶ added in v1.9.9
func UpdateLLMIntegration(ctx context.Context, ID string, args *commonmodels.LLMIntegration) error
func UpdateObservability ¶ added in v1.9.9
func UpdateObservability(id string, args *models.Observability) 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 UpdateProjectManagement ¶ added in v1.9.9
func UpdateProjectManagement(idHex string, pm *models.ProjectManagement, 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 UpdateSonarIntegration ¶ added in v1.9.9
func UpdateSonarIntegration(id string, integration *SonarIntegration, log *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 UpdateThemeInfo ¶ added in v1.9.9
func UpdateThemeInfo(theme *models.Theme, log *zap.SugaredLogger) error
func UpdateWorkflowConcurrency ¶ added in v1.9.9
func UpdateWorkflowConcurrency(workflowConcurrency, buildConcurrency int64, log *zap.SugaredLogger) error
func UpsertSubscription ¶ added in v1.2.0
func UpsertSubscription(user string, subscription *commonmodels.Subscription, log *zap.SugaredLogger) error
func ValidateConfigurationManagement ¶ added in v1.9.9
func ValidateConfigurationManagement(rawData string, log *zap.SugaredLogger) error
func ValidateIMApp ¶ added in v1.9.9
func ValidateIMApp(im *commonmodels.IMApp, log *zap.SugaredLogger) error
func ValidateJira ¶ added in v1.9.9
func ValidateJira(info *models.ProjectManagement) error
func ValidateMeego ¶ added in v1.9.9
func ValidateMeego(info *models.ProjectManagement) error
func ValidateObservability ¶ added in v1.9.9
func ValidateObservability(args *models.Observability) error
func ValidateSonarIntegration ¶ added in v1.9.9
func ValidateSonarIntegration(arg *SonarIntegration, 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 ChartVersion ¶ added in v1.9.9
type CreatePrivateKeyResp ¶ added in v1.9.9
type CreatePrivateKeyResp struct {
VmID string `json:"vm_id"`
}
func CreatePrivateKey ¶ added in v1.2.0
func CreatePrivateKey(args *commonmodels.PrivateKey, log *zap.SugaredLogger) (*CreatePrivateKeyResp, error)
type DashBoardCardConfig ¶ added in v1.9.9
type DashBoardConfig ¶ added in v1.9.9
type DashBoardConfig struct {
Cards []*DashBoardCardConfig `json:"cards"`
}
func GetDashboardConfiguration ¶ added in v1.9.9
func GetDashboardConfiguration(username, userID string, log *zap.SugaredLogger) (*DashBoardConfig, error)
type EnvResponse ¶ added in v1.9.9
type EnvResponse struct { Name string `json:"name"` ProjectName string `json:"project_name"` UpdateTime int64 `json:"update_time"` UpdatedBy string `json:"updated_by"` ClusterID string `json:"cluster_id"` Services []*EnvService `json:"services,omitempty"` VMServices []*VMEnvService `json:"vm_services,omitempty"` }
func GetMyEnvironment ¶ added in v1.9.9
func GetMyEnvironment(projectName, envName, username, userID string, log *zap.SugaredLogger) (*EnvResponse, error)
type EnvService ¶ added in v1.9.9
type ExternalSystemDetail ¶ added in v1.8.0
type ExternalSystemDetail struct { ID string `json:"id"` Name string `json:"name"` Server string `json:"server"` Headers []*util.KeyValue `json:"headers,omitempty"` // @2023-04-14 APIToken is deprecated after 1.4.0-ee APIToken string `json:"api_token,omitempty"` }
func GetExternalSystemDetail ¶ added in v1.8.0
func GetExternalSystemDetail(id string, log *zap.SugaredLogger) (*ExternalSystemDetail, error)
func ListExternalSystem ¶ added in v1.8.0
func ListExternalSystem(encryptedKey string, pageNum, pageSize int64, log *zap.SugaredLogger) ([]*ExternalSystemDetail, int64, error)
type GetDefaultLoginResponse ¶ added in v1.9.9
type GetDefaultLoginResponse struct {
DefaultLogin string `json:"default_login"`
}
func GetDefaultLogin ¶ added in v1.9.9
func GetDefaultLogin(logger *zap.SugaredLogger) (*GetDefaultLoginResponse, error)
type GetWebhookConfigReponse ¶ added in v1.9.9
func GetWebhookConfig ¶ added in v1.9.9
func GetWebhookConfig(ctx context.Context, log *zap.SugaredLogger) (*GetWebhookConfigReponse, error)
type IndexFileResp ¶ added in v1.9.9
type IndexFileResp struct {
Entries map[string][]*ChartVersion `json:"entries"`
}
func ListCharts ¶ added in v1.9.9
func ListCharts(name string, log *zap.SugaredLogger) (*IndexFileResp, error)
type InitializeInfo ¶ added in v1.9.9
type InitializeInfo struct { CreatedAt int64 `json:"created_at"` Username string `json:"username"` Phone int64 `json:"phone,omitempty"` Email string `json:"email"` Company string `json:"company"` Reason string `json:"reason,omitempty"` Address string `json:"address,omitempty"` Domain string `json:"domain"` }
type JenkinsArgs ¶
type JenkinsBuildArgs ¶
type JenkinsBuildArgs struct { Name string `json:"name"` Value interface{} `json:"value"` Type string `json:"type"` }
func ListJobBuildArgs ¶
func ListJobBuildArgs(id, jobName string, log *zap.SugaredLogger) ([]*JenkinsBuildArgs, error)
type JiraProjectsResp ¶ added in v1.9.9
func ListJiraProjects ¶ added in v1.9.9
func ListJiraProjects(id string) ([]JiraProjectsResp, error)
type MeegoProject ¶ added in v1.9.9
type MeegoProjectResp ¶ added in v1.9.9
type MeegoProjectResp struct {
Projects []*MeegoProject `json:"projects"`
}
func GetMeegoProjects ¶ added in v1.9.9
func GetMeegoProjects(id string) (*MeegoProjectResp, error)
type MeegoTransitionResp ¶ added in v1.9.9
type MeegoTransitionResp struct {
TargetStatus []*MeegoWorkItemStatusTransition `json:"target_status"`
}
func ListAvailableWorkItemTransitions ¶ added in v1.9.9
func ListAvailableWorkItemTransitions(id, projectID, typeKey string, workItemID int) (*MeegoTransitionResp, error)
type MeegoWorkItem ¶ added in v1.9.9
type MeegoWorkItemResp ¶ added in v1.9.9
type MeegoWorkItemResp struct {
WorkItems []*MeegoWorkItem `json:"work_items"`
}
func ListMeegoWorkItems ¶ added in v1.9.9
func ListMeegoWorkItems(id, projectID, typeKey, nameQuery string, pageNum, pageSize int) (*MeegoWorkItemResp, error)
type MeegoWorkItemStatusTransition ¶ added in v1.9.9
type MeegoWorkItemType ¶ added in v1.9.9
type MeegoWorkItemTypeResp ¶ added in v1.9.9
type MeegoWorkItemTypeResp struct {
WorkItemTypes []*MeegoWorkItemType `json:"work_item_types"`
}
func GetWorkItemTypeList ¶ added in v1.9.9
func GetWorkItemTypeList(id, projectID string) (*MeegoWorkItemTypeResp, error)
type MessageCtx ¶ added in v1.2.0
type MyEnvCardConfig ¶ added in v1.9.9
type MyWorkflowCardConfig ¶ added in v1.9.9
type MyWorkflowCardConfig struct {
WorkflowList []*WorkflowConfig `json:"workflow_list"`
}
type OpenAPICluster ¶ added in v1.9.9
type OpenAPICluster struct { ID string `json:"cluster_id"` Name string `json:"name"` Production bool `json:"production"` Description string `json:"description"` ProviderName string `json:"provider_name"` CreatedBy string `json:"created_by"` CreatedTime int64 `json:"created_time"` Local bool `json:"local"` Status string `json:"status"` Type string `json:"type"` }
func OpenAPIListCluster ¶ added in v1.9.9
func OpenAPIListCluster(projectName string, logger *zap.SugaredLogger) ([]*OpenAPICluster, error)
type OpenAPICreateRegistryReq ¶ added in v1.9.9
type OpenAPICreateRegistryReq struct { Address string `json:"address"` Provider config.RegistryProvider `json:"provider"` Namespace string `json:"namespace"` IsDefault bool `json:"is_default"` AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` EnableTLS bool `json:"enable_tls"` // Optional field below Region string `json:"region"` TLSCert string `json:"tls_cert"` }
func (OpenAPICreateRegistryReq) Validate ¶ added in v1.9.9
func (req OpenAPICreateRegistryReq) Validate() error
type OpenAPIRegistry ¶ added in v1.9.9
type OperationLogArgs ¶ added in v1.4.0
type OperationLogArgs struct { Username string `json:"username"` ProductName string `json:"product_name"` ExactProduct string `json:"exact_product"` Function string `json:"function"` Status int `json:"status"` PerPage int `json:"per_page"` Page int `json:"page"` Scene string `json:"scene"` TargetID string `json:"target_id"` Detail string `json:"detail"` }
type RepoImgResp ¶
type RepoImgResp struct { Host string `json:"host"` Owner string `json:"owner"` Name string `json:"name"` Tag string `json:"tag"` Created string `json:"created"` Digest string `json:"digest"` }
func ImageListGetter ¶ added in v1.9.9
func ImageListGetter(repo *registry.Repo, registryInfo *commonmodels.RegistryNamespace, dbTags map[string]*models.ImageTag, regService registry.Service, logger *zap.SugaredLogger) []*RepoImgResp
func ListReposTags ¶
func ListReposTags(registryInfo *commonmodels.RegistryNamespace, names []string, logger *zap.SugaredLogger) ([]*RepoImgResp, error)
ListReposTags TODO: need to be optimized
type RepoInfo ¶
type RepoInfo struct { RegType string `json:"regType"` RegProvider string `json:"regProvider"` RegNamespace string `json:"regNamespace"` RegAddr string `json:"regAddr"` ID string `json:"id"` }
func ListAllRepos ¶
func ListAllRepos(log *zap.SugaredLogger) ([]*RepoInfo, error)
type SecurityAndPrivacySettings ¶ added in v1.9.9
type SecurityAndPrivacySettings struct { TokenExpirationTime int64 `json:"token_expiration_time"` ImprovementPlan bool `json:"improvement_plan"` }
func GetSecuritySettings ¶ added in v1.9.9
func GetSecuritySettings(logger *zap.SugaredLogger) (*SecurityAndPrivacySettings, error)
type SonarIntegration ¶ added in v1.9.9
type SonarIntegration struct { ID string `json:"id"` SystemIdentity string `json:"system_identity"` ServerAddress string `json:"server_address"` Token string `json:"token"` }
func GetSonarIntegration ¶ added in v1.9.9
func GetSonarIntegration(id string, log *zap.SugaredLogger) (*SonarIntegration, error)
func ListSonarIntegration ¶ added in v1.9.9
func ListSonarIntegration(log *zap.SugaredLogger) ([]*SonarIntegration, int64, error)
type SystemInitializationStatus ¶ added in v1.9.9
type SystemInitializationStatus struct { Initialized bool `json:"initialized"` IsEnterprise bool `json:"is_enterprise"` LicenseStatus string `json:"license_status"` SystemID string `json:"system_id"` }
func GetSystemInitializationStatus ¶ added in v1.9.9
func GetSystemInitializationStatus(logger *zap.SugaredLogger) (*SystemInitializationStatus, error)
type UpdateDefaultLoginParams ¶ added in v1.9.9
type UpdateDefaultLoginParams struct {
DefaultLogin string `json:"default_login"`
}
type VMEnvService ¶ added in v1.9.9
type VMEnvService struct { ServiceName string `json:"service_name"` EnvStatus []*commonmodels.EnvStatus `json:"env_status"` }
type WorkflowConcurrencySettings ¶ added in v1.9.9
type WorkflowConcurrencySettings struct { WorkflowConcurrency int64 `json:"workflow_concurrency"` BuildConcurrency int64 `json:"build_concurrency"` }
func GetWorkflowConcurrency ¶ added in v1.9.9
func GetWorkflowConcurrency() (*WorkflowConcurrencySettings, error)
type WorkflowConfig ¶ added in v1.9.9
type WorkflowResponse ¶ added in v1.9.9
type WorkflowResponse struct { TaskID int64 `json:"task_id,omitempty"` Name string `json:"name"` Project string `json:"project"` Creator string `json:"creator"` StartTime int64 `json:"start_time"` Status string `json:"status"` DisplayName string `json:"display_name"` Type string `json:"workflow_type"` TestName string `json:"test_name,omitempty"` ScanName string `json:"scan_name,omitempty"` ScanID string `json:"scan_id,omitempty"` }
func GetMyWorkflow ¶ added in v1.9.9
func GetMyWorkflow(header http.Header, username, userID string, isAdmin bool, cardID string, log *zap.SugaredLogger) ([]*WorkflowResponse, error)
func GetRunningWorkflow ¶ added in v1.9.9
func GetRunningWorkflow(log *zap.SugaredLogger) ([]*WorkflowResponse, error)
Source Files ¶
- announcement.go
- basic_images.go
- capacity.go
- concurrency.go
- configuration_management.go
- custom_theme.go
- dashboard.go
- external_link.go
- external_system.go
- github_app.go
- guanceyun.go
- helm.go
- im_app.go
- initialization.go
- install.go
- jenkins.go
- llm.go
- login.go
- meego.go
- notify.go
- observablilty.go
- openapi.go
- operation.go
- private_key.go
- project_management.go
- proxy.go
- registry.go
- s3.go
- security.go
- sonar.go
- system_cache.go
- types.go
- webhook.go