echo

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient added in v1.2.3

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

func (*APIClient) CallAPI added in v1.2.3

func (c *APIClient) CallAPI(path string, method string,
	postBody interface{},
	headerParams map[string]string,
	queryParams url.Values,
	formParams map[string]string,
	fileName string,
	fileBytes []byte) (*resty.Response, error)

func (*APIClient) ParameterToString added in v1.2.3

func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string

func (*APIClient) SelectHeaderAccept added in v1.2.3

func (c *APIClient) SelectHeaderAccept(accepts []string) string

func (*APIClient) SelectHeaderContentType added in v1.2.3

func (c *APIClient) SelectHeaderContentType(contentTypes []string) string

type APIResponse added in v1.2.3

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse added in v1.2.3

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError added in v1.2.3

func NewAPIResponseWithError(errorMessage string) *APIResponse

type Configuration added in v1.2.3

type Configuration struct {
	Username      string            `json:"userName,omitempty"`
	Password      string            `json:"password,omitempty"`
	APIKeyPrefix  map[string]string `json:"APIKeyPrefix,omitempty"`
	APIKey        map[string]string `json:"APIKey,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	AccessToken   string            `json:"accessToken,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	APIClient     *APIClient
	Transport     *http.Transport
	Timeout       *time.Duration `json:"timeout,omitempty"`
}

func NewConfiguration added in v1.2.3

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader added in v1.2.3

func (c *Configuration) AddDefaultHeader(key string, value string)

func (*Configuration) GetAPIKeyWithPrefix added in v1.2.3

func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string

func (*Configuration) GetBasicAuthEncodedString added in v1.2.3

func (c *Configuration) GetBasicAuthEncodedString() string

type EchoServiceApi

type EchoServiceApi struct {
	Configuration *Configuration
}

func NewEchoServiceApi

func NewEchoServiceApi() *EchoServiceApi

func NewEchoServiceApiWithBasePath

func NewEchoServiceApiWithBasePath(basePath string) *EchoServiceApi

func (EchoServiceApi) Echo

*

  • Echo method receives a simple message and returns it.
  • The message posted as the id parameter will also be returned. *
  • @param id
  • @return *ExamplepbSimpleMessage

func (EchoServiceApi) EchoBody

*

  • EchoBody method receives a simple message and returns it. *
  • @param body
  • @return *ExamplepbSimpleMessage

func (EchoServiceApi) Echo_1 added in v1.2.3

*

  • Echo method receives a simple message and returns it.
  • The message posted as the id parameter will also be returned. *
  • @param id
  • @param num
  • @return *ExamplepbSimpleMessage

type ExamplepbSimpleMessage

type ExamplepbSimpleMessage struct {

	// Id represents the message identifier.
	Id string `json:"id,omitempty"`

	Num string `json:"num,omitempty"`
}

SimpleMessage represents a simple message sent to the Echo service.

Jump to

Keyboard shortcuts

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