Documentation
¶
Index ¶
- Variables
- func Contains(strList []string, str string) bool
- func ConvertTypeByJson(srcObj interface{}, destPtr interface{}) (err error)
- func CreateUUID() string
- func Encrypt(key string) string
- func ExtractTgzBytes(tgzBytes []byte) (map[string][]byte, error)
- func GenerateCert(host string, validFor time.Duration, isCA bool, ecdsaCurve string) error
- func GetCodeRepoName(codeUrl string) string
- func GetImageName(img string) string
- func GetMapStringValue(m map[string]interface{}, k string) (s string, ok bool)
- func HandleCrash(additionalHandlers ...func(interface{}))
- func LookupEnvOrInt(key string, defaultVal int) int
- func LookupEnvOrString(key string, defaultVal string) string
- func MaxInt64(x int64, ys ...int64) int64
- func MergeMap(mObj ...map[string]interface{}) map[string]interface{}
- func MergeReplaceMap(mObj ...map[string]interface{}) map[string]interface{}
- func MinInt64(x int64, ys ...int64) int64
- func NextTriggerTime(spec string) (t time.Time, err error)
- func ParseBool(str string) bool
- func ParseImageName(img string, withDefault bool) (string, string, string)
- func ParseUint(s string) (uint, error)
- func PathExist(path string) bool
- func ReplaceYamlPathValue(yamlBytes []byte, pathVal map[string]string) ([]byte, error)
- func RequestHost(r *http.Request) (host string)
- func ShortUUID() string
- func StringNow() string
- func StringPtr(s string) *string
- func VerifyEmailFormat(email string) bool
- func VerifyMobileFormat(mobileNum string) bool
- type Response
- type WatchResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var CSTZone = time.FixedZone("GMT", 8*3600)
Functions ¶
func ConvertTypeByJson ¶
func ConvertTypeByJson(srcObj interface{}, destPtr interface{}) (err error)
func CreateUUID ¶
func CreateUUID() string
func GenerateCert ¶
func GetCodeRepoName ¶
GetCodeRepoName 获取代码库的项目名 如:https://github.com/test/testrepo.git -> testrepo git@github.com/test/testrepo.git -> testrepo
func GetImageName ¶
GetImageName 获取镜像的名称 如:docker.io/kubespace/kubespace:latest -> kubespace/kubespace
func GetMapStringValue ¶
func HandleCrash ¶
func HandleCrash(additionalHandlers ...func(interface{}))
func LookupEnvOrInt ¶
func LookupEnvOrString ¶
func MergeReplaceMap ¶
func ParseImageName ¶
ParseImageName 获取镜像的名称 如:docker.io/kubespace/kubespace:latest -> docker.io kubespace/kubespace latest
func ReplaceYamlPathValue ¶
ReplaceYamlPathValue 替换YAML内容path的值,且不改变原yaml其余内容 如path=a.b,即将 a:
b: xx
xx值进行替换
func VerifyEmailFormat ¶
func VerifyMobileFormat ¶
VerifyMobileFormat mobile verify
Types ¶
type WatchResponse ¶
Click to show internal directories.
Click to hide internal directories.