coinmate

package
v0.0.0-...-5e12142 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceCurrency

type BalanceCurrency struct {
	Currency  string  `json:"currency"`
	Balance   float32 `json:"balance"`
	Reserved  float32 `json:"reserved"`
	Available float32 `json:"available"`
}

Balance currency data

type ClientInterface

type ClientInterface interface {
	GetNonce() string
	GetSignature(clientId, apiKey, nonce, privateKey string) string
	GetBaseUrl() string
	MakePublicRequest(r Request) (Response, error)
	MakeSecureRequest(r Request) (Response, error)
	GetRequestBody(map[string]string) []byte
}

type CoinmateClient

type CoinmateClient struct {
	ClientID   string
	ApiKey     string
	PrivateKey string
	Nonce      string
	Signature  string
	// contains filtered or unexported fields
}

func GetCoinmateClient

func GetCoinmateClient(clientId, publicKey, privateKey string) *CoinmateClient

Return Coinmate client

func (*CoinmateClient) GetBaseUrl

func (c *CoinmateClient) GetBaseUrl() string

Return url prefix

func (*CoinmateClient) GetNonce

func (c *CoinmateClient) GetNonce() string

Return nonce (security)

func (*CoinmateClient) GetRequestBody

func (c *CoinmateClient) GetRequestBody(additionalParams map[string]string) []byte

Return request body due to security

func (*CoinmateClient) GetSignature

func (c *CoinmateClient) GetSignature(clientId, apiKey, nonce, privateKey string) string

Return signature (security)

func (*CoinmateClient) MakePublicRequest

func (c *CoinmateClient) MakePublicRequest(r Request) (Response, error)

Make public request

func (*CoinmateClient) MakeSecureRequest

func (c *CoinmateClient) MakeSecureRequest(r Request) (Response, error)

Make secure request

type CoinmateResponse

type CoinmateResponse struct {
	Error        bool        `json:"error"`
	ErrorMessage string      `json:"errorMessage"`
	Data         interface{} `json:"data"`
}

type Request

type Request struct {
	HTTPMethod string
	URL        string
	Body       []byte
}

Request data

type Response

type Response struct {
	Status     string
	StatusCode int
	Body       []byte
}

Response data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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