utilities

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSignature

func GenerateSignature(data, keypath string) (string, error)

func GenerateToken

func GenerateToken(apiKey, username, password, baseUrl, path string) *http.Response

func IsAllowedCountryCode

func IsAllowedCountryCode(code string) bool

func MakeGetRequest

func MakeGetRequest(signature, token, baseURL, path string) *http.Response

func MakePostRequest

func MakePostRequest(signature, token, baseURL, path string, reqBody []byte) *http.Response

Types

type Signer

type Signer interface {
	// Sign returns raw signature for the given data. This method
	// will apply the hash specified for the keytype to the data.
	Sign(data []byte) ([]byte, error)
}

A Signer is can create signatures that verify against a public key.

Jump to

Keyboard shortcuts

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