v1

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ExecuteSuccess                  = uint32(apimodel.Code_ExecuteSuccess)
	DataNoChange                    = uint32(apimodel.Code_DataNoChange)
	NoNeedUpdate                    = uint32(apimodel.Code_NoNeedUpdate)
	BadRequest                      = uint32(apimodel.Code_BadRequest)
	ParseException                  = uint32(apimodel.Code_ParseException)
	EmptyRequest                    = uint32(apimodel.Code_EmptyRequest)
	BatchSizeOverLimit              = uint32(apimodel.Code_BatchSizeOverLimit)
	InvalidDiscoverResource         = uint32(apimodel.Code_InvalidDiscoverResource)
	InvalidRequestID                = uint32(apimodel.Code_InvalidRequestID)
	InvalidUserName                 = uint32(apimodel.Code_InvalidUserName)
	InvalidUserToken                = uint32(apimodel.Code_InvalidUserToken)
	InvalidParameter                = uint32(apimodel.Code_InvalidParameter)
	EmptyQueryParameter             = uint32(apimodel.Code_EmptyQueryParameter)
	InvalidQueryInsParameter        = uint32(apimodel.Code_InvalidQueryInsParameter)
	InvalidNamespaceName            = uint32(apimodel.Code_InvalidNamespaceName)
	InvalidNamespaceOwners          = uint32(apimodel.Code_InvalidNamespaceOwners)
	InvalidNamespaceToken           = uint32(apimodel.Code_InvalidNamespaceToken)
	InvalidServiceName              = uint32(apimodel.Code_InvalidServiceName)
	InvalidServiceOwners            = uint32(apimodel.Code_InvalidServiceOwners)
	InvalidServiceToken             = uint32(apimodel.Code_InvalidServiceToken)
	InvalidServiceMetadata          = uint32(apimodel.Code_InvalidServiceMetadata)
	InvalidServicePorts             = uint32(apimodel.Code_InvalidServicePorts)
	InvalidServiceBusiness          = uint32(apimodel.Code_InvalidServiceBusiness)
	InvalidServiceDepartment        = uint32(apimodel.Code_InvalidServiceDepartment)
	InvalidServiceCMDB              = uint32(apimodel.Code_InvalidServiceCMDB)
	InvalidServiceComment           = uint32(apimodel.Code_InvalidServiceComment)
	InvalidServiceAliasComment      = uint32(apimodel.Code_InvalidServiceAliasComment)
	InvalidInstanceID               = uint32(apimodel.Code_InvalidInstanceID)
	InvalidInstanceHost             = uint32(apimodel.Code_InvalidInstanceHost)
	InvalidInstancePort             = uint32(apimodel.Code_InvalidInstancePort)
	InvalidServiceAlias             = uint32(apimodel.Code_InvalidServiceAlias)
	InvalidNamespaceWithAlias       = uint32(apimodel.Code_InvalidNamespaceWithAlias)
	InvalidServiceAliasOwners       = uint32(apimodel.Code_InvalidServiceAliasOwners)
	InvalidInstanceProtocol         = uint32(apimodel.Code_InvalidInstanceProtocol)
	InvalidInstanceVersion          = uint32(apimodel.Code_InvalidInstanceVersion)
	InvalidInstanceLogicSet         = uint32(apimodel.Code_InvalidInstanceLogicSet)
	InvalidInstanceIsolate          = uint32(apimodel.Code_InvalidInstanceIsolate)
	HealthCheckNotOpen              = uint32(apimodel.Code_HealthCheckNotOpen)
	HeartbeatOnDisabledIns          = uint32(apimodel.Code_HeartbeatOnDisabledIns)
	HeartbeatExceedLimit            = uint32(apimodel.Code_HeartbeatExceedLimit)
	HeartbeatTypeNotFound           = uint32(apimodel.Code_HeartbeatTypeNotFound)
	InvalidMetadata                 = uint32(apimodel.Code_InvalidMetadata)
	InvalidRateLimitID              = uint32(apimodel.Code_InvalidRateLimitID)
	InvalidRateLimitLabels          = uint32(apimodel.Code_InvalidRateLimitLabels)
	InvalidRateLimitAmounts         = uint32(apimodel.Code_InvalidRateLimitAmounts)
	InvalidRateLimitName            = uint32(apimodel.Code_InvalidRateLimitName)
	InvalidCircuitBreakerID         = uint32(apimodel.Code_InvalidCircuitBreakerID)
	InvalidCircuitBreakerVersion    = uint32(apimodel.Code_InvalidCircuitBreakerVersion)
	InvalidCircuitBreakerName       = uint32(apimodel.Code_InvalidCircuitBreakerName)
	InvalidCircuitBreakerNamespace  = uint32(apimodel.Code_InvalidCircuitBreakerNamespace)
	InvalidCircuitBreakerOwners     = uint32(apimodel.Code_InvalidCircuitBreakerOwners)
	InvalidCircuitBreakerToken      = uint32(apimodel.Code_InvalidCircuitBreakerToken)
	InvalidCircuitBreakerBusiness   = uint32(apimodel.Code_InvalidCircuitBreakerBusiness)
	InvalidCircuitBreakerDepartment = uint32(apimodel.Code_InvalidCircuitBreakerDepartment)
	InvalidCircuitBreakerComment    = uint32(apimodel.Code_InvalidCircuitBreakerComment)
	InvalidRoutingID                = uint32(apimodel.Code_InvalidRoutingID)
	InvalidRoutingPolicy            = uint32(apimodel.Code_InvalidRoutingPolicy)
	InvalidRoutingName              = uint32(apimodel.Code_InvalidRoutingName)
	InvalidRoutingPriority          = uint32(apimodel.Code_InvalidRoutingPriority)

	// 网格相关错误码
	ServicesExistedMesh  = uint32(apimodel.Code_ServicesExistedMesh)
	ResourcesExistedMesh = uint32(apimodel.Code_ResourcesExistedMesh)
	InvalidMeshParameter = uint32(apimodel.Code_InvalidMeshParameter)

	// 平台信息相关错误码
	InvalidPlatformID         = uint32(apimodel.Code_InvalidPlatformID)
	InvalidPlatformName       = uint32(apimodel.Code_InvalidPlatformName)
	InvalidPlatformDomain     = uint32(apimodel.Code_InvalidPlatformDomain)
	InvalidPlatformQPS        = uint32(apimodel.Code_InvalidPlatformQPS)
	InvalidPlatformToken      = uint32(apimodel.Code_InvalidPlatformToken)
	InvalidPlatformOwner      = uint32(apimodel.Code_InvalidPlatformOwner)
	InvalidPlatformDepartment = uint32(apimodel.Code_InvalidPlatformDepartment)
	InvalidPlatformComment    = uint32(apimodel.Code_InvalidPlatformComment)
	NotFoundPlatform          = uint32(apimodel.Code_NotFoundPlatform)

	// flux相关错误码
	InvalidFluxRateLimitId     = uint32(apimodel.Code_InvalidFluxRateLimitId)
	InvalidFluxRateLimitQps    = uint32(apimodel.Code_InvalidFluxRateLimitQps)
	InvalidFluxRateLimitSetKey = uint32(apimodel.Code_InvalidFluxRateLimitSetKey)

	ExistedResource                 = uint32(apimodel.Code_ExistedResource)
	NotFoundResource                = uint32(apimodel.Code_NotFoundResource)
	NamespaceExistedServices        = uint32(apimodel.Code_NamespaceExistedServices)
	ServiceExistedInstances         = uint32(apimodel.Code_ServiceExistedInstances)
	ServiceExistedRoutings          = uint32(apimodel.Code_ServiceExistedRoutings)
	ServiceExistedRateLimits        = uint32(apimodel.Code_ServiceExistedRateLimits)
	ExistReleasedConfig             = uint32(apimodel.Code_ExistReleasedConfig)
	SameInstanceRequest             = uint32(apimodel.Code_SameInstanceRequest)
	ServiceExistedCircuitBreakers   = uint32(apimodel.Code_ServiceExistedCircuitBreakers)
	ServiceExistedAlias             = uint32(apimodel.Code_ServiceExistedAlias)
	NamespaceExistedMeshResources   = uint32(apimodel.Code_NamespaceExistedMeshResources)
	NamespaceExistedCircuitBreakers = uint32(apimodel.Code_NamespaceExistedCircuitBreakers)
	ServiceSubscribedByMeshes       = uint32(apimodel.Code_ServiceSubscribedByMeshes)
	ServiceExistedFluxRateLimits    = uint32(apimodel.Code_ServiceExistedFluxRateLimits)
	NamespaceExistedConfigGroups    = uint32(apimodel.Code_NamespaceExistedConfigGroups)

	NotFoundService                    = uint32(apimodel.Code_NotFoundService)
	NotFoundRouting                    = uint32(apimodel.Code_NotFoundRouting)
	NotFoundInstance                   = uint32(apimodel.Code_NotFoundInstance)
	NotFoundServiceAlias               = uint32(apimodel.Code_NotFoundServiceAlias)
	NotFoundNamespace                  = uint32(apimodel.Code_NotFoundNamespace)
	NotFoundSourceService              = uint32(apimodel.Code_NotFoundSourceService)
	NotFoundRateLimit                  = uint32(apimodel.Code_NotFoundRateLimit)
	NotFoundCircuitBreaker             = uint32(apimodel.Code_NotFoundCircuitBreaker)
	NotFoundMasterConfig               = uint32(apimodel.Code_NotFoundMasterConfig)
	NotFoundTagConfig                  = uint32(apimodel.Code_NotFoundTagConfig)
	NotFoundTagConfigOrService         = uint32(apimodel.Code_NotFoundTagConfigOrService)
	ClientAPINotOpen                   = uint32(apimodel.Code_ClientAPINotOpen)
	NotAllowBusinessService            = uint32(apimodel.Code_NotAllowBusinessService)
	NotAllowAliasUpdate                = uint32(apimodel.Code_NotAllowAliasUpdate)
	NotAllowAliasCreateInstance        = uint32(apimodel.Code_NotAllowAliasCreateInstance)
	NotAllowAliasCreateRouting         = uint32(apimodel.Code_NotAllowAliasCreateRouting)
	NotAllowCreateAliasForAlias        = uint32(apimodel.Code_NotAllowCreateAliasForAlias)
	NotAllowAliasCreateRateLimit       = uint32(apimodel.Code_NotAllowAliasCreateRateLimit)
	NotAllowAliasBindRule              = uint32(apimodel.Code_NotAllowAliasBindRule)
	NotAllowDifferentNamespaceBindRule = uint32(apimodel.Code_NotAllowDifferentNamespaceBindRule)
	Unauthorized                       = uint32(apimodel.Code_Unauthorized)
	NotAllowedAccess                   = uint32(apimodel.Code_NotAllowedAccess)
	IPRateLimit                        = uint32(apimodel.Code_IPRateLimit)
	APIRateLimit                       = uint32(apimodel.Code_APIRateLimit)
	CMDBNotFindHost                    = uint32(apimodel.Code_CMDBNotFindHost)
	DataConflict                       = uint32(apimodel.Code_DataConflict)
	InstanceTooManyRequests            = uint32(apimodel.Code_InstanceTooManyRequests)
	ExecuteException                   = uint32(apimodel.Code_ExecuteException)
	StoreLayerException                = uint32(apimodel.Code_StoreLayerException)
	CMDBPluginException                = uint32(apimodel.Code_CMDBPluginException)
	ParseRoutingException              = uint32(apimodel.Code_ParseRoutingException)
	ParseRateLimitException            = uint32(apimodel.Code_ParseRateLimitException)
	ParseCircuitBreakerException       = uint32(apimodel.Code_ParseCircuitBreakerException)
	HeartbeatException                 = uint32(apimodel.Code_HeartbeatException)
	InstanceRegisTimeout               = uint32(apimodel.Code_InstanceRegisTimeout)

	InvalidConfigFileGroupName     = uint32(apimodel.Code_InvalidConfigFileGroupName)
	InvalidConfigFileName          = uint32(apimodel.Code_InvalidConfigFileName)
	InvalidConfigFileContentLength = uint32(apimodel.Code_InvalidConfigFileContentLength)
	InvalidConfigFileFormat        = uint32(apimodel.Code_InvalidConfigFileFormat)
	InvalidConfigFileTags          = uint32(apimodel.Code_InvalidConfigFileTags)
	InvalidWatchConfigFileFormat   = uint32(apimodel.Code_InvalidWatchConfigFileFormat)
	NotFoundResourceConfigFile     = uint32(apimodel.Code_NotFoundResourceConfigFile)
	InvalidConfigFileTemplateName  = uint32(apimodel.Code_InvalidConfigFileTemplateName)
	InvalidMatchRule               = uint32(apimodel.Code_InvalidMatchRule)

	// 鉴权相关错误码
	InvalidUserOwners         = uint32(apimodel.Code_InvalidUserOwners)
	InvalidUserID             = uint32(apimodel.Code_InvalidUserID)
	InvalidUserPassword       = uint32(apimodel.Code_InvalidUserPassword)
	InvalidUserMobile         = uint32(apimodel.Code_InvalidUserMobile)
	InvalidUserEmail          = uint32(apimodel.Code_InvalidUserEmail)
	InvalidUserGroupOwners    = uint32(apimodel.Code_InvalidUserGroupOwners)
	InvalidUserGroupID        = uint32(apimodel.Code_InvalidUserGroupID)
	InvalidAuthStrategyOwners = uint32(apimodel.Code_InvalidAuthStrategyOwners)
	InvalidAuthStrategyName   = uint32(apimodel.Code_InvalidAuthStrategyName)
	InvalidAuthStrategyID     = uint32(apimodel.Code_InvalidAuthStrategyID)
	InvalidPrincipalType      = uint32(apimodel.Code_InvalidPrincipalType)

	UserExisted                            = uint32(apimodel.Code_UserExisted)
	UserGroupExisted                       = uint32(apimodel.Code_UserGroupExisted)
	AuthStrategyRuleExisted                = uint32(apimodel.Code_AuthStrategyRuleExisted)
	SubAccountExisted                      = uint32(apimodel.Code_SubAccountExisted)
	NotFoundUser                           = uint32(apimodel.Code_NotFoundUser)
	NotFoundOwnerUser                      = uint32(apimodel.Code_NotFoundOwnerUser)
	NotFoundUserGroup                      = uint32(apimodel.Code_NotFoundUserGroup)
	NotFoundAuthStrategyRule               = uint32(apimodel.Code_NotFoundAuthStrategyRule)
	NotAllowModifyDefaultStrategyPrincipal = uint32(apimodel.Code_NotAllowModifyDefaultStrategyPrincipal)
	NotAllowModifyOwnerDefaultStrategy     = uint32(apimodel.Code_NotAllowModifyOwnerDefaultStrategy)

	EmptyAutToken   = uint32(apimodel.Code_EmptyAutToken)
	TokenDisabled   = uint32(apimodel.Code_TokenDisabled)
	TokenNotExisted = uint32(apimodel.Code_TokenNotExisted)

	AuthTokenVerifyException = uint32(apimodel.Code_AuthTokenForbidden)
	OperationRoleException   = uint32(apimodel.Code_OperationRoleForbidden)
)

