cios

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 24 Imported by: 20

README

Go API client for cios

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

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

  • API version: 1.0.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

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

import sw "./cios"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AccountApi GetMe Get /v2/me ログイン中のユーザープロフィールおよび所属する企業、参加するグループの一覧を取得する
AuthApi RefreshToken Post /connect/token
CollectionApi CreateSeriesDataBulk Put /v2/collections/{collection_id}/series/{series_id}/data-bulk
CollectionApi CreateSeriesImage Put /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/image
CollectionApi DeleteSeriesLatest Delete /v2/collections/{collection_id}/series/{series_id}/latest
CollectionApi GetCollectionStatus Get /v2/collections/{collection_id}/status
CollectionApi GetRecordedDates Get /v2/collections/{collection_id}/recorded-dates
CollectionApi GetSeries Get /v2/collections/{collection_id}/series/{series_id}
CollectionApi GetSeriesAggregation Post /v2/collections/{collection_id}/series/{series_id}/aggregation
CollectionApi GetSeriesImage Get /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/image
CollectionApi GetSeriesImages Get /v2/collections/{collection_id}/series/{series_id}/images
CollectionApi GetSeriesThumbnails Get /v2/collections/{collection_id}/series/{series_id}/thumbnails
CollectionApi GetSeriesThumnbnail Get /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/thumbnail
CollectionApi GetTimeSeriesData Get /v2/collections/{collection_id}/series/{series_id}/data
CollectionApi PostCollectionArchive Post /v2/collections/{collection_id}/archive
CollectionApi PostCollectionRestore Post /v2/collections/{collection_id}/restore
CollectionApi PostSearchLatest Post /v2/collections/{collection_id}/search-latest
CollectionApi PostSeries Post /v2/collections/{collection_id}/series 時系列データ保存
CollectionApi PostSeriesBulk Post /v2/collections/{collection_id}/series-bulk
CollectionApi PutSeries Put /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/data
ContractApi GetContract Get /v2/contracts/{contract_id} 契約IDの契約情報を取得する
ContractApi GetContractUser Get /v2/contracts/{contract_id}/users/{user_id} 契約IDの契約情報を取得する
ContractApi GetContractUsers Get /v2/contracts/{contract_id}/users 契約IDの契約情報を取得する
ContractApi GetContracts Get /v2/contracts 契約一覧情報を取得する
DeviceApi CreateDevice Post /v2/devices デバイスの登録
DeviceApi CreateDeviceClient Post /v2/devices/{device_id}/device_clients
DeviceApi CreateDevicePolicy Post /v2/devices/group_policies
DeviceApi DeleteDevice Delete /v2/devices/{device_id}
DeviceApi DeleteDeviceClient Delete /v2/devices/{device_id}/device_clients/{client_id} device.write
DeviceApi DeletePolicy Delete /v2/devices/group_policies/{policy_id}
DeviceApi GetDevice Get /v2/devices/{device_id} 指定したidのデバイスの情報を取得する
DeviceApi GetDeviceInventoryLatest Get /v2/devices/{device_id}/inventory/latest
DeviceApi GetDeviceMonitoringLatest Get /v2/devices/{device_id}/monitoring/latest
DeviceApi GetDeviceMonitoringsLatest Post /v2/devices/monitoring/latest
DeviceApi GetDevicePolicies Get /v2/devices/group_policies
DeviceApi GetDeviceProfile Get /v2/devices/profile device.profile
DeviceApi GetDevices Get /v2/devices デバイスの一覧を取得する
DeviceApi UpdateDevice Patch /v2/devices/{device_id} 指定したidのデバイス情報を更新する
DeviceApi UpdateDeviceClient Patch /v2/devices/{device_id}/device_clients/{client_id} device.write
DeviceAssetApi CreateDeviceEntitiesComponent Post /v2/device_entities/{key}/components
DeviceAssetApi CreateDeviceEntitiesLifecycle Post /v2/device_entities/{key}/lifecycles
DeviceAssetApi CreateDeviceModel Post /v2/device_models
DeviceAssetApi CreateInventory Post /v2/device_models/{name}/entities
DeviceAssetApi DeleteDeviceEntitiesComponent Delete /v2/device_entities/{key}/components/{component_id}
DeviceAssetApi DeleteDeviceEntitiesLifecycle Delete /v2/device_entities/{key}/lifecycles/{lifecycle_id}
DeviceAssetApi DeleteDeviceEntity Delete /v2/device_entities/{key}
DeviceAssetApi DeleteDeviceModel Delete /v2/device_models/{name}
DeviceAssetApi GetDeviceEntities Get /v2/device_entities
DeviceAssetApi GetDeviceEntitiesComponent Get /v2/device_entities/{key}/components/{component_id}
DeviceAssetApi GetDeviceEntitiesComponents Get /v2/device_entities/{key}/components
DeviceAssetApi GetDeviceEntitiesLifecycle Get /v2/device_entities/{key}/lifecycles/{lifecycle_id}
DeviceAssetApi GetDeviceEntitiesLifecycles Get /v2/device_entities/{key}/lifecycles
DeviceAssetApi GetDeviceEntity Get /v2/device_entities/{key}
DeviceAssetApi GetDeviceModel Get /v2/device_models/{name}
DeviceAssetApi GetDeviceModels Get /v2/device_models
DeviceAssetApi GetDeviceModelsComponents Get /v2/device_models/{name}/components
DeviceAssetApi UpdateDeviceEntitiesComponent Patch /v2/device_entities/{key}/components/{component_id}
DeviceAssetApi UpdateDeviceEntitiesComponents Patch /v2/device_entities/{key}/components
DeviceAssetApi UpdateDeviceEntity Patch /v2/device_entities/{key}
DeviceAssetApi UpdateDeviceModel Patch /v2/device_models/{name}
FileStorageApi CopyNode Post /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}/copy
FileStorageApi CreateBucket Post /v2/file_storage/buckets
FileStorageApi CreateDirectory Post /v2/file_storage/buckets/{bucket_id}/create_directory
FileStorageApi DeleteBucket Delete /v2/file_storage/buckets/{bucket_id}
FileStorageApi DeleteNode Delete /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}
FileStorageApi DownloadFile Get /v2/file_storage/buckets/{bucket_id}/download
FileStorageApi GetBucket Get /v2/file_storage/buckets/{bucket_id}
FileStorageApi GetBuckets Get /v2/file_storage/buckets
FileStorageApi GetNode Get /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}
FileStorageApi GetNodes Get /v2/file_storage/buckets/{bucket_id}/nodes
FileStorageApi MoveNode Post /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}/move
FileStorageApi RenameNode Post /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}/rename
FileStorageApi UpdateBucket Patch /v2/file_storage/buckets/{bucket_id}
FileStorageApi UploadFile Put /v2/file_storage/buckets/{bucket_id}/upload
GeographyApi CreateCircle Post /v2/geo/circles
GeographyApi CreatePoint Post /v2/geo/points
GeographyApi CreateRoute Post /v2/geo/routes
GeographyApi DeleteCircle Delete /v2/geo/circles/{circles_id}
GeographyApi DeletePoint Delete /v2/geo/points/{point_id}
GeographyApi DeleteRoute Delete /v2/geo/routes/{routes_id}
GeographyApi GetCircle Get /v2/geo/circles/{circles_id}
GeographyApi GetCircles Get /v2/geo/circles
GeographyApi GetPoint Get /v2/geo/points/{point_id}
GeographyApi GetPoints Get /v2/geo/points
GeographyApi GetRoute Get /v2/geo/routes/{routes_id}
GeographyApi GetRoutes Get /v2/geo/routes
GeographyApi UpdateCircle Patch /v2/geo/circles/{circles_id}
GeographyApi UpdatePoint Patch /v2/geo/points/{point_id}
GeographyApi UpdateRoute Patch /v2/geo/routes/{routes_id}
GroupApi CreateGroup Post /v2/groups
GroupApi DeleteGroup Delete /v2/groups/{group_id}
GroupApi DeleteMember Delete /v2/groups/{group_id}/members
GroupApi GetGroup Get /v2/groups/{group_id}
GroupApi GetGroups Get /v2/groups
GroupApi GetMembers Get /v2/groups/{group_id}/members
GroupApi InviteGroup Post /v2/groups/{group_id}/invites
GroupApi ReplaceGroup Put /v2/groups/{group_id}
GroupApi SetMember Patch /v2/groups/{group_id}/members
GroupApi UpdateGroup Patch /v2/groups/{group_id}
GroupApi UpdateMember Put /v2/groups/{group_id}/members
LicenseApi GetMyLicenses Get /v2/licenses/me
PublishSubscribeApi CreateChannel Post /v2/channels
PublishSubscribeApi CreateDataStoreObject Post /v2/datastore/channels/{channel_id}/objects
PublishSubscribeApi DeleteChannel Delete /v2/channels/{channel_id}
PublishSubscribeApi DeleteDataStoreChannel Delete /v2/datastore/channels/{channel_id}
PublishSubscribeApi DeleteDataStoreObjectData Delete /v2/datastore/channels/{channel_id}/objects/{object_id}
PublishSubscribeApi DeleteDataStoreSession Delete /v2/datastore/channels/{channel_id}/sessions/{session_id}
PublishSubscribeApi GetChannel Get /v2/channels/{channel_id}
PublishSubscribeApi GetChannels Get /v2/channels
PublishSubscribeApi GetDataStoreChannel Get /v2/datastore/channels/{channel_id}
PublishSubscribeApi GetDataStoreChannels Get /v2/datastore/channels
PublishSubscribeApi GetDataStoreMultiObjectDataLatest Post /v2/datastore/objects_latest
PublishSubscribeApi GetDataStoreObjectData Get /v2/datastore/channels/{channel_id}/objects/{object_id}
PublishSubscribeApi GetDataStoreObjectDataLatest Get /v2/datastore/channels/{channel_id}/object_latest
PublishSubscribeApi GetDataStoreObjects Get /v2/datastore/channels/{channel_id}/objects
PublishSubscribeApi GetDataStoreSession Get /v2/datastore/channels/{channel_id}/sessions/{session_id}
PublishSubscribeApi GetDataStoreSessions Get /v2/datastore/channels/{channel_id}/sessions
PublishSubscribeApi PublishMessage Post /v2/messaging
PublishSubscribeApi SubscribeMessage Get /v2/messaging
PublishSubscribeApi UpdateChannel Patch /v2/channels/{channel_id}
ResourceOwnerApi GetResourceOwner Get /v2/resource_owners/{resource_owner_id}
ResourceOwnerApi GetResourceOwners Get /v2/resource_owners
VideostreamingOperationsApi CreateVideoStreamsPlay Post /v2/video_streams/{video_id}/play
VideostreamingOperationsApi CreateVideoStreamsStop Post /v2/video_streams/{video_id}/stop
VideostreamingOperationsApi GetVideoStreams Get /v2/video_streams/{video_id}
VideostreamingOperationsApi GetVideoStreamsList Get /v2/video_streams
VideostreamingOperationsApi GetVideoStreamsThumbnail Get /v2/video_streams/{video_id}/thumbnail
VideostreamingOperationsApi UpdateStreams Patch /v2/video_streams/{video_id}

Documentation For Models

Documentation For Authorization

bearerAuth
  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

Documentation

Documentation is too large to display.

Source Files

Jump to

Keyboard shortcuts

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