handler

package
v1.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

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

This section is empty.

Variables

View Source
var SonarIntegrationValidationError = errors.New("name and server must be provided")

Functions

func AddSystemOperationLog added in v1.4.0

func AddSystemOperationLog(c *gin.Context)

func BatchCreatePrivateKey added in v1.6.0

func BatchCreatePrivateKey(c *gin.Context)

func CheckJenkinsIntegration added in v1.9.0

func CheckJenkinsIntegration(c *gin.Context)

func CheckLLMIntegration added in v1.9.9

func CheckLLMIntegration(c *gin.Context)

@Summary Check llm integrations @Description Check llm integrations @Tags system @Accept json @Produce json @Success 200 {object} checkLLMIntegrationResponse @Router /api/aslan/system/llm/integration/check [get]

func CleanCache added in v1.2.0

func CleanCache(c *gin.Context)

func CleanCacheState

func CleanCacheState(c *gin.Context)

func CleanImageCache

func CleanImageCache(c *gin.Context)

func CreateAnnouncement added in v1.4.0

func CreateAnnouncement(c *gin.Context)

func CreateBasicImage

func CreateBasicImage(c *gin.Context)

func CreateConfigurationManagement added in v1.9.9

func CreateConfigurationManagement(c *gin.Context)

func CreateDBInstance added in v1.9.9

func CreateDBInstance(c *gin.Context)
func CreateExternalLink(c *gin.Context)

func CreateExternalSystem added in v1.8.0

func CreateExternalSystem(c *gin.Context)

func CreateFavorite added in v1.9.9

func CreateFavorite(c *gin.Context)

func CreateHelmRepo added in v1.2.0

func CreateHelmRepo(c *gin.Context)

func CreateIMApp added in v1.9.9

func CreateIMApp(c *gin.Context)

func CreateInstall

func CreateInstall(c *gin.Context)

func CreateJenkinsIntegration

func CreateJenkinsIntegration(c *gin.Context)

func CreateLLMIntegration added in v1.9.9

func CreateLLMIntegration(c *gin.Context)

@Summary Create a llm integration @Description Create a llm integration @Tags system @Accept json @Produce json @Param body body CreateLLMIntegrationRequest true "body" @Success 200 @Router /api/aslan/system/llm/integration [post]

func CreateObservability added in v1.9.9

func CreateObservability(c *gin.Context)

func CreateOrUpdateDashboardConfiguration added in v1.9.9

func CreateOrUpdateDashboardConfiguration(c *gin.Context)

func CreateOrUpdateSecuritySettings added in v1.9.9

func CreateOrUpdateSecuritySettings(c *gin.Context)

func CreatePrivateKey added in v1.2.0

func CreatePrivateKey(c *gin.Context)

func CreateProjectManagement added in v1.9.9

func CreateProjectManagement(c *gin.Context)

func CreateProxy

func CreateProxy(c *gin.Context)

func CreateRegistryNamespace

func CreateRegistryNamespace(c *gin.Context)

func CreateS3Storage

func CreateS3Storage(c *gin.Context)

func CreateSonarIntegration added in v1.9.9

func CreateSonarIntegration(c *gin.Context)

func DeleteAnnouncement added in v1.4.0

func DeleteAnnouncement(c *gin.Context)

func DeleteBasicImage

func DeleteBasicImage(c *gin.Context)

func DeleteConfigurationManagement added in v1.9.9

func DeleteConfigurationManagement(c *gin.Context)

func DeleteDBInstance added in v1.9.9

func DeleteDBInstance(c *gin.Context)
func DeleteExternalLink(c *gin.Context)

func DeleteExternalSystem added in v1.8.0

func DeleteExternalSystem(c *gin.Context)

func DeleteFavorite added in v1.9.9

func DeleteFavorite(c *gin.Context)

func DeleteHelmRepo added in v1.2.0

func DeleteHelmRepo(c *gin.Context)

func DeleteIMApp added in v1.9.9

