Versions in this module Expand all Collapse all v1 v1.11.1 Sep 16, 2024 v1.11.0 Sep 15, 2024 v1.10.0 Sep 15, 2024 v1.9.1 Oct 19, 2023 v1.9.0 Sep 25, 2023 Changes in this version + var ErrFailToMarshalData = apperrors.System(nil, "fail to marshal data", "FAIL_TO_MARSHAL_DATA") + var ErrFailToMarshalMeta = apperrors.System(nil, "fail to marshal data", "FAIL_TO_MARSHAL_META") + type Entry struct + Data T + Status Status + func (e Entry[T]) Hash() ([]byte, error) + func (e Entry[T]) Marshal() ([]byte, error) + type FindByHasStoryOptions struct + Has bool + Interval time.Duration + Limit int + SourceNames []string + type Options struct + TTL time.Duration + type Status byte + const StatusNew + const StatusSent + func (s Status) Byte() byte + func (s Status) Is(status Status) bool + type Storage interface + Cleanup func() (int64, error) + FindByHasStory func(opt FindByHasStoryOptions) ([]T, error) + Has func(hash string) (bool, error) + Store func(entry Entry[T]) error + Update func(entry Entry[T]) error + Where func(opts WhereOptions, list []T) ([]T, error) + type WhereOption func(opts *WhereOptions) + func WhereAllowMissed(allow bool) WhereOption + func WhereIs(status Status) WhereOption + func WhereNot(status Status) WhereOption + type WhereOptions struct + AllowMissed *bool + Is *Status + Not *Status + func Where(opts ...WhereOption) WhereOptions + func WhereNotSent() WhereOptions