北极星错误码 六位构成,前面三位参照HTTP Status的标准 后面三位,依据内部的具体错误自定义

Variables

This section is empty.

Functions

func AddAnyDataIntoBatchQuery added in v1.14.0

func AddAnyDataIntoBatchQuery(resp *apiservice.BatchQueryResponse, message proto.Message) error

AddAnyDataIntoBatchQuery add message as any data array

func AddNamespace added in v1.14.0

func AddNamespace(b *apiservice.BatchQueryResponse, namespace *apimodel.Namespace)

AddNamespace BatchQueryResponse添加命名空间

func AddNamespaceSummary added in v1.16.0

func AddNamespaceSummary(b *apiservice.BatchQueryResponse, summary *apimodel.Summary)

AddNamespaceSummary 添加汇总信息

func CalcCode

func CalcCode(rm ResponseMessage) int

*

  • @brief 获取返回码前三位
  • @note 返回码前三位和HTTP返回码定义一致

func CalcCodeV2 added in v1.18.0

func CalcCodeV2(rm ResponseMessageV2) int

*

  • @brief 获取返回码前三位
  • @note 返回码前三位和HTTP返回码定义一致

func Code2Info

func Code2Info(code uint32) string

code to info

func Collect added in v1.14.0

func Collect(batchWriteResponse *apiservice.BatchWriteResponse, response *apiservice.Response)