func DeleteIMApp(c *gin.Context)

func DeleteInstall

func DeleteInstall(c *gin.Context)

func DeleteJenkinsIntegration

func DeleteJenkinsIntegration(c *gin.Context)

func DeleteLLMIntegration added in v1.9.9

func DeleteLLMIntegration(c *gin.Context)

@Summary Delete a llm integration @Description Delete a llm integration @Tags system @Accept json @Produce json @Param id path string true "id" @Success 200 @Router /api/aslan/system/llm/integration/{id} [delete]

func DeleteNotifies added in v1.2.0

func DeleteNotifies(c *gin.Context)

func DeleteObservability added in v1.9.9

func DeleteObservability(c *gin.Context)

func DeletePrivateKey added in v1.2.0

func DeletePrivateKey(c *gin.Context)

func DeleteProjectManagement added in v1.9.9

func DeleteProjectManagement(c *gin.Context)

func DeleteProxy

func DeleteProxy(c *gin.Context)

func DeleteRegistryNamespace

func DeleteRegistryNamespace(c *gin.Context)

func DeleteS3Storage

func DeleteS3Storage(c *gin.Context)

func DeleteSonarIntegration added in v1.9.9

func DeleteSonarIntegration(c *gin.Context)

func DingTalkEventHandler added in v1.9.9

func DingTalkEventHandler(c *gin.Context)

func GarbageCollection added in v1.2.0

func GarbageCollection(c *gin.Context)

func GetBasicImage

func GetBasicImage(c *gin.Context)

func GetConfigurationManagement added in v1.9.9

func GetConfigurationManagement(c *gin.Context)

func GetDBInstance added in v1.9.9

func GetDBInstance(c *gin.Context)

func GetDashboardConfiguration added in v1.9.9

func GetDashboardConfiguration(c *gin.Context)

func GetDefaultLogin added in v1.9.9

func GetDefaultLogin(c *gin.Context)

func GetDefaultRegistryNamespace added in v1.2.0

func GetDefaultRegistryNamespace(c *gin.Context)

func GetDingTalkDepartment added in v1.9.9

func GetDingTalkDepartment(c *gin.Context)

func GetDingTalkUserID added in v1.9.9

func GetDingTalkUserID(c *gin.Context)

func GetExternalSystemDetail added in v1.8.0

func GetExternalSystemDetail(c *gin.Context)

func GetInstall

func GetInstall(c *gin.Context)

func GetJiraAllStatus added in v1.9.9

func GetJiraAllStatus(c *gin.Context)

func GetJiraTypes added in v1.9.9

func GetJiraTypes(c *gin.Context)

func GetLLMIntegration added in v1.9.9

func GetLLMIntegration(c *gin.Context)

@Summary Get a llm integration @Description Get a llm integration @Tags system @Accept json @Produce json @Param id path string true "id" @Success 200 {object} commonmodels.LLMIntegration @Router /api/aslan/system/llm/integration/{id} [get]

func GetLarkDepartment added in v1.9.9

func GetLarkDepartment(c *gin.Context)

func GetLarkUserID added in v1.9.9

func GetLarkUserID(c *gin.Context)

func GetMeegoProjects added in v1.9.9

func GetMeegoProjects(c *gin.Context)

@Summary List Meego Projects @Description List Meego Projects @Tags system @Accept json @Produce json @Param id path string true "meego id" @Success 200 {object} service.MeegoProjectResp @Router /api/aslan/system/meego/{id}/projects [get]

func GetMyEnvironment added in v1.9.9

func GetMyEnvironment(c *gin.Context)

func GetMyWorkflow added in v1.9.9

func GetMyWorkflow(c *gin.Context)

func GetOperationLogs added in v1.4.0

func GetOperationLogs(c *gin.Context)

func GetPrivateKey added in v1.2.0

func GetPrivateKey(c *gin.Context)

func GetProxy

func GetProxy(c *gin.Context)

func GetProxyConfig

func GetProxyConfig(c *gin.Context)

