config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey() string

APIKey is the API key to use.

func IPNSecretKey added in v1.0.1

func IPNSecretKey() string

IPNSecretKey returns the related IPN secret key to use.

func Load

func Load(c *Credentials) error

Load parses a JSON file to get the required credentials to operate NOWPayment's API.

func LoadFromFile added in v1.0.2

func LoadFromFile(r io.Reader) error

LoadFromFile parses a JSON file to get the required credentials to operate NOWPayment's API.

func Login

func Login() string

Login returns the email address to use with the API.

func Password

func Password() string

Password returns the related password to use.

func Server

func Server() string

Server returns URL to connect to the API service.

Types

type Credentials added in v1.0.2

type Credentials struct {
	APIKey       string `json:"apiKey"`
	IPNSecretKey string `json:"ipnSecretKey"`
	Login        string `json:"login"`
	Password     string `json:"password"`
	Server       string `json:"server"`
}

Jump to

Keyboard shortcuts

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