*

  • @brief BatchWriteResponse添加Response

func ConfigCollect added in v1.17.3

func ConfigCollect(batchWriteResponse *apiconfig.ConfigBatchWriteResponse, response *apiconfig.ConfigResponse)

ConfigCollect BatchWriteResponse添加Response

func FormatBatchWriteResponse

func FormatBatchWriteResponse(response *apiservice.BatchWriteResponse) *apiservice.BatchWriteResponse

格式化responses batch操作 如果所有子错误码一致,那么使用子错误码 如果包含任意一个5xx,那么返回500

func NewAnyDataResponse added in v1.14.0

func NewAnyDataResponse(code apimodel.Code, msg proto.Message) *apiservice.Response

NewAnyDataResponse create the response with data with any type

func NewAuthBatchQueryResponse added in v1.14.0

func NewAuthBatchQueryResponse(code apimodel.Code) *apiservice.BatchQueryResponse

NewAuthBatchQueryResponse 创建批量查询回复

func NewAuthBatchQueryResponseWithMsg added in v1.14.0

func NewAuthBatchQueryResponseWithMsg(code apimodel.Code, msg string) *apiservice.BatchQueryResponse

NewAuthBatchQueryResponseWithMsg 创建带详细信息的批量查询回复

func NewAuthBatchWriteResponse added in v1.14.0