func GetRSAPublicKey added in v1.9.9

func GetRSAPublicKey(c *gin.Context)

func GetRegistryNamespace added in v1.8.0

func GetRegistryNamespace(c *gin.Context)

func GetRunningWorkflow added in v1.9.9

func GetRunningWorkflow(c *gin.Context)

func GetS3Storage

func GetS3Storage(c *gin.Context)

func GetSecuritySettings added in v1.9.9

func GetSecuritySettings(c *gin.Context)

func GetSonarIntegration added in v1.9.9

func GetSonarIntegration(c *gin.Context)

func GetStrategy added in v1.2.0

func GetStrategy(c *gin.Context)

func GetSystemInitializationStatus added in v1.9.9

func GetSystemInitializationStatus(c *gin.Context)

func GetTextFromEncryptedKey added in v1.9.9

func GetTextFromEncryptedKey(c *gin.Context)

func GetThemeInfos added in v1.9.9

func GetThemeInfos(c *gin.Context)

func GetWebhookConfig added in v1.9.9

func GetWebhookConfig(c *gin.Context)

@Summary Get webhook config @Description Get webhook config @Tags system @Accept json @Produce json @Success 200 {object} service.GetWebhookConfigReponse @Router /api/aslan/system/webhook/config [get]

func GetWorkItemTypeList added in v1.9.9

func GetWorkItemTypeList(c *gin.Context)

@Summary Get Meego Work Item Type List @Description Get Meego Work Item Type List @Tags system @Accept json @Produce json @Param id path string true "meego id" @Param projectID path string true "project id" @Success 200 {object} service.MeegoWorkItemTypeResp @Router /api/aslan/system/meego/{id}/projects/{projectID}/work_item/types [get]

func GetWorkflowConcurrency added in v1.9.9

func GetWorkflowConcurrency(c *gin.Context)

func HandleJiraEvent added in v1.9.9

func HandleJiraEvent(c *gin.Context)

func HandleMeegoEvent added in v1.9.9

func HandleMeegoEvent(c *gin.Context)

func InitializeUser added in v1.9.9

func InitializeUser(c *gin.Context)

func LarkEventHandler added in v1.9.9

func LarkEventHandler(c *gin.Context)

func ListAllRepos

func ListAllRepos(c *gin.Context)

func ListApolloApps added in v1.9.9

func ListApolloApps(c *gin.Context)

func ListApolloEnvAndClusters added in v1.9.9

func ListApolloEnvAndClusters(c *gin.Context)

func ListApolloNamespaces added in v1.9.9

func ListApolloNamespaces(c *gin.Context)

func ListAvailableWorkItemTransitions added in v1.9.9

func ListAvailableWorkItemTransitions(c *gin.Context)

func ListBasicImages

func ListBasicImages(c *gin.Context)

func ListCharts added in v1.9.9

func ListCharts(c *gin.Context)

func ListConfigurationManagement added in v1.9.9

func ListConfigurationManagement(c *gin.Context)

func ListDBInstance added in v1.9.9

func ListDBInstance(c *gin.Context)

func ListDBInstanceInfo added in v1.9.9

func ListDBInstanceInfo(c *gin.Context)

func ListDBInstancesInfoByProject added in v1.9.9

func ListDBInstancesInfoByProject(c *gin.Context)

@Summary List DB Instances Info By Project @Description List DB Instances Info By Project @Tags system @Accept json @Produce json @Param projectName query string true "project name" @Success 200 {array} commonmodels.DBInstance @Router /api/aslan/system/dbinstance/project [get]

func ListExternalLinks(c *gin.Context)

func ListExternalSystem added in v1.8.0

func ListExternalSystem(c *gin.Context)

func ListGuanceyunMonitor added in v1.9.9

func ListGuanceyunMonitor(c *gin.Context)

func ListHelmRepos added in v1.2.0

func ListHelmRepos(c *gin.Context)

func ListHelmReposByProject added in v1.9.9

