package
2.6.1+incompatible
Repository: https://github.com/storageos/go-api.git
Documentation: pkg.go.dev
# README
Go API client for api
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: 2.5.0
- Package version: 2.4.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://storageos.com
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
go get github.com/antihax/optional
Put the package under your project folder and add the following in import:
import "./api"
Documentation for API Endpoints
All URIs are relative to http://localhost/v2
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | AttachNFSVolume | Post /namespaces/{namespaceID}/volumes/{id}/nfs/attach | attach and share the volume using NFS |
DefaultApi | AttachVolume | Post /namespaces/{namespaceID}/volumes/{id}/attach | Attach a volume to the given node |
DefaultApi | AuthenticateUser | Post /auth/login | Authenticate a user |
DefaultApi | CreateNamespace | Post /namespaces | Create a new namespace |
DefaultApi | CreatePolicyGroup | Post /policies | Create a new policy group |
DefaultApi | CreateUser | Post /users | Create a new user |
DefaultApi | CreateVolume | Post /namespaces/{namespaceID}/volumes | Create a new Volume in the specified namespace |
DefaultApi | DeleteAuthenticatedUser | Delete /users/self | Delete the authenticated user |
DefaultApi | DeleteAuthenticatedUserSessions | Delete /users/self/sessions | Invalidate the logged in user's sessions |
DefaultApi | DeleteNamespace | Delete /namespaces/{id} | Delete a namespace |
DefaultApi | DeleteNode | Delete /nodes/{id} | Delete a node |
DefaultApi | DeletePolicyGroup | Delete /policies/{id} | Delete a policy group |
DefaultApi | DeleteSessions | Delete /users/{id}/sessions | Invalidate login sessions |
DefaultApi | DeleteUser | Delete /users/{id} | Delete a user |
DefaultApi | DeleteVolume | Delete /namespaces/{namespaceID}/volumes/{id} | Delete a volume |
DefaultApi | DetachVolume | Delete /namespaces/{namespaceID}/volumes/{id}/attach | Detach the given volume |
DefaultApi | GetAuthenticatedUser | Get /users/self | Get the currently authenticated user's information |
DefaultApi | GetCluster | Get /cluster | Retrieves the cluster's global configuration settings |
DefaultApi | GetDiagnostics | Get /diagnostics | Retrieves a diagnostics bundle from the target node |
DefaultApi | GetLicence | Get /cluster/licence | Retrieves the cluster's licence information |
DefaultApi | GetNamespace | Get /namespaces/{id} | Fetch a namespace |
DefaultApi | GetNode | Get /nodes/{id} | Fetch a node |
DefaultApi | GetPolicyGroup | Get /policies/{id} | Fetch a policy group |
DefaultApi | GetSingleNodeDiagnostics | Get /diagnostics/{id} | Retrieves a single node diagnostics bundle from the target node |
DefaultApi | GetUser | Get /users/{id} | Fetch a user |
DefaultApi | GetVolume | Get /namespaces/{namespaceID}/volumes/{id} | Fetch a volume |
DefaultApi | ListNamespaces | Get /namespaces | Fetch the list of namespaces |
DefaultApi | ListNodes | Get /nodes | Fetch the list of nodes |
DefaultApi | ListPolicyGroups | Get /policies | Fetch the list of policy groups |
DefaultApi | ListUsers | Get /users | Fetch the list of users |
DefaultApi | ListVolumes | Get /namespaces/{namespaceID}/volumes | Fetch the list of volumes in the given namespace |
DefaultApi | RefreshJwt | Post /auth/refresh | Refresh the JWT |
DefaultApi | ResizeVolume | Put /namespaces/{namespaceID}/volumes/{id}/size | Increase the size of a volume. |
DefaultApi | SetComputeOnly | Put /nodes/{id}/compute-only | Modify the computeonly behaviour state for a node |
DefaultApi | SetCordoned | Put /nodes/{id}/cordon | Modify the cordoned state for a node |
DefaultApi | SetFailureMode | Put /namespaces/{namespaceID}/volumes/{id}/failure-mode | Set the failure mode of the volume. |
DefaultApi | SetPlacementStrategy | Put /namespaces/{namespaceID}/volumes/{id}/placement-strategy | Sets the placement strategy of the volume. |
DefaultApi | SetReplicas | Put /namespaces/{namespaceID}/volumes/{id}/replicas | Set the number of replicas to maintain for the volume. |
DefaultApi | Spec | Get /openapi | Serves this openapi spec file |
DefaultApi | UpdateAuthenticatedUser | Put /users/self | Update the authenticated user's information |
DefaultApi | UpdateCluster | Put /cluster | Update the cluster's global configuration settings |
DefaultApi | UpdateLicence | Put /cluster/licence | Update the licence global configuration settings |
DefaultApi | UpdateNFSVolumeExports | Put /namespaces/{namespaceID}/volumes/{id}/nfs/export-config | Update an nfs volume's export configuration |
DefaultApi | UpdateNFSVolumeMountEndpoint | Put /namespaces/{namespaceID}/volumes/{id}/nfs/mount-endpoint | Update an nfs volume's mount endpoint |
DefaultApi | UpdateNamespace | Put /namespaces/{id} | Update a namespace |
DefaultApi | UpdateNode | Put /nodes/{id} | Update a node |
DefaultApi | UpdatePolicyGroup | Put /policies/{id} | Update a policy group |
DefaultApi | UpdateUser | Put /users/{id} | Update a user |
DefaultApi | UpdateVolume | Put /namespaces/{namespaceID}/volumes/{id} | Update a volume |
Documentation For Models
- AcceptedMessage
- AttachNfsVolumeData
- AttachType
- AttachVolumeData
- AuthUserData
- CapacityStats
- Cluster
- CreateNamespaceData
- CreatePolicyGroupData
- CreateUserData
- CreateVolumeData
- DeploymentInfo
- Error
- FailureModeIntent
- FsType
- Licence
- LogFormat
- LogLevel
- MasterDeploymentInfo
- MasterDeploymentInfoAllOf
- MasterHealth
- Namespace
- NfsAcl
- NfsAclIdentity
- NfsAclSquashConfig
- NfsConfig
- NfsExportConfig
- NfsVolumeExports
- NfsVolumeMountEndpoint
- Node
- NodeHealth
- PoliciesIdSpecs
- PoliciesSpecs
- PolicyGroup
- PolicyGroupUsers
- ReplicaDeploymentInfo
- ReplicaDeploymentInfoAllOf
- ReplicaHealth
- ResizeVolumeRequest
- SetComputeOnlyNodeData
- SetCordonedNodeData
- SetFailureModeIntentRequestData
- SetFailureModeRequest
- SetFailureThresholdRequestData
- SetPlacementStrategyData
- SetReplicasRequest
- Strategy
- StrategyOptions
- SyncProgress
- UpdateAuthenticatedUserData
- UpdateClusterData
- UpdateLicence
- UpdateNamespaceData
- UpdateNodeData
- UpdatePolicyGroupData
- UpdateUserData
- UpdateVolumeData
- User
- UserSession
- UserSessionAllOf
- UserSessionAllOfSession
- Volume
Documentation For Authorization
jwt
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
Author
# Functions
CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResonse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewConfiguration returns a new Configuration object.
# Constants
List of AttachType.
List of AttachType.
List of AttachType.
List of AttachType.
List of FailureModeIntent.
List of FailureModeIntent.
List of FailureModeIntent.
List of FsType.
List of FsType.
List of FsType.
List of FsType.
List of FsType.
List of FsType.
List of LogFormat.
List of LogFormat.
List of LogLevel.
List of LogLevel.
List of LogLevel.
List of LogLevel.
List of MasterHealth.
List of MasterHealth.
List of MasterHealth.
List of NodeHealth.
List of NodeHealth.
List of NodeHealth.
List of ReplicaHealth.
List of ReplicaHealth.
List of ReplicaHealth.
List of ReplicaHealth.
List of ReplicaHealth.
List of ReplicaHealth.
List of ReplicaHealth.
List of ReplicaHealth.
# Variables
ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKey takes an APIKey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
# Structs
AcceptedMessage struct for AcceptedMessage.
APIClient manages communication with the StorageOS API API v2.5.0 In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
APIResponse stores the API response returned by the server.
AttachNfsVolumeData struct for AttachNfsVolumeData.
AttachNFSVolumeOpts Optional parameters for the method 'AttachNFSVolume'.
AttachVolumeData struct for AttachVolumeData.
AuthUserData struct for AuthUserData.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
CapacityStats struct for CapacityStats.
Cluster struct for Cluster.
Configuration stores the configuration of the API client.
CreateNamespaceData struct for CreateNamespaceData.
CreatePolicyGroupData struct for CreatePolicyGroupData.
CreateUserData struct for CreateUserData.
CreateVolumeData struct for CreateVolumeData.
CreateVolumeOpts Optional parameters for the method 'CreateVolume'.
DeleteAuthenticatedUserOpts Optional parameters for the method 'DeleteAuthenticatedUser'.
DeleteNamespaceOpts Optional parameters for the method 'DeleteNamespace'.
DeleteNodeOpts Optional parameters for the method 'DeleteNode'.
DeletePolicyGroupOpts Optional parameters for the method 'DeletePolicyGroup'.
DeleteUserOpts Optional parameters for the method 'DeleteUser'.
DeleteVolumeOpts Optional parameters for the method 'DeleteVolume'.
DeploymentInfo struct for DeploymentInfo.
DetachVolumeOpts Optional parameters for the method 'DetachVolume'.
Error struct for Error.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
Licence A representation of a cluster's licence properties .
MasterDeploymentInfo struct for MasterDeploymentInfo.
MasterDeploymentInfoAllOf struct for MasterDeploymentInfoAllOf.
Namespace struct for Namespace.
NfsAcl struct for NfsAcl.
NfsAclIdentity struct for NfsAclIdentity.
NfsAclSquashConfig struct for NfsAclSquashConfig.
NfsConfig struct for NfsConfig.
NfsExportConfig struct for NfsExportConfig.
NfsVolumeExports struct for NfsVolumeExports.
NfsVolumeMountEndpoint struct for NfsVolumeMountEndpoint.
Node struct for Node.
PoliciesIdSpecs struct for PoliciesIdSpecs.
PoliciesSpecs struct for PoliciesSpecs.
PolicyGroup struct for PolicyGroup.
PolicyGroupUsers struct for PolicyGroupUsers.
ReplicaDeploymentInfo struct for ReplicaDeploymentInfo.
ReplicaDeploymentInfoAllOf struct for ReplicaDeploymentInfoAllOf.
ResizeVolumeOpts Optional parameters for the method 'ResizeVolume'.
ResizeVolumeRequest struct for ResizeVolumeRequest.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.
SetComputeOnlyNodeData struct for SetComputeOnlyNodeData.
SetComputeOnlyOpts Optional parameters for the method 'SetComputeOnly'.
SetCordonedNodeData struct for SetCordonedNodeData.
SetCordonedOpts Optional parameters for the method 'SetCordoned'.
SetFailureModeIntentRequestData struct for SetFailureModeIntentRequestData.
SetFailureModeOpts Optional parameters for the method 'SetFailureMode'.
SetFailureModeRequest struct for SetFailureModeRequest.
SetFailureThresholdRequestData struct for SetFailureThresholdRequestData.
SetPlacementStrategyData struct for SetPlacementStrategyData.
SetPlacementStrategyOpts Optional parameters for the method 'SetPlacementStrategy'.
SetReplicasOpts Optional parameters for the method 'SetReplicas'.
SetReplicasRequest struct for SetReplicasRequest.
Strategy The logic to use when placing the volume replicas across the available nodes.
StrategyOptions Used together with topology-aware strategy to further specify how the placement should be done.
SyncProgress The progress report for an ongoing sync.
UpdateAuthenticatedUserData struct for UpdateAuthenticatedUserData.
UpdateAuthenticatedUserOpts Optional parameters for the method 'UpdateAuthenticatedUser'.
UpdateClusterData struct for UpdateClusterData.
UpdateClusterOpts Optional parameters for the method 'UpdateCluster'.
UpdateLicence struct for UpdateLicence.
UpdateLicenceOpts Optional parameters for the method 'UpdateLicence'.
UpdateNamespaceData struct for UpdateNamespaceData.
UpdateNamespaceOpts Optional parameters for the method 'UpdateNamespace'.
UpdateNFSVolumeExportsOpts Optional parameters for the method 'UpdateNFSVolumeExports'.
UpdateNFSVolumeMountEndpointOpts Optional parameters for the method 'UpdateNFSVolumeMountEndpoint'.
UpdateNodeData struct for UpdateNodeData.
UpdatePolicyGroupData struct for UpdatePolicyGroupData.
UpdatePolicyGroupOpts Optional parameters for the method 'UpdatePolicyGroup'.
UpdateUserData struct for UpdateUserData.
UpdateUserOpts Optional parameters for the method 'UpdateUser'.
UpdateVolumeData struct for UpdateVolumeData.
UpdateVolumeOpts Optional parameters for the method 'UpdateVolume'.
User struct for User.
UserSession struct for UserSession.
UserSessionAllOf struct for UserSessionAllOf.
UserSessionAllOfSession struct for UserSessionAllOfSession.
Volume struct for Volume.
# Type aliases
AttachType The attachment type of a volume.
DefaultApiService DefaultApi service.
FailureModeIntent The intent-based failure mode behaviour of a volume.
FsType The file system type of a volume.
LogFormat This setting determines the format nodes in the cluster will use for log entries.
LogLevel This setting determines the log level for nodes across the cluster to use when recording entries in the log.
MasterHealth The operational health of a volume master deployment .
NodeHealth The operational health of a node entity .
ReplicaHealth The operational health of a volume replica deployment .