handler

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 30 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

func AddSystemOperationLog(c *gin.Context)

func BatchCreatePrivateKey

func BatchCreatePrivateKey(c *gin.Context)

func CheckJenkinsIntegration

func CheckJenkinsIntegration(c *gin.Context)

func CheckLLMIntegration

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

func CleanCache(c *gin.Context)

func CleanCacheState

func CleanCacheState(c *gin.Context)

func CleanImageCache

func CleanImageCache(c *gin.Context)

func CleanSharedStorage

func CleanSharedStorage(c *gin.Context)

func CreateAnnouncement

func CreateAnnouncement(c *gin.Context)

func CreateBasicImage

func CreateBasicImage(c *gin.Context)

func CreateConfigurationManagement

func CreateConfigurationManagement(c *gin.Context)

func CreateDBInstance

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

func CreateExternalSystem

func CreateExternalSystem(c *gin.Context)

func CreateFavorite

func CreateFavorite(c *gin.Context)

func CreateHelmRepo

func CreateHelmRepo(c *gin.Context)

func CreateIMApp

func CreateIMApp(c *gin.Context)

func CreateInstall

func CreateInstall(c *gin.Context)

func CreateJenkinsIntegration

func CreateJenkinsIntegration(c *gin.Context)

func CreateLLMIntegration

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

func CreateObservability(c *gin.Context)

func CreateOrUpdateDashboardConfiguration

func CreateOrUpdateDashboardConfiguration(c *gin.Context)

func CreateOrUpdateSecuritySettings

func CreateOrUpdateSecuritySettings(c *gin.Context)

func CreatePrivateKey

func CreatePrivateKey(c *gin.Context)

func CreateProjectManagement

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

func CreateSonarIntegration(c *gin.Context)

func DeleteAnnouncement

func DeleteAnnouncement(c *gin.Context)

func DeleteBasicImage

func DeleteBasicImage(c *gin.Context)

func DeleteConfigurationManagement

func DeleteConfigurationManagement(c *gin.Context)

func DeleteDBInstance

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

func DeleteExternalSystem

func DeleteExternalSystem(c *gin.Context)

func DeleteFavorite

func DeleteFavorite(c *gin.Context)

func DeleteHelmRepo

func DeleteHelmRepo(c *gin.Context)

func DeleteIMApp

func DeleteIMApp(c *gin.Context)

func DeleteInstall

func DeleteInstall(c *gin.Context)

func DeleteJenkinsIntegration

func DeleteJenkinsIntegration(c *gin.Context)

func DeleteLLMIntegration

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

func DeleteNotifies(c *gin.Context)

func DeleteObservability

func DeleteObservability(c *gin.Context)

func DeletePrivateKey

func DeletePrivateKey(c *gin.Context)

func DeleteProjectManagement

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

func DeleteSonarIntegration(c *gin.Context)

func DingTalkEventHandler

func DingTalkEventHandler(c *gin.Context)

func GarbageCollection

func GarbageCollection(c *gin.Context)

func GetBasicImage

func GetBasicImage(c *gin.Context)

func GetConfigurationManagement

func GetConfigurationManagement(c *gin.Context)

func GetDBInstance

func GetDBInstance(c *gin.Context)

func GetDashboardConfiguration

func GetDashboardConfiguration(c *gin.Context)

func GetDefaultLogin

func GetDefaultLogin(c *gin.Context)

func GetDefaultRegistryNamespace

func GetDefaultRegistryNamespace(c *gin.Context)

func GetDingTalkDepartment

func GetDingTalkDepartment(c *gin.Context)

func GetDingTalkUserID

func GetDingTalkUserID(c *gin.Context)

func GetExternalSystemDetail

func GetExternalSystemDetail(c *gin.Context)

func GetInstall

func GetInstall(c *gin.Context)

func GetJiraAllStatus

func GetJiraAllStatus(c *gin.Context)

func GetJiraTypes

func GetJiraTypes(c *gin.Context)

func GetLLMIntegration

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

func GetLarkDepartment(c *gin.Context)

func GetLarkUserID

func GetLarkUserID(c *gin.Context)

func GetMeegoProjects

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

