Documentation ¶
Index ¶
- Constants
- Variables
- func AddNormalizedTag(es TagMutableSet, e *Tag)
- func Aligned(id IdLike, lenLeft, lenRight int) string
- func AlignedParts(id IdLike, lenLeft, lenRight int) (string, string, string)
- func Contains(a, b IdWithParts) bool
- func ContainsExactly(a, b IdWithParts) bool
- func DontAbbreviateString[VPtr interfaces.Stringer](k VPtr) (string, error)
- func DontExpandString(v string) (string, error)
- func Equals(a, b IdLike) (ok bool)
- func ErrOnConfig(v string) (err error)
- func ErrOnConfigBytes(b []byte) (err error)
- func ExpandMany[T idExpandable[T], TPtr idExpandablePtr[T]](ks interfaces.SetPtrLike[T, TPtr], ex expansion.Expander) (out interfaces.SetPtrLike[T, TPtr])
- func ExpandOneInto[T IdLike](k T, mf func(string) (T, error), ex expansion.Expander, ...)
- func ExpandOneSlice[T IdLike](k T, mf func(string) (T, error), exes ...expansion.Expander) (out []T)
- func FormattedString(k IdWithParts) string
- func GetObjectIdPool() interfaces.Pool[ObjectId, *ObjectId]
- func GetTagPool() interfaces.Pool[Tag, *Tag]
- func HasParentPrefix(a, b Tag) (has bool)
- func IsDependentLeaf(a Tag) (has bool)
- func IsEmpty[T interfaces.Stringer](a T) bool
- func IsErrInvalid(err error) bool
- func IsErrInvalidSigil(err error) bool
- func LeftSubtract[T interfaces.Stringer, TPtr interfaces.StringSetterPtr[T]](a, b T) (c T, err error)
- func RemovePrefixes(es TagMutableSet, needle Tag)
- func SigilFieldFunc(c rune) (ok bool)
- func TagSetEquals(a, b TagSet) bool
- type Abbr
- func (a Abbr) AbbreviateObjectId(in *ObjectId, out *ObjectId) (err error)
- func (a Abbr) AbbreviateZettelIdOnly(in *ObjectId) (err error)
- func (a Abbr) ExpandZettelIdOnly(in *ObjectId) (err error)
- func (a Abbr) ExpanderFor(g genres.Genre) FuncExpandString
- func (a Abbr) LenHeadAndTail(in *ObjectId) (head, tail int, err error)
- type Abbreviatable
- type Clock
- type Config
- func (a Config) Equals(b Config) bool
- func (a Config) EqualsAny(b any) bool
- func (a Config) GetGenre() interfaces.Genre
- func (t Config) MarshalBinary() (text []byte, err error)
- func (t Config) MarshalText() (text []byte, err error)
- func (k Config) Parts() [3]string
- func (a *Config) Reset()
- func (a *Config) ResetWith(_ Config)
- func (i Config) Set(v string) (err error)
- func (i Config) String() string
- func (t *Config) UnmarshalBinary(text []byte) (err error)
- func (t *Config) UnmarshalText(text []byte) (err error)
- type DumbObjectId
- type ErrInvalidId
- type ExternalObjectId
- type ExternalObjectIdCloner
- type ExternalObjectIdGetter
- type Field
- type FuncAbbreviateString
- type FuncExpandString
- type Genre
- func (a *Genre) Add(bs ...genres.Genre)
- func (i *Genre) AddString(v string) (err error)
- func (i Genre) Byte() byte
- func (a Genre) Contains(b interfaces.GenreGetter) bool
- func (a Genre) ContainsOneOf(b interfaces.GenreGetter) bool
- func (a *Genre) Del(b interfaces.GenreGetter)
- func (a Genre) Equals(b Genre) bool
- func (a Genre) EqualsAny(b any) bool
- func (i Genre) GetSha() *sha.Sha
- func (a Genre) IsEmpty() bool
- func (i Genre) ReadByte() (byte, error)
- func (i *Genre) ReadFrom(r io.Reader) (n int64, err error)
- func (g *Genre) ReadFromTokenScanner(ts *query_spec.TokenScanner) (err error)
- func (a *Genre) Reset()
- func (a *Genre) ResetWith(b Genre)
- func (gs *Genre) Set(v string) (err error)
- func (a Genre) Slice() []genres.Genre
- func (a Genre) String() string
- func (i *Genre) WriteTo(w io.Writer) (n int64, err error)
- type IdLike
- type IdParts
- type IdWithParts
- type Index
- type IndexedLike
- type IndexedTag
- type IndexedTag2
- type InlineTypeChecker
- type ObjectId
- type ObjectIdGetter
- type ObjectIdLike
- type ObjectIdStringerSansRepo
- type ObjectIdStringerWithRepo
- type Provider
- type RepoId
- func (a RepoId) Equals(b RepoId) bool
- func (a RepoId) EqualsAny(b any) bool
- func (k RepoId) EqualsRepoId(kg interfaces.RepoIdGetter) bool
- func (o RepoId) GetGenre() interfaces.Genre
- func (k RepoId) GetQueryPrefix() string
- func (k RepoId) GetRepoId() interfaces.RepoId
- func (k RepoId) GetRepoIdString() string
- func (k RepoId) IsEmpty() bool
- func (t RepoId) MarshalBinary() (text []byte, err error)
- func (t RepoId) MarshalText() (text []byte, err error)
- func (k RepoId) Parts() [3]string
- func (e *RepoId) Reset()
- func (e *RepoId) ResetWith(e1 RepoId)
- func (e *RepoId) Set(v string) (err error)
- func (k RepoId) String() string
- func (t *RepoId) UnmarshalBinary(text []byte) (err error)
- func (t *RepoId) UnmarshalText(text []byte) (err error)
- type Sigil
- func (a *Sigil) Add(b Sigil)
- func (i Sigil) Byte() byte
- func (a Sigil) Contains(b Sigil) bool
- func (a Sigil) ContainsOneOf(b Sigil) bool
- func (a *Sigil) Del(b Sigil)
- func (a Sigil) Equals(b Sigil) bool
- func (a Sigil) EqualsAny(b any) bool
- func (a Sigil) GetGattung() interfaces.Genre
- func (i Sigil) GetSha() *sha.Sha
- func (a Sigil) GetSigil() interfaces.Sigil
- func (a *Sigil) GetSigilPtr() *Sigil
- func (a Sigil) IncludesExternal() bool
- func (a Sigil) IncludesHidden() bool
- func (a Sigil) IncludesHistory() bool
- func (a Sigil) IncludesLatest() bool
- func (a Sigil) IsEmpty() bool
- func (a Sigil) IsLatestOrUnknown() bool
- func (i Sigil) ReadByte() (byte, error)
- func (i *Sigil) ReadFrom(r io.Reader) (n int64, err error)
- func (a *Sigil) Reset()
- func (a *Sigil) ResetWith(b Sigil)
- func (i *Sigil) Set(v string) (err error)
- func (a Sigil) String() string
- func (i *Sigil) WriteTo(w io.Writer) (n int64, err error)
- type Tag
- type TagMutableSet
- type TagSet
- func Expanded(s TagSet, ex expansion.Expander) (out TagSet)
- func IntersectPrefixes(haystack TagSet, needle Tag) (s3 TagSet)
- func MakeTagSet(es ...Tag) (s TagSet)
- func MakeTagSetStrings(vs ...string) (s TagSet, err error)
- func SubtractPrefix(s1 TagSet, e Tag) (s2 TagSet)
- func WithRemovedCommonPrefixes(s TagSet) (s2 TagSet)
- type TagSlice
- func (es *TagSlice) Add(e Tag)
- func (es *TagSlice) AddString(v string) (err error)
- func (s *TagSlice) DropFirst()
- func (s TagSlice) Len() int
- func (s *TagSlice) Set(v string) (err error)
- func (es TagSlice) SortedString() (out []string)
- func (s TagSlice) String() string
- func (s TagSlice) ToSet() TagSet
- type Tai
- func (a Tai) After(b Tai) bool
- func (t Tai) AsTime() (t1 thyme.Time)
- func (a Tai) Before(b Tai) bool
- func (t Tai) Equals(t1 Tai) bool
- func (a Tai) EqualsAny(b any) bool
- func (t Tai) Format(v string) string
- func (t Tai) GetGenre() interfaces.Genre
- func (t Tai) GetTai() Tai
- func (t Tai) IsEmpty() (ok bool)
- func (t Tai) IsZero() (ok bool)
- func (t Tai) Less(t1 Tai) bool
- func (t Tai) MarshalBinary() (text []byte, err error)
- func (t Tai) MarshalText() (text []byte, err error)
- func (t Tai) Parts() [3]string
- func (t *Tai) ReadFrom(r io.Reader) (n int64, err error)
- func (t *Tai) Reset()
- func (t *Tai) ResetWith(b Tai)
- func (t *Tai) Set(v string) (err error)
- func (t *Tai) SetFromRFC3339(v string) (err error)
- func (t Tai) String() (v string)
- func (t Tai) StringDefaultFormat() string
- func (t *Tai) UnmarshalBinary(text []byte) (err error)
- func (t *Tai) UnmarshalText(text []byte) (err error)
- func (t Tai) WriteTo(w io.Writer) (n int64, err error)
- type TaiRFC3339Value
- type Type
- func (a Type) Equals(b Type) bool
- func (a Type) EqualsAny(b any) bool
- func (o Type) GetGenre() interfaces.Genre
- func (t *Type) GetTypPtr() *Type
- func (t Type) GetType() Type
- func (t Type) IsEmpty() bool
- func (t Type) IsToml() bool
- func (t Type) MarshalBinary() (text []byte, err error)
- func (t Type) MarshalText() (text []byte, err error)
- func (t Type) Parts() [3]string
- func (t *Type) Reset()
- func (a *Type) ResetWith(b Type)
- func (e *Type) Set(v string) (err error)
- func (e Type) String() string
- func (e *Type) TodoSetFromObjectId(v *ObjectId) (err error)
- func (t *Type) UnmarshalBinary(text []byte) (err error)
- func (t *Type) UnmarshalText(text []byte) (err error)
- type TypeMutableSet
- type TypeSet
- type TypedBlob
- type ZettelId
- func MakeZettelId(v string) (h *ZettelId, err error)
- func MakeZettelIdFromHeadAndTail(head, tail string) (h *ZettelId, err error)
- func MakeZettelIdFromProvidersAndCoordinates(i coordinates.Int, pl Provider, pr Provider) (h *ZettelId, err error)
- func MustZettelId(v string) (h *ZettelId)
- func NewZettelIdEmpty() (h ZettelId)
- func (a ZettelId) Equals(b ZettelId) bool
- func (a ZettelId) EqualsAny(b any) bool
- func (h ZettelId) GetGenre() interfaces.Genre
- func (h ZettelId) GetHead() string
- func (h ZettelId) GetTail() string
- func (i ZettelId) Less(j ZettelId) bool
- func (t ZettelId) MarshalBinary() (text []byte, err error)
- func (t ZettelId) MarshalText() (text []byte, err error)
- func (h ZettelId) Parts() [3]string
- func (h *ZettelId) Reset()
- func (h *ZettelId) ResetWith(h1 ZettelId)
- func (h *ZettelId) Set(v string) (err error)
- func (h *ZettelId) SetFromIdParts(parts [3]string) (err error)
- func (h ZettelId) String() string
- func (t *ZettelId) UnmarshalBinary(text []byte) (err error)
- func (t *ZettelId) UnmarshalText(text []byte) (err error)
- type ZettelIdMutableSet
- type ZettelIdSet
Constants ¶
View Source
const ( SigilUnknown = Sigil(iota) SigilLatest = Sigil(1 << iota) SigilHistory SigilExternal SigilHidden SigilMax SigilAll = Sigil(^byte(0)) )
View Source
const RepoIdRegexString = `^(/)?[-a-z0-9_]+$`
View Source
const Tag2RegexString = `^%?[-a-z0-9_]+$`
View Source
const TagRegexString = `^%?[-a-z0-9_]+$`
Variables ¶
View Source
var ErrFDNotId = errors.New("not a id file")
View Source
var RepoIdRegex *regexp.Regexp
View Source
var Tag2Regex *regexp.Regexp
View Source
var TagRegex *regexp.Regexp
View Source
var TagResetter = sTagResetter
Functions ¶
func AddNormalizedTag ¶
func AddNormalizedTag(es TagMutableSet, e *Tag)
func Contains ¶
func Contains(a, b IdWithParts) bool
func ContainsExactly ¶
func ContainsExactly(a, b IdWithParts) bool
func DontAbbreviateString ¶
func DontAbbreviateString[VPtr interfaces.Stringer](k VPtr) (string, error)
func DontExpandString ¶
func ErrOnConfig ¶
func ErrOnConfigBytes ¶
func ExpandMany ¶
func ExpandMany[T idExpandable[T], TPtr idExpandablePtr[T]]( ks interfaces.SetPtrLike[T, TPtr], ex expansion.Expander, ) (out interfaces.SetPtrLike[T, TPtr])
func ExpandOneInto ¶
func ExpandOneSlice ¶
func FormattedString ¶
func FormattedString(k IdWithParts) string
func GetObjectIdPool ¶
func GetObjectIdPool() interfaces.Pool[ObjectId, *ObjectId]
func GetTagPool ¶
func GetTagPool() interfaces.Pool[Tag, *Tag]
func HasParentPrefix ¶
func IsDependentLeaf ¶
func IsEmpty ¶
func IsEmpty[T interfaces.Stringer](a T) bool
func IsErrInvalid ¶
func IsErrInvalidSigil ¶
func LeftSubtract ¶
func LeftSubtract[ T interfaces.Stringer, TPtr interfaces.StringSetterPtr[T], ]( a, b T, ) (c T, err error)
func RemovePrefixes ¶
func RemovePrefixes(es TagMutableSet, needle Tag)
func SigilFieldFunc ¶
func TagSetEquals ¶
Types ¶
type Abbr ¶
type Abbr struct { Sha abbrOne ZettelId abbrOne }
func (Abbr) AbbreviateObjectId ¶
func (Abbr) AbbreviateZettelIdOnly ¶
func (Abbr) ExpandZettelIdOnly ¶
func (Abbr) ExpanderFor ¶
func (a Abbr) ExpanderFor(g genres.Genre) FuncExpandString
type Abbreviatable ¶
type Abbreviatable interface { interfaces.Stringer }
type Config ¶
type Config struct{}
func (Config) GetGenre ¶
func (a Config) GetGenre() interfaces.Genre
func (Config) MarshalBinary ¶
func (Config) MarshalText ¶
func (*Config) UnmarshalBinary ¶
func (*Config) UnmarshalText ¶
type DumbObjectId ¶
func (*DumbObjectId) CloneExternalObjectId ¶
func (a *DumbObjectId) CloneExternalObjectId() ExternalObjectId
func (*DumbObjectId) GetExternalObjectId ¶
func (a *DumbObjectId) GetExternalObjectId() ExternalObjectId
func (*DumbObjectId) GetGenre ¶
func (a *DumbObjectId) GetGenre() interfaces.Genre
func (*DumbObjectId) IsEmpty ¶
func (a *DumbObjectId) IsEmpty() bool
func (*DumbObjectId) String ¶
func (a *DumbObjectId) String() string
type ErrInvalidId ¶
type ErrInvalidId string
func (ErrInvalidId) Error ¶
func (e ErrInvalidId) Error() string
func (ErrInvalidId) Is ¶
func (e ErrInvalidId) Is(err error) (ok bool)
type ExternalObjectId ¶
type ExternalObjectId interface { ObjectIdLike interfaces.GenreGetter interfaces.Stringer ExternalObjectIdGetter ExternalObjectIdCloner }
type ExternalObjectIdCloner ¶
type ExternalObjectIdCloner interface {
CloneExternalObjectId() ExternalObjectId
}
type ExternalObjectIdGetter ¶
type ExternalObjectIdGetter interface {
GetExternalObjectId() ExternalObjectId
}
type FuncAbbreviateString ¶
type FuncAbbreviateString func(Abbreviatable) (string, error)
type Genre ¶
type Genre byte
func MakeGenreAll ¶
func MakeGenreAll() Genre
func (Genre) Contains ¶
func (a Genre) Contains(b interfaces.GenreGetter) bool
func (Genre) ContainsOneOf ¶
func (a Genre) ContainsOneOf(b interfaces.GenreGetter) bool
func (*Genre) Del ¶
func (a *Genre) Del(b interfaces.GenreGetter)
func (*Genre) ReadFromTokenScanner ¶
func (g *Genre) ReadFromTokenScanner( ts *query_spec.TokenScanner, ) (err error)
type IdLike ¶
type IdLike interface { IdWithParts interfaces.GenreGetter }
type IdWithParts ¶
type IdWithParts interface { interfaces.Stringer Parts() [3]string }
type IndexedLike ¶
func MakeIndexed ¶
func MakeIndexed(k IdLike) (i *IndexedLike)
func (*IndexedLike) GetCount ¶
func (k *IndexedLike) GetCount() int
func (*IndexedLike) GetInt ¶
func (z *IndexedLike) GetInt() int
func (*IndexedLike) GetObjectId ¶
func (z *IndexedLike) GetObjectId() IdLike
func (*IndexedLike) GetSchwanzenCount ¶
func (k *IndexedLike) GetSchwanzenCount() int
func (*IndexedLike) Reset ¶
func (z *IndexedLike) Reset()
func (*IndexedLike) ResetWithObjectId ¶
func (i *IndexedLike) ResetWithObjectId(k IdLike)
type IndexedTag ¶
type IndexedTag = IndexedLike
type IndexedTag2 ¶
type IndexedTag2 = IndexedLike
type InlineTypeChecker ¶
type ObjectIdGetter ¶
type ObjectIdGetter interface {
GetObjectId() *ObjectId
}
type ObjectIdLike ¶
type ObjectIdLike interface { interfaces.GenreGetter interfaces.Stringer // GetObjectId() *ObjectId IsEmpty() bool }
type ObjectIdStringerSansRepo ¶
type ObjectIdStringerSansRepo ObjectId
func (*ObjectIdStringerSansRepo) String ¶
func (oid *ObjectIdStringerSansRepo) String() string
type ObjectIdStringerWithRepo ¶
type ObjectIdStringerWithRepo ObjectId
func (*ObjectIdStringerWithRepo) String ¶
func (oid *ObjectIdStringerWithRepo) String() string
type Provider ¶
type Provider interface {
MakeZettelIdFromCoordinates(i coordinates.Int) (string, error)
}
type RepoId ¶
type RepoId struct {
// contains filtered or unexported fields
}
func MakeRepoId ¶
func MustRepoId ¶
func (RepoId) EqualsRepoId ¶
func (k RepoId) EqualsRepoId(kg interfaces.RepoIdGetter) bool
func (RepoId) GetGenre ¶
func (o RepoId) GetGenre() interfaces.Genre
func (RepoId) GetQueryPrefix ¶
func (RepoId) GetRepoId ¶
func (k RepoId) GetRepoId() interfaces.RepoId
func (RepoId) GetRepoIdString ¶
func (RepoId) MarshalBinary ¶
func (RepoId) MarshalText ¶
func (*RepoId) UnmarshalBinary ¶
func (*RepoId) UnmarshalText ¶
type Sigil ¶
type Sigil byte
func (Sigil) ContainsOneOf ¶
func (Sigil) GetGattung ¶
func (a Sigil) GetGattung() interfaces.Genre
func (Sigil) GetSigil ¶
func (a Sigil) GetSigil() interfaces.Sigil
func (*Sigil) GetSigilPtr ¶
func (Sigil) IncludesExternal ¶
func (Sigil) IncludesHidden ¶
func (Sigil) IncludesHistory ¶
func (Sigil) IncludesLatest ¶
func (Sigil) IsLatestOrUnknown ¶
type TagMutableSet ¶
type TagMutableSet = interfaces.MutableSetPtrLike[Tag, *Tag]
func MakeMutableTagSet ¶
func MakeMutableTagSet(hs ...Tag) TagMutableSet
func MakeTagMutableSet ¶
func MakeTagMutableSet(hs ...Tag) TagMutableSet
type TagSet ¶
type TagSet = interfaces.SetPtrLike[Tag, *Tag]
var TagSetEmpty TagSet
func IntersectPrefixes ¶
func MakeTagSet ¶
func MakeTagSetStrings ¶
func SubtractPrefix ¶
type TagSlice ¶
type TagSlice []Tag
func MakeTagSlice ¶
func NewSliceFromStrings ¶
func (TagSlice) SortedString ¶
type Tai ¶
type Tai struct {
// contains filtered or unexported fields
}
func TaiFromTime ¶
func TaiFromTime1 ¶
func (Tai) GetGenre ¶
func (t Tai) GetGenre() interfaces.Genre
func (Tai) MarshalBinary ¶
func (Tai) MarshalText ¶
func (*Tai) SetFromRFC3339 ¶
func (Tai) StringDefaultFormat ¶
func (*Tai) UnmarshalBinary ¶
func (*Tai) UnmarshalText ¶
type TaiRFC3339Value ¶
type TaiRFC3339Value Tai
func (*TaiRFC3339Value) Set ¶
func (t *TaiRFC3339Value) Set(v string) (err error)
func (*TaiRFC3339Value) String ¶
func (t *TaiRFC3339Value) String() string
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
func (Type) GetGenre ¶
func (o Type) GetGenre() interfaces.Genre
func (Type) MarshalBinary ¶
func (Type) MarshalText ¶
func (*Type) TodoSetFromObjectId ¶
func (*Type) UnmarshalBinary ¶
func (*Type) UnmarshalText ¶
type TypeMutableSet ¶
type TypeMutableSet = interfaces.MutableSetPtrLike[Type, *Type]
func MakeMutableTypeSet ¶
func MakeMutableTypeSet(hs ...Type) TypeMutableSet
func MakeTypMutableSet ¶
func MakeTypMutableSet(hs ...Type) TypeMutableSet
type TypeSet ¶
type TypeSet = interfaces.SetPtrLike[Type, *Type]
func MakeTypSet ¶
func MakeTypSetStrings ¶
type ZettelId ¶
type ZettelId struct {
// contains filtered or unexported fields
}
func MakeZettelId ¶
func MakeZettelIdFromProvidersAndCoordinates ¶
func MakeZettelIdFromProvidersAndCoordinates( i coordinates.Int, pl Provider, pr Provider, ) (h *ZettelId, err error)
TODO-P3 is this really necessary?;w
func MustZettelId ¶
func NewZettelIdEmpty ¶
func NewZettelIdEmpty() (h ZettelId)
func (ZettelId) GetGenre ¶
func (h ZettelId) GetGenre() interfaces.Genre
func (ZettelId) MarshalBinary ¶
func (ZettelId) MarshalText ¶
func (*ZettelId) SetFromIdParts ¶
func (*ZettelId) UnmarshalBinary ¶
func (*ZettelId) UnmarshalText ¶
type ZettelIdMutableSet ¶
type ZettelIdMutableSet = interfaces.MutableSetLike[ZettelId]
func MakeZettelIdMutableSet ¶
func MakeZettelIdMutableSet(hs ...ZettelId) ZettelIdMutableSet
type ZettelIdSet ¶
type ZettelIdSet = interfaces.SetLike[ZettelId]
Source Files ¶
- abbr.go
- clock.go
- errors.go
- expansion.go
- field.go
- genre.go
- indexed.go
- konfig.go
- main.go
- object_id.go
- object_id2.go
- object_id_common.go
- object_id_dumb.go
- registry.go
- repo_id.go
- sigil.go
- tag.go
- tag2.go
- tag_collections.go
- tag_functions.go
- tag_pools.go
- tai.go
- type.go
- type_collections.go
- typed_blob.go
- zettel_id.go
- zettel_id_collections.go
Click to show internal directories.
Click to hide internal directories.