database

package
v0.0.0-...-4274f6d Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(user *structs.User) error

func DeleteUser

func DeleteUser(user *structs.User) error

func GetAllEntitiesFromUser

func GetAllEntitiesFromUser(uid int64, eType string) (*[]*structs.Entity, error)

func GetAssetsForEntity

func GetAssetsForEntity(entity *structs.Entity) error

func GetEntitiesByAnswerOf

func GetEntitiesByAnswerOf(eid int64) ([]*structs.Entity, error)

func GetEntityByID

func GetEntityByID(id int64, eType string) (*structs.Entity, error)

func GetLastNEntities

func GetLastNEntities(numOfEntities uint, eType string) (*[]*structs.Entity, error)

func GetUserByID

func GetUserByID(id int64) (*structs.User, error)

func GetUserByName

func GetUserByName(username string) (*structs.User, error)

func GetUserSettings

func GetUserSettings(user *structs.User) error

func InitializeDatabaseInstance

func InitializeDatabaseInstance(isDev bool) error

func IsEntityLikedBy

func IsEntityLikedBy(eid, uid uint) (bool, error)

func IsValidUser

func IsValidUser(user *structs.User) (bool, error)

func UpdateCheck

func UpdateCheck(user *structs.User) error

Types

type KomfyDB

type KomfyDB struct {
	Instance *gorm.DB
}

KomfyDB is the komfy database

func (KomfyDB) Close

func (db KomfyDB) Close() error

Jump to

Keyboard shortcuts

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