cache

package
v0.0.0-...-24cb8d0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: MIT Imports: 9 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 {
	sync.RWMutex

	List map[string]string
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *Cache

func (*Cache) Delete

func (c *Cache) Delete(k Key)

func (*Cache) Get

func (c *Cache) Get(k Key) (d Details, ok bool)

func (*Cache) Set

func (c *Cache) Set(k Key, d Details)

func (*Cache) SetTopList

func (s *Cache) SetTopList(c map[string]string) error

type Details

type Details struct {
	Token           string
	Fiat            string
	Price           string
	ChangePCTHour   string
	ChangePCT24Hour string
	ChangePCT7Day   string
}

func DetailsConversion

func DetailsConversion(price, hour, hour24, sevenDay float64) Details

type Key

type Key struct {
	API      string
	Fiat     string
	Currency string
}

func GenKey

func GenKey(a, f, c string) Key

Jump to

Keyboard shortcuts

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