Documentation ¶
Index ¶
- func CheckAccess(path string, group []string, request interface{}) int
- func ClearRemoteConfig(name string)
- func CreateSequence() string
- func GetConfigPath() string
- func GetContentType(extname string) string
- func GetDB(ctx *Context, name ...interface{}) (*dbx.DBConnect, error)
- func GetHttpResult(ctx *Context, link string, params ...map[string]string) []byte
- func GetRedis(ctx *Context, name ...interface{}) (*redis.Client, error)
- func GetRemoteConfig(ctx *Context, name string) (*yaml.YAMLNode, error)
- func GetRemoteDBConfig(ctx *Context, name string) (*dbx.Config, error)
- func GetRemoteResult(path string, params ...map[string]string) (*http.Response, error)
- func IsObjectClass(clazz string) bool
- func Publish(src, dest string) bool
- func PublishZip(src, dest string)
- func PublishZipBuffer(buffer []byte, dest string)
- func Register(proc interface{}, args ...string)
- func ResponseJson(out http.ResponseWriter, dest interface{})
- func SyncRemoteConfig(typ string, name string)
- func UpdateAccess(host string, port int) bool
- func UpdateRoute(host string, port int)
- type AccessItem
- type AccessItemList
- type AppConfig
- type Config
- type Context
- func (ctx Context) Debug(format string, args ...interface{})
- func (ctx Context) DebugPrint(args ...interface{})
- func (ctx Context) Error(format string, args ...interface{})
- func (ctx Context) ErrorPrint(args ...interface{})
- func (ctx Context) GetDB(name ...interface{}) (*dbx.DBConnect, error)
- func (ctx Context) GetPath() string
- func (ctx Context) GetRequest() interface{}
- func (ctx Context) GetResponse() interface{}
- func (ctx Context) GetTraceId() string
- func (ctx Context) Info(format string, args ...interface{})
- func (ctx Context) InfoPrint(args ...interface{})
- func (ctx Context) Notice(format string, args ...interface{})
- func (ctx Context) NoticePrint(args ...interface{})
- func (ctx Context) Tips(format string, args ...interface{})
- func (ctx Context) TipsPrint(args ...interface{})
- func (ctx Context) Trace(format string, args ...interface{})
- func (ctx Context) TracePrint(args ...interface{})
- type Document
- type DocumentList
- type FieldItem
- type FileItem
- type HostItem
- type LogConfig
- type RedisConfig
- type RouteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAccess ¶
func ClearRemoteConfig ¶
func ClearRemoteConfig(name string)
func CreateSequence ¶
func CreateSequence() string
func GetConfigPath ¶
func GetConfigPath() string
func GetContentType ¶
func GetHttpResult ¶
func GetRemoteResult ¶
func IsObjectClass ¶
func PublishZip ¶
func PublishZip(src, dest string)
func PublishZipBuffer ¶
func ResponseJson ¶
func ResponseJson(out http.ResponseWriter, dest interface{})
func SyncRemoteConfig ¶
func UpdateAccess ¶
func UpdateRoute ¶
Types ¶
type AccessItem ¶
type AccessItemList ¶
type AccessItemList []AccessItem
func (AccessItemList) Len ¶
func (list AccessItemList) Len() int
func (AccessItemList) Less ¶
func (list AccessItemList) Less(i, j int) bool
func (AccessItemList) Swap ¶
func (list AccessItemList) Swap(i, j int)
type AppConfig ¶
type AppConfig struct { RouteConfig Id int Name string Path string Route RouteConfig }
type Config ¶
type Config struct { App AppConfig Log LogConfig Redis RedisConfig Datebase dbx.Config }
func LoadConfig ¶
type Context ¶
func NewContext ¶
func (Context) DebugPrint ¶
func (ctx Context) DebugPrint(args ...interface{})
func (Context) ErrorPrint ¶
func (ctx Context) ErrorPrint(args ...interface{})
func (Context) GetRequest ¶
func (ctx Context) GetRequest() interface{}
func (Context) GetResponse ¶
func (ctx Context) GetResponse() interface{}
func (Context) GetTraceId ¶
func (Context) NoticePrint ¶
func (ctx Context) NoticePrint(args ...interface{})
func (Context) TracePrint ¶
func (ctx Context) TracePrint(args ...interface{})
type Document ¶
type Document struct { Path string Group string Access string Remark string Extdata string Request string Response string FieldList []FieldItem RequestType reflect.Type ResponseType reflect.Type }
func AddDocument ¶
func GetDocument ¶
type DocumentList ¶
type DocumentList []Document
func GetDocumentList ¶
func GetDocumentList() DocumentList
func (DocumentList) Len ¶
func (list DocumentList) Len() int
func (DocumentList) Less ¶
func (list DocumentList) Less(i, j int) bool
func (DocumentList) Swap ¶
func (list DocumentList) Swap(i, j int)
type FieldItem ¶
type FieldItem struct { Name string Type reflect.Type Regex *regexp.Regexp Option []string Remark string RangeT int64 RangeX int64 RangeY int64 RangeXF float64 RangeYF float64 Required bool }
func NewFieldItem ¶
func NewFieldItem(field reflect.StructField) FieldItem
func (*FieldItem) CheckOption ¶
func (*FieldItem) CheckRange ¶
func (*FieldItem) CheckValue ¶
func (*FieldItem) GetOptionString ¶
type FileItem ¶
type FileItem struct {
// contains filtered or unexported fields
}
func GetFileItem ¶
type HostItem ¶
type HostItem struct { Host string `json:"host"` Port int `json:"port"` Weight int `json:"weight"` }
func GetRouteHost ¶
func GetRouteHost() *HostItem
type RedisConfig ¶
type RedisConfig struct { RouteConfig Password string }
type RouteConfig ¶
func (RouteConfig) String ¶ added in v0.0.3
func (obj RouteConfig) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.