dao

package
v0.0.0-...-5b02dbe Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCustomer

func CreateCustomer(customer *db.Customer) error

func CreateUser

func CreateUser(user *db.User) error

func CustomerByIDAndUserID

func CustomerByIDAndUserID(id, userID uuid.UUID) (*db.Customer, error)

func Customers

func Customers(userID uuid.UUID, page, pageSize uint32, order, direction string, filters ...string) ([]db.Customer, error)

func CustomersCount

func CustomersCount(userID uuid.UUID, filters ...string) (uint32, error)

func DeleteCustomer

func DeleteCustomer(customer *db.Customer) error

func IsErrDuplicateKey

func IsErrDuplicateKey(err error) bool

func IsErrRecordNotFound

func IsErrRecordNotFound(err error) bool

func UpdateCustomer

func UpdateCustomer(customer *db.Customer) error

func UserByAccessToken

func UserByAccessToken(token uuid.UUID) (*db.User, error)

func UserByEmail

func UserByEmail(email string) (*db.User, error)

func UserRemoveAccessToken

func UserRemoveAccessToken(user *db.User) error

func UserUpdateAccessToken

func UserUpdateAccessToken(user *db.User, token uuid.UUID) error

func UserUpdateEmailAndLanguage

func UserUpdateEmailAndLanguage(user *db.User, email, language string) error

Types

type CustomerMonthlyRegistrations

type CustomerMonthlyRegistrations struct {
	Month         uint8
	Registrations uint32
}

func CustomersMonthlyRegistrations

func CustomersMonthlyRegistrations(userID uuid.UUID, start, end time.Time) ([]CustomerMonthlyRegistrations, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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