config

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCull added in v1.0.7

func NewCull(usd, pat, all []string) *cull

func NewParagon added in v1.0.7

func NewParagon(name string, size, gain, loss, delta float64) *paragon

func NewPeriod added in v1.0.7

func NewPeriod(name, duration string, now *time.Time) *period

Types

type ParagonConfig added in v1.0.7

type ParagonConfig struct {
	Patterns []cbp.Pattern `yaml:"patterns"`
}

type Session

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

Session of the application - only active while the executable is run within the defined period range.

func NewSession

func NewSession(cfg, dur string, usd []string, size, gain, loss, delta float64, debug ...bool) (*Session, error)

NewSession reads configuration from environment variables and validates it

func (Session) GetPattern added in v1.0.5

func (p Session) GetPattern(productID string) *cbp.Pattern

func (Session) IDS added in v1.0.7

func (c Session) IDS() []string

func (Session) InPeriod added in v1.0.5

func (p Session) InPeriod(t time.Time) bool

InPeriod is an exclusive range function to determine if the given time falls within the defined period.

func (Session) RateParams added in v1.0.9

func (p Session) RateParams() *[]cb.GetHistoricRatesParams

func (Session) Start added in v1.0.5

func (p Session) Start() *time.Time

func (Session) Stop added in v1.0.5

func (p Session) Stop() *time.Time

func (Session) UsdSelectionProductIDs added in v1.0.3

func (c Session) UsdSelectionProductIDs() []string

Jump to

Keyboard shortcuts

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