Documentation ¶
Index ¶
- func DeletePirg(db *sql.DB, id int) error
- func DeleteUser(db *sql.DB, id int) error
- func NewDBConn(dbr DBRequest) (*sql.DB, error)
- func UpdateUser(db *sql.DB, userId int, user *UserRequest) error
- func WipeDB(db *sql.DB) error
- type APIKeyEntry
- type DBRequest
- type Pirg
- type PirgRequest
- type User
- type UserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateUser ¶
func UpdateUser(db *sql.DB, userId int, user *UserRequest) error
Types ¶
type APIKeyEntry ¶
func GetAPIKeyEntry ¶
func GetAPIKeyEntry(db *sql.DB, key string) (*APIKeyEntry, error)
GetAPIKeyEntry looks for the provided key in the database and returns the APIKeyEntry if found, nil if not found, or an error
type DBRequest ¶
type Pirg ¶
type Pirg struct { Id int `json:"id"` Name string `json:"name"` OwnerId int `json:"owner_id"` AdminIds []int `json:"admin_ids"` UserIds []int `json:"user_ids"` CreatedAt time.Time `json:"created_at"` ModifiedAt time.Time `json:"modified_at"` }
func CreatePirg ¶
func CreatePirg(db *sql.DB, pirg *PirgRequest) (*Pirg, error)
func UpdatePirg ¶
type PirgRequest ¶
Click to show internal directories.
Click to hide internal directories.