func ListHelmReposByProject(c *gin.Context)

@Summary List Helm Repos By Project @Description List Helm Repos By Project @Tags system @Accept json @Produce json @Param projectName query string true "project name" @Success 200 {array} commonmodels.HelmRepo @Router /api/aslan/system/helm/project [get]

func ListHelmReposPublic added in v1.9.9

func ListHelmReposPublic(c *gin.Context)

func ListIMApp added in v1.9.9

func ListIMApp(c *gin.Context)

func ListImages

func ListImages(c *gin.Context)

func ListInstalls

func ListInstalls(c *gin.Context)

func ListJenkinsIntegration

func ListJenkinsIntegration(c *gin.Context)

func ListJiraProjects added in v1.9.9

func ListJiraProjects(c *gin.Context)

@Summary List Jira Projects @Description List Jira Projects @Tags system @Accept json @Produce json @Param id path string true "jira id" @Success 200 {array} service.JiraProjectsResp @Router /api/aslan/system/project_management/{id}/jira/project [get]

func ListJobBuildArgs

func ListJobBuildArgs(c *gin.Context)

func ListJobNames

func ListJobNames(c *gin.Context)

func ListLLMIntegration added in v1.9.9

func ListLLMIntegration(c *gin.Context)

@Summary List llm integrations @Description List llm integrations @Tags system @Accept json @Produce json @Success 200 {array} commonmodels.LLMIntegration @Router /api/aslan/system/llm/integration [get]

func ListLabels added in v1.6.0

func ListLabels(c *gin.Context)

func ListMeegoWorkItems added in v1.9.9

func ListMeegoWorkItems(c *gin.Context)

@Summary List Meego Work Items @Description List Meego Work Items @Tags system @Accept json @Produce json @Param id path string true "meego id" @Param projectID path string true "project id" @Param type_key query string true "type key" @Param page_num query string true "page num" @Param page_size query string true "page size" @Param item_name query string true "item name" @Success 200 {object} service.MeegoWorkItemResp @Router /api/aslan/system/meego/{id}/projects/{projectID}/work_item [get]

func ListNacosConfig added in v1.9.9

func ListNacosConfig(c *gin.Context)

func ListNacosNamespace added in v1.9.9

func ListNacosNamespace(c *gin.Context)

func ListObservability added in v1.9.9

func ListObservability(c *gin.Context)

func ListObservabilityDetail added in v1.9.9

func ListObservabilityDetail(c *gin.Context)

func ListPrivateKeys added in v1.2.0

func ListPrivateKeys(c *gin.Context)

func ListPrivateKeysInternal added in v1.9.9

func ListPrivateKeysInternal(c *gin.Context)

func ListProjectManagement added in v1.9.9

func ListProjectManagement(c *gin.Context)

func ListProjectManagementForProject added in v1.9.9

func ListProjectManagementForProject(c *gin.Context)

@Summary List Project Management For Project @Description List Project Management For Project @Tags system @Accept json @Produce json @Success 200 {array} models.ProjectManagement @Router /api/aslan/system/project_management/project [get]

func ListProxies

func ListProxies(c *gin.Context)

func ListRegistries

func ListRegistries(c *gin.Context)

@Summary List Registries @Description List Registries @Tags system @Accept json @Produce json @Param projectName query string true "project name" @Success 200 {array} commonmodels.RegistryNamespace @Router /api/aslan/system/registry/project [get]

func ListRegistryNamespaces

func ListRegistryNamespaces(c *gin.Context)

func ListRepoImages

func ListRepoImages(c *gin.Context)

func ListS3Storage

func ListS3Storage(c *gin.Context)

func ListS3StorageByProject added in v1.9.9

func ListS3StorageByProject(c *gin.Context)

@Summary List S3 Storage By Project @Description List S3 Storage By Project @Tags system @Accept json @Produce json @Param projectName query string true "project name" @Success 200 {array} commonmodels.S3Storage @Router /api/aslan/system/s3storage/project [get]

