client

package module
v0.0.0-...-8f6edbe Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 21 Imported by: 1

README

Go API client for client

This API allows to control geo-spatial behavior and simulation.

Micro-service
meep-gis-engine

Type & Usage
Platform runtime interface to control geo-spatial behavior and simulation

Details
API details available at your-AdvantEDGE-ip-address/api

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: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

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

import "./client"

Documentation for API Endpoints

All URIs are relative to https://localhost/sandboxname/gis/v1

Class Method HTTP request Description
AutomationApi GetAutomationState Get /automation Get automation state
AutomationApi GetAutomationStateByName Get /automation/{type} Get automation state
AutomationApi SetAutomationStateByName Post /automation/{type} Set automation state
GeospatialDataApi DeleteGeoDataByName Delete /geodata/{assetName} Delete geospatial data
GeospatialDataApi GetAssetData Get /geodata Get geospatial data
GeospatialDataApi GetDistanceGeoDataByName Post /geodata/{assetName}/distanceTo Get distance between geospatial data points
GeospatialDataApi GetGeoDataByName Get /geodata/{assetName} Get geospatial data
GeospatialDataApi GetGeoDataPowerValues Post /geodata/cellularPower Get RSRQ and RSRP values for a list of coordinates
GeospatialDataApi GetWithinRangeByName Post /geodata/{assetName}/withinRange Returns if a geospatial data points is within a specified distance from a location
GeospatialDataApi UpdateGeoDataByName Post /geodata/{assetName} Create/Update geospatial data

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

AdvantEDGE@InterDigital.com

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	AutomationApi *AutomationApiService

	GeospatialDataApi *GeospatialDataApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the AdvantEDGE GIS Engine REST API API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

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

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AutomationApiService

type AutomationApiService service

func (*AutomationApiService) GetAutomationState

func (a *AutomationApiService) GetAutomationState(ctx context.Context) (AutomationStateList, *http.Response, error)

AutomationApiService Get automation state Get automation state for all automation types

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return AutomationStateList

func (*AutomationApiService) GetAutomationStateByName

func (a *AutomationApiService) GetAutomationStateByName(ctx context.Context, type_ string) (AutomationState, *http.Response, error)

AutomationApiService Get automation state Get automation state for the given automation type

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param type_ Automation type.<br> Automation loop evaluates enabled automation types once every second.<br> <p>Supported Types: <li>MOVEMENT - Advances UEs along configured paths using previous position & velocity as inputs. <li>MOBILITY - Sends Mobility events to Sanbox Controller when UE changes POA. <li>POAS-IN-RANGE - Sends POAS-IN-RANGE events to Sanbox Controller when list of POAs in range changes. <li>NETWORK-CHARACTERISTICS-UPDATE - Sends network characteristics update events to Sanbox Controller when throughput values change.

@return AutomationState

func (*AutomationApiService) SetAutomationStateByName

func (a *AutomationApiService) SetAutomationStateByName(ctx context.Context, type_ string, run bool) (*http.Response, error)

AutomationApiService Set automation state Set automation state for the given automation type \\

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param type_ Automation type.<br> Automation loop evaluates enabled automation types once every second.<br> <p>Supported Types: <li>MOBILITY - Sends Mobility events to Sanbox Controller when UE changes POA. <li>MOVEMENT - Advances UEs along configured paths using previous position & velocity as inputs. <li>POAS-IN-RANGE - Sends POAS-IN-RANGE events to Sanbox Controller when list of POAs in range changes. <li>NETWORK-CHARACTERISTICS-UPDATE - Sends network characteristics update events to Sanbox Controller when throughput values change.
  • @param run Automation state (e.g. true=running, false=stopped)

type AutomationState

type AutomationState struct {
	// Automation type.<br> Automation loop evaluates enabled automation types once every second.<br> <p>Supported Types: <li>MOBILITY - Sends Mobility events to Sanbox Controller when UE changes POA. <li>MOVEMENT - Advances UEs along configured paths using previous position & velocity as inputs. <li>POAS-IN-RANGE - Sends POAS-IN-RANGE events to Sanbox Controller when list of POAs in range changes. <li>NETWORK-CHARACTERISTICS-UPDATE - Sends network characteristics update events to Sanbox Controller when throughput values change.
	Type_ string `json:"type,omitempty"`
	// Automation feature state
	Active bool `json:"active,omitempty"`
}

type AutomationStateList

type AutomationStateList struct {
	States []AutomationState `json:"states,omitempty"`
}

List of automation states

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

type CoordinatePower

