bestchange

package
v0.0.0-...-87c4436 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Debug mode. Default: false.
	Debug bool
)

Functions

func SetLogger

func SetLogger(logger Logger) error

SetLogger specifies the logger that the package should use.

Types

type Client

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

Client.

func NewClient

func NewClient() *Client

NewClient creates a new client.

func (*Client) Rate

func (c *Client) Rate() (float64, error)

Rate in Moscow.

type Logger

type Logger interface {
	Println(v ...interface{})
	Printf(format string, v ...interface{})
}

Logger is an interface that represents the required methods to log data.

type Rate

type Rate struct {
	Value float64 `json:"value"`
}

Average exchange rate.

func (*Rate) String

func (r *Rate) String() string

String representation of average exchange rate.

Jump to

Keyboard shortcuts

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