Documentation ¶
Overview ¶
Package utils contains some common functions
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, md5str 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, md5str 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.
Click to show internal directories.
Click to hide internal directories.