func GetMyEnvironment(c *gin.Context)

func GetMyWorkflow

func GetMyWorkflow(c *gin.Context)

func GetNacosConfig

func GetNacosConfig(c *gin.Context)

func GetOperationLogs

func GetOperationLogs(c *gin.Context)

func GetPrivateKey

func GetPrivateKey(c *gin.Context)

func GetProxy

func GetProxy(c *gin.Context)

func GetProxyConfig

func GetProxyConfig(c *gin.Context)

func GetRSAPublicKey

func GetRSAPublicKey(c *gin.Context)

func GetRegistryNamespace

func GetRegistryNamespace(c *gin.Context)

func GetRunningWorkflow

func GetRunningWorkflow(c *gin.Context)

func GetS3Storage

func GetS3Storage(c *gin.Context)

func GetSecuritySettings

func GetSecuritySettings(c *gin.Context)

func GetSonarIntegration

func GetSonarIntegration(c *gin.Context)

func GetStrategy

func GetStrategy(c *gin.Context)

func GetSystemInitializationStatus

func GetSystemInitializationStatus(c *gin.Context)

func GetTextFromEncryptedKey

func GetTextFromEncryptedKey(c *gin.Context)

func GetThemeInfos

func GetThemeInfos(c *gin.Context)

func GetWebhookConfig

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

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

func GetWorkflowConcurrency(c *gin.Context)

func HandleJiraEvent

func HandleJiraEvent(c *gin.Context)

func HandleMeegoEvent

func HandleMeegoEvent(c *gin.Context)

func InitializeUser

func InitializeUser(c *gin.Context)

func LarkEventHandler

func LarkEventHandler(c *gin.Context)

func ListAllRepos

func ListAllRepos(c *gin.Context)

func ListApolloApps

func ListApolloApps(c *gin.Context)

func ListApolloConfig

func ListApolloConfig(c *gin.Context)

func ListApolloConfigByType

func ListApolloConfigByType(c *gin.Context)

func ListApolloEnvAndClusters

func ListApolloEnvAndClusters(c *gin.Context)

func ListApolloNamespaces

func ListApolloNamespaces(c *gin.Context)

func ListAvailableWorkItemTransitions

func ListAvailableWorkItemTransitions(c *gin.Context)

func ListBasicImages

func ListBasicImages(c *gin.Context)

func ListCharts

func ListCharts(c *gin.Context)

func ListConfigurationManagement

func ListConfigurationManagement(c *gin.Context)

func ListDBInstance

func ListDBInstance(c *gin.Context)

func ListDBInstanceInfo

func ListDBInstanceInfo(c *gin.Context)

func ListDBInstancesInfoByProject

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

func ListExternalSystem(c *gin.Context)

func ListGrafanaAlert

func ListGrafanaAlert(c *gin.Context)

func ListGuanceyunMonitor

func ListGuanceyunMonitor(c *gin.Context)

func ListHelmRepos

func ListHelmRepos(c *gin.Context)

func ListHelmReposByProject

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

func ListHelmReposPublic(c *gin.Context)

func ListIMApp

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

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

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

func ListLabels(c *gin.Context)

func ListMeegoWorkItems

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

func ListNacosConfig(c *gin.Context)

func ListNacosConfigByType

func ListNacosConfigByType(c *gin.Context)

func ListNacosNamespace

func ListNacosNamespace(c *gin.Context)

func ListObservability

func ListObservability(c *gin.Context)

func ListObservabilityDetail

func ListObservabilityDetail(c *gin.Context)

func ListPrivateKeys

func ListPrivateKeys(c *gin.Context)

func ListPrivateKeysInternal

func ListPrivateKeysInternal(c *gin.Context)

func ListProjectManagement

func ListProjectManagement(c *gin.Context)

func ListProjectManagementForProject

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

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

func ListSonarIntegration(c *gin.Context)

func ListSubscriptions

func ListSubscriptions(c *gin.Context)

func ListTars

func ListTars(c *gin.Context)

func OpenAPICreateRegistry

func OpenAPICreateRegistry(c *gin.Context)

func OpenAPIDeleteCluster

