Documentation
¶
Index ¶
- type APIClient
- func (c *APIClient) CallAPI(path string, method string, postBody interface{}, ...) (*resty.Response, error)
- func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string
- func (c *APIClient) SelectHeaderAccept(accepts []string) string
- func (c *APIClient) SelectHeaderContentType(contentTypes []string) string
- type APIResponse
- type ApiCatalogItem
- type ApiCatalogRequest
- type ApiErrorResponse
- type ApiItemWithLocation
- type ApiLocation
- type ApiLocationRequest
- type Configuration
- type MetadataApi
- func (a MetadataApi) AllItems() ([]ApiItemWithLocation, *APIResponse, error)
- func (a MetadataApi) CatalogItem(locationUid string, body ApiCatalogRequest) (*ApiCatalogItem, *APIResponse, error)
- func (a MetadataApi) MoveLocation(locationUid string, body ApiLocationRequest) (*ApiLocation, *APIResponse, error)
- func (a MetadataApi) RegisterLocation(body ApiLocationRequest) (*ApiLocation, *APIResponse, error)
- func (a MetadataApi) RemoveFromCatalog(subject string) (*APIResponse, error)
- type ServicesErrorResponse
- type ServicesItem
- type ServicesItemWithLocation
- type ServicesLocation
- type ServicesLocationRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
}
func (*APIClient) ParameterToString ¶
func (*APIClient) SelectHeaderAccept ¶
func (*APIClient) SelectHeaderContentType ¶
type APIResponse ¶
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type ApiCatalogItem ¶
type ApiCatalogRequest ¶
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 ApiLocationRequest ¶
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 ServicesLocationRequest ¶
Source Files
¶
- api_catalog_item.go
- api_catalog_request.go
- api_client.go
- api_error_response.go
- api_item_with_location.go
- api_location.go
- api_location_request.go
- api_response.go
- configuration.go
- metadata_api.go
- services_error_response.go
- services_item.go
- services_item_with_location.go
- services_location.go
- services_location_request.go
Click to show internal directories.
Click to hide internal directories.