Documentation
¶
Index ¶
- Constants
- Variables
- func DeRegisterModules(ms ...string)
- func Init(ctx context.Context)
- func Plugin(prefix string, middleware ...ghttp.HandlerFunc) ghttp.Plugin
- func RegisterModules(ms ...string)
- func SetAdaptor(adaptor RecordAdaptor)
- func SupportedModules() []string
- func Sys(ctx context.Context, event string, content ...interface{})
- type ILogger
- type MysqlAdaptor
- type Record
- type RecordAdaptor
- type RecordContent
- type RecordQueryParams
- type RecordQueryResult
Constants ¶
View Source
const ( EventShutdown = "shutdown" EventStartUp = "startup" )
View Source
const (
ModuleSystem = "system"
)
Variables ¶
View Source
var (
Logger *logger
)
Functions ¶
func DeRegisterModules ¶
func DeRegisterModules(ms ...string)
func RegisterModules ¶
func RegisterModules(ms ...string)
func SetAdaptor ¶
func SetAdaptor(adaptor RecordAdaptor)
func SupportedModules ¶
func SupportedModules() []string
Types ¶
type MysqlAdaptor ¶
type MysqlAdaptor struct {
// contains filtered or unexported fields
}
func NewMysqlAdaptor ¶
func (*MysqlAdaptor) Load ¶
func (m *MysqlAdaptor) Load(ctx context.Context, params *RecordQueryParams) (res *RecordQueryResult, err error)
type RecordAdaptor ¶
type RecordAdaptor interface {
Store(ctx context.Context, record *Record) (err error)
Load(ctx context.Context, params *RecordQueryParams) (res *RecordQueryResult, err error)
}
type RecordContent ¶
type RecordContent struct {
Meta *meta.Meta `json:"meta"`
Value interface{} `json:"value"`
Error string `json:"error"`
}
func Content ¶
func Content(ctx context.Context, v ...interface{}) *RecordContent
type RecordQueryParams ¶
type RecordQueryResult ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.