model

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var STORE = &Store{}

Functions

func AddCategory

func AddCategory(st *Store, name *value.Var[string]) (id int, err error)

func DeleteCategory

func DeleteCategory(st *Store, id *value.Var[int]) error

Types

type Category

type Category struct {
	ID   int
	Name string
}

func FindCategory

func FindCategory(st *Store, id *value.Var[int]) (c Category, err error)

type Store

type Store struct {
	Categories []Category
	sync.RWMutex
}

Jump to

Keyboard shortcuts

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