admin

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdmin

func NewAdmin(db *mongo.Database) (admin.AdminInterface, error)

func NewApplet

func NewApplet(db *mongo.Database) (admin.AppletInterface, error)

func NewClientConfig

func NewClientConfig(db *mongo.Database) (admin.ClientConfigInterface, error)

func NewForbiddenAccount

func NewForbiddenAccount(db *mongo.Database) (admin.ForbiddenAccountInterface, error)

func NewIPForbidden

func NewIPForbidden(db *mongo.Database) (admin.IPForbiddenInterface, error)

func NewLimitUserLoginIP

func NewLimitUserLoginIP(db *mongo.Database) (admin.LimitUserLoginIPInterface, error)

func NewRegisterAddGroup

func NewRegisterAddGroup(db *mongo.Database) (admin.RegisterAddGroupInterface, error)

Types

type Admin

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

func (*Admin) ChangePassword

func (o *Admin) ChangePassword(ctx context.Context, userID string, newPassword string) error

func (*Admin) Create

func (o *Admin) Create(ctx context.Context, admins []*admin.Admin) error

func (*Admin) Delete

func (o *Admin) Delete(ctx context.Context, userIDs []string) error

func (*Admin) Search

func (o *Admin) Search(ctx context.Context, pagination pagination.Pagination) (int64, []*admin.Admin, error)

func (*Admin) Take

func (o *Admin) Take(ctx context.Context, account string) (*admin.Admin, error)

func (*Admin) TakeUserID

func (o *Admin) TakeUserID(ctx context.Context, userID string) (*admin.Admin, error)

func (*Admin) Update

func (o *Admin) Update(ctx context.Context, account string, update map[string]any) error

type Applet

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

func (*Applet) Create

func (o *Applet) Create(ctx context.Context, applets []*admin.Applet) error

func (*Applet) Del

func (o *Applet) Del(ctx context.Context, ids []string) error

func (*Applet) FindID

func (o *Applet) FindID(ctx context.Context, ids []string) ([]*admin.Applet, error)

func (*Applet) FindOnShelf

func (o *Applet) FindOnShelf(ctx context.Context) ([]*admin.Applet, error)

func (*Applet) Search

func (o *Applet) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admin.Applet, error)

func (*Applet) Take

func (o *Applet) Take(ctx context.Context, id string) (*admin.Applet, error)

func (*Applet) Update

func (o *Applet) Update(ctx context.Context, id string, data map[string]any) error

type ClientConfig

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

func (*ClientConfig) Del

func (o *ClientConfig) Del(ctx context.Context, keys []string) error

func (*ClientConfig) Get

func (o *ClientConfig) Get(ctx context.Context) (map[string]string, error)

func (*ClientConfig) Set

func (o *ClientConfig) Set(ctx context.Context, config map[string]string) error

type ForbiddenAccount

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

func (*ForbiddenAccount) Create

func (*ForbiddenAccount) Delete

func (o *ForbiddenAccount) Delete(ctx context.Context, userIDs []string) error

func (*ForbiddenAccount) Find

func (o *ForbiddenAccount) Find(ctx context.Context, userIDs []string) ([]*admin.ForbiddenAccount, error)

func (*ForbiddenAccount) FindAllIDs

func (o *ForbiddenAccount) FindAllIDs(ctx context.Context) ([]string, error)

func (*ForbiddenAccount) Search

func (o *ForbiddenAccount) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admin.ForbiddenAccount, error)

func (*ForbiddenAccount) Take

type IPForbidden

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

func (*IPForbidden) Create

func (o *IPForbidden) Create(ctx context.Context, ms []*admin.IPForbidden) error

func (*IPForbidden) Delete

func (o *IPForbidden) Delete(ctx context.Context, ips []string) error

func (*IPForbidden) Find

func (o *IPForbidden) Find(ctx context.Context, ips []string) ([]*admin.IPForbidden, error)

func (*IPForbidden) Search

func (o *IPForbidden) Search(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*admin.IPForbidden, error)

func (*IPForbidden) Take

func (o *IPForbidden) Take(ctx context.Context, ip string) (*admin.IPForbidden, error)

type InvitationRegister

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

func (*InvitationRegister) Create

func (*InvitationRegister) Del

func (o *InvitationRegister) Del(ctx context.Context, codes []string) error

func (*InvitationRegister) Find

func (*InvitationRegister) Search

func (o *InvitationRegister) Search(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*admin.InvitationRegister, error)

func (*InvitationRegister) Take

func (*InvitationRegister) Update

func (o *InvitationRegister) Update(ctx context.Context, code string, data map[string]any) error

type LimitUserLoginIP

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

func (*LimitUserLoginIP) Count

func (o *LimitUserLoginIP) Count(ctx context.Context, userID string) (uint32, error)

func (*LimitUserLoginIP) Create

func (*LimitUserLoginIP) Delete

func (*LimitUserLoginIP) Search

func (o *LimitUserLoginIP) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admin.LimitUserLoginIP, error)

func (*LimitUserLoginIP) Take

type RegisterAddFriend

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

func (*RegisterAddFriend) Add

func (o *RegisterAddFriend) Add(ctx context.Context, registerAddFriends []*admin.RegisterAddFriend) error

func (*RegisterAddFriend) Del

func (o *RegisterAddFriend) Del(ctx context.Context, userIDs []string) error

func (*RegisterAddFriend) FindUserID

func (o *RegisterAddFriend) FindUserID(ctx context.Context, userIDs []string) ([]string, error)

func (*RegisterAddFriend) Search

func (o *RegisterAddFriend) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admin.RegisterAddFriend, error)

type RegisterAddGroup

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

func (*RegisterAddGroup) Add

func (o *RegisterAddGroup) Add(ctx context.Context, registerAddGroups []*admin.RegisterAddGroup) error

func (*RegisterAddGroup) Del

func (o *RegisterAddGroup) Del(ctx context.Context, groupIDs []string) error

func (*RegisterAddGroup) FindGroupID

func (o *RegisterAddGroup) FindGroupID(ctx context.Context, groupIDs []string) ([]string, error)

func (*RegisterAddGroup) Search

func (o *RegisterAddGroup) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admin.RegisterAddGroup, error)

Jump to

Keyboard shortcuts

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