Documentation ¶
Index ¶
- Constants
- func NewControllerSingleFlight() eudore.Controller
- func NewPairs(keys []string) *pairs
- type Call
- type ControllerSingleFlight
- func (ctl *ControllerSingleFlight) ControllerRoute() map[string]string
- func (ctl *ControllerSingleFlight) Do(fn func() (interface{}, error)) (interface{}, error)
- func (ctl *ControllerSingleFlight) DoWithKey(key string, fn func() (interface{}, error)) (interface{}, error)
- func (ctl *ControllerSingleFlight) GetRouteParam(pkg, name, method string) string
- func (ctl *ControllerSingleFlight) Init(ctx eudore.Context) error
- func (ctl *ControllerSingleFlight) Inject(controller eudore.Controller, router eudore.RouterMethod) error
- func (ctl *ControllerSingleFlight) Release() error
- type ControllerStatic
- func (ctl *ControllerStatic) AddLabel(str string)
- func (ctl *ControllerStatic) AddMeta(name, content string)
- func (ctl *ControllerStatic) Clone() *ControllerStatic
- func (ctl *ControllerStatic) GetPathBody(path string) (io.ReadCloser, error)
- func (ctl *ControllerStatic) GetSha512Value(path string) (string, error)
- func (ctl *ControllerStatic) Init(ctx eudore.Context) error
- func (ctl *ControllerStatic) NewHTMLHandlerFunc(path string) eudore.HandlerFunc
- func (ctl *ControllerStatic) NewMergeFileHandlerFunc(parent string) eudore.HandlerFunc
- func (ctl *ControllerStatic) NewStaticHandlerFunc(perfix string) eudore.HandlerFunc
- func (ctl *ControllerStatic) OpenMergeFile(path string) (*MergeFile, error)
- func (ctl *ControllerStatic) PushAll(path string) error
- func (ctl *ControllerStatic) WithPushHook()
- func (ctl *ControllerStatic) WithSRIHook()
- func (ctl *ControllerStatic) WriteHTML(path string) error
- type ControllerWebsite
- func (ctl *ControllerWebsite) ControllerRoute() map[string]string
- func (ctl *ControllerWebsite) Exec(query string, args ...interface{}) (sql.Result, error)
- func (ctl *ControllerWebsite) ExecBodyWithJSON(sql string, keys ...string) error
- func (ctl *ControllerWebsite) GetRouteParam(pkg, name, method string) string
- func (ctl *ControllerWebsite) Init(ctx eudore.Context) error
- func (ctl *ControllerWebsite) Inject(controller eudore.Controller, router eudore.RouterMethod) error
- func (ctl *ControllerWebsite) QueryBind(data interface{}, query string, args ...interface{}) error
- func (ctl *ControllerWebsite) QueryBindContext(ctx context.Context, data interface{}, query string, args ...interface{}) error
- func (ctl *ControllerWebsite) QueryCount(query string, args ...interface{}) int
- func (ctl *ControllerWebsite) QueryCountContext(ctx context.Context, query string, args ...interface{}) int
- func (ctl *ControllerWebsite) QueryJSON(query string, args ...interface{}) (map[string]interface{}, error)
- func (ctl *ControllerWebsite) QueryJSONContext(ctx context.Context, query string, args ...interface{}) (map[string]interface{}, error)
- func (ctl *ControllerWebsite) QueryPages(query string, args ...interface{}) ([]map[string]interface{}, error)
- func (ctl *ControllerWebsite) QueryPagesContext(ctx context.Context, query string, args ...interface{}) ([]map[string]interface{}, error)
- func (ctl *ControllerWebsite) QueryRows(query string, args ...interface{}) ([]map[string]interface{}, error)
- func (ctl *ControllerWebsite) QueryRowsContext(ctx context.Context, query string, args ...interface{}) ([]map[string]interface{}, error)
- func (ctl *ControllerWebsite) Release() error
- type HeadLabel
- type MergeFile
- type StaticHook
Constants ¶
View Source
const TimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
Variables ¶
This section is empty.
Functions ¶
func NewControllerSingleFlight ¶
func NewControllerSingleFlight() eudore.Controller
Types ¶
type ControllerSingleFlight ¶
type ControllerSingleFlight struct { eudore.ContextData // contains filtered or unexported fields }
func (*ControllerSingleFlight) ControllerRoute ¶
func (ctl *ControllerSingleFlight) ControllerRoute() map[string]string
ControllerRoute 方法返回默认路由信息。
func (*ControllerSingleFlight) Do ¶
func (ctl *ControllerSingleFlight) Do(fn func() (interface{}, error)) (interface{}, error)
func (*ControllerSingleFlight) DoWithKey ¶
func (ctl *ControllerSingleFlight) DoWithKey(key string, fn func() (interface{}, error)) (interface{}, error)
func (*ControllerSingleFlight) GetRouteParam ¶
func (ctl *ControllerSingleFlight) GetRouteParam(pkg, name, method string) string
GetRouteParam 方法添加路由参数信息。
func (*ControllerSingleFlight) Init ¶
func (ctl *ControllerSingleFlight) Init(ctx eudore.Context) error
Init 实现控制器初始方法。
func (*ControllerSingleFlight) Inject ¶
func (ctl *ControllerSingleFlight) Inject(controller eudore.Controller, router eudore.RouterMethod) error
Inject 方法实现控制器注入到路由器的方法。
func (*ControllerSingleFlight) Release ¶
func (ctl *ControllerSingleFlight) Release() error
Release 实现控制器释放方法。
type ControllerStatic ¶
type ControllerStatic struct { eudore.Context Hook StaticHook Meta []HeadLabel // contains filtered or unexported fields }
func NewControllerStatic ¶
func NewControllerStatic() *ControllerStatic
func (*ControllerStatic) AddLabel ¶
func (ctl *ControllerStatic) AddLabel(str string)
func (*ControllerStatic) AddMeta ¶
func (ctl *ControllerStatic) AddMeta(name, content string)
func (*ControllerStatic) Clone ¶
func (ctl *ControllerStatic) Clone() *ControllerStatic
func (*ControllerStatic) GetPathBody ¶
func (ctl *ControllerStatic) GetPathBody(path string) (io.ReadCloser, error)
func (*ControllerStatic) GetSha512Value ¶
func (ctl *ControllerStatic) GetSha512Value(path string) (string, error)
计算SRI512
func (*ControllerStatic) NewHTMLHandlerFunc ¶
func (ctl *ControllerStatic) NewHTMLHandlerFunc(path string) eudore.HandlerFunc
func (*ControllerStatic) NewMergeFileHandlerFunc ¶
func (ctl *ControllerStatic) NewMergeFileHandlerFunc(parent string) eudore.HandlerFunc
func (*ControllerStatic) NewStaticHandlerFunc ¶
func (ctl *ControllerStatic) NewStaticHandlerFunc(perfix string) eudore.HandlerFunc
func (*ControllerStatic) OpenMergeFile ¶
func (ctl *ControllerStatic) OpenMergeFile(path string) (*MergeFile, error)
func (*ControllerStatic) PushAll ¶
func (ctl *ControllerStatic) PushAll(path string) error
func (*ControllerStatic) WithPushHook ¶
func (ctl *ControllerStatic) WithPushHook()
func (*ControllerStatic) WithSRIHook ¶
func (ctl *ControllerStatic) WithSRIHook()
func (*ControllerStatic) WriteHTML ¶
func (ctl *ControllerStatic) WriteHTML(path string) error
type ControllerWebsite ¶
type ControllerWebsite struct { eudore.ContextData *sql.DB }
func NewControllerWejass ¶
func NewControllerWejass(db *sql.DB) *ControllerWebsite
func (*ControllerWebsite) ControllerRoute ¶
func (ctl *ControllerWebsite) ControllerRoute() map[string]string
ControllerRoute 方法返回默认路由信息。
func (*ControllerWebsite) Exec ¶
func (ctl *ControllerWebsite) Exec(query string, args ...interface{}) (sql.Result, error)
Exec executes a query without returning any rows. The args are for any placeholder parameters in the query.
func (*ControllerWebsite) ExecBodyWithJSON ¶
func (ctl *ControllerWebsite) ExecBodyWithJSON(sql string, keys ...string) error
func (*ControllerWebsite) GetRouteParam ¶
func (ctl *ControllerWebsite) GetRouteParam(pkg, name, method string) string
GetRouteParam 方法添加路由参数信息。
func (*ControllerWebsite) Init ¶
func (ctl *ControllerWebsite) Init(ctx eudore.Context) error
Init 实现控制器初始方法。
func (*ControllerWebsite) Inject ¶
func (ctl *ControllerWebsite) Inject(controller eudore.Controller, router eudore.RouterMethod) error
Inject 方法实现控制器注入到路由器的方法,调用ControllerBaseInject方法注入。
func (*ControllerWebsite) QueryBind ¶
func (ctl *ControllerWebsite) QueryBind(data interface{}, query string, args ...interface{}) error
func (*ControllerWebsite) QueryBindContext ¶
func (ctl *ControllerWebsite) QueryBindContext(ctx context.Context, data interface{}, query string, args ...interface{}) error
func (*ControllerWebsite) QueryCount ¶
func (ctl *ControllerWebsite) QueryCount(query string, args ...interface{}) int
QueryCount
func (*ControllerWebsite) QueryCountContext ¶
func (ctl *ControllerWebsite) QueryCountContext(ctx context.Context, query string, args ...interface{}) int
QueryCountContext
func (*ControllerWebsite) QueryJSON ¶
func (ctl *ControllerWebsite) QueryJSON(query string, args ...interface{}) (map[string]interface{}, error)
func (*ControllerWebsite) QueryJSONContext ¶
func (*ControllerWebsite) QueryPages ¶
func (ctl *ControllerWebsite) QueryPages(query string, args ...interface{}) ([]map[string]interface{}, error)
QueryPages 方法对查询结构分页,使用url参数size和page作为分页参数,对查询sql后附加sql: " limit %d OFFSET %d"。
func (*ControllerWebsite) QueryPagesContext ¶
func (ctl *ControllerWebsite) QueryPagesContext(ctx context.Context, query string, args ...interface{}) ([]map[string]interface{}, error)
QueryContextPages 方法对查询结构分页,使用url参数size和page作为分页参数,对查询sql后附加sql: " limit %d OFFSET %d"。
func (*ControllerWebsite) QueryRows ¶
func (ctl *ControllerWebsite) QueryRows(query string, args ...interface{}) ([]map[string]interface{}, error)
func (*ControllerWebsite) QueryRowsContext ¶
func (*ControllerWebsite) Release ¶
func (ctl *ControllerWebsite) Release() error
Release 实现控制器释放方法。
type StaticHook ¶
type StaticHook func(*ControllerStatic, HeadLabel)
Click to show internal directories.
Click to hide internal directories.