Documentation ¶
Index ¶
- Constants
- func ApiResponse(status bool, info interface{}) map[string]interface{}
- func AuthServerConfigFile() string
- func Base64Decoding(encodeString string) string
- func Base64Encoding(str string) string
- func DeleteResponse(err error, ctx context.Context, info string, username interface{}, ...) map[string]interface{}
- func GetClientIp(r *http.Request) string
- func GetDate() string
- func GetMinTime(ctime string) string
- func GetReferer(ctx context.Context) string
- func GetResponseResult(err error, draw interface{}, returnData interface{}, totle interface{}) map[string]interface{}
- func GetSelectOption(name string, value string, title string) string
- func GetSelectOptionName(name string) string
- func GetTableRows(table string)
- func GetUri(ctx context.Context) string
- func GetUser(user interface{}) string
- func HttpGetJson(data string, url string) map[string]interface{}
- func Json2Yaml(jsondata string) string
- func LdapLoginAuth(username string, passowrd string) (bool, error)
- func ListExistsInt(arr []int, value int) bool
- func ListExistsString(arr []string, value string) bool
- func MakeImageTag() string
- func Md5String(str string) string
- func Md5Uuid() string
- func MergerStruct(a interface{}, b interface{})
- func Namespace(appname string, resource string) string
- func ObjToString(v interface{}) string
- func ReadFile(filename string) string
- func RedisCacheClient(key string) (cache.Cache, error)
- func RedisObj2Obj(r interface{}, o interface{}) bool
- func ReplaceTime(t string) string
- func ResponseMap(listResult interface{}, total interface{}, draw interface{}) map[string]interface{}
- func ResponseMapError(err string) map[string]interface{}
- func SaveOperLog(user interface{}, ctx context.Context, info string, clusterName string)
- func SaveResponse(err error, errmsg string) (map[string]interface{}, string)
- func SetPublicData(src interface{}, username string, obj interface{})
- func StringToInt(v string) interface{}
- func StringsToJSON(str string) string
- func TimeToStamp(ctime string) int64
- func WriteLock(key string, lock *Lock, timeout int64) bool
- func Yaml2Json(input []byte) (map[string]interface{}, error)
- type Lock
- type MapLock
- type Param
Constants ¶
View Source
const ADMIN = "admin"
Variables ¶
This section is empty.
Functions ¶
func DeleteResponse ¶
func DeleteResponse(err error, ctx context.Context, info string, username interface{}, cluster string, r gosql.Result) map[string]interface{}
删除时返回的响应数据
func GetMinTime ¶
2018-01-15 13:30 获取时间简单格式 util.GetMinTime("2018-01-15 14:40:49")
func GetResponseResult ¶
func GetResponseResult(err error, draw interface{}, returnData interface{}, totle interface{}) map[string]interface{}
2018-01-31 09:30 获取响应数据
func GetSelectOption ¶
生成htmlselect的内容 2018-01-26 10:57
func HttpGetJson ¶
2018-03-24 17:03 发送json请求
func LdapLoginAuth ¶
ldap登录验证 2018-01-19 09:59
func ListExistsString ¶
检查某个slice有某个数据 2018-02-05 21:06
func RedisObj2Obj ¶
func RedisObj2Obj(r interface{}, o interface{}) bool
2018-02-19 08:51 redis数据转换到对象中
func ResponseMap ¶
func ResponseMap(listResult interface{}, total interface{}, draw interface{}) map[string]interface{}
为表格提供的数据 return
func SaveOperLog ¶
记录操作日志
func SaveResponse ¶
保存成功提示信息
func SetPublicData ¶
func SetPublicData(src interface{}, username string, obj interface{})
2018-02-04 将一些公共数据写好
func StringsToJSON ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.