Documentation ¶
Index ¶
- type Admin
- type AdminInterface
- type Applet
- type AppletInterface
- type ClientConfig
- type ClientConfigInterface
- type ForbiddenAccount
- type ForbiddenAccountInterface
- type IPForbidden
- type IPForbiddenInterface
- type InvitationRegister
- type InvitationRegisterInterface
- type LimitUserLoginIP
- type LimitUserLoginIPInterface
- type RegisterAddFriend
- type RegisterAddFriendInterface
- type RegisterAddGroup
- type RegisterAddGroupInterface
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
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"` }
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 ¶
ClientConfig config
func (ClientConfig) TableName ¶
func (ClientConfig) TableName() string
type ClientConfigInterface ¶
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) }
Click to show internal directories.
Click to hide internal directories.