Documentation ¶
Index ¶
- 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 ¶
This section is empty.
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 Request *requestWith Inside *inside Controllers []service.Controller Options Options // contains filtered or unexported fields }
func (*Module) Controller ¶
func (m *Module) Controller() []service.Controller
type Options ¶
type Options struct { InitDB func() (*zdb.DB, error) `z:"-"` SSEReconnect func(uid, lastID string) `z:"-"` InlayRBAC *rbac.RBAC `z:"-"` ApiPrefix string `z:"prefix"` RBACFile string `z:"rbac_file"` AdminDefaultPassword string `z:"admin_default_password"` ModelPrefix string `z:"model_prefix"` InlayUser ztype.Maps `z:"inlay_user"` Models []schema.Schema `z:"-"` SSE znet.SSEOption `z:"-"` Expire int64 `z:"expire"` RefreshExpire int64 `z:"refresh_expire"` Only bool `z:"only"` DisabledLogIP bool `z:"disabled_ip"` EnableRegister bool `z:"register"` // contains filtered or unexported fields }
func (Options) DisableWrite ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.