database

package
v0.0.0-...-c4c9469 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func ConnectDB

func ConnectDB() (*DB, error)

func (*DB) CreateUser

func (db *DB) CreateUser(input *model.NewUser) (*model.User, error)

func (*DB) DeleteUser

func (db *DB) DeleteUser(ID string) (*model.DeleteUser, error)

func (*DB) GetUsers

func (db *DB) GetUsers(ID string) ([]*model.User, error)

func (*DB) SingleUser

func (db *DB) SingleUser(ID string) (*model.User, error)

func (*DB) UpdateUser

func (db *DB) UpdateUser(ID string, input *model.UpdateUser) (*model.User, error)

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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