args

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

package args holds the argument logic for the requests the client will use to comunicate with Cryptomarket. Separate package between args and the request is prefered as its crearer for the user to use them if they are called args.AnArgument, instead of request.AnArgument.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument func(*requests.Request) error

An Argument is a function that servers the porpouse of arguments for a requests. Works by modifying the given request, creating the corresponding data there.

func Address

func Address(val string) Argument

Address is an argument of a request.

func Amount

func Amount(val string) Argument

Amount is an argument of a request. Represents numbers as strings.

Number format: without thousand separator, and . (a dot) as decimal point.

func BankAccount

func BankAccount(val string) Argument

BancAccount is an argument of a request.

func CallbackUrl

func CallbackUrl(val string) Argument

CallbackUrl is an argument of a request.

Max 256 caracteres.

func Currency

func Currency(val string) Argument

Currency is an argument of a request. Its a currency as "EUR" or "XLM".

func Date

func Date(val string) Argument

Date is an argument of a request.

Needed in deposit requests for México.

Date format: dd/mm/yyyy.

func End

func End(val string) Argument

End is an argument of a request.

Date format: yyyy-mm-dd.

func EndDate

func EndDate(val string) Argument

EndDate is an argument of a request.

Date format: dd/mm/yyyy

func ErrorUrl

func ErrorUrl(val string) Argument

ErrorUrl is an argument of a request.

Max 256 caracteres.

func ExternalId

func ExternalId(val string) Argument

ErrorUrl is an argument of a request.

Max 64 caracteres.

func Id

func Id(val string) Argument

Id is an argument of a request.

func Language

func Language(val string) Argument

Language is an argument of a request.

Supported languages are "es", "en" and "pt".

func Limit

func Limit(val int) Argument

Limit is an argument of a request. It accepts an integer greater or equal to 20 and lesser or equal to 100.

Asumed to be 20 by the server if the argument is not given.

func Market

func Market(val string) Argument

Market is an argument of a request.

Accepts a par of currencies. e.g. "ETHCLP" or "BTCARS".

func Memo

func Memo(val string) Argument

Memo is an argument of a request.

func Page

func Page(val int) Argument

Page is an argument of a request.

Accepts an integer greater or equal to 0, asumed to be 0 by the server if not given.

func PaymentReceiver

func PaymentReceiver(val string) Argument

PaymentReceiver is an argument of a request.

func Price

func Price(val string) Argument

Price is an argument of a request.

func RefundEmail

func RefundEmail(val string) Argument

RefundMail is an argument of a request.

func Start

func Start(val string) Argument

Start is an argument of a request.

Date format: yyyy-mm-dd.

func StartDate

func StartDate(val string) Argument

StartDate is an argument of a request.

Date format: dd/mm/yyyy

func SuccessUrl

func SuccessUrl(val string) Argument

SuccessUrl is an argument of a request.

Max 256 caracteres

func TimeFrame

func TimeFrame(val string) Argument

TimeFrame is an argument of a request. Its the lapse between two candles. Is an Alias of Timeframe

Accepts: 1, 5, 15, 60, 240, 1440 or 10080 as strings.

func Timeframe

func Timeframe(val string) Argument

Timeframe is an argument of a request. Its the lapse between two candles.

Accepts: 1, 5, 15, 60, 240, 1440 or 10080 as strings.

func ToReceive

func ToReceive(val float64) Argument

ToReceive is an argument of a request.

func ToReceiveCurrency

func ToReceiveCurrency(val string) Argument

ToReceiveCurrency is an argument of a request.

func Token

func Token(val string) Argument

Token is an argument of a request.

func TrackingCode

func TrackingCode(val string) Argument

TrackingCode is an argument of a request.

Its needed in deposit requests for México.

func Type

func Type(val string) Argument

Type is an argument of a request.

Accepts either "buy" or "sell".

func Voucher

func Voucher(val string) Argument

Voucher is an argument of a request.

Its needed in deposit requests for México, Brasil and European Union.

func Wallet

func Wallet(val string) Argument

Wallet is an argument of a request.

examples: "ETH", "XLM" or "BTC".

type DateError

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

func (*DateError) Error

func (de *DateError) Error() string

Jump to

Keyboard shortcuts

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