repositories

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IntervalGroup is the column alias for the interval group.
	IntervalGroup = "group_timestamp"
)
View Source
const (
	// MaxPageSize is the maximum page size for paginated results
	MaxPageSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Log *zerolog.Logger
	// contains filtered or unexported fields
}

Repository is the base repository for all repositories.

func NewRepository

func NewRepository(logger *zerolog.Logger, settings config.Settings, rootCAs *x509.CertPool) (*Repository, error)

NewRepository creates a new base repository. clientCAs is optional and can be nil.

func (*Repository) GetLastSeen added in v0.0.4

func (r *Repository) GetLastSeen(ctx context.Context, sigArgs *model.SignalArgs) (*time.Time, error)

GetLastSeen returns the last seen timestamp of a token.

func (*Repository) GetLatestSignalFloat

func (r *Repository) GetLatestSignalFloat(ctx context.Context, sigArgs *model.FloatSignalArgs) (*model.SignalFloat, error)

GetLatestSignalFloat returns the latest float signal based on the provided arguments.

func (*Repository) GetLatestSignalString

func (r *Repository) GetLatestSignalString(ctx context.Context, sigArgs *model.StringSignalArgs) (*model.SignalString, error)

GetLatestSignalString returns the latest string signal based on the provided arguments.

func (*Repository) GetSignalFloats

func (r *Repository) GetSignalFloats(ctx context.Context, sigArgs *model.FloatSignalArgs) ([]*model.SignalFloat, error)

GetSignalFloats returns the float signals based on the provided arguments.

func (*Repository) GetSignalString

func (r *Repository) GetSignalString(ctx context.Context, sigArgs *model.StringSignalArgs) ([]*model.SignalString, error)

GetSignalString returns the string signals based on the provided arguments.

Jump to

Keyboard shortcuts

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