type CoordinatePower struct {
	// Latitude of a second element for query purpose.
	Latitude float32 `json:"latitude"`
	// Longitude of a second element for query purpose.
	Longitude float32 `json:"longitude"`
	// Reference Signal Received Quality as defined in ETSI TS 136 214.
	Rsrq int32 `json:"rsrq"`
	// Reference Signal Received Power as defined in ETSI TS 136 214.
	Rsrp int32 `json:"rsrp"`
	// Name of the POA for which RSRP/RSRQ values are calculated.
	PoaName string `json:"poaName"`
}

Coordinates with their power values.

type CoordinatePowerList

type CoordinatePowerList struct {
	CoordinatesPower []CoordinatePower `json:"coordinatesPower,omitempty"`
}

List of geo coordinates with RSRQ/RSRP values

type Distance

type Distance struct {
	// Distance between two points (in meters)
	Distance float32 `json:"distance"`
	// Source asset latitude
	SrcLatitude float32 `json:"srcLatitude,omitempty"`
	// Source asset longitude
	SrcLongitude float32 `json:"srcLongitude,omitempty"`
	// Destination asset latitude
	DstLatitude float32 `json:"dstLatitude,omitempty"`
	// Destination asset longitude
	DstLongitude float32 `json:"dstLongitude,omitempty"`
}

Distance response

type GenericSwaggerError

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

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type GeoCoordinate

type GeoCoordinate struct {
	// Latitude of a second element for query purpose.
	Latitude float32 `json:"latitude,omitempty"`
	// Longitude of a second element for query purpose.
	Longitude float32 `json:"longitude,omitempty"`
}

Geo-coordinates for cellular power.

type GeoCoordinateList

type GeoCoordinateList struct {
	GeoCoordinates []GeoCoordinate `json:"geoCoordinates,omitempty"`
}

List of geo-coordinates

type GeoData

type GeoData struct {
	Location *Point `json:"location,omitempty"`
	// Optional - Radius (in meters) around the location
	Radius float32     `json:"radius,omitempty"`
	Path   *LineString `json:"path,omitempty"`
	// End-of-Path mode: <li>LOOP: When path endpoint is reached, start over from the beginning <li>REVERSE: When path endpoint is reached, return on the reverse path
	EopMode string `json:"eopMode,omitempty"`
	// Speed of movement along path in m/s
	Velocity   float32  `json:"velocity,omitempty"`
	D2dInRange []string `json:"d2dInRange,omitempty"`
	PoaInRange []string `json:"poaInRange,omitempty"`
}

Geographic data

type GeoDataAsset

type GeoDataAsset struct {
	Location *Point `json:"location,omitempty"`
	// Optional - Radius (in meters) around the location
	Radius float32     `json:"radius,omitempty"`
	Path   *LineString `json:"path,omitempty"`
	// End-of-Path mode: <li>LOOP: When path endpoint is reached, start over from the beginning <li>REVERSE: When path endpoint is reached, return on the reverse path
	EopMode string `json:"eopMode,omitempty"`
	// Speed of movement along path in m/s
	Velocity   float32  `json:"velocity,omitempty"`
	D2dInRange []string `json:"d2dInRange,omitempty"`
	PoaInRange []string `json:"poaInRange,omitempty"`
	// Name of geospatial asset
	AssetName string `json:"assetName"`
	// Asset type
	AssetType string `json:"assetType"`
	// Asset sub-type
	SubType string `json:"subType,omitempty"`
}

List of geospatial data

type GeoDataAssetList

type GeoDataAssetList struct {
	GeoDataAssets []GeoDataAsset `json:"geoDataAssets,omitempty"`
}

List of geospatial assets data

type GeospatialDataApiService

type GeospatialDataApiService service

func (*GeospatialDataApiService) DeleteGeoDataByName

func (a *GeospatialDataApiService) DeleteGeoDataByName(ctx context.Context, assetName string) (*http.Response, error)

GeospatialDataApiService Delete geospatial data Delete geospatial data for the given asset

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param assetName Name of geospatial asset

func (*GeospatialDataApiService) GetAssetData

func (a *GeospatialDataApiService) GetAssetData(ctx context.Context, localVarOptionals *GetAssetDataOpts) (GeoDataAssetList, *http.Response, error)

func (*GeospatialDataApiService) GetDistanceGeoDataByName

func (a *GeospatialDataApiService) GetDistanceGeoDataByName(ctx context.Context, assetName string, targetPoint TargetPoint) (Distance, *http.Response, error)

