nfs

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

README

go-nfs

GoDoc Build Status Go Report Card Apache 2 licensed

A go client library for NearlyFreeSpeech's api.

Api Docs

Getting / Usage

go get github.com/adamdecaf/go-nfs

Building / Testing

You need the following environment variables set:

  • NFS_ACCOUNT_ID
  • NFS_API_KEY
  • NFS_LOGIN
$ go get github.com/adamdecaf/go-nfs
$ cd go-nfs
$ go build .
$ go test -v .

License

Apache License 2.0 See LICENSE for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountBalanceHighest

func GetAccountBalanceHighest(c *Client) (float32, error)

GetAccountBalanceHighest https://members.nearlyfreespeech.net/wiki/API/AccountBalanceHigh

func GetAccountStatus

func GetAccountStatus(c *Client) (string, error)

func GetDNSRecords

func GetDNSRecords(c *Client, domain string, params map[string]string) (string, error)

GetDNSRecords https://members.nearlyfreespeech.net/wiki/API/

func RemoveDNSRecord

func RemoveDNSRecord(c *Client, domain string, params map[string]string) (string, error)

RemoveDNSRecord https://members.nearlyfreespeech.net/wiki/API/DNSRemoveRR

func SetDNSRecord

func SetDNSRecord(c *Client, domain string, params map[string]string) (string, error)

SetDNSRecord https://members.nearlyfreespeech.net/wiki/API/DNSAddRR

func SetFriendlyName

func SetFriendlyName(c *Client, name string) error

Types

type Client

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

func NewClient

func NewClient(apiKey, login string) *Client

func NewClientForAccount

func NewClientForAccount(accountId, apiKey, login string) *Client

type Error

type Error struct {
	Debug string `json:"debug"`
	Error string `json:"error"`
}

Error represented by the NFS api

func (Error) Err

func (e Error) Err() error

Jump to

Keyboard shortcuts

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