find

package
v0.0.0-...-988e9ee Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 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 LogOptions

type LogOptions struct {
	// contains filtered or unexported fields
}

func NewLogOptions

func NewLogOptions() *LogOptions

func (*LogOptions) Limit

func (l *LogOptions) Limit(limit int64) *LogOptions

func (*LogOptions) MongoOptions

func (l *LogOptions) MongoOptions() *options.FindOptions

func (*LogOptions) Skip

func (l *LogOptions) Skip(skip int64) *LogOptions

func (*LogOptions) SortCreatedAt

func (l *LogOptions) SortCreatedAt(order int) *LogOptions

type LogQuery

type LogQuery struct {
	Services optional.Optional[[]string]      `json:"services"`
	Modules  optional.Optional[[]string]      `json:"modules"`
	Levels   optional.Optional[[]types.Level] `json:"levels"`

	Before optional.Optional[types.Time] `json:"before"`
	After  optional.Optional[types.Time] `json:"after"`
}

func (*LogQuery) MongoQuery

func (l *LogQuery) MongoQuery() bson.M

func (*LogQuery) SetAfter

func (l *LogQuery) SetAfter(after types.Time)

func (*LogQuery) SetBefore

func (l *LogQuery) SetBefore(before types.Time)

func (*LogQuery) WithLevels

func (l *LogQuery) WithLevels(levels ...types.Level) *LogQuery

func (*LogQuery) WithModules

func (l *LogQuery) WithModules(modules ...string) *LogQuery

func (*LogQuery) WithServices

func (l *LogQuery) WithServices(services ...string) *LogQuery

type Options

type Options[T any] interface {
	MongoOptions() *options.FindOptions
}

type Query

type Query[T any] interface {
	MongoQuery() bson.M
}

Jump to

Keyboard shortcuts

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