db

package
v0.0.0-...-1881185 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB() *mongo.Database

Types

type UserDB

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

func (*UserDB) Connect

func (u *UserDB) Connect()

func (*UserDB) CreateUser

func (u *UserDB) CreateUser(user *model.User) error

func (*UserDB) FindOneUser

func (u *UserDB) FindOneUser(name string) (*model.User, error)

findOneUser: 유저 하나를 찾는다

return case 1: return nil, nil : 조건에 맞는 유저 정보가 없을 때
return case 2: return nil, e   : 쿼리에서 에러가 나올 때
return case 3: return data, nil: 데이터를 찾았을 때

Jump to

Keyboard shortcuts

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