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: 10 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-15T10:02:08.317+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
MetadataApi AllItems Get /catalog/items/ get all cataloged items
MetadataApi CatalogItem Put /catalog/items/{location-uid} catalog an item for discovery e.g. what and where
MetadataApi MoveLocation Patch /catalog/announce/{location-uid} change a node's location - keeping the same location-uid
MetadataApi RegisterLocation Put /catalog/announce register a node's location
MetadataApi RemoveFromCatalog Delete /catalog/items/ delete an item from the catalog

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 ApiCatalogItem

type ApiCatalogItem struct {
	Sample string `json:"sample,omitempty"`

	// path of the data item
	Subject string `json:"subject,omitempty"`

	// a collection of tags probably belonging to an ontology
	Tags []string `json:"tags,omitempty"`
}

type ApiCatalogRequest

type ApiCatalogRequest struct {
	Sample string `json:"sample,omitempty"`

	// path of the data item
	Subject string `json:"subject,omitempty"`

	// a collection of tags probably belonging to an ontology
	Tags []string `json:"tags,omitempty"`
}

type ApiErrorResponse

type ApiErrorResponse struct {

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

type ApiItemWithLocation

type ApiItemWithLocation struct {

	// location for the catalogued piece of data
	Location ApiLocation `json:"location,omitempty"`

	Sample string `json:"sample,omitempty"`

	// path of the data item
	Subject string `json:"subject,omitempty"`

	// a collection of tags probably belonging to an ontology
	Tags []string `json:"tags,omitempty"`
}

type ApiLocation

type ApiLocation struct {

	// public IP address of the node
	IpAddress string `json:"ip-address,omitempty"`

	// public port of the node
	Port int32 `json:"port,omitempty"`

	Scheme string `json:"scheme,omitempty"`

	// unique identifier for a node
	Uid string `json:"uid,omitempty"`
}

type ApiLocationRequest

type ApiLocationRequest struct {

	// public IP address of the node
	IpAddress string `json:"ip-address,omitempty"`

	// public port of the node
	Port int32 `json:"port,omitempty"`

	Scheme string `json:"scheme,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 MetadataApi

type MetadataApi struct {
	Configuration Configuration
}

func NewMetadataApi

func NewMetadataApi() *MetadataApi

func NewMetadataApiWithBasePath

func NewMetadataApiWithBasePath(basePath string) *MetadataApi

func (MetadataApi) AllItems

func (a MetadataApi) AllItems() ([]ApiItemWithLocation, *APIResponse, error)

*

  • get all cataloged items
  • get all cataloged items *
  • @return []ApiItemWithLocation

func (MetadataApi) CatalogItem

func (a MetadataApi) CatalogItem(locationUid string, body ApiCatalogRequest) (*ApiCatalogItem, *APIResponse, error)

*

  • catalog an item for discovery e.g. what and where
  • catalog an item for discovery e.g. what and where *
  • @param locationUid identifier for a location
  • @param body
  • @return *ApiCatalogItem

func (MetadataApi) MoveLocation

func (a MetadataApi) MoveLocation(locationUid string, body ApiLocationRequest) (*ApiLocation, *APIResponse, error)

*

  • change a node's location - keeping the same location-uid
  • change a node's location - keeping the same location-uid *
  • @param locationUid identifier for a location
  • @param body
  • @return *ApiLocation

func (MetadataApi) RegisterLocation

func (a MetadataApi) RegisterLocation(body ApiLocationRequest) (*ApiLocation, *APIResponse, error)

*

  • register a node's location
  • register a node's location *
  • @param body
  • @return *ApiLocation

func (MetadataApi) RemoveFromCatalog

func (a MetadataApi) RemoveFromCatalog(subject string) (*APIResponse, error)

*

  • delete an item from the catalog
  • delete an item from the catalog *
  • @param subject 'subject' of the item to delete
  • @return void

type ServicesErrorResponse

type ServicesErrorResponse struct {

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

type ServicesItem

type ServicesItem struct {

	// path of the data item
	Key string `json:"key,omitempty"`

	// a valid location of a node registered previously
	LocationUid string `json:"location-uid,omitempty"`

	Sample string `json:"sample,omitempty"`

	// a collection of tags probably belonging to an ontology
	Tags []string `json:"tags,omitempty"`
}

type ServicesItemWithLocation

type ServicesItemWithLocation struct {

	// public IP address of the node
	IpAddress string `json:"ip-address,omitempty"`

	// path of the data item
	Key string `json:"key,omitempty"`

	// a valid location of a node registered previously
	LocationUid string `json:"location-uid,omitempty"`

	// public port of the node
	Port int32 `json:"port,omitempty"`

	Sample string `json:"sample,omitempty"`

	// a collection of tags probably belonging to an ontology
	Tags []string `json:"tags,omitempty"`

	// unique identifier for a node
	Uid string `json:"uid,omitempty"`
}

type ServicesLocation

type ServicesLocation struct {

	// public IP address of the node
	IpAddress string `json:"ip-address,omitempty"`

	// public port of the node
	Port int32 `json:"port,omitempty"`

	// unique identifier for a node
	Uid string `json:"uid,omitempty"`
}

type ServicesLocationRequest

type ServicesLocationRequest struct {

	// public IP address of the node
	IpAddress string `json:"ip-address,omitempty"`

	// public port of the node
	Port int32 `json:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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