database

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping added in v1.0.7

func Ping(client *mongo.Client) bool

Types

type Client

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

func New

func New() *Client

func (*Client) Connect

func (self *Client) Connect() bool

func (*Client) Disconnect

func (self *Client) Disconnect() bool

func (*Client) Namespace added in v1.1.8

func (self *Client) Namespace() *Namespace

func (*Client) RegisterTokenCollection added in v1.1.4

func (self *Client) RegisterTokenCollection() *RegisterTokenCollection

func (*Client) UserCollection added in v1.1.4

func (self *Client) UserCollection() *UserCollection

type Namespace added in v1.1.8

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

func (Namespace) CreateNamespace added in v1.1.8

func (self Namespace) CreateNamespace(uuid, namespace string) (string, bool)

func (Namespace) DeleteNamespace added in v1.1.8

func (self Namespace) DeleteNamespace(uuid, namespace string) (string, bool)

func (Namespace) Exists added in v1.1.9

func (self Namespace) Exists(namespace string) bool

func (Namespace) ListNamespace added in v1.1.8

func (self Namespace) ListNamespace(uuid string) ([]string, error)

type RegisterTokenCollection added in v1.1.4

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

func (*RegisterTokenCollection) CreateToken added in v1.1.4

func (self *RegisterTokenCollection) CreateToken(duration int32) string

duration, Unit : Seconds

func (*RegisterTokenCollection) ExistsToken added in v1.1.4

func (self *RegisterTokenCollection) ExistsToken(token string) (bool, error)

성공 유무와, iat, exp, dur 관련 실패 데이터

func (*RegisterTokenCollection) TokenCount added in v1.1.4

func (self *RegisterTokenCollection) TokenCount() int64

type UserCollection

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

func (UserCollection) DeleteUser

func (self UserCollection) DeleteUser(uuid string) bool

func (UserCollection) ExistsId

func (self UserCollection) ExistsId(userId string) bool

func (UserCollection) GetUserInfo added in v1.1.8

func (self UserCollection) GetUserInfo(uuid string) (UserInfo, error)

func (UserCollection) GetUserUuid

func (self UserCollection) GetUserUuid(userId string) (string, error)

func (UserCollection) Login

func (self UserCollection) Login(userId, password string) bool

func (UserCollection) NewUser

func (self UserCollection) NewUser(userId, password, nickname, email string) (string, error)

type UserInfo added in v1.1.8

type UserInfo struct {
	Nickname string
	Email    string
	UserId   string
	Uuid     string
}

Jump to

Keyboard shortcuts

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