Documentation ¶
Index ¶
- Variables
- func ChangeOldAppPort()
- func CheckInSlice(str string, list []string) bool
- func CheckIntersect(original, extras []string) bool
- func ClearPid()
- func DetectPortIsFree() bool
- func FileExists(name string) bool
- func LogErr()
- func ReadPid() int
- func RemoveStringFromStringSlice(str string, elements []string) []string
- func ReplacePid()
- func SliceCountValues(input []string) map[string]int
- func StringReplaceBySlice(subject string, search, replace []string) string
- func WritePid(pid int)
- type CommonCache
- type HttpLib
Constants ¶
This section is empty.
Variables ¶
View Source
var Log *log.Entry
View Source
var Port = conf.AppConfig.UString("port")
Functions ¶
func ChangeOldAppPort ¶
func ChangeOldAppPort()
func CheckIntersect ¶
util, check slices intersects
func RemoveStringFromStringSlice ¶
util, remove string from slice
func ReplacePid ¶
func ReplacePid()
func SliceCountValues ¶
func StringReplaceBySlice ¶
replace substrings in string by search=>replace slices
Types ¶
type CommonCache ¶
type CommonCache struct {
// contains filtered or unexported fields
}
var Cache *CommonCache
func (*CommonCache) Get ¶
func (c *CommonCache) Get(key string) (interface{}, bool)
get cache value by key
func (*CommonCache) Set ¶
func (c *CommonCache) Set(key string, value interface{}, minutes int)
set cache value, if minutes is 0 - caching forever
type HttpLib ¶
type HttpLib struct { XCallingService string `json:"x_calling_service"` XCallingMethod string `json:"x_calling_method"` }
request headers
func (*HttpLib) GetRequestHeaders ¶
func (*HttpLib) ResponseWriter ¶
func (h *HttpLib) ResponseWriter(request *http.Request, w http.ResponseWriter, response interface{})
gzip/plain writer
Click to show internal directories.
Click to hide internal directories.