func NewAuthBatchWriteResponse(code apimodel.Code) *apiservice.BatchWriteResponse

NewAuthBatchWriteResponse 创建批量回复

func NewAuthResponse added in v1.14.0

func NewAuthResponse(code apimodel.Code) *apiservice.Response

NewAuthResponse 创建回复消息

func NewAuthResponseWithMsg added in v1.14.0

func NewAuthResponseWithMsg(code apimodel.Code, msg string) *apiservice.Response

NewAuthResponseWithMsg 创建回复消息

func NewAuthStrategyResponse

func NewAuthStrategyResponse(code apimodel.Code, req *apisecurity.AuthStrategy) *apiservice.Response

NewAuthStrategyResponse 创建鉴权策略响应体

func NewAuthStrategyResponseWithMsg

func NewAuthStrategyResponseWithMsg(
	code apimodel.Code, msg string, req *apisecurity.AuthStrategy) *apiservice.Response

NewAuthStrategyResponseWithMsg 创建鉴权策略响应体并自定义Info

func NewBatchQueryResponse

func NewBatchQueryResponse(code apimodel.Code) *apiservice.BatchQueryResponse

NewBatchQueryResponse create the batch query responses

func NewBatchQueryResponseWithMsg

func NewBatchQueryResponseWithMsg(code apimodel.Code, msg string) *apiservice.BatchQueryResponse

