package
0.26.0
Repository: https://github.com/rockset/rockset-go-client.git
Documentation: pkg.go.dev

# README

Go API client for openapi

Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below.

All requests must be authorized with a Rockset API key, which can be created in the Rockset console. The API key must be provided as ApiKey <api_key> in the Authorization request header. For example:

Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT

All endpoints are only accessible via https.

Build something awesome!

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: v1
  • Package version: 0.25.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 openapi "github.com/rockset/rockset-go-client"

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 https://api.use1a1.rockset.com

ClassMethodHTTP requestDescription
APIKeysApiCreateApiKeyPost /v1/orgs/self/users/self/apikeysCreate API Key
APIKeysApiDeleteApiKeyDelete /v1/orgs/self/users/{user}/apikeys/{name}Delete API Key
APIKeysApiGetApiKeyGet /v1/orgs/self/users/{user}/apikeys/{name}Retrieve API Key
APIKeysApiListApiKeysGet /v1/orgs/self/users/{user}/apikeysList API Keys
APIKeysApiUpdateApiKeyPost /v1/orgs/self/users/{user}/apikeys/{name}Update API Key State
AliasesApiCreateAliasPost /v1/orgs/self/ws/{workspace}/aliasesCreate Alias
AliasesApiDeleteAliasDelete /v1/orgs/self/ws/{workspace}/aliases/{alias}Delete Alias
AliasesApiGetAliasGet /v1/orgs/self/ws/{workspace}/aliases/{alias}Retrieve Alias
AliasesApiListAliasesGet /v1/orgs/self/aliasesList Aliases
AliasesApiUpdateAliasPost /v1/orgs/self/ws/{workspace}/aliases/{alias}Update Alias
AliasesApiWorkspaceAliasesGet /v1/orgs/self/ws/{workspace}/aliasesList Aliases in Workspace
CollectionsApiCreateCollectionPost /v1/orgs/self/ws/{workspace}/collectionsCreate Collection
CollectionsApiDeleteCollectionDelete /v1/orgs/self/ws/{workspace}/collections/{collection}Delete Collection
CollectionsApiGetCollectionGet /v1/orgs/self/ws/{workspace}/collections/{collection}Retrieve Collection
CollectionsApiGetCollectionOffsetsPost /v1/orgs/self/ws/{workspace}/collections/{collection}/offsets/commitGet Collection Commit
CollectionsApiListCollectionsGet /v1/orgs/self/collectionsList Collections
CollectionsApiUpdateCollectionPut /v1/orgs/self/ws/{workspace}/collections/{collection}Update Collection
CollectionsApiWorkspaceCollectionsGet /v1/orgs/self/ws/{workspace}/collectionsList Collections in Workspace
CustomRolesApiCreateRolePost /v1/orgs/self/rolesCreate a Role
CustomRolesApiDeleteRoleDelete /v1/orgs/self/roles/{roleName}Delete a Role
CustomRolesApiGetRoleGet /v1/orgs/self/roles/{roleName}Retrieve role
CustomRolesApiListRolesGet /v1/orgs/self/rolesList Roles
CustomRolesApiUpdateRolePost /v1/orgs/self/roles/{roleName}Update a Role
DeploymentSettingsApiGetDeploymentSettingsGet /v1/orgs/self/deploymentsettingsRetrieve Deployment Settings
DeploymentSettingsApiUpdateDeploymentSettingsPut /v1/orgs/self/deploymentsettingsUpdate Deployment Settings
DocumentsApiAddDocumentsPost /v1/orgs/self/ws/{workspace}/collections/{collection}/docsAdd Documents
DocumentsApiDeleteDocumentsDelete /v1/orgs/self/ws/{workspace}/collections/{collection}/docsDelete Documents
DocumentsApiPatchDocumentsPatch /v1/orgs/self/ws/{workspace}/collections/{collection}/docsPatch Documents
IntegrationsApiCreateIntegrationPost /v1/orgs/self/integrationsCreate Integration
IntegrationsApiDeleteIntegrationDelete /v1/orgs/self/integrations/{integration}Delete Integration
IntegrationsApiGetIntegrationGet /v1/orgs/self/integrations/{integration}Retrieve Integration
IntegrationsApiListIntegrationsGet /v1/orgs/self/integrationsList Integrations
IntegrationsApiUpdateIntegrationPut /v1/orgs/self/integrations/{integration}Update Integration
OrganizationsApiGetOrganizationGet /v1/orgs/selfGet Organization
QueriesApiCancelQueryDelete /v1/orgs/self/queries/{queryId}Cancel Query
QueriesApiGetQueryGet /v1/orgs/self/queries/{queryId}Retrieve Query
QueriesApiGetQueryResultsGet /v1/orgs/self/queries/{queryId}/pagesRetrieve Query Results Page
QueriesApiListActiveQueriesGet /v1/orgs/self/queriesList Queries
QueriesApiQueryPost /v1/orgs/self/queriesExecute SQL Query
QueriesApiValidatePost /v1/orgs/self/queries/validationsValidate Query
QueryLambdasApiCreateQueryLambdaPost /v1/orgs/self/ws/{workspace}/lambdasCreate Query Lambda
QueryLambdasApiCreateQueryLambdaTagPost /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tagsCreate Query Lambda Tag
QueryLambdasApiDeleteQueryLambdaDelete /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}Delete Query Lambda
QueryLambdasApiDeleteQueryLambdaTagDelete /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags/{tag}Delete Query Lambda Tag Version
QueryLambdasApiDeleteQueryLambdaVersionDelete /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/version/{version}Delete Query Lambda Version
QueryLambdasApiExecuteQueryLambdaPost /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versions/{version}Execute Query Lambda By Version
QueryLambdasApiExecuteQueryLambdaByTagPost /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags/{tag}Execute Query Lambda By Tag
QueryLambdasApiGetQueryLambdaTagVersionGet /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags/{tag}Retrieve Query Lambda Tag
QueryLambdasApiGetQueryLambdaVersionGet /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versions/{version}Retrieve Query Lambda Version
QueryLambdasApiListAllQueryLambdasGet /v1/orgs/self/lambdasList Query Lambdas
QueryLambdasApiListQueryLambdaTagsGet /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tagsList Query Lambda Tags
QueryLambdasApiListQueryLambdaVersionsGet /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versionsList Query Lambda Versions
QueryLambdasApiListQueryLambdasInWorkspaceGet /v1/orgs/self/ws/{workspace}/lambdasList Query Lambdas in Workspace
QueryLambdasApiUpdateQueryLambdaPost /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versionsUpdate Query Lambda
ScheduledLambdasApiCreateScheduledLambdaPost /v1/orgs/self/ws/{workspace}/scheduled_lambdasCreate a Scheduled Lambda mapping
ScheduledLambdasApiDeleteScheduledLambdaDelete /v1/orgs/self/ws/{workspace}/scheduled_lambdas/{scheduledLambdaId}Delete a Scheduled Lambda mapping
ScheduledLambdasApiGetScheduledLambdaGet /v1/orgs/self/ws/{workspace}/scheduled_lambdas/{scheduledLambdaId}Retrieve a Scheduled Lambda mapping
ScheduledLambdasApiUpdateScheduledLambdaPost /v1/orgs/self/ws/{workspace}/scheduled_lambdas/{scheduledLambdaId}Update a Scheduled Lambda mapping
SharedLambdasApiExecutePublicQueryLambdaWithParamsPost /v1/public/shared_lambdas/{public_access_id}Execute a Public Query Lambda
SourcesApiCreateSourcePost /v1/orgs/self/ws/{workspace}/collections/{collection}/sourcesCreate a source
SourcesApiDeleteSourceDelete /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}Delete Collection source
SourcesApiGetSourceGet /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}Retrieve source
SourcesApiListCollectionSourcesGet /v1/orgs/self/ws/{workspace}/collections/{collection}/sourcesList sources in collection
SourcesApiResumeSourcePost /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}/resumeResume source ingest
SourcesApiSuspendSourcePost /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}/suspendSuspend source ingest
SourcesApiUpdateSourcePut /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}Update a collection source
UsersApiCreateUserPost /v1/orgs/self/usersCreate User
UsersApiDeleteUserDelete /v1/orgs/self/users/{user}Delete User
UsersApiGetCurrentUserGet /v1/orgs/self/users/selfRetrieve Current User
UsersApiGetUserGet /v1/orgs/self/users/{user}Retrieve User
UsersApiListUnsubscribePreferencesGet /v1/orgs/self/users/self/preferencesRetrieve Notification Preferences
UsersApiListUsersGet /v1/orgs/self/usersList Users
UsersApiUpdateUnsubscribePreferencesPost /v1/orgs/self/users/self/preferencesUpdate Notification Preferences
UsersApiUpdateUserPost /v1/orgs/self/users/{user}Update User
ViewsApiCreateViewPost /v1/orgs/self/ws/{workspace}/viewsCreate View
ViewsApiDeleteViewDelete /v1/orgs/self/ws/{workspace}/views/{view}Delete View
ViewsApiGetViewGet /v1/orgs/self/ws/{workspace}/views/{view}Retrieve View
ViewsApiListViewsGet /v1/orgs/self/viewsList Views
ViewsApiUpdateViewPost /v1/orgs/self/ws/{workspace}/views/{view}Update View
ViewsApiWorkspaceViewsGet /v1/orgs/self/ws/{workspace}/viewsList Views in Workspace
VirtualInstancesApiCreateVirtualInstancePost /v1/orgs/self/virtualinstancesCreate Virtual Instance
VirtualInstancesApiDeleteVirtualInstanceDelete /v1/orgs/self/virtualinstances/{virtualInstanceId}Delete Virtual Instance
VirtualInstancesApiGetCollectionMountGet /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts/{collectionPath}Get Collection Mount
VirtualInstancesApiGetMountOffsetsPost /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts/{collectionPath}/offsets/commitGet Collection Commit
VirtualInstancesApiGetVirtualInstanceGet /v1/orgs/self/virtualinstances/{virtualInstanceId}Retrieve Virtual Instance
VirtualInstancesApiGetVirtualInstanceQueriesGet /v1/orgs/self/virtualinstances/{virtualInstanceId}/queriesList Queries
VirtualInstancesApiListCollectionMountsGet /v1/orgs/self/virtualinstances/{virtualInstanceId}/mountsList Collection Mounts
VirtualInstancesApiListVirtualInstancesGet /v1/orgs/self/virtualinstancesList Virtual Instances
VirtualInstancesApiMountCollectionPost /v1/orgs/self/virtualinstances/{virtualInstanceId}/mountsMount Collections
VirtualInstancesApiQueryVirtualInstancePost /v1/orgs/self/virtualinstances/{virtualInstanceId}/queriesExecute SQL Query on a specific Virtual Instance
VirtualInstancesApiResumeVirtualInstancePost /v1/orgs/self/virtualinstances/{virtualInstanceId}/resumeResume Virtual Instance
VirtualInstancesApiSetVirtualInstancePost /v1/orgs/self/virtualinstances/{virtualInstanceId}Update Virtual Instance
VirtualInstancesApiSuspendVirtualInstancePost /v1/orgs/self/virtualinstances/{virtualInstanceId}/suspendSuspend Virtual Instance
VirtualInstancesApiUnmountCollectionDelete /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts/{collectionPath}Unmount Collection
WorkspacesApiCreateWorkspacePost /v1/orgs/self/wsCreate Workspace
WorkspacesApiDeleteWorkspaceDelete /v1/orgs/self/ws/{workspace}Delete Workspace
WorkspacesApiGetWorkspaceGet /v1/orgs/self/ws/{workspace}Retrieve Workspace
WorkspacesApiListWorkspacesGet /v1/orgs/self/wsList Workspaces

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

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