member

package
v0.7.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package member 会员管理

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// User 用户相关的配置
	User *user.Config `json:"user" xml:"user" yaml:"user"`

	// 上传接口的相关配置
	Upload *upload.Config `json:"upload" xml:"upload" yaml:"upload"`
}

func (*Config) SanitizeConfig

func (c *Config) SanitizeConfig() *web.FieldError

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module 不带权限功能的会员管理模块

func Install

func Install(mod *cmfx.Module, o *Config, up *upload.Module, adminL *admin.Module) *Module

func Load

func Load(mod *cmfx.Module, conf *Config, up *upload.Module, adminMod *admin.Module) *Module

Load 加载模块

func (*Module) AddSecurityLog

func (m *Module) AddSecurityLog(tx *orm.Tx, uid int64, content, ip, ua string) error

AddSecurityLog 记录一条安全日志

func (*Module) AddSecurityLogWithContext

func (m *Module) AddSecurityLogWithContext(tx *orm.Tx, uid int64, ctx *web.Context, content web.LocaleStringer) error

AddSecurityLogWithContext 从 web.Context 中记录一条安全日志

func (*Module) CurrentUser

func (m *Module) CurrentUser(ctx *web.Context) *user.User

CurrentUser 获取当前登录的用户信息

func (*Module) Middleware

func (m *Module) Middleware(next web.HandlerFunc, method, path, router string) web.HandlerFunc

Middleware 验证是否登录

func (*Module) URLPrefix

func (m *Module) URLPrefix() string

func (*Module) UserModule

func (m *Module) UserModule() *user.Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL