Versions in this module Expand all Collapse all v0 v0.6.4 Nov 29, 2015 v0.6.1 Oct 21, 2015 Changes in this version + var APIProxyVersion string + var Assest = &AssestStruct + func DirCheck(filePath string) + func FileExists(filePath string) bool + func InIntSlice(id int, idSli []int) bool + func InStringSlice(str string, strSli []string) bool + func IsContentTypeText(contentType string) bool + func IsRequestDumpBody(req *http.Request) bool + func LoadJSONFile(jsonPath string, obj interface{}) error + func ReqCookieHidden(str string) string + func ResCookieSetHidden(str string) string + func SetInterval(call func(), sec int64) *time.Ticker + func StrSliceIntersectGetOne(a, b []string) string + func StrSliceRandItem(strsli []string) string + func URLPathClean(urlPath string) string + type APIServer struct + Apis map[string]*apiStruct + ConfDir string + Enable bool + Rw sync.RWMutex + ServerConf *serverConfItem + func (apiServer *APIServer) GetCounter() *Counter + func (apiServer *APIServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) + type APIServerManager struct + ConfPath string + LogFile *os.File + func NewAPIServerManager(confPath string) *APIServerManager + func (manager *APIServerManager) Start() + type AssestFile struct + Content string + Mtime int64 + Name string + type AssestStruct struct + Files map[string]*AssestFile + func (statics *AssestStruct) FileHandlerFunc(name string) http.HandlerFunc + func (statics *AssestStruct) GetAssestFile(name string) (*AssestFile, error) + func (statics *AssestStruct) HTTPHandler(pdir string) http.Handler + func (statics AssestStruct) GetContent(name string) string + func (statics AssestStruct) GetFileNames(dir string) []string + type BroadCastData struct + Data map[string]interface{} + ID string + func (d *BroadCastData) String() string + type Caller []*CallerItem + func (caller Caller) Len() int + func (caller Caller) Less(i, j int) bool + func (caller Caller) Sort() + func (caller Caller) Swap(i, j int) + type CallerItem struct + Enable bool + IP string + IPReg *regexp.Regexp + Ignore []string + Note string + Pref []string + type CallerPrefConf struct + func (cpf *CallerPrefConf) AddNewPrefHost(prefType string, hostName string) + func (cpf *CallerPrefConf) AddNewPrefHostRaw(prefType string, str string, spitStr string) + func (cpf *CallerPrefConf) GetIP() string + type Counter struct + Pv map[string]uint64 + TotalPv uint64 + func (c *Counter) AutoSave(sec int64) + func (c *Counter) GetPv(name string) uint64 + func (c *Counter) GetTotalPv() uint64 + func (c *Counter) SaveFile() error + type Host struct + Checked bool + Enable bool + Name string + Note string + SortIndex int + URLStr string + type Hosts map[string]*Host + func (hs Hosts) GetHostsWithPref(pref []string) []*Host + type JSONResult struct + Code int + Data interface{} + Msg string