func ListSonarIntegration added in v1.9.9

func ListSonarIntegration(c *gin.Context)

func ListSubscriptions added in v1.2.0

func ListSubscriptions(c *gin.Context)

func ListTars added in v1.6.0

func ListTars(c *gin.Context)

func OpenAPICreateRegistry added in v1.9.9

func OpenAPICreateRegistry(c *gin.Context)

func OpenAPIListCluster added in v1.9.9

func OpenAPIListCluster(c *gin.Context)

func OpenAPIListRegistry added in v1.9.9

func OpenAPIListRegistry(c *gin.Context)

func PullAllAnnouncement added in v1.4.0

func PullAllAnnouncement(c *gin.Context)

func PullNotify added in v1.2.0

func PullNotify(c *gin.Context)

func PullNotifyAnnouncement added in v1.4.0

func PullNotifyAnnouncement(c *gin.Context)

func ReadNotify added in v1.2.0

func ReadNotify(c *gin.Context)

func SearchJiraIssues added in v1.9.9

func SearchJiraIssues(c *gin.Context)

func SearchJiraProjectIssuesWithJQL added in v1.9.9

func SearchJiraProjectIssuesWithJQL(c *gin.Context)

func SetCron added in v1.9.9

func SetCron(c *gin.Context)

func TestConnection

func TestConnection(c *gin.Context)

func TestJenkinsConnection

func TestJenkinsConnection(c *gin.Context)

func Unsubscribe added in v1.2.0

func Unsubscribe(c *gin.Context)

func UpdateAnnouncement added in v1.4.0

func UpdateAnnouncement(c *gin.Context)

func UpdateBasicImage

func UpdateBasicImage(c *gin.Context)

func UpdateConfigurationManagement added in v1.9.9

func UpdateConfigurationManagement(c *gin.Context)

func UpdateDBInstance added in v1.9.9

func UpdateDBInstance(c *gin.Context)

func UpdateDefaultLogin added in v1.9.9

func UpdateDefaultLogin(c *gin.Context)
func UpdateExternalLink(c *gin.Context)

func UpdateExternalSystem added in v1.8.0

func UpdateExternalSystem(c *gin.Context)

func UpdateHelmRepo added in v1.2.0

func UpdateHelmRepo(c *gin.Context)

func UpdateIMApp added in v1.9.9

func UpdateIMApp(c *gin.Context)

func UpdateInstall

func UpdateInstall(c *gin.Context)

func UpdateJenkinsIntegration

func UpdateJenkinsIntegration(c *gin.Context)

func UpdateLLMIntegration added in v1.9.9

func UpdateLLMIntegration(c *gin.Context)

@Summary Update a llm integration @Description Update a llm integration @Tags system @Accept json @Produce json @Param id path string true "id" @Param body body CreateLLMIntegrationRequest true "body" @Success 200 @Router /api/aslan/system/llm/integration/{id} [put]

func UpdateObservability added in v1.9.9

func UpdateObservability(c *gin.Context)

func UpdateOperationLog added in v1.4.0

func UpdateOperationLog(c *gin.Context)

func UpdatePrivateKey added in v1.2.0

func UpdatePrivateKey(c *gin.Context)

func UpdateProjectManagement added in v1.9.9

func UpdateProjectManagement(c *gin.Context)

func UpdateProxy

func UpdateProxy(c *gin.Context)

func UpdateRegistryNamespace

func UpdateRegistryNamespace(c *gin.Context)

func UpdateS3Storage

func UpdateS3Storage(c *gin.Context)

func UpdateSonarIntegration added in v1.9.9

func UpdateSonarIntegration(c *gin.Context)

func UpdateStrategy added in v1.2.0

func UpdateStrategy(c *gin.Context)

func UpdateSubscribe added in v1.2.0

func UpdateSubscribe(c *gin.Context)

func UpdateThemeInfo added in v1.9.9

func UpdateThemeInfo(c *gin.Context)

