model

package
v0.13.22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   int
	Name string
}

type Model

type Model struct {
	Store *Store
	*web.CoreContext
}

func StartModel

func StartModel(rt web.Route, rw http.ResponseWriter, req *http.Request) *Model

type Store

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

func (*Store) AddCategory

func (st *Store) AddCategory(cat Category)

func (*Store) DeleteCategory

func (st *Store) DeleteCategory(id int)

func (*Store) FindCategory

func (st *Store) FindCategory(id int) *Category

func (*Store) SortByID

func (s *Store) SortByID(dir string)

func (*Store) SortByName

func (s *Store) SortByName(dir string)

Jump to

Keyboard shortcuts

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