UserDao

package
v0.0.0-...-41ddd9f Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserGroupRedisHost = flag.String("UserGroupRedisHost",
		"127.0.0.1:6379", "redis host for user-group-info")
)
View Source
var (
	UserPubKeyRedisHost = flag.String("UserPubKeyRedisHost",
		"127.0.0.1:6379", "redis host for user-pubKey-info")
)

Functions

This section is empty.

Types

type UGDImpl

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

func NewUGDImpl

func NewUGDImpl() *UGDImpl

func (*UGDImpl) CreateGroupDao

func (U *UGDImpl) CreateGroupDao(uid string, groupName string) error

func (*UGDImpl) DeleteGroupDao

func (U *UGDImpl) DeleteGroupDao(uid string, groupName string) error

func (*UGDImpl) GetGroupNameList

func (U *UGDImpl) GetGroupNameList(uid string) ([]string, error)

func (*UGDImpl) JoinGroupDao

func (U *UGDImpl) JoinGroupDao(uid string, groupName string) error

func (*UGDImpl) LeaveGroupDao

func (U *UGDImpl) LeaveGroupDao(uid string, groupName string) error

type UserGroupDao

type UserGroupDao interface {
	JoinGroupDao(uid string, groupName string) error
	LeaveGroupDao(uid string, groupName string) error
	CreateGroupDao(uid string, groupName string) error
	DeleteGroupDao(uid string, groupName string) error
	GetGroupNameList(uid string) ([]string, error)
}

uid : [group1, group2, group3, ... ]

type UserInfoDao

type UserInfoDao interface {
	RegisterNewUser(info *Auth.UserInfo) error
	ChangeUserInfo(info *Auth.UserInfo, oldInfo *Auth.UserInfo) error
	Login(code Auth.UserPassword) error
}

type UserInfoDaoImpl

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

func (*UserInfoDaoImpl) ChangeUserInfo

func (u *UserInfoDaoImpl) ChangeUserInfo(info *Auth.UserInfo, oldInfo *Auth.UserInfo) error

func (*UserInfoDaoImpl) Initial

func (u *UserInfoDaoImpl) Initial()

func (*UserInfoDaoImpl) Login

func (u *UserInfoDaoImpl) Login(code *Auth.UserPassword) error

func (*UserInfoDaoImpl) RegisterNewUser

func (u *UserInfoDaoImpl) RegisterNewUser(info *Auth.UserInfo) error

type UserPubKeyDao

type UserPubKeyDao interface {
	SetUserPubKey(uid string, pubKey []byte) (err error)
	GetUserPubKey(uid string) (pubKey []byte, err error)
}

type UserPubKeyDaoImpl

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

func NewUserPubKeyDaoImpl

func NewUserPubKeyDaoImpl() *UserPubKeyDaoImpl

func (*UserPubKeyDaoImpl) GetUserPubKey

func (u *UserPubKeyDaoImpl) GetUserPubKey(uid string) (pubKey []byte, err error)

func (*UserPubKeyDaoImpl) SetUserPubKey

func (u *UserPubKeyDaoImpl) SetUserPubKey(uid string, pubKey []byte) (err error)

Jump to

Keyboard shortcuts

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