-
Notifications
You must be signed in to change notification settings - Fork 377
/
hepa.go
110 lines (96 loc) · 2.87 KB
/
hepa.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Copyright (c) 2021 Terminus, Inc.
//
// This program is free software: you can use, redistribute, and/or modify
// it under the terms of the GNU Affero General Public License, version 3
// or later ("AGPL"), as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package apistructs
// AuthType
const (
AT_KEY_AUTH = "key-auth"
AT_OAUTH2 = "oauth2"
AT_SIGN_AUTH = "sign-auth"
AT_HMAC_AUTH = "hmac-auth"
AT_ALIYUN_APP = "aliyun-app"
)
// AclType
const (
ACL = "acl"
ACL_NONE = ""
ACL_ON = "on"
ACL_OFF = "off"
)
// Scene
const (
OPENAPI_SCENE = "openapi"
WEBAPI_SCENE = "webapi"
UNITY_SCENE = "unity"
)
type EndpointInfoResponse struct {
Header
Data PackageInfoDto `json:"data"`
}
type ClientInfoResponse struct {
Header
Data ClientInfoDto `json:"data"`
}
type TenantGroupResponse struct {
Header
Data string `json:"data"`
}
type ClientInfoDto struct {
ClientId string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
}
type LimitType struct {
Day *int `json:"qpd,omitempty"`
Hour *int `json:"qph,omitempty"`
Minute *int `json:"qpm,omitempty"`
Second *int `json:"qps,omitempty"`
}
type ChangeLimitsReq struct {
Limits []LimitType `json:"limits"`
}
type OpenapiInfoDto struct {
ApiId string `json:"apiId"`
CreateAt string `json:"createAt"`
DiceApp string `json:"diceApp"`
DiceService string `json:"diceService"`
Origin string `json:"origin"`
Mutable bool `json:"mutable"`
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"`
Description string `json:"description"`
Hosts []string `json:"hosts"`
}
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"`
}
type PackageInfoDto struct {
Id string `json:"id"`
CreateAt string `json:"createAt"`
PackageDto
}