db

package
v0.0.0-...-94ea744 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PORT = 5432
)

Variables

This section is empty.

Functions

func DeleteMerchant

func DeleteMerchant(merchantId int) (error, int64)

delete merchant from the DB by merchantId

func DeleteTeam

func DeleteTeam(teamId int) int

delete team from the DB by teamId

func GetAllMerchants

func GetAllMerchants(intPageNum int, intPageSize int) ([]models.Merchant, error)

get all merchant from the DB

func GetAllTeams

func GetAllTeams(intPageNum int, intPageSize int) ([]models.Team, error)

get all teams from the DB

func GetMerchant

func GetMerchant(merchantId int) (models.Merchant, error)

get one merchant from the DB by its merchantId

func GetMerchantTeamMembers

func GetMerchantTeamMembers(merchantId int, intPageNum int, intPageSize int) ([]models.Team, error)

Get Teams related to given merchantId

func GetTeam

func GetTeam(teamId int) (models.Team, error)

get one team from the DB by its teamId

func InsertMerchant

func InsertMerchant(merchant models.Merchant) (error, int)

create one merchant in the DB

func InsertTeam

func InsertTeam(team models.Team) (error, int)

create one team in the DB

func UpdateMerchant

func UpdateMerchant(merchantId int, merchant models.Merchant) (error, int64)

update one merchant in the DB by its merchantId

func UpdateTeam

func UpdateTeam(teamId int, team models.Team) int

update one team in the DB by its teamId

Types

This section is empty.

Jump to

Keyboard shortcuts

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