domain

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry map[string]interface{}

func NewEntry

func NewEntry(fields map[string]string, realtime time.Time) (*Entry, error)

type EntryRepository

type EntryRepository interface {
	Store(context.Context, *Entry) error
	Get(context.Context, primitive.ObjectID) (*Entry, error)
	List(context.Context, Paginator) ([]Entry, int64, error)
}

type Paginated

type Paginated struct {
	TotalCount int64       `json:"totalCount"`
	Limit      int64       `json:"limit"`
	Offset     int64       `json:"offset"`
	Items      interface{} `json:"items"`
}

func NewPaginated

func NewPaginated(totalCount int64, limit int64, offset int64, items interface{}) Paginated

func NewPaginatedFromPaginator

func NewPaginatedFromPaginator(p Paginator, totalCount int64, items interface{}) Paginated

type Paginator

type Paginator struct {
	Offset int64 `schema:"offset,default:0"`
	Limit  int64 `schema:"limit,default:10"`
}

Jump to

Keyboard shortcuts

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