model

package
v0.0.0-...-ac08b67 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateID

func GenerateID(last int) int

Types

type Balance

type Balance struct {
	ID      int
	Segment int
	Notes   string `json:"notes"`
	Amount  int    `json:"amount"`
	Email   string
}

type BalanceModel

type BalanceModel struct{}

func (*BalanceModel) GetBalance

func (bm *BalanceModel) GetBalance(userEmail string) ([]Balance, int, error)

func (*BalanceModel) Insert

func (bm *BalanceModel) Insert(newData Balance) (Balance, error)

type User

type User struct {
	ID       int
	Nama     string `json:"nama"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserModel

type UserModel struct{}

func (*UserModel) GetAll

func (um *UserModel) GetAll() ([]User, error)

func (*UserModel) Insert

func (um *UserModel) Insert(newUser User) (User, error)

func (*UserModel) Login

func (um *UserModel) Login(email string, password string) (User, error)

func (*UserModel) Update

func (um *UserModel) Update(updatedUser User) (User, error)

Jump to

Keyboard shortcuts

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