NewBatchQueryResponseWithMsg create the batch query responses with message

func NewBatchWriteResponse

func NewBatchWriteResponse(code apimodel.Code) *apiservice.BatchWriteResponse

*

  • @brief 创建批量回复

func NewBatchWriteResponseWithMsg

func NewBatchWriteResponseWithMsg(code apimodel.Code, msg string) *apiservice.BatchWriteResponse

*

  • @brief 创建带详细信息的批量回复

func NewCircuitBreakerResponse

func NewCircuitBreakerResponse(code apimodel.Code, circuitBreaker *apifault.CircuitBreaker) *apiservice.Response

*

  • @brief 创建回复带熔断规则信息

func NewClientResponse

func NewClientResponse(code apimodel.Code, client *apiservice.Client) *apiservice.Response

*

  • @brief 创建回复带客户端信息

func NewConfigBatchQueryResponse added in v1.17.3

func NewConfigBatchQueryResponse(code apimodel.Code) *apiconfig.ConfigBatchQueryResponse

func NewConfigBatchQueryResponseWithInfo added in v1.17.3

func NewConfigBatchQueryResponseWithInfo(code apimodel.Code, info string) *apiconfig.ConfigBatchQueryResponse

func NewConfigBatchWriteResponse added in v1.17.3

func NewConfigBatchWriteResponse(code apimodel.Code) *apiconfig.ConfigBatchWriteResponse

