api

package
v0.0.0-...-c3caef9 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: BSD-3-Clause Imports: 0 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAPI

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

BaseAPI - Base API struct.

func NewBaseAPI

func NewBaseAPI(method string, endpoint string, requestObject interface{}, responseObject interface{}) *BaseAPI

NewBaseAPI - Returns a new object of the BaseAPI.

func (*BaseAPI) Endpoint

func (b *BaseAPI) Endpoint() string

Endpoint - Returns the Endpoint url string.

func (*BaseAPI) Error

func (b *BaseAPI) Error() error

Error - Returns the err the api.

func (*BaseAPI) Method

func (b *BaseAPI) Method() string

Method - Returns the Method string, i.e. GET, PUT, POST.

func (*BaseAPI) RawResponse

func (b *BaseAPI) RawResponse() []byte

RawResponse - Returns the rawResponse object as byte type.

func (*BaseAPI) RequestObject

func (b *BaseAPI) RequestObject() interface{}

RequestObject - Returns the request object of the BaseAPI

func (*BaseAPI) ResponseObject

func (b *BaseAPI) ResponseObject() interface{}

ResponseObject - Returns the ResponseObject interface.

func (*BaseAPI) SetError

func (b *BaseAPI) SetError(err error)

SetError - Sets the err on api object.

func (*BaseAPI) SetRawResponse

func (b *BaseAPI) SetRawResponse(rawResponse []byte)

SetRawResponse - Sets the rawResponse on api object.

func (*BaseAPI) SetResponseObject

func (b *BaseAPI) SetResponseObject(res interface{})

SetResponseObject - Sets the responseObject on api.

func (*BaseAPI) SetStatusCode

func (b *BaseAPI) SetStatusCode(statusCode int)

SetStatusCode - Sets the statusCode from api object.

func (*BaseAPI) StatusCode

func (b *BaseAPI) StatusCode() int

StatusCode - Returns the status code of the api.

type NSXApi

type NSXApi interface {
	Method() string
	Endpoint() string
	RequestObject() interface{}
	ResponseObject() interface{}
	StatusCode() int
	RawResponse() []byte
	Error() error

	SetResponseObject(interface{})
	SetStatusCode(int)
	SetRawResponse([]byte)
}

NSXApi object.

Jump to

Keyboard shortcuts

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