# Packages
# README
Go API client for syntropy
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.0
- 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/net/context
Put the package under your project folder and add the following in import:
import syntropy "github.com/GIT_USER_ID/GIT_REPO_ID"
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(), syntropy.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(), syntropy.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 identified 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(), syntropy.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), syntropy.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://api.syntropystack.com
Class | Method | HTTP request | Description |
---|---|---|---|
AgentsApi | V1NetworkAgentsCreate | Post /v1/network/agents | Create Agent |
AgentsApi | V1NetworkAgentsGet | Get /v1/network/agents | Get Agents |
AgentsApi | V1NetworkAgentsRemove | Post /v1/network/agents/remove | Delete Agents |
AgentsApi | V1NetworkAgentsSearch | Post /v1/network/agents/search | Search Agents |
AgentsApi | V1NetworkAgentsUpdate | Patch /v1/network/agents/{agent_id} | Updates Agent |
AuthApi | V1NetworkAuthAccessTokensCreate | Post /v1/network/auth/access-tokens | Create Access token |
AuthApi | V1NetworkAuthAccessTokensDelete | Delete /v1/network/auth/access-tokens/{access_token_id} | Delete Access token |
AuthApi | V1NetworkAuthAccessTokensGet | Get /v1/network/auth/access-tokens | Get Access tokens |
AuthApi | V1NetworkAuthAccessTokensPermissionsGet | Get /v1/network/auth/access-tokens/permissions | Get Access token permissions |
AuthApi | V1NetworkAuthAgentTokensCreate | Post /v1/network/auth/agent-tokens | Create Agent Token |
AuthApi | V1NetworkAuthAgentTokensDelete | Delete /v1/network/auth/agent-tokens/{agent_token_id} | Delete Agent Token |
AuthApi | V1NetworkAuthAgentTokensGet | Get /v1/network/auth/agent-tokens | Get Agent Tokens |
ConnectionsApi | V1NetworkConnectionsCreateMesh | Post /v1/network/connections/mesh | Create Connections Mesh |
ConnectionsApi | V1NetworkConnectionsCreateP2P | Post /v1/network/connections/point-to-point | Create P2P Connections |
ConnectionsApi | V1NetworkConnectionsGet | Get /v1/network/connections | Get Connections |
ConnectionsApi | V1NetworkConnectionsRemove | Post /v1/network/connections/remove | Delete Connections |
ConnectionsApi | V1NetworkConnectionsSearch | Post /v1/network/connections/search | Search Connections |
ConnectionsApi | V1NetworkConnectionsServicesGet | Get /v1/network/connections/services | Get Connection services |
ConnectionsApi | V1NetworkConnectionsServicesUpdate | Patch /v1/network/connections/services | Update Connection services |
ConnectionsApi | V1NetworkConnectionsUpdate | Patch /v1/network/connections | Update Connections |
Documentation For Models
- AgentConnectionSubnetStatuses
- AgentFilterAgentStatus
- AgentInterfaceMetadata
- AgentInterfacesMetadata
- AgentLockedFields
- AgentProviderNameAndId
- AgentServiceTypes
- AgentServicesUpdateChanges
- AgentStatus
- AgentTag
- AgentType
- ConnectionServiceAgentServiceSubnet
- Order
- V1Agent
- V1AgentCreateItem
- V1AgentFilter
- V1AgentOrderInner
- V1AgentOrderInnerAnyOf
- V1AgentOrderInnerAnyOf1
- V1AgentOrderInnerAnyOf2
- V1AgentOrderInnerAnyOf3
- V1AgentOrderInnerAnyOf4
- V1AgentPairFilter
- V1AuthAccessToken
- V1AuthAccessTokenPermissions
- V1AuthAccessTokensCreateItem
- V1AuthAgentToken
- V1AuthApiKeysCreateItem
- V1Connection
- V1ConnectionAgent
- V1ConnectionCreateItem
- V1ConnectionCreatedBy
- V1ConnectionFilter
- V1ConnectionOrderInner
- V1ConnectionOrderInnerOneOf
- V1ConnectionOrderInnerOneOf1
- V1ConnectionOrderInnerOneOf2
- V1ConnectionOrderInnerOneOf3
- V1ConnectionService
- V1ConnectionServiceAgent
- V1ConnectionServiceAgentService
- V1ConnectionServiceSubnet
- V1ConnectionStatus
- V1ConnectionUpdateChange
- V1ErrorResponse
- V1ErrorResponseErrorsInner
- V1NetworkAgentsCreateRequest
- V1NetworkAgentsCreateResponse
- V1NetworkAgentsGetResponse
- V1NetworkAgentsRemoveRequest
- V1NetworkAgentsSearchRequest
- V1NetworkAgentsSearchResponse
- V1NetworkAgentsUpdateRequest
- V1NetworkAuthAccessTokensCreateRequest
- V1NetworkAuthAccessTokensCreateResponse
- V1NetworkAuthAccessTokensGetResponse
- V1NetworkAuthAccessTokensPermissionsGetResponse
- V1NetworkAuthAgentTokensCreateRequest
- V1NetworkAuthAgentTokensCreateResponse
- V1NetworkAuthAgentTokensGetResponse
- V1NetworkConnectionsCreateMeshRequest
- V1NetworkConnectionsCreateMeshRequestAgentIdsInner
- V1NetworkConnectionsCreateP2PRequest
- V1NetworkConnectionsCreateP2PRequestAgentPairsInner
- V1NetworkConnectionsCreateResponse
- V1NetworkConnectionsGetResponse
- V1NetworkConnectionsRemoveRequest
- V1NetworkConnectionsSearchRequest
- V1NetworkConnectionsSearchResponse
- V1NetworkConnectionsServicesGetResponse
- V1NetworkConnectionsServicesUpdateRequest
- V1NetworkConnectionsUpdateRequest
Documentation For Authorization
accessToken
- Type: API key
- API key parameter name: api-key
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: api-key and passed in as the auth context for each request.
jwt
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
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