func NewConfigBatchWriteResponseWithInfo added in v1.17.3

func NewConfigBatchWriteResponseWithInfo(code apimodel.Code, info string) *apiconfig.ConfigBatchWriteResponse

func NewConfigClientListResponse added in v1.17.3

func NewConfigClientListResponse(code apimodel.Code) *apiconfig.ConfigClientListResponse

func NewConfigClientResponse0 added in v1.18.0

func NewConfigClientResponse0(code apimodel.Code) *apiconfig.ConfigClientResponse

func NewConfigClientResponseFromConfigResponse added in v1.17.2

func NewConfigClientResponseFromConfigResponse(response *apiconfig.ConfigResponse) *apiconfig.ConfigClientResponse

func NewConfigClientResponseWithInfo added in v1.17.3

func NewConfigClientResponseWithInfo(code apimodel.Code, message string) *apiconfig.ConfigClientResponse

func NewConfigDiscoverResponse added in v1.18.0

func NewConfigDiscoverResponse(code apimodel.Code) *apiconfig.ConfigDiscoverResponse

创建一个空白的 ConfigDiscoverResponse

func NewConfigEncryptAlgorithmResponse added in v1.17.2

func NewConfigEncryptAlgorithmResponse(code apimodel.Code,
	algorithms []*wrapperspb.StringValue) *apiconfig.ConfigEncryptAlgorithmResponse

func NewConfigFileBatchQueryResponse

func NewConfigFileBatchQueryResponse(
	code apimodel.Code, total uint32, configFiles []*apiconfig.ConfigFile) *apiconfig.ConfigBatchQueryResponse

func NewConfigFileBatchQueryResponseWithMessage added in v1.17.2

func NewConfigFileBatchQueryResponseWithMessage(
	code apimodel.Code, message string) *apiconfig.ConfigBatchQueryResponse

func NewConfigFileExportResponse added in v1.15.0

func NewConfigFileExportResponse(code apimodel.Code, data []byte) *apiconfig.ConfigExportResponse

func NewConfigFileExportResponseWithMessage added in v1.17.2

func NewConfigFileExportResponseWithMessage(code apimodel.Code, message string) *apiconfig.ConfigExportResponse

func NewConfigFileGroupBatchQueryResponse

func NewConfigFileGroupBatchQueryResponse(code apimodel.Code, total uint32,
	configFileGroups []*apiconfig.ConfigFileGroup) *apiconfig.ConfigBatchQueryResponse

func NewConfigFileGroupResponseWithMessage

