client

package
v5.1.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: BSD-3-Clause Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorField

type ErrorField struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Field   string `json:"field"`
}

func (ErrorField) String

func (err ErrorField) String() string

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type VirgilAPIError

type VirgilAPIError struct {
	StatusCode int
	Code       int          `json:"code"`
	Message    string       `json:"message"`
	Errors     []ErrorField `json:"errors,omitempty"`
}

func (VirgilAPIError) Error

func (err VirgilAPIError) Error() string

type VirgilHTTPClient

type VirgilHTTPClient struct {
	Client  HTTPClient
	Address string
}

func (*VirgilHTTPClient) Send

func (vc *VirgilHTTPClient) Send(
	method string,
	urlPath string,
	payload interface{},
	respObj interface{},
	header http.Header,
) (headers http.Header, cookie string, virgilAPIErr *VirgilAPIError)

Jump to

Keyboard shortcuts

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