Documentation ¶
Index ¶
- Variables
- func CheckAddressByTcp(address string, port int, timeout time.Duration, logger logr.Logger) (bool, error)
- func CheckAddressSSHLived(address string, timeSecond time.Duration, logger logr.Logger) bool
- func ContainsString(slice []string, s string, modifier func(s string) string) bool
- func FormatString(str string) string
- func MapMerge(m1 map[string]interface{}, m2 map[string]interface{}) map[string]interface{}
- func MapMergeString(m1 map[string]string, m2 map[string]string) map[string]string
- func MaxIntSlice(v []int) int
- func ParseInput(logger logr.Logger, request *restful.Request, response *restful.Response, ...) ([]string, error)
- func RandPassword() string
- func RandString(n int) string
- func ReadHttpPostBody(logger logr.Logger, request *restful.Request, response *restful.Response) ([]byte, error)
- func RemoveString(slice []string, s string, modifier func(s string) string) []string
- func SortStrings(s []string) []string
- type CacheProvider
- type ResponseNilMsg
- type ResponseWithMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SuccessResponse = ResponseNilMsg{Status: "ok"}
)
Functions ¶
func CheckAddressByTcp ¶
func CheckAddressSSHLived ¶
func ContainsString ¶
func FormatString ¶
func MapMergeString ¶
func MaxIntSlice ¶
func ParseInput ¶
func RandPassword ¶
func RandPassword() string
func RandString ¶
func ReadHttpPostBody ¶
func RemoveString ¶
func SortStrings ¶
Types ¶
type CacheProvider ¶
type CacheProvider struct {
// contains filtered or unexported fields
}
func GetCacheProvider ¶
func GetCacheProvider() *CacheProvider
func (*CacheProvider) Add ¶
func (c *CacheProvider) Add(key string, value interface{}) error
func (*CacheProvider) Delete ¶
func (c *CacheProvider) Delete(key string) error
func (*CacheProvider) Get ¶
func (c *CacheProvider) Get(key string) (value interface{}, exists bool, err error)
func (*CacheProvider) Update ¶
func (c *CacheProvider) Update(key string, value interface{}) error
type ResponseNilMsg ¶
type ResponseNilMsg struct {
Status string `json:"status"`
}
type ResponseWithMsg ¶
type ResponseWithMsg struct { Status string `json:"status"` Msg map[string]interface{} `json:"msg"` }
func ResponseSucInitFactory ¶
func ResponseSucInitFactory() *ResponseWithMsg
Click to show internal directories.
Click to hide internal directories.