func NewConfigFileGroupResponseWithMessage(code apimodel.Code, message string) *apiconfig.ConfigResponse

func NewConfigFileImportResponse added in v1.15.0

func NewConfigFileImportResponse(code apimodel.Code,
	createConfigFiles, skipConfigFiles, overwriteConfigFiles []*apiconfig.ConfigFile) *apiconfig.ConfigImportResponse

func NewConfigFileImportResponseWithMessage added in v1.15.0

func NewConfigFileImportResponseWithMessage(code apimodel.Code, message string) *apiconfig.ConfigImportResponse

func NewConfigFileReleaseHistoryBatchQueryResponse

func NewConfigFileReleaseHistoryBatchQueryResponse(code apimodel.Code, total uint32,
	configFileReleaseHistories []*apiconfig.ConfigFileReleaseHistory) *apiconfig.ConfigBatchQueryResponse

func NewConfigFileReleaseHistoryResponse

func NewConfigFileReleaseHistoryResponse(
	code apimodel.Code, configFileReleaseHistory *apiconfig.ConfigFileReleaseHistory) *apiconfig.ConfigResponse

func NewConfigFileReleaseResponse

func NewConfigFileReleaseResponse(
	code apimodel.Code, configFileRelease *apiconfig.ConfigFileRelease) *apiconfig.ConfigResponse

func NewConfigFileReleaseResponseWithMessage

func NewConfigFileReleaseResponseWithMessage(code apimodel.Code, message string) *apiconfig.ConfigResponse

func NewConfigFileResponse

func NewConfigFileResponse(code apimodel.Code, configFile *apiconfig.ConfigFile) *apiconfig.ConfigResponse

func NewConfigFileTemplateBatchQueryResponse

func NewConfigFileTemplateBatchQueryResponse(code apimodel.Code, total uint32,
	configFileTemplates []*apiconfig.ConfigFileTemplate) *apiconfig.ConfigBatchQueryResponse

func NewConfigFileTemplateResponse

func NewConfigFileTemplateResponse(
	code apimodel.Code, template *apiconfig.ConfigFileTemplate) *apiconfig.ConfigResponse

func NewConfigFileTemplateResponseWithMessage

func NewConfigFileTemplateResponseWithMessage(code apimodel.Code, message string) *apiconfig.ConfigResponse

func NewConfigResponse

func NewConfigResponse(code apimodel.Code) *apiconfig.ConfigResponse

func NewConfigResponseWithInfo added in v1.17.3

func NewConfigResponseWithInfo(code apimodel.Code, message string) *apiconfig.ConfigResponse

func NewDiscoverCircuitBreakerResponse

func NewDiscoverCircuitBreakerResponse(code apimodel.Code, service *apiservice.Service) *apiservice.DiscoverResponse

*

  • @brief 创建查询熔断规则回复

func NewDiscoverFaultDetectorResponse added in v1.14.0

func NewDiscoverFaultDetectorResponse(code apimodel.Code, service *apiservice.Service) *apiservice.DiscoverResponse

*

  • @brief 创建查询探测规则回复

func NewDiscoverInstanceResponse

func NewDiscoverInstanceResponse(code apimodel.Code, service *apiservice.Service) *apiservice.DiscoverResponse

*

  • @brief 创建查询服务实例回复

func NewDiscoverRateLimitResponse

func NewDiscoverRateLimitResponse(code apimodel.Code, service *apiservice.Service) *apiservice.DiscoverResponse

*

  • @brief 创建查询限流规则回复

func NewDiscoverResponse

func NewDiscoverResponse(code apimodel.Code) *apiservice.DiscoverResponse

创建一个空白的discoverResponse

func NewDiscoverRoutingResponse

func NewDiscoverRoutingResponse(code apimodel.Code, service *apiservice.Service) *apiservice.DiscoverResponse

*

  • @brief 创建查询服务路由回复

func NewDiscoverServiceResponse

func NewDiscoverServiceResponse(code apimodel.Code, service *apiservice.Service) *apiservice.DiscoverResponse