GeospatialDataApiService Get distance between geospatial data points Get distance between geospatial data for the given asset and another asset or geospatial coordinates

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param assetName Name of geospatial asset
  • @param targetPoint Parameters of geospatial assets

@return Distance

func (*GeospatialDataApiService) GetGeoDataByName

func (a *GeospatialDataApiService) GetGeoDataByName(ctx context.Context, assetName string, localVarOptionals *GetGeoDataByNameOpts) (GeoDataAsset, *http.Response, error)

func (*GeospatialDataApiService) GetGeoDataPowerValues

func (a *GeospatialDataApiService) GetGeoDataPowerValues(ctx context.Context, coordinates GeoCoordinateList) (CoordinatePowerList, *http.Response, error)

GeospatialDataApiService Get RSRQ and RSRP values for a list of coordinates Get RSRQ and RSRP values for a list of coordinates

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param coordinates List of geo coordinates

@return CoordinatePowerList

func (*GeospatialDataApiService) GetWithinRangeByName

func (a *GeospatialDataApiService) GetWithinRangeByName(ctx context.Context, assetName string, targetRange TargetRange) (WithinRange, *http.Response, error)

GeospatialDataApiService Returns if a geospatial data points is within a specified distance from a location Get geospatial data for the given asset and if it is within range of another asset or geospatial coordinates

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param assetName Name of geospatial asset
  • @param targetRange Parameters of geospatial assets

@return WithinRange

func (*GeospatialDataApiService) UpdateGeoDataByName

func (a *GeospatialDataApiService) UpdateGeoDataByName(ctx context.Context, assetName string, geoData GeoDataAsset) (*http.Response, error)

GeospatialDataApiService Create/Update geospatial data Create/Update geospatial data for the given asset

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param assetName Name of geospatial asset
  • @param geoData Geospatial data

type GetAssetDataOpts

type GetAssetDataOpts struct {
	AssetType   optional.String
	SubType     optional.String
	ExcludePath optional.String
}

type GetGeoDataByNameOpts

type GetGeoDataByNameOpts struct {
	ExcludePath optional.String
}

type LineString

type LineString struct {
	// Must be LineString
	Type_ string `json:"type"`
	// For a LineString, coordinates is an array of two or more positions; a position is an array of two decimal numbers (longitude and latitude precisely in that order)
	Coordinates [][]float32 `json:"coordinates,omitempty"`
}

An array of two or more positions in coordinate space (GeoJSON); a position is an array of two numbers

type Point

type Point struct {
	// Must be Point
	Type_ string `json:"type"`
	// For a Point, coordinates MUST be an array of two decimal numbers; longitude and latitude precisely in that order
	Coordinates []float32 `json:"coordinates,omitempty"`
}

A single position in coordinate space (GeoJSON); a position is an array of two numbers

type TargetPoint

type TargetPoint struct {
	// Asset name of a second element for query purpose. If present, latitude and longitude are ignored.
	AssetName string `json:"assetName,omitempty"`
	// Latitude of a second element for query purpose. Taken into account only if AssetName is not present.
	Latitude float32 `json:"latitude,omitempty"`
	// Longitude of a second element for query purpose. Taken into account only if AssetName is not present.
	Longitude float32 `json:"longitude,omitempty"`
}

Parameters for distance query purpose.

type TargetRange

type TargetRange struct {
	// Asset name of a second element for query purpose. If present, latitude and longitude are ignored.
	AssetName string `json:"assetName,omitempty"`
	// Latitude of a second element for query purpose. Taken into account only if AssetName is not present.
	Latitude float32 `json:"latitude,omitempty"`
	// Longitude of a second element for query purpose. Taken into account only if AssetName is not present.
	Longitude float32 `json:"longitude,omitempty"`
	// Radius (in meters) around the location.
	Radius float32 `json:"radius"`
	// Accuracy of the location (in meters).
	Accuracy float32 `json:"accuracy,omitempty"`
}

Parameters for within range query purpose.

type WithinRange

type WithinRange struct {
	// Source asset latitude
	SrcLatitude float32 `json:"srcLatitude,omitempty"`
	// Source asset longitude
	SrcLongitude float32 `json:"srcLongitude,omitempty"`
	// Destination asset latitude
	DstLatitude float32 `json:"dstLatitude,omitempty"`
	// Destination asset longitude
	DstLongitude float32 `json:"dstLongitude,omitempty"`
	// Within range result (e.g. true = within range, false = beyond range)
	Within bool `json:"within"`
}

Within range response

Jump to

Keyboard shortcuts

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