Documentation ¶
Index ¶
- Variables
- func PermisMiddleware(r *znet.Engine, ignore ...string) error
- func SendRealtime(uid string, data string, event ...string) bool
- type AccountModel
- type Index
- func (h *Index) AnyLogout(c *znet.Context) (any, error)
- func (h *Index) AnyPassword(c *znet.Context) (data any, err error)
- func (h *Index) GetInfo(c *znet.Context) (interface{}, error)
- func (h *Index) GetLogs(c *znet.Context) (data any, err error)
- func (h *Index) GetMessage(c *znet.Context) (data ztype.Map, err error)
- func (h *Index) Init(r *znet.Engine) error
- func (h *Index) POSTAvatar(c *znet.Context) (any, error)
- func (h *Index) PatchMe(c *znet.Context) (any, error)
- type Message
- type MessageModel
- type Module
- type Options
- type User
- func (h *User) Get(c *znet.Context) (data *model.PageData, err error)
- func (h *User) Init(r *znet.Engine) error
- func (h *User) Post(c *znet.Context) (id interface{}, err error)
- func (h *User) UIDDELETE(c *znet.Context) (res interface{}, err error)
- func (h *User) UIDPut(c *znet.Context) (res interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Inside = &inside{}
View Source
var Request = &requestWith{}
Functions ¶
Types ¶
type AccountModel ¶
func GetAccountModel ¶
func GetAccountModel() *AccountModel
type Index ¶
func (*Index) AnyPassword ¶
AnyPassword 修改密码
func (*Index) GetMessage ¶
GetMessage 站内消息
func (*Index) POSTAvatar ¶
POSTAvatar 上传用户头像
type MessageModel ¶
func GetMessageModel ¶
func GetMessageModel() (*MessageModel, error)
func (*MessageModel) SendMessage ¶
func (m *MessageModel) SendMessage(from, to, title, message string, mtype ...string) (err error)
type Module ¶
type Module struct { service.ModuleLifeCycle service.App Options *Options Controllers []service.Controller // contains filtered or unexported fields }
func (*Module) Controller ¶
func (m *Module) Controller() []service.Controller
type Options ¶
type Options struct { InitDB func() (*zdb.DB, error) `json:"-"` SSEReconnect func(uid, lastID string) `json:"-"` InlayRBAC *rbac.RBAC `json:"-"` AdminDefaultPassword string `json:"admin_default_password"` ApiPrefix string `json:"prefix"` RBACFile string `json:"rbac_file"` InlayUser ztype.Maps `json:"inlay_user"` Models []define.Define `json:"-"` SSE znet.SSEOption `json:"-"` Expire int `json:"expire"` Only bool `json:"only"` DisabledLogIP bool `json:"disabled_ip"` // contains filtered or unexported fields }
func (Options) DisableWrite ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.