Documentation ¶
Index ¶
- Variables
- func ApplyMigrations() error
- func CountAdmins() (int64, error)
- func CreateGroup(group *Group) error
- func CreateLink(link *Link) error
- func DeleteAdmin(id int) error
- func DeleteGroup(groupID int) error
- func DeleteLink(linkID int) error
- func EstablishDatabaseConnection(cfg *config.Config) error
- func UpdateGroup(id int, name string) error
- func UpdateLink(link *Link) error
- type Admin
- type Group
- type Link
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
View Source
var (
ErrWrongNumberOfAffectedRows = errors.New("wrong number of affected rows")
)
Functions ¶
func ApplyMigrations ¶ added in v1.3.0
func ApplyMigrations() error
func CountAdmins ¶
func CreateGroup ¶ added in v1.3.0
Create a new group in the database. The function fills in the ID.
func CreateLink ¶ added in v1.3.0
Create a new link in the database. The function fills in the ID.
func DeleteAdmin ¶ added in v1.3.0
func DeleteGroup ¶ added in v1.3.0
func DeleteLink ¶ added in v1.3.0
func EstablishDatabaseConnection ¶ added in v1.3.0
func UpdateGroup ¶ added in v1.3.0
func UpdateLink ¶ added in v1.3.0
Types ¶
type Group ¶
func GetGroupsWithLinks ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.