github.com/polarismesh/polaris@v1.17.8/apiserver/httpserver/proto.go (about) 1 /** 2 * Tencent is pleased to support the open source community by making Polaris available. 3 * 4 * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 5 * 6 * Licensed under the BSD 3-Clause License (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * https://opensource.org/licenses/BSD-3-Clause 11 * 12 * Unless required by applicable law or agreed to in writing, software distributed 13 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 14 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 15 * specific language governing permissions and limitations under the License. 16 */ 17 18 package httpserver 19 20 import ( 21 "github.com/golang/protobuf/proto" 22 apiconfig "github.com/polarismesh/specification/source/go/api/v1/config_manage" 23 apimodel "github.com/polarismesh/specification/source/go/api/v1/model" 24 apisecurity "github.com/polarismesh/specification/source/go/api/v1/security" 25 apiservice "github.com/polarismesh/specification/source/go/api/v1/service_manage" 26 ) 27 28 // NamespaceArr 命名空间数组定义 29 type NamespaceArr []*apimodel.Namespace 30 31 // Reset 重置初始化 32 func (m *NamespaceArr) Reset() { *m = NamespaceArr{} } 33 34 // String return string 35 func (m *NamespaceArr) String() string { return proto.CompactTextString(m) } 36 37 // ProtoMessage return proto message 38 func (*NamespaceArr) ProtoMessage() {} 39 40 // ConfigReleaseArr 发布规则数组定义 41 type ConfigReleaseArr []*apiservice.ConfigRelease 42 43 // Reset reset initialization 44 func (m *ConfigReleaseArr) Reset() { *m = ConfigReleaseArr{} } 45 46 // String return string 47 func (m *ConfigReleaseArr) String() string { return proto.CompactTextString(m) } 48 49 // ProtoMessage return proto message 50 func (*ConfigReleaseArr) ProtoMessage() {} 51 52 // ServiceAliasArr 服务实例数组定义 53 type ServiceAliasArr []*apiservice.ServiceAlias 54 55 // Reset reset initialization 56 func (m *ServiceAliasArr) Reset() { *m = ServiceAliasArr{} } 57 58 // String return string 59 func (m *ServiceAliasArr) String() string { return proto.CompactTextString(m) } 60 61 // ProtoMessage proto message 62 func (*ServiceAliasArr) ProtoMessage() {} 63 64 // ConfigFileArr 配置文件数组定义 65 type ConfigFileArr []*apiconfig.ConfigFile 66 67 // Reset reset initialization 68 func (m *ConfigFileArr) Reset() { *m = ConfigFileArr{} } 69 70 // String return string 71 func (m *ConfigFileArr) String() string { return proto.CompactTextString(m) } 72 73 // ProtoMessage proto message 74 func (*ConfigFileArr) ProtoMessage() {} 75 76 // UserArr 命名空间数组定义 77 type UserArr []*apisecurity.User 78 79 // Reset 清空数组 80 func (m *UserArr) Reset() { *m = UserArr{} } 81 82 // String return string 83 func (m *UserArr) String() string { return proto.CompactTextString(m) } 84 85 // ProtoMessage return proto message 86 func (*UserArr) ProtoMessage() {} 87 88 // GroupArr 命名空间数组定义 89 type GroupArr []*apisecurity.UserGroup 90 91 // Reset 清空数组 92 func (m *GroupArr) Reset() { *m = GroupArr{} } 93 94 // String return string 95 func (m *GroupArr) String() string { return proto.CompactTextString(m) } 96 97 // ProtoMessage return proto message 98 func (*GroupArr) ProtoMessage() {} 99 100 // ModifyGroupArr 命名空间数组定义 101 type ModifyGroupArr []*apisecurity.ModifyUserGroup 102 103 // Reset 清空数组 104 func (m *ModifyGroupArr) Reset() { *m = ModifyGroupArr{} } 105 106 // String return string 107 func (m *ModifyGroupArr) String() string { return proto.CompactTextString(m) } 108 109 // ProtoMessage return proto message 110 func (*ModifyGroupArr) ProtoMessage() {} 111 112 // StrategyArr 命名空间数组定义 113 type StrategyArr []*apisecurity.AuthStrategy 114 115 // Reset 清空数组 116 func (m *StrategyArr) Reset() { *m = StrategyArr{} } 117 118 // String return string 119 func (m *StrategyArr) String() string { return proto.CompactTextString(m) } 120 121 // ProtoMessage return proto message 122 func (*StrategyArr) ProtoMessage() {} 123 124 // ModifyStrategyArr 命名空间数组定义 125 type ModifyStrategyArr []*apisecurity.ModifyAuthStrategy 126 127 // Reset 清空数组 128 func (m *ModifyStrategyArr) Reset() { *m = ModifyStrategyArr{} } 129 130 // String return string 131 func (m *ModifyStrategyArr) String() string { return proto.CompactTextString(m) } 132 133 // ProtoMessage return proto message 134 func (*ModifyStrategyArr) ProtoMessage() {} 135 136 // AuthResourceArr 命名空间数组定义 137 type AuthResourceArr []*apisecurity.StrategyResources 138 139 // Reset 清空数组 140 func (m *AuthResourceArr) Reset() { *m = AuthResourceArr{} } 141 142 // String return string 143 func (m *AuthResourceArr) String() string { return proto.CompactTextString(m) } 144 145 // ProtoMessage return proto message 146 func (*AuthResourceArr) ProtoMessage() {}