database

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 13 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) 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 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) [64]byte

duration, Unit : Seconds

func (*RegisterTokenCollection) ExistsToken added in v1.1.4

func (self *RegisterTokenCollection) ExistsToken(token []byte) (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) 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)

Jump to

Keyboard shortcuts

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