*

  • @brief 创建查询服务回复

func NewGroupRelationResponse

func NewGroupRelationResponse(code apimodel.Code, relation *apisecurity.UserGroupRelation) *apiservice.Response

NewGroupRelationResponse 创建用户组关联关系的响应体

func NewGroupResponse

func NewGroupResponse(code apimodel.Code, user *apisecurity.UserGroup) *apiservice.Response

NewGroupResponse 创建回复带用户组信息

func NewInstanceRespWithError

func NewInstanceRespWithError(code apimodel.Code, err error, instance *apiservice.Instance) *apiservice.Response

创建带自定义error的服务实例response

func NewInstanceResponse

func NewInstanceResponse(code apimodel.Code, instance *apiservice.Instance) *apiservice.Response

*

  • @brief 创建回复带服务实例信息

func NewLoginResponse

func NewLoginResponse(code apimodel.Code, loginResponse *apisecurity.LoginResponse) *apiservice.Response

NewLoginResponse 创建登录响应体

func NewModifyAuthStrategyResponse

func NewModifyAuthStrategyResponse(code apimodel.Code, req *apisecurity.ModifyAuthStrategy) *apiservice.Response

NewModifyAuthStrategyResponse 创建修改鉴权策略响应体

func NewModifyGroupResponse

func NewModifyGroupResponse(code apimodel.Code, group *apisecurity.ModifyUserGroup) *apiservice.Response

NewModifyGroupResponse 创建修改用户组的响应信息

func NewNamespaceResponse

func NewNamespaceResponse(code apimodel.Code, namespace *apimodel.Namespace) *apiservice.Response

*

  • @brief 创建回复带命名空间信息

func NewRateLimitResponse

func NewRateLimitResponse(code apimodel.Code, rule *apitraffic.Rule) *apiservice.Response

NewRateLimitResponse 创建回复带限流规则信息

func NewResponse

func NewResponse(code apimodel.Code) *apiservice.Response

NewResponse 创建回复

func NewResponseWithMsg

func NewResponseWithMsg(code apimodel.Code, msg string) *apiservice.Response

NewResponseWithMsg 带上具体的错误信息

func NewRouterResponse added in v1.14.0

func NewRouterResponse(code apimodel.Code, router *apitraffic.RouteRule) *apiservice.Response

NewRouterResponse 创建带新版本路由的返回

func NewRoutingResponse

func NewRoutingResponse(code apimodel.Code, routing *apitraffic.Routing) *apiservice.Response

*

  • @brief 创建回复带服务路由信息

func NewServiceAliasResponse

func NewServiceAliasResponse(code apimodel.Code, alias *apiservice.ServiceAlias) *apiservice.Response

创建带别名信息的答复

func NewServiceResponse

func NewServiceResponse(code apimodel.Code, service *apiservice.Service) *apiservice.Response

*

  • @brief 创建回复带服务信息

func NewStrategyResourcesResponse

func NewStrategyResourcesResponse(code apimodel.Code, ret *apisecurity.StrategyResources) *apiservice.Response

NewStrategyResourcesResponse 创建修改鉴权策略响应体

func NewUserResponse

func NewUserResponse(code apimodel.Code, user *apisecurity.User) *apiservice.Response

NewUserResponse 创建回复带用户信息

func NewUserResponseWithMsg

func NewUserResponseWithMsg(code apimodel.Code, info string, user *apisecurity.User) *apiservice.Response

NewUserResponse 创建回复带用户信息

Types

type ResponseMessage

type ResponseMessage interface {
	proto.Message
	GetCode() *wrappers.UInt32Value
	GetInfo() *wrappers.StringValue
}

*

  • @brief 回复消息接口

type ResponseMessageV2 added in v1.18.0

type ResponseMessageV2 interface {
	proto.Message
	GetCode() uint32
	GetInfo() string
}

Jump to

Keyboard shortcuts

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