swagger

package
v0.0.0-...-91b2197 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

README

Go API client for swagger

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version:
  • Package version: 1.0.0
  • Build date: 2017-08-15T09:16:43.347+01:00
  • Build package: class io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

    "./swagger"

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
DataApi Append Put /data/ append data to a bucket, will create the bucket if it does not exist.
DataApi GetAll Get /data/ returns all of the data stored in a logical 'bucket' in the last 24 hours.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
}

func (*APIClient) CallAPI

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

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

func (*APIClient) SelectHeaderAccept

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

func (*APIClient) SelectHeaderContentType

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

type APIResponse

type APIResponse struct {
	*http.Response
	Message string `json:"message,omitempty"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type ApiData

type ApiData struct {

	// unique bucket to save value to
	Bucket string `json:"bucket,omitempty"`

	// data to save
	Value interface{} `json:"value,omitempty"`
}

type ApiDataResponse

type ApiDataResponse struct {

	// when the item was saved
	Ts time.Time `json:"ts,omitempty"`

	// saved value
	Value interface{} `json:"value,omitempty"`
}

type ApiErrorResponse

type ApiErrorResponse struct {

	// error message if any
	Error_ string `json:"error,omitempty"`
}

type Configuration

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"`

	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	Timeout       int               `json:"timeout,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         `json:"APIClient,omitempty"`
	// contains filtered or unexported fields
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

func (*Configuration) GetAPIKeyWithPrefix

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

func (*Configuration) GetBasicAuthEncodedString

func (c *Configuration) GetBasicAuthEncodedString() string

func (*Configuration) GetDebug

func (c *Configuration) GetDebug() bool

func (*Configuration) SetDebug

func (c *Configuration) SetDebug(enable bool)

type DataApi

type DataApi struct {
	Configuration Configuration
}

func NewDataApi

func NewDataApi() *DataApi

func NewDataApiWithBasePath

func NewDataApiWithBasePath(basePath string) *DataApi

func (DataApi) Append

func (a DataApi) Append(body ApiData) (*APIResponse, error)

*

  • append data to a bucket, will create the bucket if it does not exist.
  • append data to a bucket, will create the bucket if it does not exist. *
  • @param body
  • @return void

func (DataApi) GetAll

func (a DataApi) GetAll(bucketUid string) ([]ApiDataResponse, *APIResponse, error)

*

  • returns all of the data stored in a logical 'bucket' in the last 24 hours.
  • returns all of the data stored in a logical 'bucket' in the last 24 hours. *
  • @param bucketUid name of the 'bucket' of data
  • @return []ApiDataResponse

type ServicesData

type ServicesData struct {

	// unique bucket to save value to
	Bucket string `json:"bucket,omitempty"`

	// encoded contents to save
	Value string `json:"value,omitempty"`
}

type ServicesDataResponse

type ServicesDataResponse struct {

	// when the item was saved
	Ts time.Time `json:"ts,omitempty"`

	// saved value
	Value string `json:"value,omitempty"`
}

type ServicesErrorResponse

type ServicesErrorResponse struct {

	// error message if any
	Error_ string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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