admin

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Account    string    `bson:"account"`
	Password   string    `bson:"password"`
	FaceURL    string    `bson:"face_url"`
	Nickname   string    `bson:"nickname"`
	UserID     string    `bson:"user_id"`
	Level      int32     `bson:"level"`
	CreateTime time.Time `bson:"create_time"`
}

Admin user

func (Admin) TableName

func (Admin) TableName() string

type AdminInterface

type AdminInterface interface {
	Create(ctx context.Context, admins []*Admin) error
	Take(ctx context.Context, account string) (*Admin, error)
	TakeUserID(ctx context.Context, userID string) (*Admin, error)
	Update(ctx context.Context, account string, update map[string]any) error
	ChangePassword(ctx context.Context, userID string, newPassword string) error
	Delete(ctx context.Context, userIDs []string) error
	Search(ctx context.Context, pagination pagination.Pagination) (int64, []*Admin, error)
}

type Applet

type Applet struct {
	ID         string    `bson:"id"`
	Name       string    `bson:"name"`
	AppID      string    `bson:"app_id"`
	Icon       string    `bson:"icon"`
	URL        string    `bson:"url"`
	MD5        string    `bson:"md5"`
	Size       int64     `bson:"size"`
	Version    string    `bson:"version"`
	Priority   uint32    `bson:"priority"`
	Status     uint8     `bson:"status"`
	CreateTime time.Time `bson:"create_time"`
}

func (Applet) TableName

func (Applet) TableName() string

type AppletInterface

type AppletInterface interface {
	Create(ctx context.Context, applets []*Applet) error
	Del(ctx context.Context, ids []string) error
	Update(ctx context.Context, id string, data map[string]any) error
	Take(ctx context.Context, id string) (*Applet, error)
	Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*Applet, error)
	FindOnShelf(ctx context.Context) ([]*Applet, error)
	FindID(ctx context.Context, ids []string) ([]*Applet, error)
}

type ClientConfig

type ClientConfig struct {
	Key   string `bson:"key"`
	Value string `bson:"value"`
}

ClientConfig config

func (ClientConfig) TableName

func (ClientConfig) TableName() string

type ClientConfigInterface

type ClientConfigInterface interface {
	Set(ctx context.Context, config map[string]string) error
	Get(ctx context.Context) (map[string]string, error)
	Del(ctx context.Context, keys []string) error
}

type ForbiddenAccount

type ForbiddenAccount struct {
	UserID         string    `bson:"user_id"`
	Reason         string    `bson:"reason"`
	OperatorUserID string    `bson:"operator_user_id"`
	CreateTime     time.Time `bson:"create_time"`
}

ForbiddenAccount table

func (ForbiddenAccount) TableName

func (ForbiddenAccount) TableName() string

type ForbiddenAccountInterface

type ForbiddenAccountInterface interface {
	Create(ctx context.Context, ms []*ForbiddenAccount) error
	Take(ctx context.Context, userID string) (*ForbiddenAccount, error)
	Delete(ctx context.Context, userIDs []string) error
	Find(ctx context.Context, userIDs []string) ([]*ForbiddenAccount, error)
	Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*ForbiddenAccount, error)
	FindAllIDs(ctx context.Context) ([]string, error)
}

type IPForbidden

type IPForbidden struct {
	IP            string    `bson:"ip"`
	LimitRegister bool      `bson:"limit_register"`
	LimitLogin    bool      `bson:"limit_login"`
	CreateTime    time.Time `bson:"create_time"`
}

func (IPForbidden) IPForbidden

func (IPForbidden) IPForbidden() string

type IPForbiddenInterface

type IPForbiddenInterface interface {
	Take(ctx context.Context, ip string) (*IPForbidden, error)
	Find(ctx context.Context, ips []string) ([]*IPForbidden, error)
	Search(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*IPForbidden, error)
	Create(ctx context.Context, ms []*IPForbidden) error
	Delete(ctx context.Context, ips []string) error
}

type InvitationRegister

type InvitationRegister struct {
	InvitationCode string    `bson:"invitation_code"`
	UsedByUserID   string    `bson:"used_by_user_id"`
	CreateTime     time.Time `bson:"create_time"`
}

func (InvitationRegister) TableName

func (InvitationRegister) TableName() string

type InvitationRegisterInterface

type InvitationRegisterInterface interface {
	Find(ctx context.Context, codes []string) ([]*InvitationRegister, error)
	Del(ctx context.Context, codes []string) error
	Create(ctx context.Context, v []*InvitationRegister) error
	Take(ctx context.Context, code string) (*InvitationRegister, error)
	Update(ctx context.Context, code string, data map[string]any) error
	Search(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*InvitationRegister, error)
}

type LimitUserLoginIP

type LimitUserLoginIP struct {
	UserID     string    `bson:"user_id"`
	IP         string    `bson:"ip"`
	CreateTime time.Time `bson:"create_time"`
}

func (LimitUserLoginIP) TableName

func (LimitUserLoginIP) TableName() string

type LimitUserLoginIPInterface

type LimitUserLoginIPInterface interface {
	Create(ctx context.Context, ms []*LimitUserLoginIP) error
	Delete(ctx context.Context, ms []*LimitUserLoginIP) error
	Count(ctx context.Context, userID string) (uint32, error)
	Take(ctx context.Context, userID string, ip string) (*LimitUserLoginIP, error)
	Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*LimitUserLoginIP, error)
}

type RegisterAddFriend

type RegisterAddFriend struct {
	UserID     string    `bson:"user_id"`
	CreateTime time.Time `bson:"create_time"`
}

func (RegisterAddFriend) TableName

func (RegisterAddFriend) TableName() string

type RegisterAddFriendInterface

type RegisterAddFriendInterface interface {
	Add(ctx context.Context, registerAddFriends []*RegisterAddFriend) error
	Del(ctx context.Context, userIDs []string) error
	FindUserID(ctx context.Context, userIDs []string) ([]string, error)
	Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*RegisterAddFriend, error)
}

type RegisterAddGroup

type RegisterAddGroup struct {
	GroupID    string    `bson:"group_id"`
	CreateTime time.Time `bson:"create_time"`
}

func (RegisterAddGroup) TableName

func (RegisterAddGroup) TableName() string

type RegisterAddGroupInterface

type RegisterAddGroupInterface interface {
	Add(ctx context.Context, registerAddGroups []*RegisterAddGroup) error
	Del(ctx context.Context, groupIDs []string) error
	FindGroupID(ctx context.Context, groupIDs []string) ([]string, error)
	Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*RegisterAddGroup, error)
}

Jump to

Keyboard shortcuts

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