internal

package
v0.0.0-...-3ae3623 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonService

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

func NewJsonService

func NewJsonService(url string, client *http.Client) *JsonService

func (*JsonService) Delete

func (svc *JsonService) Delete(endpoint string, body interface{}, result interface{}) (*http.Response, error)

func (*JsonService) Get

func (svc *JsonService) Get(endpoint string, result interface{}) (*http.Response, error)

func (*JsonService) InjectRequest

func (svc *JsonService) InjectRequest(action RequestSite)

func (*JsonService) Post

func (svc *JsonService) Post(endpoint string, body interface{}, result interface{}) (*http.Response, error)

func (*JsonService) Put

func (svc *JsonService) Put(endpoint string, id string, body interface{}, result interface{}) (*http.Response, error)

type RequestSigner

type RequestSigner struct {
}

func (*RequestSigner) GetSignature

func (signer *RequestSigner) GetSignature(req *http.Request, secret string) (string, error)

type RequestSite

type RequestSite func(method string, endpoint string, req *http.Request) error

type ResponseError

type ResponseError struct {
	Code   int
	Status string
	Body   string
}

func (*ResponseError) Error

func (e *ResponseError) Error() string

type ResponseSite

type ResponseSite func(method string, endpoint string, res *http.Response) error

Jump to

Keyboard shortcuts

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