func UpdateWorkflowConcurrency added in v1.9.9

func UpdateWorkflowConcurrency(c *gin.Context)

func UpsertSubscription added in v1.2.0

func UpsertSubscription(c *gin.Context)

func Validate added in v1.9.9

func Validate(c *gin.Context)

func ValidateConfigurationManagement added in v1.9.9

func ValidateConfigurationManagement(c *gin.Context)

func ValidateDBInstance added in v1.9.9

func ValidateDBInstance(c *gin.Context)

func ValidateIMApp added in v1.9.9

func ValidateIMApp(c *gin.Context)

func ValidateObservability added in v1.9.9

func ValidateObservability(c *gin.Context)

func ValidateSonarInformation added in v1.9.9

func ValidateSonarInformation(c *gin.Context)

Types

type AdvancedRegistrySetting added in v1.9.9

type AdvancedRegistrySetting struct {
	Modified   bool   `json:"modified"`
	TLSEnabled bool   `json:"enable_tls"`
	TLSCert    string `json:"tls_cert"`
}

type CheckJenkinsIntegrationResp added in v1.9.0

type CheckJenkinsIntegrationResp struct {
	Exists bool `json:"exists"`
}

type CreateLLMIntegrationRequest added in v1.9.9

type CreateLLMIntegrationRequest struct {
	Name        string `json:"name"`
	Token       string `json:"token"`
	BaseURL     string `json:"base_url"`
	EnableProxy bool   `json:"enable_proxy"`
}

type DryRunFlag added in v1.2.0

type DryRunFlag struct {
	DryRun bool `json:"dryrun"`
}

DryRunFlag indicates whether a run is a dry run or not. If it is a dry run, the relevant API is supposed to be no-op except logging.

type GetLLMIntegrationRespone added in v1.9.9

type GetLLMIntegrationRespone struct {
	Name    string `json:"name"`
	Token   string `json:"token"`
	BaseURL string `json:"base_url"`
}

type GuanceyunMonitor added in v1.9.9

type GuanceyunMonitor struct {
	CheckerName string `json:"checker_name"`
	CheckerID   string `json:"checker_id"`
}

type InitializeUserReq added in v1.9.9

type InitializeUserReq struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Company  string `json:"company"`
	Email    string `json:"email"`
	Phone    int64  `json:"phone"`
	Reason   string `json:"reason"`
	Address  string `json:"address"`
}

func (*InitializeUserReq) Validate added in v1.9.9

func (req *InitializeUserReq) Validate() error

type ListImagesOption

type ListImagesOption struct {
	Names []string `json:"names"`
}

type ListTarsOption added in v1.6.0

type ListTarsOption struct {
	Names []string `json:"names"`
}

type OpenAPIRouter added in v1.9.9

type OpenAPIRouter struct{}

func (*OpenAPIRouter) Inject added in v1.9.9

func (*OpenAPIRouter) Inject(router *gin.RouterGroup)

type ProxyConfig

type ProxyConfig struct {
	HTTPAddr   string `json:"HTTPAddr"`
	HTTPSAddr  string `json:"HTTPSAddr"`
	Socks5Addr string `json:"Socks5Addr"`
	NoProxy    string `json:"NoProxy"`
}

type Registry added in v1.2.0

type Registry struct {
	ID              string                   `json:"id"`
	RegAddr         string                   `json:"reg_addr"`
	IsDefault       bool                     `json:"is_default"`
	Namespace       string                   `json:"namespace"`
	AccessKey       string                   `json:"access_key"`
	SecretKey       string                   `json:"secret_key"`
	AdvancedSetting *AdvancedRegistrySetting `json:"advanced_setting"`
}

type Router

type Router struct{}

func (*Router) Inject

func (*Router) Inject(router *gin.RouterGroup)

type SetCleanConfig added in v1.9.9

type SetCleanConfig struct {
	Cron        string `json:"cron"`
	CronEnabled bool   `json:"cron_enabled"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL