handler

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forex

type Forex struct {
	Api   string
	Key   string
	Cache *cache.Cache
}

func New

func New() *Forex

func (*Forex) History

func (s *Forex) History(ctx context.Context, req *pb.HistoryRequest, rsp *pb.HistoryResponse) error

func (*Forex) Price

func (s *Forex) Price(ctx context.Context, req *pb.PriceRequest, rsp *pb.PriceResponse) error

func (*Forex) Quote

func (s *Forex) Quote(ctx context.Context, req *pb.QuoteRequest, rsp *pb.QuoteResponse) error

type History

type History struct {
	Open      float64 `json:"o"`
	High      float64 `json:"h"`
	Low       float64 `json:"l"`
	Close     float64 `json:"c"`
	Volume    float64 `json:"v"`
	Timestamp float64 `json:"t"`
}

type Previous

type Previous struct {
	Symbol       string
	TotalResults int32
	Results      []*History
}

type Quote

type Quote struct {
	Symbol    string
	Ask       float64
	Bid       float64
	Asize     float64
	Bsize     float64
	Timestamp float64
}

Jump to

Keyboard shortcuts

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