database

package
v0.0.0-...-f5d2eb2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTranslation

func AddTranslation(lang string, label string, value string) error

func Connect

func Connect()

func DeleteOrder

func DeleteOrder(uid, ribbon uint) error

func DeleteRibbon

func DeleteRibbon(id uint) error

---------------------------------------------------------------------------------------------------------------------- Delete ----------------------------------------------------------------------------------------------------------------------

func DeleteTranslation

func DeleteTranslation(lang, label string) error

func Exec

func Exec(query string, args []any) (sql.Result, error)

func GetAllOrders

func GetAllOrders() (map[string]any, error)

func GetGlyphs

func GetGlyphs() (map[uint]Glyph, error)

func GetOptions

func GetOptions() (map[string]any, error)

func GetOrderByID

func GetOrderByID(order_id uint) (map[string]any, error)

func GetOrders

func GetOrders(uid uint) (map[string]any, error)

func GetTranslation

func GetTranslation(lang string, key string) (map[string]interface{}, error)

func Query

func Query(statement string, args []any) ([]map[string]interface{}, error)

func SetColumns

func SetColumns(uid, columns uint) error

func SetOption

func SetOption(name, value string) error

func SetOrder

func SetOrder(uid, ribbon uint, values map[string]uint) error

func SetStatus

func SetStatus(uid uint, status string) error

Types

type Category

type Category struct {
	ID         uint
	Background string
	Stripes    string
	Glyph      string
	Wing1      string
	Wing2      string
	Ordering   uint
}

func CreateCategory

func CreateCategory(background, stripes, glyph, wing1, wing2 string) (*Category, error)

func GetCategories

func GetCategories() ([]Category, error)

func GetCategory

func GetCategory(id uint) (*Category, error)

type Glyph

type Glyph struct {
	ID   uint
	File string
}

func CreateGlyph

func CreateGlyph(file_name string) (*Glyph, error)

func GetGlyph

func GetGlyph(id uint) (*Glyph, error)

type Ribbon

type Ribbon struct {
	ID       uint
	Category uint
	Glyph    uint
	NoWings  bool
	Ordering uint
	Special  map[string]string
}

func CreateRibbon

func CreateRibbon(category uint, glyph uint, no_wings bool) (*Ribbon, error)

---------------------------------------------------------------------------------------------------------------------- Create ----------------------------------------------------------------------------------------------------------------------

func GetRibbon

func GetRibbon(id uint) (*Ribbon, error)

func GetRibbons

func GetRibbons() ([]Ribbon, error)

---------------------------------------------------------------------------------------------------------------------- Read ----------------------------------------------------------------------------------------------------------------------

func (Ribbon) GetCategory

func (ribbon Ribbon) GetCategory() (*Category, error)

Jump to

Keyboard shortcuts

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