func OpenAPIDeleteCluster(c *gin.Context)

func OpenAPIGetRegistry

func OpenAPIGetRegistry(c *gin.Context)

func OpenAPIListCluster

func OpenAPIListCluster(c *gin.Context)

func OpenAPIListRegistry

func OpenAPIListRegistry(c *gin.Context)

func OpenAPIUpdateCluster

func OpenAPIUpdateCluster(c *gin.Context)

func OpenAPIUpdateRegistry

func OpenAPIUpdateRegistry(c *gin.Context)

func PullAllAnnouncement

func PullAllAnnouncement(c *gin.Context)

func PullNotify

func PullNotify(c *gin.Context)

func PullNotifyAnnouncement

func PullNotifyAnnouncement(c *gin.Context)

func ReadNotify

func ReadNotify(c *gin.Context)

func SearchJiraIssues

func SearchJiraIssues(c *gin.Context)

func SearchJiraProjectIssuesWithJQL

func SearchJiraProjectIssuesWithJQL(c *gin.Context)

func SetCron

func SetCron(c *gin.Context)

func TestConnection

func TestConnection(c *gin.Context)

func TestJenkinsConnection

func TestJenkinsConnection(c *gin.Context)

func Unsubscribe

func Unsubscribe(c *gin.Context)

func UpdateAnnouncement

func UpdateAnnouncement(c *gin.Context)

func UpdateBasicImage

func UpdateBasicImage(c *gin.Context)

func UpdateConfigurationManagement

func UpdateConfigurationManagement(c *gin.Context)

func UpdateDBInstance

func UpdateDBInstance(c *gin.Context)

func UpdateDefaultLogin

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

func UpdateExternalSystem

func UpdateExternalSystem(c *gin.Context)

func UpdateHelmRepo

func UpdateHelmRepo(c *gin.Context)

func UpdateIMApp

func UpdateIMApp(c *gin.Context)

func UpdateInstall

func UpdateInstall(c *gin.Context)

func UpdateJenkinsIntegration

func UpdateJenkinsIntegration(c *gin.Context)

func UpdateLLMIntegration

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

func UpdateObservability(c *gin.Context)

func UpdateOperationLog

func UpdateOperationLog(c *gin.Context)

func UpdatePrivateKey

func UpdatePrivateKey(c *gin.Context)

func UpdateProjectManagement

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

func UpdateSonarIntegration(c *gin.Context)

func UpdateStrategy

func UpdateStrategy(c *gin.Context)

func UpdateSubscribe

func UpdateSubscribe(c *gin.Context)

func UpdateThemeInfo

func UpdateThemeInfo(c *gin.Context)

func UpdateWorkflowConcurrency

func UpdateWorkflowConcurrency(c *gin.Context)

func UpsertSubscription

func UpsertSubscription(c *gin.Context)

func Validate

func Validate(c *gin.Context)

func ValidateConfigurationManagement

func ValidateConfigurationManagement(c *gin.Context)

func ValidateDBInstance

func ValidateDBInstance(c *gin.Context)

func ValidateIMApp

func ValidateIMApp(c *gin.Context)

func ValidateObservability

func ValidateObservability(c *gin.Context)

func ValidateSonarInformation

func ValidateSonarInformation(c *gin.Context)

Types

type AdvancedRegistrySetting

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

type CheckJenkinsIntegrationResp

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

type CreateLLMIntegrationRequest

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

type DryRunFlag

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

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

type GrafanaAlert

type GrafanaAlert struct {
	Name string `json:"name"`
	UID  string `json:"uid"`
}

type GuanceyunMonitor

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

type InitializeUserReq

type InitializeUserReq struct {
	Username        string `json:"username"`
	Password        string `json:"password"`
	Company         string `json:"company"`
	Email           string `json:"email"`
	Phone           int64  `json:"phone"`
	ImprovementPlan bool   `json:"improvement_plan"`
}

func (*InitializeUserReq) Validate

func (req *InitializeUserReq) Validate() error

type ListImagesOption

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

type ListTarsOption

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

type OpenAPIRouter

type OpenAPIRouter struct{}

func (*OpenAPIRouter) Inject

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

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

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