model

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopModel

func StopModel(ctx *Model, req *wc.Request)

Types

type Category

type Category struct {
	ID   int
	Name string
}

type Model

type Model struct {
	*Store
}

func StartModel

func StartModel(req *wc.Request) *Model

func (*Model) AddCategory

func (st *Model) AddCategory(cat Category)

func (*Model) DeleteCategory

func (st *Model) DeleteCategory(id int)

func (*Model) FindCategory

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

type Store

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

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