Versions in this module Expand all Collapse all v0 v0.1.5 Oct 8, 2023 Changes in this version + var ItemStatusFlow = StatusFlow + var OnlyRemoveStatusFlow = StatusFlow + func ParseFilterItemStatusList(r *http.Request, key string, def ItemStatus, items *[]ItemStatus) error + type ItemStatus uint8 + const ItemStatusDisabled + const ItemStatusDraft + const ItemStatusEnabled + const ItemStatusRemoved + func ParseItemStatusList(items []string) ([]ItemStatus, error) + func (e *ItemStatus) ParseAndSet(value string) error + func (e *ItemStatus) Scan(value any) error + func (e *ItemStatus) UnmarshalJSON(data []byte) error + func (e ItemStatus) MarshalJSON() ([]byte, error) + func (e ItemStatus) String() string + type OnlyRemoveStatus uint8 + const OnlyRemoveStatusEnabled + const OnlyRemoveStatusRemoved + func (e *OnlyRemoveStatus) ParseAndSet(value string) error + func (e *OnlyRemoveStatus) Scan(value any) error + func (e *OnlyRemoveStatus) UnmarshalJSON(data []byte) error + func (e OnlyRemoveStatus) MarshalJSON() ([]byte, error) + func (e OnlyRemoveStatus) String() string + type Status interface + String func() string + type StatusFlow map[Status][]Status + func (f StatusFlow) Check(statusFrom Status, statusTo Status) bool + func (f StatusFlow) Exists(status Status) bool + func (f StatusFlow) PossibleFromStatuses(statusTo Status) (statuses []Status) + func (f StatusFlow) PossibleToStatuses(statusFrom Status) []Status