idxttl

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDXTTL

type IDXTTL struct {
	ExpiresAt  time.Time
	Signatures []string
}

IDXTTL holds the list of Signatures that need to expire at the given ExpiresAt

func New

func New(ea time.Time, ss ...string) *IDXTTL

New initializes a new IDXTTL to expire all the ss at ea

func (*IDXTTL) AddSignatures

func (i *IDXTTL) AddSignatures(ss ...string)

AddSignatures will add all the s to the list of signatures to expire on the ExpiresAt if they do not exists already

type Repository

type Repository interface {
	CreateOrReplace(ctx context.Context, ik *IDXTTL) error
	// Filter will return all the IDXTTL older than ea
	Filter(ctx context.Context, ea time.Time) ([]*IDXTTL, error)
	Find(ctx context.Context, ea time.Time) (*IDXTTL, error)
	Delete(ctx context.Context, ea time.Time) error
}

Repository is the interface that has to be fulfilled to interact with IDXTTL. All the 'ea' used as keys will be converted to RFC3339

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL