database

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminUserExists

func AdminUserExists() bool

func CreateItem

func CreateItem(item constants.ItemInsert) error

func CreateList

func CreateList(userId int, name string, description string) (int, error)

func DeleteItem

func DeleteItem(itemId int) error

func DeleteList

func DeleteList(listId int, confirmationName string) (bool, error)

func DeleteUser added in v1.7.0

func DeleteUser(userId int) error

func GenerateShareCode

func GenerateShareCode(listId int) (string, error)

func GetAllUsers

func GetAllUsers() ([]constants.UserRead, error)

func GetItem

func GetItem(itemId int) (constants.Item, error)

func GetList

func GetList(listId int) (constants.List, error)

func GetListFromShareCode

func GetListFromShareCode(shareCode string) (constants.List, error)

func GetListItems

func GetListItems(listId int) ([]constants.Item, error)

func GetLists

func GetLists(userId int) ([]constants.List, error)

func GetUserGroupId added in v1.7.0

func GetUserGroupId(userId int) (int, error)

func GetUsersInSameGroupAsUser added in v1.7.0

func GetUsersInSameGroupAsUser(userId int) ([]constants.UserRead, error)

func ListNameTaken

func ListNameTaken(userId int, name string) (bool, error)

func LoginUser

func LoginUser(email, password string) (int, error)

func RegisterUser

func RegisterUser(user constants.UserRegister) error

func SetUserAdmin added in v1.7.0

func SetUserAdmin(userId int, admin bool) error

func UnpublishShareCode

func UnpublishShareCode(listId int) error

func UpdateItem

func UpdateItem(itemId int, item constants.ItemInsert) error

func UpdateList

func UpdateList(listId int, params constants.ListPostParams) error

func UserIsAdmin

func UserIsAdmin(userId int) (bool, error)

func UserOwnsList

func UserOwnsList(userId int, listId int) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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