Versions in this module Expand all Collapse all v0 v0.11.0 Sep 22, 2026 v0.10.1 May 19, 2025 v0.10.0 May 18, 2025 v0.9.0 May 12, 2025 v0.8.1 May 5, 2025 Changes in this version + const HumanIdLength + const UnsetCombinedId + const UnsetId + func IsErrMultipleMatch(err error) bool + func IsErrNotFound(err error) bool + func Resolve[T Resolved](rs Resolvers, id Id) (T, error) + func SeparateIds(prefix string) (primaryPrefix string, secondaryPrefix string) + type CachedResolver struct + func NewCachedResolver(resolver Resolver) *CachedResolver + func (c *CachedResolver) Resolve(id Id) (Resolved, error) + type CombinedId string + func CombineIds(primary Id, secondary Id) CombinedId + func (ci *CombinedId) UnmarshalGQL(v interface{}) error + func (ci CombinedId) HasPrefix(prefix string) bool + func (ci CombinedId) Human() string + func (ci CombinedId) MarshalGQL(w io.Writer) + func (ci CombinedId) PrimaryPrefix() string + func (ci CombinedId) SecondaryPrefix() string + func (ci CombinedId) String() string + func (ci CombinedId) Validate() error + type ErrInvalidFormat struct + func NewErrInvalidFormat(version uint, expected uint) *ErrInvalidFormat + func NewErrUnknownFormat(expected uint) *ErrInvalidFormat + func (e ErrInvalidFormat) Error() string + type ErrMultipleMatch struct + Matching []Id + func NewErrMultipleMatch(typename string, matching []Id) *ErrMultipleMatch + func (e ErrMultipleMatch) Error() string + type ErrNotFound struct + func NewErrNotFound(typename string) *ErrNotFound + func (e ErrNotFound) Error() string + type Id string + func DeriveId(data []byte) Id + func RefToId(ref string) Id + func RefsToIds(refs []string) []Id + func (i *Id) UnmarshalGQL(v interface{}) error + func (i Id) HasPrefix(prefix string) bool + func (i Id) Human() string + func (i Id) MarshalGQL(w io.Writer) + func (i Id) String() string + func (i Id) Validate() error + type Interface interface + Id func() Id + Validate func() error + type MergeResult struct + Entity Interface + Err error + Id Id + Reason string + Status MergeStatus + func NewMergeError(err error, id Id) MergeResult + func NewMergeInvalidStatus(id Id, reason string) MergeResult + func NewMergeNewStatus(id Id, entity Interface) MergeResult + func NewMergeNothingStatus(id Id) MergeResult + func NewMergeUpdatedStatus(id Id, entity Interface) MergeResult + func (mr MergeResult) String() string + type MergeStatus int + const MergeStatusError + const MergeStatusInvalid + const MergeStatusNew + const MergeStatusNothing + const MergeStatusUpdated + type Resolved interface + Id func() Id + type Resolver interface + Resolve func(id Id) (Resolved, error) + func MakeResolver(entities ...Resolved) Resolver + type ResolverFunc func(id Id) (EntityT, error) + func (fn ResolverFunc[EntityT]) Resolve(id Id) (Resolved, error) + type Resolvers map[Resolved]Resolver + type StreamedEntity struct + CurrentEntity int64 + Entity EntityT + Err error + TotalEntities int64