Documentation ¶
Index ¶
- type DBClient
- func (dbc *DBClient) CreatePack(pack model.Pack) (string, error)
- func (dbc *DBClient) CreatePlan(plan *model.Plan) (string, error)
- func (dbc *DBClient) CreateSchema() error
- func (dbc *DBClient) CreateTables() error
- func (dbc *DBClient) CreateUser(user *model.User) (string, string, error)
- func (dbc *DBClient) DevExists(dev string) (bool, error)
- func (dbc *DBClient) GetDevByUsername(username string) (model.User, error)
- func (dbc *DBClient) GetDevCount() (int, error)
- func (dbc *DBClient) GetDevs() ([]model.User, error)
- func (dbc *DBClient) GetDoneIconCountByDev(dev string) (int, error)
- func (dbc *DBClient) GetDoneIconsByPackByDev(dev, pack string) ([]model.Icon, error)
- func (dbc *DBClient) GetIconByComponentByPackByDev(dev, pack, component string) (*model.Icon, error)
- func (dbc *DBClient) GetIconCountByDev(dev string) (int, error)
- func (dbc *DBClient) GetIconPackIDFromName(dev, pack string) (int, error)
- func (dbc *DBClient) GetIcons() ([]model.Icon, error)
- func (dbc *DBClient) GetIconsByDev(dev string) ([]model.Icon, error)
- func (dbc *DBClient) GetIconsByPackByDev(dev, pack string) ([]model.Icon, error)
- func (dbc *DBClient) GetPackCountByDev(dev string) (int, error)
- func (dbc *DBClient) GetPacks() ([]model.Pack, error)
- func (dbc *DBClient) GetPacksByDev(dev string) ([]model.Pack, error)
- func (dbc *DBClient) GetPendingIconCountByDev(dev string) (int, error)
- func (dbc *DBClient) GetPendingIconsByPackByDev(dev, pack string) ([]model.Icon, error)
- func (dbc *DBClient) GetPlans() ([]model.Plan, error)
- func (dbc *DBClient) GetUsers() ([]model.User, error)
- func (dbc *DBClient) PackExists(dev, pack string) (bool, error)
- func (dbc *DBClient) PlansExists() (bool, error)
- func (dbc *DBClient) SaveIcon(dev string, icon *model.Icon) (int, error)
- func (dbc *DBClient) SaveIcons(dev string, icons []*model.Icon) (int, error)
- func (dbc *DBClient) UpdateIconStatus(dev, pack, component, status string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
type DBClient struct {
// contains filtered or unexported fields
}
DBClient is the database client type
func (*DBClient) CreatePack ¶
CreatePack creates a new icon pack record
func (*DBClient) CreatePlan ¶
CreatePlan creates a new plan record
func (*DBClient) CreateSchema ¶
CreateSchema creates the required schema
func (*DBClient) CreateTables ¶
CreateTables creates the required tables
func (*DBClient) CreateUser ¶
CreateUser inserts a new user
func (*DBClient) GetDevByUsername ¶
GetDevByUsername gets the dev with the given username
func (*DBClient) GetDevCount ¶
GetDevCount gets the number of all developers
func (*DBClient) GetDoneIconCountByDev ¶
GetDoneIconCountByDev returns the number of icon request in the database
func (*DBClient) GetDoneIconsByPackByDev ¶
GetDoneIconsByPackByDev retrieves the list of icons which are still pending
func (*DBClient) GetIconByComponentByPackByDev ¶
func (dbc *DBClient) GetIconByComponentByPackByDev(dev, pack, component string) (*model.Icon, error)
GetIconByComponentByPackByDev returns the matching icon
func (*DBClient) GetIconCountByDev ¶
GetIconCountByDev returns the number of icon requests owned by the dev
func (*DBClient) GetIconPackIDFromName ¶
GetIconPackIDFromName checks whether the plans table exists
func (*DBClient) GetIconsByDev ¶
GetIconsByDev gets all the icon packs by the dev
func (*DBClient) GetIconsByPackByDev ¶
GetIconsByPackByDev gets all the icons by the developer
func (*DBClient) GetPackCountByDev ¶
GetPackCountByDev gets the number of icon packs by the dev
func (*DBClient) GetPacksByDev ¶
GetPacksByDev gets all the icon packs
func (*DBClient) GetPendingIconCountByDev ¶
GetPendingIconCountByDev returns the number of icon request in the database
func (*DBClient) GetPendingIconsByPackByDev ¶
GetPendingIconsByPackByDev retrieves the list of icons which are still pending
func (*DBClient) PackExists ¶
PackExists checks whether the icon pack exists
func (*DBClient) PlansExists ¶
PlansExists checks whether the plans table exists
func (*DBClient) SaveIcon ¶
SaveIcon upserts the icon to the database and updates requester count on conflict !UNUSED