Documentation ¶
Index ¶
- Constants
- Variables
- func MakePolicies(dtos []PolicyDto) (res []*pb.Policy)
- type AliyunAppCredential
- type ApiAuthData
- type ApiAuthErr
- type ApiAuthReqDto
- type ApiAuthRespDto
- type ApiCreateRespDto
- type ApiDto
- type ApiInfoDto
- type ApiPrefixReqDto
- type ApiReqDto
- type ApiReqOptionDto
- type BindDomainDto
- type CallMockDto
- type CategoryInfoDto
- type ClientInfoDto
- type CloudapiBindInfo
- type CloudapiGroupInfo
- type CloudapiInfo
- type ConsumerAclInfoDto
- type ConsumerAclsDto
- type ConsumerAllResp
- type ConsumerApiDto
- type ConsumerApiInfoDto
- type ConsumerApiPolicyInfoDto
- type ConsumerApiReqDto
- type ConsumerCreateDto
- type ConsumerCredentialsDto
- type ConsumerDto
- type ConsumerEditDto
- type ConsumerEditRespDto
- type ConsumerInfoDto
- type CreateConsumerResp
- type DiceApiInfoDto
- type DiceApiLoadInfoDto
- type DiceArgsDto
- type DiceHealthDto
- type DiceHealthModule
- type DiceHealthStatus
- type DiceInfo
- type DomainLinkInfo
- type DomainType
- type EndPoint
- type EndpointDomainDto
- type GatewayGroupInfo
- type GetApisDto
- type GetDiceApiDto
- type GetOpenConsumersDto
- type GetOpenLimitRulesDto
- type GetOpenapiDto
- type GetPackagesDto
- type GroupCreateDto
- type GroupCreateRes
- type GroupDto
- type GwApiGroupDto
- type GwApiPolicyDto
- type LoadDiceApiDto
- type ManageDomainInfo
- type ManageDomainReq
- type MockInfoDto
- type OpenConsumerDto
- type OpenConsumerInfoDto
- type OpenLimitRuleDto
- type OpenLimitRuleInfoDto
- type OpenapiDto
- type OpenapiInfoDto
- type OpenapiRule
- type OpenapiRuleInfo
- type Origin
- type PackageAclInfoDto
- type PackageAclsDto
- type PackageDto
- type PackageInfoDto
- type PathVariableConfig
- type PluginDto
- type PolicyCreateDto
- type PolicyCreateRespDto
- type PolicyDto
- type PublishAuthNDto
- type PublishDto
- type RegisterApp
- type RegisterAppsDto
- type RegisterDto
- type RegisterRespDto
- type RegisterStatusDto
- type RouteInfoConfig
- type RuleCategory
- type RuleRegion
- type RuntimeDomain
- type RuntimeDomainsDto
- type RuntimeServiceReqDto
- type ServiceDetailDto
- type ServiceDomainReqDto
- type SortByRegexList
- type SortByRuleList
- type SortBySceneList
- type SortByTypeList
- type SubPluginDto
- type SubscribeDto
- type TenantDto
- type UITypeDto
- type UpstreamApiDto
- type UpstreamLbDto
- type UpstreamRegisterDto
- type ZoneKongPolicies
Constants ¶
View Source
const ( RT_AUTO_REGISTER = "register" RT_AUTO = "auto" RT_MANUAL = "manual" NT_IN = "inner" NT_OUT = "outer" ST_UP = "asc" ST_DOWN = "desc" )
View Source
const ( CT_PRO = "project" CT_ORG = "org" )
View Source
const ( RT_SERVICE = "service" RT_URL = "url" )
RedirectType
View Source
const ( AT_KEY_AUTH = "key-auth" AT_OAUTH2 = "oauth2" AT_SIGN_AUTH = "sign-auth" AT_HMAC_AUTH = "hmac-auth" AT_ALIYUN_APP = "aliyun-app" )
AuthType
View Source
const ( ACL = "acl" ACL_NONE = "" ACL_ON = "on" ACL_OFF = "off" )
AclType
View Source
const ( OPENAPI_SCENE = "openapi" WEBAPI_SCENE = "webapi" UNITY_SCENE = "unity" )
Scene
View Source
const ( EDT_CUSTOM = "CUSTOM" EDT_DEFAULT = "DEFAULT" )
View Source
const ( UI_NORMAL = "normal" UI_K8S = "k8s" )
View Source
const ( BASE_PRIORITY = 0 WILDCARD_DOMAIN_BASE_PRIORITY = 1000 )
Variables ¶
View Source
var HMACAUTH_CONFIG map[string]interface{}
View Source
var INNER_HOSTS = []string{
"dev-api-gateway.kube-system.svc.cluster.local",
"test-api-gateway.kube-system.svc.cluster.local",
"staging-api-gateway.kube-system.svc.cluster.local",
"api-gateway.kube-system.svc.cluster.local",
}
View Source
var KEYAUTH_CONFIG map[string]interface{}
View Source
var OAUTH2_CONFIG map[string]interface{}
View Source
var RULE_PRIORITY = map[RuleCategory]int{ AUTH_RULE: 1000, ACL_RULE: 999, LIMIT_RULE: 998, }
View Source
var SIGNAUTH_CONFIG map[string]interface{}
Functions ¶
func MakePolicies ¶ added in v1.3.0
Types ¶
type AliyunAppCredential ¶
type ApiAuthData ¶
type ApiAuthData struct {
Access bool `json:"access"`
}
type ApiAuthErr ¶
type ApiAuthReqDto ¶
type ApiAuthRespDto ¶
type ApiAuthRespDto struct { Success bool `json:"success"` Data ApiAuthData `json:"data"` Err ApiAuthErr `json:"err"` }
func (ApiAuthRespDto) HasPermission ¶
func (dto ApiAuthRespDto) HasPermission() bool
type ApiCreateRespDto ¶
type ApiCreateRespDto struct {
ApiId string `json:"apiId"`
}
type ApiDto ¶
type ApiDto struct { // 路径 Path string `json:"path"` // 方法 Method string `json:"method"` // 转发方式 RedirectType string `json:"redirectType"` // 转发地址 RedirectAddr string `json:"redirectAddr"` // 转发地址 RedirectPath string `json:"redirectPath"` // 域名 Hosts []string `json:"hosts"` //项目名称 ProjectId string `json:"projectId"` // 描述 Description string `json:"description"` // 应用名 DiceApp string `json:"diceApp"` // 服务名 DiceService string `json:"diceService"` // 是否开启公网访问 OuterNetEnable bool `json:"outerNetEnable"` // 分支id RuntimeId string `json:"runtimeId"` //环境 Env string `json:"env"` RegisterType string `json:"-"` NeedAuth int `json:"-"` UpstreamApiId string `json:"-"` RuntimeServiceId string `json:"-"` IsInner int `json:"-"` Swagger interface{} `json:"-"` DaoId string `json:"-"` }
func MakeApiDto ¶ added in v1.3.0
func MakeApiDto(req *pb.ApiRequest) *ApiDto
type ApiInfoDto ¶
type ApiInfoDto struct { ApiId string `json:"apiId"` // 列表中展示时使用此字段 Path string `json:"path"` // API编辑时用于展现 DisplayPath string `json:"displayPath"` // 若有此字段,API编辑时展现前缀 DisplayPathPrefix string `json:"displayPathPrefix,omitempty"` OuterNetEnable bool `json:"outerNetEnable"` RegisterType string `json:"registerType"` NeedAuth bool `json:"needAuth"` Method string `json:"method,omitempty"` Description string `json:"description"` RedirectAddr string `json:"redirectAddr"` RedirectPath string `json:"redirectPath"` RedirectType string `json:"redirectType"` MonitorPath string `json:"monitorPath"` Group GroupDto `json:"group"` CreateAt string `json:"createAt"` Policies []PolicyDto `json:"policies"` Swagger interface{} `json:"swagger,omitempty"` }
type ApiPrefixReqDto ¶
type ApiReqDto ¶
type ApiReqDto struct { *ApiDto *ApiReqOptionDto }
type ApiReqOptionDto ¶
type BindDomainDto ¶
type CallMockDto ¶
type CategoryInfoDto ¶
type ClientInfoDto ¶
type CloudapiBindInfo ¶
type CloudapiBindInfo struct {
Domain string `json:"domain"`
}
type CloudapiGroupInfo ¶
type CloudapiInfo ¶
type CloudapiInfo struct {
CloudapiExists bool `json:"cloudapiExists"`
}
type ConsumerAclInfoDto ¶
type ConsumerAclInfoDto struct { PackageInfoDto Selected bool `json:"selected"` }
func (ConsumerAclInfoDto) ToAcl ¶ added in v1.3.0
func (dto ConsumerAclInfoDto) ToAcl() *pb.Acl
type ConsumerAclsDto ¶
type ConsumerAclsDto struct {
Packages []string `json:"packages"`
}
type ConsumerAllResp ¶
type ConsumerAllResp struct {
Consumers []ConsumerInfoDto `json:"consumers"`
}
type ConsumerApiDto ¶
type ConsumerApiInfoDto ¶
type ConsumerApiInfoDto struct { Id string `json:"id"` ConsumerId string `json:"consumerId"` ApiId string `json:"apiId"` ApiPath string `json:"apiPath"` Method string `json:"method"` RedirectAddr string `json:"redirectAddr"` Description string `json:"description"` RateLimitPolicy ConsumerApiPolicyInfoDto `json:"rateLimitPolicy"` }
type ConsumerApiReqDto ¶
type ConsumerApiReqDto struct {
List []ConsumerApiDto `json:"list"`
}
type ConsumerCreateDto ¶
type ConsumerCreateDto struct { OrgId int `json:"orgId"` ProjectId string `json:"projectId"` Env string `json:"env"` ConsumerId string `json:"consumerId"` ConsumerName string `json:"consumerName"` Description string `json:"description"` }
func NewConsumerCreateDto ¶
func NewConsumerCreateDto() *ConsumerCreateDto
func (ConsumerCreateDto) IsEmpty ¶
func (dto ConsumerCreateDto) IsEmpty() bool
type ConsumerCredentialsDto ¶
type ConsumerCredentialsDto struct { ConsumerName string `json:"consumerName"` ConsumerId string `json:"consumerId"` AuthConfig *orm.ConsumerAuthConfig `json:"authConfig"` }
func FromCredentials ¶ added in v1.3.0
func FromCredentials(creds *pb.ConsumerCredentials) *ConsumerCredentialsDto
func (ConsumerCredentialsDto) ToCredentials ¶ added in v1.3.0
func (dto ConsumerCredentialsDto) ToCredentials() *pb.ConsumerCredentials
type ConsumerDto ¶
type ConsumerDto struct { ConsumerCredentialsDto Endpoint EndPoint `json:"endpoint"` GatewayInstance string `json:"gatewayInstance"` ClusterName string `json:"clusterName"` }
type ConsumerEditDto ¶
type ConsumerEditRespDto ¶
type ConsumerInfoDto ¶
type ConsumerInfoDto struct { ConsumerId string `json:"consumerId"` ConsumerName string `json:"consumerName"` ConsumerApiInfos []ConsumerApiInfoDto `json:"consumerApiInfos"` }
type CreateConsumerResp ¶
type CreateConsumerResp struct { ConsumerId string `json:"consumerId"` ConsumerName string `json:"consumerName"` AuthConfig *orm.ConsumerAuthConfig `json:"authConfig"` }
type DiceApiInfoDto ¶
type DiceApiLoadInfoDto ¶
type DiceApiLoadInfoDto struct { RoutePrefix string `json:"routePrefix"` Apis []DiceApiInfoDto `json:"apis"` }
type DiceArgsDto ¶
type DiceArgsDto struct { OrgId string ProjectId string Env string DiceApp string DiceService string PageNo int64 PageSize int64 SortField string SortType string }
func NewDiceArgsDto ¶
func NewDiceArgsDto(c *gin.Context) DiceArgsDto
func (DiceArgsDto) GenSelectOptions ¶
func (impl DiceArgsDto) GenSelectOptions() []orm.SelectOption
type DiceHealthDto ¶
type DiceHealthDto struct { Status DiceHealthStatus `json:"status"` Modules []DiceHealthModule `json:"modules"` }
type DiceHealthModule ¶
type DiceHealthModule struct { Name string `json:"name"` Status DiceHealthStatus `json:"status"` Message string `json:"message"` }
type DiceHealthStatus ¶
type DiceHealthStatus string
const ( DiceHealthOK DiceHealthStatus = "ok" DiceHealthFail DiceHealthStatus = "fail" )
type DomainLinkInfo ¶
type DomainType ¶
type DomainType string
const ( ServiceDomain DomainType = "service" GatewayDomain DomainType = "gateway" OtherDomain DomainType = "other" )
type EndpointDomainDto ¶
func (EndpointDomainDto) CheckValid ¶
func (dto EndpointDomainDto) CheckValid() error
type GatewayGroupInfo ¶
type GatewayGroupInfo struct { GatewayGroup orm.GatewayGroup `json:"gatewayGroup"` Policies []orm.GatewayPolicy `json:"policies"` }
func (*GatewayGroupInfo) AddPolicy ¶
func (dto *GatewayGroupInfo) AddPolicy(policy *orm.GatewayPolicy)
type GetApisDto ¶
type GetApisDto struct { From string Method string ConsumerId string RuntimeId string RuntimeServiceId string DiceApp string DiceService string ApiPath string RegisterType string NetType string NeedAuth int SortField string SortType string OrgId string ProjectId string Env string Size int64 Page int64 }
type GetDiceApiDto ¶
type GetDiceApiDto struct { DiceArgsDto ApiPath string Method string }
func NewGetDiceApiDto ¶
func NewGetDiceApiDto(c *gin.Context) GetDiceApiDto
func (GetDiceApiDto) GenSelectOptions ¶
func (impl GetDiceApiDto) GenSelectOptions() []orm.SelectOption
type GetOpenConsumersDto ¶
type GetOpenConsumersDto struct {
DiceArgsDto
}
func (GetOpenConsumersDto) GenSelectOptions ¶
func (impl GetOpenConsumersDto) GenSelectOptions() []orm.SelectOption
type GetOpenLimitRulesDto ¶
type GetOpenLimitRulesDto struct { DiceArgsDto ConsumerId string PackageId string }
func NewGetOpenLimitRulesDto ¶
func NewGetOpenLimitRulesDto(c *gin.Context) GetOpenLimitRulesDto
func (GetOpenLimitRulesDto) GenSelectOptions ¶
func (impl GetOpenLimitRulesDto) GenSelectOptions() []orm.SelectOption
type GetOpenapiDto ¶
type GetOpenapiDto struct { DiceArgsDto ApiPath string Method string Origin string }
func NewGetOpenapiDto ¶
func NewGetOpenapiDto(c *gin.Context) GetOpenapiDto
func (GetOpenapiDto) GenSelectOptions ¶
func (impl GetOpenapiDto) GenSelectOptions() []orm.SelectOption
type GetPackagesDto ¶
type GetPackagesDto struct { DiceArgsDto Domain string }
type GroupCreateDto ¶
type GroupCreateRes ¶
type GroupCreateRes struct { }
type GwApiGroupDto ¶
type GwApiGroupDto struct { GroupId string `json:"groupId"` GroupName string `json:"groupName"` DisplayName string `json:"displayName"` CreateAt string `json:"createAt"` Policies []GwApiPolicyDto `json:"policies"` }
func (*GwApiGroupDto) AddPolicy ¶
func (dto *GwApiGroupDto) AddPolicy(policy *GwApiPolicyDto)
AddPolicy
type GwApiPolicyDto ¶
type LoadDiceApiDto ¶
type ManageDomainInfo ¶
type ManageDomainInfo struct { ID string `json:"id"` Domain string `json:"domain"` ClusterName string `json:"clusterName"` Type DomainType `json:"type"` ProjectName string `json:"projectName"` AppName string `json:"appName"` Workspace string `json:"workspace"` Link *DomainLinkInfo `json:"link,omitempty"` }
type ManageDomainReq ¶
type ManageDomainReq struct { OrgId string Domain string ClusterName string Type DomainType ProjectID string Workspace string PageSize int64 PageNo int64 }
func (ManageDomainReq) GenSelectOptions ¶
func (req ManageDomainReq) GenSelectOptions() []orm.SelectOption
type MockInfoDto ¶
type OpenConsumerDto ¶
type OpenConsumerInfoDto ¶
type OpenConsumerInfoDto struct { Id string `json:"id"` CreateAt string `json:"createAt"` OpenConsumerDto }
func (OpenConsumerInfoDto) ToConsumer ¶ added in v1.3.0
func (dto OpenConsumerInfoDto) ToConsumer() *pb.Consumer
type OpenLimitRuleDto ¶
type OpenLimitRuleDto struct { ConsumerId string `json:"consumerId"` PackageId string `json:"packageId"` Method string `json:"method"` ApiPath string `json:"apiPath"` Limit exdto.LimitType `json:"limit"` KongConfig map[string]interface{} `json:"-"` ApiId string `json:"-"` }
func FromLimitRequest ¶ added in v1.3.0
func FromLimitRequest(limit *pb.LimitRequest) *OpenLimitRuleDto
func (OpenLimitRuleDto) ToLimitRequest ¶ added in v1.3.0
func (dto OpenLimitRuleDto) ToLimitRequest() *pb.LimitRequest
type OpenLimitRuleInfoDto ¶
type OpenLimitRuleInfoDto struct { OpenLimitRuleDto Id string `json:"id"` CreateAt string `json:"createAt"` ConsumerName string `json:"consumerName"` PackageName string `json:"packageName"` }
type OpenapiDto ¶
type OpenapiDto struct { ApiPath string `json:"apiPath"` RedirectType string `json:"redirectType"` RedirectAddr string `json:"redirectAddr"` RedirectPath string `json:"redirectPath"` RedirectApp string `json:"redirectApp"` RedirectService string `json:"redirectService"` RedirectRuntimeId string `json:"redirectRuntimeId"` RedirectRuntimeName string `json:"redirectRuntimeName"` Method string `json:"method,omitempty"` AllowPassAuth bool `json:"allowPassAuth"` // AclType string `json:"aclType"` Description string `json:"description"` Origin Origin `json:"-"` AdjustPath string `json:"-"` AdjustRedirectAddr string `json:"-"` ServiceRewritePath string `json:"-"` IsRegexPath bool `json:"-"` RouteId string `json:"-"` ServiceId string `json:"-"` ZoneId string `json:"-"` ProjectId string `json:"-"` Env string `json:"-"` RuntimeServiceId string `json:"-"` Hosts []string `json:"hosts"` }
func FromEndpointApi ¶ added in v1.3.0
func FromEndpointApi(ep *pb.EndpointApi) *OpenapiDto
func (*OpenapiDto) Adjust ¶
func (dto *OpenapiDto) Adjust() error
func (*OpenapiDto) CheckValid ¶
func (dto *OpenapiDto) CheckValid() (bool, string)
func (OpenapiDto) ToEndpointApi ¶ added in v1.3.0
func (dto OpenapiDto) ToEndpointApi() *pb.EndpointApi
type OpenapiInfoDto ¶
type OpenapiInfoDto struct { ApiId string `json:"apiId"` CreateAt string `json:"createAt"` DiceApp string `json:"diceApp"` DiceService string `json:"diceService"` Origin Origin `json:"origin"` Mutable bool `json:"mutable"` OpenapiDto }
func (OpenapiInfoDto) ToEndpointApi ¶ added in v1.3.0
func (dto OpenapiInfoDto) ToEndpointApi() *pb.EndpointApi
type OpenapiRule ¶
type OpenapiRuleInfo ¶
type OpenapiRuleInfo struct { Id string OpenapiRule }
type PackageAclInfoDto ¶
type PackageAclInfoDto struct { OpenConsumerInfoDto Selected bool `json:"selected"` }
func (PackageAclInfoDto) ToAcl ¶ added in v1.3.0
func (dto PackageAclInfoDto) ToAcl() *pb.Acl
type PackageAclsDto ¶
type PackageAclsDto struct {
Consumers []string `json:"consumers"`
}
type PackageDto ¶
type PackageDto struct { Name string `json:"name"` BindDomain []string `json:"bindDomain"` AuthType string `json:"authType"` AclType string `json:"aclType"` Scene string `json:"scene"` Description string `json:"description"` NeedBindCloudapi bool `json:"needBindCloudapi"` }
func FromEndpoint ¶ added in v1.3.0
func FromEndpoint(ep *pb.Endpoint) *PackageDto
func (PackageDto) CheckValid ¶
func (dto PackageDto) CheckValid() error
type PackageInfoDto ¶
type PackageInfoDto struct { Id string `json:"id"` CreateAt string `json:"createAt"` PackageDto }
func (PackageInfoDto) ToEndpoint ¶ added in v1.3.0
func (dto PackageInfoDto) ToEndpoint() *pb.Endpoint
type PathVariableConfig ¶
type PluginDto ¶
type PluginDto struct { Category string `json:"category"` SubPlugins []SubPluginDto `json:"subPlugins"` }
type PolicyCreateDto ¶
type PolicyCreateDto struct { OrgId int `json:"orgId"` ProjectId string `json:"projectId"` PolicyName string `json:"policyName"` DisplayName string `json:"displayName"` Config map[string]interface{} `json:"config"` Env string `json:"env"` }
func (PolicyCreateDto) IsEmpty ¶
func (dto PolicyCreateDto) IsEmpty() bool
type PolicyCreateRespDto ¶
type PolicyCreateRespDto struct {
PolicyId string `json:"policyId"`
}
type PublishAuthNDto ¶
type PublishDto ¶
type RegisterApp ¶
type RegisterAppsDto ¶
type RegisterAppsDto struct {
Apps []RegisterApp `json:"apps"`
}
type RegisterDto ¶
type RegisterDto struct { OrgId string `json:"orgId"` ProjectId string `json:"projectId"` Workspace string `json:"workspace"` ClusterName string `json:"clusterName"` AppId string `json:"appId"` AppName string `json:"appName"` RuntimeId string `json:"runtimeId"` RuntimeName string `json:"runtimeName"` ServiceName string `json:"serviceName"` ServiceAddr string `json:"serviceAddr"` Swagger json.RawMessage `json:"swagger"` }
func (RegisterDto) CheckValid ¶
func (dto RegisterDto) CheckValid() error
type RegisterRespDto ¶
type RegisterRespDto struct {
ApiRegisterId string `json:"apiRegisterId"`
}
type RegisterStatusDto ¶
type RegisterStatusDto struct {
Completed bool `json:"completed"`
}
type RouteInfoConfig ¶
type RuleCategory ¶
type RuleCategory string
const ( ACL_RULE RuleCategory = "acl" AUTH_RULE RuleCategory = "auth" LIMIT_RULE RuleCategory = "limit" )
type RuntimeDomain ¶
type RuntimeDomain struct { AppName string `json:"appName"` Domain string `json:"domain"` DomainType string `json:"domainType"` CustomDomain string `json:"customDomain"` RootDomain string `json:"rootDomain"` UseHttps bool `json:"useHttps"` PackageId string `json:"packageId,omitempty"` TenantGroup string `json:"tenantGroup,omitempty"` }
type RuntimeDomainsDto ¶
type RuntimeDomainsDto map[string][]RuntimeDomain
type RuntimeServiceReqDto ¶
type RuntimeServiceReqDto struct { OrgId string `json:"orgId"` ProjectId string `json:"projectID"` Env string `json:"env"` ClusterName string `json:"clusterName"` RuntimeId string `json:"runtimeID"` RuntimeName string `json:"runtimeName"` ReleaseId string `json:"releaseId"` ServiceGroupNamespace string `json:"serviceGroupNamespace"` ProjectNamespace string `json:"projectNamespace"` ServiceGroupName string `json:"serviceGroupName"` AppId string `json:"appID"` AppName string `json:"appName"` Services []ServiceDetailDto `json:"services"` UseApigw bool `json:"useApigw"` }
func (RuntimeServiceReqDto) CheckValid ¶
func (dto RuntimeServiceReqDto) CheckValid() error
type ServiceDetailDto ¶
type ServiceDetailDto struct { ServiceName string `json:"serviceName"` InnerAddress string `json:"innerAddress"` EndpointDomains []EndpointDomainDto `json:"endpointDomains"` }
func (ServiceDetailDto) CheckValid ¶
func (dto ServiceDetailDto) CheckValid() error
type ServiceDomainReqDto ¶
type ServiceDomainReqDto struct { ReleaseId string `json:"releaseId"` Domains []string `json:"domains"` }
func (ServiceDomainReqDto) CheckValid ¶
func (dto ServiceDomainReqDto) CheckValid() error
type SortByRegexList ¶
type SortByRegexList []ZoneKongPolicies
func (SortByRegexList) Len ¶
func (list SortByRegexList) Len() int
func (SortByRegexList) Less ¶
func (list SortByRegexList) Less(i, j int) bool
func (SortByRegexList) Swap ¶
func (list SortByRegexList) Swap(i, j int)
type SortByRuleList ¶
type SortByRuleList []OpenapiRuleInfo
func (SortByRuleList) Len ¶
func (list SortByRuleList) Len() int
func (SortByRuleList) Less ¶
func (list SortByRuleList) Less(i, j int) bool
func (SortByRuleList) Swap ¶
func (list SortByRuleList) Swap(i, j int)
type SortBySceneList ¶
type SortBySceneList []PackageInfoDto
func (SortBySceneList) Len ¶
func (list SortBySceneList) Len() int
func (SortBySceneList) Less ¶
func (list SortBySceneList) Less(i, j int) bool
func (SortBySceneList) Swap ¶
func (list SortBySceneList) Swap(i, j int)
type SortByTypeList ¶
type SortByTypeList []RuntimeDomain
func (SortByTypeList) Len ¶
func (list SortByTypeList) Len() int
func (SortByTypeList) Less ¶
func (list SortByTypeList) Less(i, j int) bool
func (SortByTypeList) Swap ¶
func (list SortByTypeList) Swap(i, j int)
type SubPluginDto ¶
type SubscribeDto ¶
type SubscribeDto struct { SubscriberEmail string `json:"subscriberEmail"` Description string `json:"description"` }
func (SubscribeDto) CheckValid ¶
func (dto SubscribeDto) CheckValid() error
type TenantDto ¶
type TenantDto struct { Id string `json:"id"` TenantGroup string `json:"tenantGroup"` Az string `json:"az"` Env string `json:"env"` ProjectId string `json:"projectId"` ProjectName string `json:"projectName"` AdminAddr string `json:"adminAddr"` GatewayEndpoint string `json:"gatewayEndpoint"` InnerAddr string `json:"innerAddr"` ServiceName string `json:"serviceName"` InstanceId string `json:"instanceId"` }
type UpstreamApiDto ¶
type UpstreamApiDto struct { Path string `json:"path"` GatewayPath string `json:"gatewayPath"` Method string `json:"method"` Address string `json:"address"` IsInner bool `json:"isInner"` IsCustom bool `json:"isCustom"` Doc interface{} `json:"doc"` Name string `json:"name"` }
func FromUpstreamApi ¶ added in v1.3.0
func FromUpstreamApi(api *pb.UpstreamApi) UpstreamApiDto
func (*UpstreamApiDto) Init ¶
func (dto *UpstreamApiDto) Init() bool
type UpstreamLbDto ¶
type UpstreamLbDto struct { Az string `json:"az"` LbName string `json:"lbName"` OrgId string `json:"orgId"` ProjectId string `json:"projectId"` Env string `json:"env"` DeploymentId int `json:"deploymentId"` HealthcheckPath string `json:"healthcheckPath"` Targets []string `json:"targets"` }
func (UpstreamLbDto) IsInvalid ¶
func (dto UpstreamLbDto) IsInvalid() bool
type UpstreamRegisterDto ¶
type UpstreamRegisterDto struct { Az string `json:"az"` UpstreamName string `json:"-"` DiceAppId string `json:"diceAppId"` DiceService string `json:"diceService"` RuntimeName string `json:"runtimeName"` RuntimeId string `json:"runtimeId"` AppName string `json:"appName"` ServiceAlias string `json:"serviceName"` OrgId string `json:"orgId"` ProjectId string `json:"projectId"` Env string `json:"env"` ApiList []UpstreamApiDto `json:"apiList"` OldRegisterId *int `json:"registerId"` RegisterId string `json:"registerTag"` PathPrefix *string `json:"pathPrefix"` }
func FromUpstream ¶ added in v1.3.0
func FromUpstream(u *pb.Upstream) *UpstreamRegisterDto
func (*UpstreamRegisterDto) Init ¶
func (dto *UpstreamRegisterDto) Init() bool
Source Files ¶
- aliyun_app_credential.go
- api_auth_req_dto.go
- api_auth_resp_dto.go
- api_create_resp_dto.go
- api_info_dto.go
- api_prefix_req_dto.go
- api_req_dto.go
- bind_domain_dto.go
- call_mock_dto.go
- category_info_dto.go
- client_info_dto.go
- cloudapi_bind_info.go
- cloudapi_group_info.go
- cloudapi_info.go
- consumer_acls_dto.go
- consumer_all_resp.go
- consumer_api_dto.go
- consumer_api_info_dto.go
- consumer_api_policy_info_dto.go
- consumer_api_req_dto.go
- consumer_create_dto.go
- consumer_dto.go
- consumer_edit_dto.go
- consumer_edit_resp_dto.go
- consumer_info_dto.go
- create_consumer_resp.go
- dice_args_dto.go
- dice_health_dto.go
- dice_info.go
- diceapi_info_dto.go
- gateway_group_info.go
- get_diceapi_dto.go
- get_open_consumer_dto.go
- get_open_limit_rules_dto.go
- get_openapi_dto.go
- get_packages_dto.go
- group_create_dto.go
- group_create_res.go
- group_dto.go
- gw_api_group_dto.go
- gw_api_policy_dto.go
- load_diceapi_dto.go
- manage_domain_info.go
- mock_info_dto.go
- open_limit_rule_dto.go
- open_limit_rule_info_dto.go
- openapi_info_dto.go
- openapi_req_dto.go
- openapi_rule.go
- package_acls_dto.go
- package_info_dto.go
- package_req_dto.go
- path_variable_config.go
- plugin_dto.go
- policy_create_dto.go
- policy_create_resp.go
- policy_dto.go
- publish_authn_dto.go
- publish_dto.go
- register_app_dto.go
- register_dto.go
- runtime_domains_dto.go
- runtime_service_req_dto.go
- service_domain_req_dto.go
- set_route_info.go
- sub_plugin_dto.go
- subscribe_dto.go
- tenant_dto.go
- ui_type_dto.go
- upstream_api_dto.go
- upstream_lb_dto.go
- upstream_register_dto.go
- zone_kong_policies.go
Click to show internal directories.
Click to hide internal directories.