Documentation ¶
Overview ¶
* Tencent is pleased to support the open source community by making Polaris available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/BSD-3-Clause * * 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 ¶
- func CalMd5(content string) string
- func CheckContentLength(content string) error
- func CheckFileName(name *wrappers.StringValue) error
- func CheckResourceName(name *wrappers.StringValue) error
- func FromTagJson(tagStr string) []*api.ConfigFileTag
- func GenConfigFileResponse(namespace, group, fileName, content, md5 string, version uint64) *api.ConfigClientResponse
- func GenReleaseName(oldReleaseName, fileName string) string
- func ToTagJsonStr(tags []*api.ConfigFileTag) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResourceName ¶
func CheckResourceName(name *wrappers.StringValue) error
CheckResourceName 检查资源名称
func FromTagJson ¶
func FromTagJson(tagStr string) []*api.ConfigFileTag
FromTagJson 从 Tags Json 字符串里反序列化出 Tags
func GenConfigFileResponse ¶
func GenConfigFileResponse(namespace, group, fileName, content, md5 string, version uint64) *api.ConfigClientResponse
GenConfigFileResponse 为客户端生成响应对象
func GenReleaseName ¶
GenReleaseName 生成发布名称,规则是 filename-${三位自增长序列}
func ToTagJsonStr ¶
func ToTagJsonStr(tags []*api.ConfigFileTag) string
ToTagJsonStr 把 Tags 转化成 Json 字符串
Types ¶
This section is empty.