This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joe Stephenson
committed
Feb 28, 2022
1 parent
5bb6550
commit 3a8a48c
Showing
135 changed files
with
978 additions
and
845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
@@ -41,7 +41,7 @@ var ( | |
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) | ||
) | ||
|
||
// APIClient manages communication with the StorageOS API API v2.5.0 | ||
// APIClient manages communication with the StorageOS API API v2.6.0 | ||
// In most cases there should be only one, shared, APIClient. | ||
type APIClient struct { | ||
cfg *Configuration | ||
|
@@ -158,13 +158,12 @@ func parameterToJson(obj interface{}) (string, error) { | |
return string(jsonBuf), err | ||
} | ||
|
||
|
||
// callAPI do the request. | ||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { | ||
if c.cfg.Debug { | ||
dump, err := httputil.DumpRequestOut(request, true) | ||
dump, err := httputil.DumpRequestOut(request, true) | ||
if err != nil { | ||
return nil, err | ||
return nil, err | ||
} | ||
log.Printf("\n%s\n", string(dump)) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
@@ -38,7 +38,6 @@ var ( | |
|
||
// ContextAPIKey takes an APIKey as authentication for the request | ||
ContextAPIKey = contextKey("apikey") | ||
|
||
) | ||
|
||
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth | ||
|
@@ -53,7 +52,6 @@ type APIKey struct { | |
Prefix string | ||
} | ||
|
||
|
||
// ServerVariable stores the information about a server variable | ||
type ServerVariable struct { | ||
Description string | ||
|
@@ -63,9 +61,9 @@ type ServerVariable struct { | |
|
||
// ServerConfiguration stores the information about a server | ||
type ServerConfiguration struct { | ||
Url string | ||
Url string | ||
Description string | ||
Variables map[string]ServerVariable | ||
Variables map[string]ServerVariable | ||
} | ||
|
||
// Configuration stores the configuration of the API client | ||
|
@@ -87,9 +85,9 @@ func NewConfiguration() *Configuration { | |
DefaultHeader: make(map[string]string), | ||
UserAgent: "OpenAPI-Generator/1.0.0/go", | ||
Debug: false, | ||
Servers: []ServerConfiguration{ | ||
Servers: []ServerConfiguration{ | ||
{ | ||
Url: "/v2", | ||
Url: "/v2", | ||
Description: "No description provided", | ||
}, | ||
}, | ||
|
@@ -105,7 +103,7 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { | |
// ServerUrl returns URL based on server settings | ||
func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) { | ||
if index < 0 || len(c.Servers) <= index { | ||
return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1) | ||
return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers)-1) | ||
} | ||
server := c.Servers[index] | ||
url := server.Url | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,19 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// PoliciesIdSpecs struct for PoliciesIdSpecs | ||
type PoliciesIdSpecs struct { | ||
// A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. | ||
// A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. | ||
NamespaceID string `json:"namespaceID,omitempty"` | ||
// The resource type this policy grants access to. | ||
// The resource type this policy grants access to. | ||
ResourceType string `json:"resourceType,omitempty"` | ||
// If true, disallows requests that attempt to mutate the resource. | ||
// If true, disallows requests that attempt to mutate the resource. | ||
ReadOnly bool `json:"readOnly,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,19 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// PoliciesSpecs struct for PoliciesSpecs | ||
type PoliciesSpecs struct { | ||
// A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. | ||
// A unique identifier for a namespace. The format of this type is undefined and may change but the defined properties will not change.. | ||
NamespaceID string `json:"namespaceID,omitempty"` | ||
// The resource type this policy grants access to. | ||
// The resource type this policy grants access to. | ||
ResourceType string `json:"resourceType,omitempty"` | ||
// If true, disallows requests that attempt to mutate the resource. | ||
// If true, disallows requests that attempt to mutate the resource. | ||
ReadOnly bool `json:"readOnly,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// AcceptedMessage struct for AcceptedMessage | ||
type AcceptedMessage struct { | ||
Msg string `json:"msg,omitempty"` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,15 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// AttachNfsVolumeData struct for AttachNfsVolumeData | ||
type AttachNfsVolumeData struct { | ||
// An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. | ||
// An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. | ||
Version string `json:"version,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,20 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
// AttachType The attachment type of a volume. \"host\" indicates that the volume is consumed by the node it is attached to. | ||
|
||
// AttachType The attachment type of a volume. \"host\" indicates that the volume is consumed by the node it is attached to. | ||
type AttachType string | ||
|
||
// List of AttachType | ||
const ( | ||
ATTACHTYPE_UNKNOWN AttachType = "unknown" | ||
ATTACHTYPE_UNKNOWN AttachType = "unknown" | ||
ATTACHTYPE_DETACHED AttachType = "detached" | ||
ATTACHTYPE_NFS AttachType = "nfs" | ||
ATTACHTYPE_HOST AttachType = "host" | ||
ATTACHTYPE_NFS AttachType = "nfs" | ||
ATTACHTYPE_HOST AttachType = "host" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,15 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// AttachVolumeData struct for AttachVolumeData | ||
type AttachVolumeData struct { | ||
// A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. | ||
// A unique identifier for a node. The format of this type is undefined and may change but the defined properties will not change. | ||
NodeID string `json:"nodeID,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// AuthUserData struct for AuthUserData | ||
type AuthUserData struct { | ||
Username string `json:"username"` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,19 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// CapacityStats struct for CapacityStats | ||
type CapacityStats struct { | ||
// Total bytes in the filesystem | ||
// Total bytes in the filesystem | ||
Total uint64 `json:"total,omitempty"` | ||
// Free bytes in the filesystem available to root user | ||
// Free bytes in the filesystem available to root user | ||
Free uint64 `json:"free,omitempty"` | ||
// Byte value available to an unprivileged user | ||
// Byte value available to an unprivileged user | ||
Available uint64 `json:"available,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,31 +3,33 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// Cluster struct for Cluster | ||
type Cluster struct { | ||
// A unique identifier for a cluster. The format of this type is undefined and may change but the defined properties will not change. | ||
// A unique identifier for a cluster. The format of this type is undefined and may change but the defined properties will not change. | ||
Id string `json:"id,omitempty"` | ||
// Disables collection of telemetry data across the cluster. | ||
DisableTelemetry bool `json:"disableTelemetry,omitempty"` | ||
// Disables collection of reports for any fatal crashes across the cluster. | ||
// Disables collection of reports for any fatal crashes across the cluster. | ||
DisableCrashReporting bool `json:"disableCrashReporting,omitempty"` | ||
// Disables the mechanism responsible for checking if there is an updated version of StorageOS available for installation. | ||
DisableVersionCheck bool `json:"disableVersionCheck,omitempty"` | ||
LogLevel LogLevel `json:"logLevel,omitempty"` | ||
LogFormat LogFormat `json:"logFormat,omitempty"` | ||
// The time the entity was created. This timestamp is set by the node that created the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. | ||
// Disables the mechanism responsible for checking if there is an updated version of StorageOS available for installation. | ||
DisableVersionCheck bool `json:"disableVersionCheck,omitempty"` | ||
LogLevel LogLevel `json:"logLevel,omitempty"` | ||
LogFormat LogFormat `json:"logFormat,omitempty"` | ||
// The time the entity was created. This timestamp is set by the node that created the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. | ||
CreatedAt time.Time `json:"createdAt,omitempty"` | ||
// The time the entity was last updated. This timestamp is set by the node that last updated the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. | ||
// The time the entity was last updated. This timestamp is set by the node that last updated the entity, and may not be correct if the node's local clock was skewed. This value is for the user's informative purposes only, and correctness is not required. String format is RFC3339. | ||
UpdatedAt time.Time `json:"updatedAt,omitempty"` | ||
// An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. | ||
// An opaque representation of an entity version at the time it was obtained from the API. All operations that mutate the entity must include this version field in the request unchanged. The format of this type is undefined and may change but the defined properties will not change. | ||
Version string `json:"version,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,17 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// CreateNamespaceData struct for CreateNamespaceData | ||
type CreateNamespaceData struct { | ||
// The name of the namespace shown in the CLI and UI | ||
// The name of the namespace shown in the CLI and UI | ||
Name string `json:"name,omitempty"` | ||
// A set of arbitrary key value labels to apply to the entity. | ||
// A set of arbitrary key value labels to apply to the entity. | ||
Labels map[string]string `json:"labels,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// CreatePolicyGroupData struct for CreatePolicyGroupData | ||
type CreatePolicyGroupData struct { | ||
Name string `json:"name,omitempty"` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,20 @@ | |
* | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* API version: 2.5.0 | ||
* API version: 2.6.0 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
// CreateUserData struct for CreateUserData | ||
type CreateUserData struct { | ||
Username string `json:"username"` | ||
// If not present, the existing password is not changed | ||
Password string `json:"password"` | ||
// If true, this user is an administrator of the cluster. Administrators bypass the usual authentication checks and are granted access to all resources. Some actions (such as adding a new user) can only be performed by an administrator. | ||
// If true, this user is an administrator of the cluster. Administrators bypass the usual authentication checks and are granted access to all resources. Some actions (such as adding a new user) can only be performed by an administrator. | ||
IsAdmin bool `json:"isAdmin,omitempty"` | ||
// Defines a set of policy group IDs this user is a member of. Policy groups can be used to logically group users and apply authorisation policies to all members. | ||
// Defines a set of policy group IDs this user is a member of. Policy groups can be used to logically group users and apply authorisation policies to all members. | ||
Groups *[]string `json:"groups,omitempty"` | ||
} |
Oops, something went wrong.