toolscache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache implements quite simple instruments cache.

func New

func New(p SharesProvider) *Cache

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, figi tinkoffinvest.FIGI) (Tool, error)

type SharesProvider

type SharesProvider interface {
	GetShareByFIGI(ctx context.Context, figi tinkoffinvest.FIGI) (*tinkoffinvest.Instrument, error)
}

type Tool

type Tool struct {
	FIGI         tinkoffinvest.FIGI
	StocksPerLot int
	MinPriceInc  decimal.Decimal
}

Directories

Path Synopsis
Package toolscachemocks is a generated GoMock package.
Package toolscachemocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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