greece

package
v0.0.0-...-f0af531 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agg

func Agg(dbConn *db.DB, optionsList ...func(*ListOptions)) ([]*map[string]interface{}, error)

Agg Aggregate Data

func From

func From(i time.Time) func(*ListOptions)

From sets the start date to retrieve data from

func IsValidKey

func IsValidKey(str string, list []string) bool

IsValidKey checks if a string is in an array

func Keys

func Keys(i string) func(*ListOptions)

Keys sets the keys to return

func Limit

func Limit(i int) func(*ListOptions)

Limit sets the limit

func List

func List(dbConn *db.DB, optionsList ...func(*ListOptions)) ([]*map[string]interface{}, error)

List Endpoint

func NewListOpts

func NewListOpts() []func(*ListOptions)

NewListOpts create a new ListOptions struct

func Sum

func Sum(dbConn *db.DB, optionsList ...func(*ListOptions)) ([]*map[string]interface{}, error)

Sum Data

func To

func To(i time.Time) func(*ListOptions)

To sets the end date to retrieve data from

func UID

func UID(i string) func(*ListOptions)

UID sets the uid country code

Types

type ListOptions

type ListOptions struct {
	Limit int
	UID   string
	Keys  string
	From  time.Time
	To    time.Time
	Key   string
}

ListOptions represents the filter structure to query the database

func DefaultOpts

func DefaultOpts() ListOptions

DefaultOpts sets the defaults

Jump to

Keyboard shortcuts

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