Documentation ¶
Index ¶
- Constants
- Variables
- func ConfirmTypeFromReader(t Genre, r *bufio.Reader) (err error)
- func IsErrUnrecognizedGenre(err error) bool
- func IsErrUnsupportedGenre(err error) bool
- func MakeErrUnrecognizedGenre(v string) errUnrecognizedGenre
- func MakeErrUnsupportedGenre(g interfaces.GenreGetter) error
- type ErrEmptyObjectId
- type ErrWrongType
- type Genre
- func (a Genre) AssertGenre(b interfaces.GenreGetter) (err error)
- func (a Genre) Equals(b Genre) bool
- func (a Genre) EqualsAny(b any) bool
- func (a Genre) EqualsGenre(b interfaces.GenreGetter) bool
- func (g Genre) GetGenre() interfaces.Genre
- func (g Genre) GetGenreBitInt() byte
- func (g Genre) GetGenreString() string
- func (g Genre) GetGenreStringPlural(sv interfaces.StoreVersion) string
- func (g Genre) HasParents() bool
- func (g Genre) IsTrueGenre() bool
- func (g *Genre) ReadFrom(r io.Reader) (n int64, err error)
- func (g *Genre) Reset()
- func (g *Genre) Set(v string) (err error)
- func (g Genre) String() string
- func (g *Genre) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
View Source
const ( None = Genre(iota) Blob Type Tag Zettel Config InventoryList Repo MaxGenre = Repo )
Do not change this order, various serialization formats rely on the underlying integer values.
Variables ¶
View Source
var ErrNoAbbreviation = errors.New("no abbreviation")
Functions ¶
func IsErrUnrecognizedGenre ¶
func IsErrUnsupportedGenre ¶
func MakeErrUnrecognizedGenre ¶
func MakeErrUnrecognizedGenre(v string) errUnrecognizedGenre
func MakeErrUnsupportedGenre ¶
func MakeErrUnsupportedGenre(g interfaces.GenreGetter) error
Types ¶
type ErrEmptyObjectId ¶
type ErrEmptyObjectId struct{}
func (ErrEmptyObjectId) Error ¶
func (e ErrEmptyObjectId) Error() string
func (ErrEmptyObjectId) Is ¶
func (e ErrEmptyObjectId) Is(target error) (ok bool)
type ErrWrongType ¶
type ErrWrongType struct {
ExpectedType, ActualType Genre
}
func (ErrWrongType) Error ¶
func (e ErrWrongType) Error() string
func (ErrWrongType) Is ¶
func (e ErrWrongType) Is(target error) (ok bool)
type Genre ¶
type Genre byte
func Make ¶
func Make(g interfaces.Genre) Genre
func MakeOrUnknown ¶
func Must ¶
func Must(g interfaces.GenreGetter) Genre
func (Genre) AssertGenre ¶
func (a Genre) AssertGenre(b interfaces.GenreGetter) (err error)
func (Genre) EqualsGenre ¶
func (a Genre) EqualsGenre(b interfaces.GenreGetter) bool
func (Genre) GetGenre ¶
func (g Genre) GetGenre() interfaces.Genre
func (Genre) GetGenreBitInt ¶
func (Genre) GetGenreString ¶
func (Genre) GetGenreStringPlural ¶
func (g Genre) GetGenreStringPlural(sv interfaces.StoreVersion) string
func (Genre) HasParents ¶
func (Genre) IsTrueGenre ¶
Click to show internal directories.
Click to hide internal directories.