crawler

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Index = map[string]string{}/* 201 elements not displayed */

)

Functions

This section is empty.

Types

type Crawler

type Crawler struct {
	Url string
	Key string
}

func New

func New(url, key string) *Crawler

func (*Crawler) Get

func (c *Crawler) Get(symbol, currency string) (*pb.Value, error)

func (*Crawler) GetPrices

func (c *Crawler) GetPrices(base string)

func (*Crawler) List

func (c *Crawler) List(currency string) ([]*pb.Value, error)

func (*Crawler) Run

func (c *Crawler) Run()

type Data

type Data struct {
	Success   bool               `json:"success"`
	Timestamp int64              `json:"timestamp"`
	Date      string             `json:"date"`
	Base      string             `json:"base"`
	Rates     map[string]float64 `json:"rates"`
	Unit      string             `json:"unit,omitempty"`
}

type Response

type Response struct {
	Data Data `json:"data"`
}

Jump to

Keyboard shortcuts

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