Skip to content

furyGo/estuary-go-sdk

 
 

Repository files navigation

Go API client for openapi

This is the API for the Estuary application.

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: 0.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://docs.estuary.tech/feedback

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 openapi "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(), openapi.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(), openapi.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(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://api.estuary.tech

Class Method HTTP request Description
AdminApi AdminPeeringPeersDelete Delete /admin/peering/peers Remove peers on Peering Service
AdminApi AdminPeeringPeersGet Get /admin/peering/peers List all Peering peers
AdminApi AdminPeeringPeersPost Post /admin/peering/peers Add peers on Peering Service
AdminApi AdminPeeringStartPost Post /admin/peering/start Start Peering
AdminApi AdminPeeringStatusGet Get /admin/peering/status Check Peering Status
AdminApi AdminPeeringStopPost Post /admin/peering/stop Stop Peering
AdminApi AdminSystemConfigGet Get /admin/system/config Get systems(estuary/shuttle) config
AdminApi AdminUsersGet Get /admin/users Get all users
AutoretrieveApi AdminAutoretrieveInitPost Post /admin/autoretrieve/init Register autoretrieve server
AutoretrieveApi AdminAutoretrieveListGet Get /admin/autoretrieve/list List autoretrieve servers
AutoretrieveApi AutoretrieveHeartbeatPost Post /autoretrieve/heartbeat Marks autoretrieve server as up
CollectionsApi CollectionsAddContentPost Post /collections/add-content Add contents to a collection
CollectionsApi CollectionsColuuidCommitPost Post /collections/{coluuid}/commit Produce a CID of the collection contents
CollectionsApi CollectionsColuuidDelete Delete /collections/{coluuid} Deletes a collection
CollectionsApi CollectionsContentGet Get /collections/content Get contents in a collection
CollectionsApi CollectionsCreatePost Post /collections/create Create a new collection
CollectionsApi CollectionsFsAddPost Post /collections/fs/add Add a file to a collection
CollectionsApi CollectionsListGet Get /collections/list List all collections
ContentApi ContentAddCarPost Post /content/add-car Add Car object
ContentApi ContentAddIpfsPost Post /content/add-ipfs Add IPFS object
ContentApi ContentAddPost Post /content/add Add new content
ContentApi ContentAggregatedContentGet Get /content/aggregated/{content} Get aggregated content stats
ContentApi ContentAllDealsGet Get /content/all-deals Get all deals for a user
ContentApi ContentBwUsageContentGet Get /content/bw-usage/{content} Get content bandwidth
ContentApi ContentCreatePost Post /content/create Add a new content
ContentApi ContentDealsGet Get /content/deals Content with deals
ContentApi ContentEnsureReplicationDatacidGet Get /content/ensure-replication/{datacid} Ensure Replication
ContentApi ContentFailuresContentGet Get /content/failures/{content} List all failures for a content
ContentApi ContentImportdealPost Post /content/importdeal Import a deal
ContentApi ContentListGet Get /content/list List all pinned content
ContentApi ContentReadContGet Get /content/read/{cont} Read content
ContentApi ContentStagingZonesGet Get /content/staging-zones Get staging zone for user
ContentApi ContentStatsGet Get /content/stats Get content statistics
ContentApi ContentStatusIdGet Get /content/status/{id} Content Status
DealsApi DealEstimatePost Post /deal/estimate Estimate the cost of a deal
DealsApi DealInfoDealidGet Get /deal/info/{dealid} Get Deal Info
DealsApi DealProposalPropcidGet Get /deal/proposal/{propcid} Get Proposal
DealsApi DealQueryMinerGet Get /deal/query/{miner} Query Ask
DealsApi DealStatusByProposalPropcidGet Get /deal/status-by-proposal/{propcid} Get Deal Status by PropCid
DealsApi DealStatusMinerPropcidGet Get /deal/status/{miner}/{propcid} Deal Status
DealsApi DealTransferInProgressGet Get /deal/transfer/in-progress Transfer In Progress
DealsApi DealTransferStatusPost Post /deal/transfer/status Transfer Status
DealsApi DealsFailuresGet Get /deals/failures Get storage failures for user
DealsApi DealsMakeMinerPost Post /deals/make/{miner} Make Deal
DealsApi DealsStatusDealGet Get /deals/status/{deal} Get Deal Status
DealsApi PublicDealsFailuresGet Get /public/deals/failures Get storage failures
MetricsApi PublicMetricsDealsOnChainGet Get /public/metrics/deals-on-chain Get deal metrics
MinerApi PublicMinersDealsMinerGet Get /public/miners/deals/{miner} Get all miners deals
MinerApi PublicMinersStatsMinerGet Get /public/miners/stats/{miner} Get miner stats
NetApi NetAddrsGet Get /net/addrs Net Addrs
NetApi PublicMinersFailuresMinerGet Get /public/miners/failures/{miner} Get all miners
NetApi PublicMinersGet Get /public/miners Get all miners
NetApi PublicNetAddrsGet Get /public/net/addrs Net Addrs
NetApi PublicNetPeersGet Get /public/net/peers Net Peers
PeeringApi AdminPeeringPeersDelete Delete /admin/peering/peers Remove peers on Peering Service
PeeringApi AdminPeeringPeersGet Get /admin/peering/peers List all Peering peers
PeeringApi AdminPeeringPeersPost Post /admin/peering/peers Add peers on Peering Service
PeeringApi AdminPeeringStartPost Post /admin/peering/start Start Peering
PeeringApi AdminPeeringStatusGet Get /admin/peering/status Check Peering Status
PeeringApi AdminPeeringStopPost Post /admin/peering/stop Stop Peering
PeersApi AdminPeeringPeersDelete Delete /admin/peering/peers Remove peers on Peering Service
PeersApi AdminPeeringPeersGet Get /admin/peering/peers List all Peering peers
PeersApi AdminPeeringPeersPost Post /admin/peering/peers Add peers on Peering Service
PeersApi AdminPeeringStartPost Post /admin/peering/start Start Peering
PeersApi AdminPeeringStatusGet Get /admin/peering/status Check Peering Status
PeersApi AdminPeeringStopPost Post /admin/peering/stop Stop Peering
PinningApi PinningPinsGet Get /pinning/pins List all pin status objects
PinningApi PinningPinsPinidDelete Delete /pinning/pins/{pinid} Delete a pinned object
PinningApi PinningPinsPinidGet Get /pinning/pins/{pinid} Get a pin status object
PinningApi PinningPinsPinidPost Post /pinning/pins/{pinid} Replace a pinned object
PinningApi PinningPinsPost Post /pinning/pins Add and pin object
PublicApi PublicByCidCidGet Get /public/by-cid/{cid} Get Content by Cid
PublicApi PublicInfoGet Get /public/info Get public node info
PublicApi PublicMetricsDealsOnChainGet Get /public/metrics/deals-on-chain Get deal metrics
PublicApi PublicMinersDealsMinerGet Get /public/miners/deals/{miner} Get all miners deals
PublicApi PublicMinersFailuresMinerGet Get /public/miners/failures/{miner} Get all miners
PublicApi PublicMinersGet Get /public/miners Get all miners
PublicApi PublicMinersStatsMinerGet Get /public/miners/stats/{miner} Get miner stats
PublicApi PublicNetAddrsGet Get /public/net/addrs Net Addrs
PublicApi PublicNetPeersGet Get /public/net/peers Net Peers
PublicApi PublicStatsGet Get /public/stats Public stats
UserApi UserApiKeysGet Get /user/api-keys Get API keys for a user
UserApi UserApiKeysKeyDelete Delete /user/api-keys/{key} Revoke a User API Key.
UserApi UserApiKeysPost Post /user/api-keys Create API keys for a user
UserApi UserExportGet Get /user/export Export user data
UserApi UserStatsGet Get /user/stats Create API keys for a user

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: Authorization and passed in as the auth context for each request.

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

About

fork as a go mod version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%