model

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 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
	*wc.CoreContext
}

func StartModel

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

type Store

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

func (*Store) AddCategory added in v0.11.0

func (st *Store) AddCategory(cat Category)

func (*Store) DeleteCategory added in v0.11.0

func (st *Store) DeleteCategory(id int)

func (*Store) FindCategory added in v0.11.0

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