Skip to content

API reference

The authoritative API reference is hosted on pkg.go.dev:

API[Payload] methods

go
// Log records an audit entry. The caller owns the entry fields except
// for ID / Timestamp / TTLTime, which the repository fills in when zero.
func (a *API[Payload]) Log(ctx context.Context, entry *storex.Entry[Payload]) error

// Get returns the entry with the given id.
func (a *API[Payload]) Get(ctx context.Context, id storex.EntityID) (*storex.Entry[Payload], error)

// Search returns a page of entries matching the filter.
func (a *API[Payload]) Search(ctx context.Context, qry storex.Search) (*storex.PagedResult[storex.Entry[Payload]], error)

For usage-oriented explanations with code examples, see the Guide:

Released under the MIT License.