feat: reimplement influx secret
CLI command (#125)
* refactor: rename `getPassword` to `getSecret`
This commit is contained in:
488
api/api_secrets.gen.go
Normal file
488
api/api_secrets.gen.go
Normal file
@ -0,0 +1,488 @@
|
||||
/*
|
||||
* Subset of Influx API covered by Influx CLI
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: 2.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
_context "context"
|
||||
_ioutil "io/ioutil"
|
||||
_nethttp "net/http"
|
||||
_neturl "net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
var (
|
||||
_ _context.Context
|
||||
)
|
||||
|
||||
type SecretsApi interface {
|
||||
|
||||
/*
|
||||
* GetOrgsIDSecrets List all secret keys for an organization
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param orgID The organization ID.
|
||||
* @return ApiGetOrgsIDSecretsRequest
|
||||
*/
|
||||
GetOrgsIDSecrets(ctx _context.Context, orgID string) ApiGetOrgsIDSecretsRequest
|
||||
|
||||
/*
|
||||
* GetOrgsIDSecretsExecute executes the request
|
||||
* @return SecretKeysResponse
|
||||
*/
|
||||
GetOrgsIDSecretsExecute(r ApiGetOrgsIDSecretsRequest) (SecretKeysResponse, error)
|
||||
|
||||
/*
|
||||
* PatchOrgsIDSecrets Update secrets in an organization
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param orgID The organization ID.
|
||||
* @return ApiPatchOrgsIDSecretsRequest
|
||||
*/
|
||||
PatchOrgsIDSecrets(ctx _context.Context, orgID string) ApiPatchOrgsIDSecretsRequest
|
||||
|
||||
/*
|
||||
* PatchOrgsIDSecretsExecute executes the request
|
||||
*/
|
||||
PatchOrgsIDSecretsExecute(r ApiPatchOrgsIDSecretsRequest) error
|
||||
|
||||
/*
|
||||
* PostOrgsIDSecrets Delete secrets from an organization
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param orgID The organization ID.
|
||||
* @return ApiPostOrgsIDSecretsRequest
|
||||
*/
|
||||
PostOrgsIDSecrets(ctx _context.Context, orgID string) ApiPostOrgsIDSecretsRequest
|
||||
|
||||
/*
|
||||
* PostOrgsIDSecretsExecute executes the request
|
||||
*/
|
||||
PostOrgsIDSecretsExecute(r ApiPostOrgsIDSecretsRequest) error
|
||||
}
|
||||
|
||||
// SecretsApiService SecretsApi service
|
||||
type SecretsApiService service
|
||||
|
||||
type ApiGetOrgsIDSecretsRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService SecretsApi
|
||||
orgID string
|
||||
zapTraceSpan *string
|
||||
}
|
||||
|
||||
func (r ApiGetOrgsIDSecretsRequest) OrgID(orgID string) ApiGetOrgsIDSecretsRequest {
|
||||
r.orgID = orgID
|
||||
return r
|
||||
}
|
||||
func (r ApiGetOrgsIDSecretsRequest) GetOrgID() string {
|
||||
return r.orgID
|
||||
}
|
||||
|
||||
func (r ApiGetOrgsIDSecretsRequest) ZapTraceSpan(zapTraceSpan string) ApiGetOrgsIDSecretsRequest {
|
||||
r.zapTraceSpan = &zapTraceSpan
|
||||
return r
|
||||
}
|
||||
func (r ApiGetOrgsIDSecretsRequest) GetZapTraceSpan() *string {
|
||||
return r.zapTraceSpan
|
||||
}
|
||||
|
||||
func (r ApiGetOrgsIDSecretsRequest) Execute() (SecretKeysResponse, error) {
|
||||
return r.ApiService.GetOrgsIDSecretsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* GetOrgsIDSecrets List all secret keys for an organization
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param orgID The organization ID.
|
||||
* @return ApiGetOrgsIDSecretsRequest
|
||||
*/
|
||||
func (a *SecretsApiService) GetOrgsIDSecrets(ctx _context.Context, orgID string) ApiGetOrgsIDSecretsRequest {
|
||||
return ApiGetOrgsIDSecretsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
orgID: orgID,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return SecretKeysResponse
|
||||
*/
|
||||
func (a *SecretsApiService) GetOrgsIDSecretsExecute(r ApiGetOrgsIDSecretsRequest) (SecretKeysResponse, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue SecretKeysResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SecretsApiService.GetOrgsIDSecrets")
|
||||
if err != nil {
|
||||
return localVarReturnValue, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/orgs/{orgID}/secrets"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"orgID"+"}", _neturl.PathEscape(parameterToString(r.orgID, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.zapTraceSpan != nil {
|
||||
localVarHeaderParams["Zap-Trace-Span"] = parameterToString(*r.zapTraceSpan, "")
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
body, err := GunzipIfNeeded(localVarHTTPResponse)
|
||||
if err != nil {
|
||||
body.Close()
|
||||
return localVarReturnValue, err
|
||||
}
|
||||
localVarBody, err := _ioutil.ReadAll(body)
|
||||
body.Close()
|
||||
if err != nil {
|
||||
return localVarReturnValue, err
|
||||
}
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v Error
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, newErr
|
||||
}
|
||||
newErr.model = &v
|
||||
return localVarReturnValue, newErr
|
||||
}
|
||||
|
||||
body, err := GunzipIfNeeded(localVarHTTPResponse)
|
||||
if err != nil {
|
||||
body.Close()
|
||||
return localVarReturnValue, err
|
||||
}
|
||||
localVarBody, err := _ioutil.ReadAll(body)
|
||||
body.Close()
|
||||
if err != nil {
|
||||
return localVarReturnValue, err
|
||||
}
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, nil
|
||||
}
|
||||
|
||||
type ApiPatchOrgsIDSecretsRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService SecretsApi
|
||||
orgID string
|
||||
requestBody *map[string]string
|
||||
zapTraceSpan *string
|
||||
}
|
||||
|
||||
func (r ApiPatchOrgsIDSecretsRequest) OrgID(orgID string) ApiPatchOrgsIDSecretsRequest {
|
||||
r.orgID = orgID
|
||||
return r
|
||||
}
|
||||
func (r ApiPatchOrgsIDSecretsRequest) GetOrgID() string {
|
||||
return r.orgID
|
||||
}
|
||||
|
||||
func (r ApiPatchOrgsIDSecretsRequest) RequestBody(requestBody map[string]string) ApiPatchOrgsIDSecretsRequest {
|
||||
r.requestBody = &requestBody
|
||||
return r
|
||||
}
|
||||
func (r ApiPatchOrgsIDSecretsRequest) GetRequestBody() *map[string]string {
|
||||
return r.requestBody
|
||||
}
|
||||
|
||||
func (r ApiPatchOrgsIDSecretsRequest) ZapTraceSpan(zapTraceSpan string) ApiPatchOrgsIDSecretsRequest {
|
||||
r.zapTraceSpan = &zapTraceSpan
|
||||
return r
|
||||
}
|
||||
func (r ApiPatchOrgsIDSecretsRequest) GetZapTraceSpan() *string {
|
||||
return r.zapTraceSpan
|
||||
}
|
||||
|
||||
func (r ApiPatchOrgsIDSecretsRequest) Execute() error {
|
||||
return r.ApiService.PatchOrgsIDSecretsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* PatchOrgsIDSecrets Update secrets in an organization
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param orgID The organization ID.
|
||||
* @return ApiPatchOrgsIDSecretsRequest
|
||||
*/
|
||||
func (a *SecretsApiService) PatchOrgsIDSecrets(ctx _context.Context, orgID string) ApiPatchOrgsIDSecretsRequest {
|
||||
return ApiPatchOrgsIDSecretsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
orgID: orgID,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *SecretsApiService) PatchOrgsIDSecretsExecute(r ApiPatchOrgsIDSecretsRequest) error {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SecretsApiService.PatchOrgsIDSecrets")
|
||||
if err != nil {
|
||||
return GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/orgs/{orgID}/secrets"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"orgID"+"}", _neturl.PathEscape(parameterToString(r.orgID, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.requestBody == nil {
|
||||
return reportError("requestBody is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.zapTraceSpan != nil {
|
||||
localVarHeaderParams["Zap-Trace-Span"] = parameterToString(*r.zapTraceSpan, "")
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.requestBody
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
body, err := GunzipIfNeeded(localVarHTTPResponse)
|
||||
if err != nil {
|
||||
body.Close()
|
||||
return err
|
||||
}
|
||||
localVarBody, err := _ioutil.ReadAll(body)
|
||||
body.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v Error
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return newErr
|
||||
}
|
||||
newErr.model = &v
|
||||
return newErr
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type ApiPostOrgsIDSecretsRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService SecretsApi
|
||||
orgID string
|
||||
secretKeys *SecretKeys
|
||||
zapTraceSpan *string
|
||||
}
|
||||
|
||||
func (r ApiPostOrgsIDSecretsRequest) OrgID(orgID string) ApiPostOrgsIDSecretsRequest {
|
||||
r.orgID = orgID
|
||||
return r
|
||||
}
|
||||
func (r ApiPostOrgsIDSecretsRequest) GetOrgID() string {
|
||||
return r.orgID
|
||||
}
|
||||
|
||||
func (r ApiPostOrgsIDSecretsRequest) SecretKeys(secretKeys SecretKeys) ApiPostOrgsIDSecretsRequest {
|
||||
r.secretKeys = &secretKeys
|
||||
return r
|
||||
}
|
||||
func (r ApiPostOrgsIDSecretsRequest) GetSecretKeys() *SecretKeys {
|
||||
return r.secretKeys
|
||||
}
|
||||
|
||||
func (r ApiPostOrgsIDSecretsRequest) ZapTraceSpan(zapTraceSpan string) ApiPostOrgsIDSecretsRequest {
|
||||
r.zapTraceSpan = &zapTraceSpan
|
||||
return r
|
||||
}
|
||||
func (r ApiPostOrgsIDSecretsRequest) GetZapTraceSpan() *string {
|
||||
return r.zapTraceSpan
|
||||
}
|
||||
|
||||
func (r ApiPostOrgsIDSecretsRequest) Execute() error {
|
||||
return r.ApiService.PostOrgsIDSecretsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* PostOrgsIDSecrets Delete secrets from an organization
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param orgID The organization ID.
|
||||
* @return ApiPostOrgsIDSecretsRequest
|
||||
*/
|
||||
func (a *SecretsApiService) PostOrgsIDSecrets(ctx _context.Context, orgID string) ApiPostOrgsIDSecretsRequest {
|
||||
return ApiPostOrgsIDSecretsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
orgID: orgID,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *SecretsApiService) PostOrgsIDSecretsExecute(r ApiPostOrgsIDSecretsRequest) error {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SecretsApiService.PostOrgsIDSecrets")
|
||||
if err != nil {
|
||||
return GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/orgs/{orgID}/secrets/{delete}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"orgID"+"}", _neturl.PathEscape(parameterToString(r.orgID, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.secretKeys == nil {
|
||||
return reportError("secretKeys is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.zapTraceSpan != nil {
|
||||
localVarHeaderParams["Zap-Trace-Span"] = parameterToString(*r.zapTraceSpan, "")
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.secretKeys
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
body, err := GunzipIfNeeded(localVarHTTPResponse)
|
||||
if err != nil {
|
||||
body.Close()
|
||||
return err
|
||||
}
|
||||
localVarBody, err := _ioutil.ReadAll(body)
|
||||
body.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v Error
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return newErr
|
||||
}
|
||||
newErr.model = &v
|
||||
return newErr
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
@ -65,6 +65,8 @@ type APIClient struct {
|
||||
|
||||
RestoreApi RestoreApi
|
||||
|
||||
SecretsApi SecretsApi
|
||||
|
||||
SetupApi SetupApi
|
||||
|
||||
TasksApi TasksApi
|
||||
@ -103,6 +105,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
|
||||
c.OrganizationsApi = (*OrganizationsApiService)(&c.common)
|
||||
c.QueryApi = (*QueryApiService)(&c.common)
|
||||
c.RestoreApi = (*RestoreApiService)(&c.common)
|
||||
c.SecretsApi = (*SecretsApiService)(&c.common)
|
||||
c.SetupApi = (*SetupApiService)(&c.common)
|
||||
c.TasksApi = (*TasksApiService)(&c.common)
|
||||
c.TelegrafsApi = (*TelegrafsApiService)(&c.common)
|
||||
|
@ -25,6 +25,10 @@ paths:
|
||||
$ref: "./openapi/src/common/paths/orgs_orgID_members.yml"
|
||||
/orgs/{orgID}/members/{userID}:
|
||||
$ref: "./openapi/src/common/paths/orgs_orgID_members_userID.yml"
|
||||
/orgs/{orgID}/secrets:
|
||||
$ref: "./openapi/src/common/paths/orgs_orgID_secrets.yml"
|
||||
/orgs/{orgID}/secrets/{delete}:
|
||||
$ref: "./openapi/src/common/paths/orgs_orgID_secrets_delete.yml"
|
||||
/buckets/{bucketID}/schema/measurements:
|
||||
$ref: "./openapi/src/cloud/paths/measurements.yml"
|
||||
/buckets/{bucketID}/schema/measurements/{measurementID}:
|
||||
@ -263,3 +267,9 @@ components:
|
||||
$ref: "./openapi/src/common/schemas/TemplateKind.yml"
|
||||
TemplateEntry:
|
||||
$ref: "./openapi/src/common/schemas/TemplateEntry.yml"
|
||||
SecretKeysResponse:
|
||||
$ref: "./openapi/src/common/schemas/SecretKeysResponse.yml"
|
||||
SecretKeys:
|
||||
$ref: "./openapi/src/common/schemas/SecretKeys.yml"
|
||||
Secrets:
|
||||
$ref: "./openapi/src/common/schemas/Secrets.yml"
|
||||
|
113
api/model_secret_keys.gen.go
Normal file
113
api/model_secret_keys.gen.go
Normal file
@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Subset of Influx API covered by Influx CLI
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: 2.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// SecretKeys struct for SecretKeys
|
||||
type SecretKeys struct {
|
||||
Secrets *[]string `json:"secrets,omitempty"`
|
||||
}
|
||||
|
||||
// NewSecretKeys instantiates a new SecretKeys object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewSecretKeys() *SecretKeys {
|
||||
this := SecretKeys{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSecretKeysWithDefaults instantiates a new SecretKeys object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewSecretKeysWithDefaults() *SecretKeys {
|
||||
this := SecretKeys{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetSecrets returns the Secrets field value if set, zero value otherwise.
|
||||
func (o *SecretKeys) GetSecrets() []string {
|
||||
if o == nil || o.Secrets == nil {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return *o.Secrets
|
||||
}
|
||||
|
||||
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SecretKeys) GetSecretsOk() (*[]string, bool) {
|
||||
if o == nil || o.Secrets == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Secrets, true
|
||||
}
|
||||
|
||||
// HasSecrets returns a boolean if a field has been set.
|
||||
func (o *SecretKeys) HasSecrets() bool {
|
||||
if o != nil && o.Secrets != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSecrets gets a reference to the given []string and assigns it to the Secrets field.
|
||||
func (o *SecretKeys) SetSecrets(v []string) {
|
||||
o.Secrets = &v
|
||||
}
|
||||
|
||||
func (o SecretKeys) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Secrets != nil {
|
||||
toSerialize["secrets"] = o.Secrets
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableSecretKeys struct {
|
||||
value *SecretKeys
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSecretKeys) Get() *SecretKeys {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeys) Set(val *SecretKeys) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSecretKeys) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeys) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSecretKeys(val *SecretKeys) *NullableSecretKeys {
|
||||
return &NullableSecretKeys{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSecretKeys) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeys) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
149
api/model_secret_keys_response.gen.go
Normal file
149
api/model_secret_keys_response.gen.go
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Subset of Influx API covered by Influx CLI
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: 2.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// SecretKeysResponse struct for SecretKeysResponse
|
||||
type SecretKeysResponse struct {
|
||||
Secrets *[]string `json:"secrets,omitempty"`
|
||||
Links *SecretKeysResponseAllOfLinks `json:"links,omitempty"`
|
||||
}
|
||||
|
||||
// NewSecretKeysResponse instantiates a new SecretKeysResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewSecretKeysResponse() *SecretKeysResponse {
|
||||
this := SecretKeysResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSecretKeysResponseWithDefaults instantiates a new SecretKeysResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewSecretKeysResponseWithDefaults() *SecretKeysResponse {
|
||||
this := SecretKeysResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetSecrets returns the Secrets field value if set, zero value otherwise.
|
||||
func (o *SecretKeysResponse) GetSecrets() []string {
|
||||
if o == nil || o.Secrets == nil {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return *o.Secrets
|
||||
}
|
||||
|
||||
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SecretKeysResponse) GetSecretsOk() (*[]string, bool) {
|
||||
if o == nil || o.Secrets == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Secrets, true
|
||||
}
|
||||
|
||||
// HasSecrets returns a boolean if a field has been set.
|
||||
func (o *SecretKeysResponse) HasSecrets() bool {
|
||||
if o != nil && o.Secrets != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSecrets gets a reference to the given []string and assigns it to the Secrets field.
|
||||
func (o *SecretKeysResponse) SetSecrets(v []string) {
|
||||
o.Secrets = &v
|
||||
}
|
||||
|
||||
// GetLinks returns the Links field value if set, zero value otherwise.
|
||||
func (o *SecretKeysResponse) GetLinks() SecretKeysResponseAllOfLinks {
|
||||
if o == nil || o.Links == nil {
|
||||
var ret SecretKeysResponseAllOfLinks
|
||||
return ret
|
||||
}
|
||||
return *o.Links
|
||||
}
|
||||
|
||||
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SecretKeysResponse) GetLinksOk() (*SecretKeysResponseAllOfLinks, bool) {
|
||||
if o == nil || o.Links == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Links, true
|
||||
}
|
||||
|
||||
// HasLinks returns a boolean if a field has been set.
|
||||
func (o *SecretKeysResponse) HasLinks() bool {
|
||||
if o != nil && o.Links != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLinks gets a reference to the given SecretKeysResponseAllOfLinks and assigns it to the Links field.
|
||||
func (o *SecretKeysResponse) SetLinks(v SecretKeysResponseAllOfLinks) {
|
||||
o.Links = &v
|
||||
}
|
||||
|
||||
func (o SecretKeysResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Secrets != nil {
|
||||
toSerialize["secrets"] = o.Secrets
|
||||
}
|
||||
if o.Links != nil {
|
||||
toSerialize["links"] = o.Links
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableSecretKeysResponse struct {
|
||||
value *SecretKeysResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponse) Get() *SecretKeysResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponse) Set(val *SecretKeysResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSecretKeysResponse(val *SecretKeysResponse) *NullableSecretKeysResponse {
|
||||
return &NullableSecretKeysResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
113
api/model_secret_keys_response_all_of.gen.go
Normal file
113
api/model_secret_keys_response_all_of.gen.go
Normal file
@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Subset of Influx API covered by Influx CLI
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: 2.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// SecretKeysResponseAllOf struct for SecretKeysResponseAllOf
|
||||
type SecretKeysResponseAllOf struct {
|
||||
Links *SecretKeysResponseAllOfLinks `json:"links,omitempty"`
|
||||
}
|
||||
|
||||
// NewSecretKeysResponseAllOf instantiates a new SecretKeysResponseAllOf object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewSecretKeysResponseAllOf() *SecretKeysResponseAllOf {
|
||||
this := SecretKeysResponseAllOf{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSecretKeysResponseAllOfWithDefaults instantiates a new SecretKeysResponseAllOf object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewSecretKeysResponseAllOfWithDefaults() *SecretKeysResponseAllOf {
|
||||
this := SecretKeysResponseAllOf{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLinks returns the Links field value if set, zero value otherwise.
|
||||
func (o *SecretKeysResponseAllOf) GetLinks() SecretKeysResponseAllOfLinks {
|
||||
if o == nil || o.Links == nil {
|
||||
var ret SecretKeysResponseAllOfLinks
|
||||
return ret
|
||||
}
|
||||
return *o.Links
|
||||
}
|
||||
|
||||
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SecretKeysResponseAllOf) GetLinksOk() (*SecretKeysResponseAllOfLinks, bool) {
|
||||
if o == nil || o.Links == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Links, true
|
||||
}
|
||||
|
||||
// HasLinks returns a boolean if a field has been set.
|
||||
func (o *SecretKeysResponseAllOf) HasLinks() bool {
|
||||
if o != nil && o.Links != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLinks gets a reference to the given SecretKeysResponseAllOfLinks and assigns it to the Links field.
|
||||
func (o *SecretKeysResponseAllOf) SetLinks(v SecretKeysResponseAllOfLinks) {
|
||||
o.Links = &v
|
||||
}
|
||||
|
||||
func (o SecretKeysResponseAllOf) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Links != nil {
|
||||
toSerialize["links"] = o.Links
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableSecretKeysResponseAllOf struct {
|
||||
value *SecretKeysResponseAllOf
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponseAllOf) Get() *SecretKeysResponseAllOf {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponseAllOf) Set(val *SecretKeysResponseAllOf) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponseAllOf) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponseAllOf) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSecretKeysResponseAllOf(val *SecretKeysResponseAllOf) *NullableSecretKeysResponseAllOf {
|
||||
return &NullableSecretKeysResponseAllOf{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponseAllOf) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponseAllOf) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
149
api/model_secret_keys_response_all_of_links.gen.go
Normal file
149
api/model_secret_keys_response_all_of_links.gen.go
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Subset of Influx API covered by Influx CLI
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: 2.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// SecretKeysResponseAllOfLinks struct for SecretKeysResponseAllOfLinks
|
||||
type SecretKeysResponseAllOfLinks struct {
|
||||
Self *string `json:"self,omitempty"`
|
||||
Org *string `json:"org,omitempty"`
|
||||
}
|
||||
|
||||
// NewSecretKeysResponseAllOfLinks instantiates a new SecretKeysResponseAllOfLinks object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewSecretKeysResponseAllOfLinks() *SecretKeysResponseAllOfLinks {
|
||||
this := SecretKeysResponseAllOfLinks{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSecretKeysResponseAllOfLinksWithDefaults instantiates a new SecretKeysResponseAllOfLinks object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewSecretKeysResponseAllOfLinksWithDefaults() *SecretKeysResponseAllOfLinks {
|
||||
this := SecretKeysResponseAllOfLinks{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetSelf returns the Self field value if set, zero value otherwise.
|
||||
func (o *SecretKeysResponseAllOfLinks) GetSelf() string {
|
||||
if o == nil || o.Self == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Self
|
||||
}
|
||||
|
||||
// GetSelfOk returns a tuple with the Self field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SecretKeysResponseAllOfLinks) GetSelfOk() (*string, bool) {
|
||||
if o == nil || o.Self == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Self, true
|
||||
}
|
||||
|
||||
// HasSelf returns a boolean if a field has been set.
|
||||
func (o *SecretKeysResponseAllOfLinks) HasSelf() bool {
|
||||
if o != nil && o.Self != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSelf gets a reference to the given string and assigns it to the Self field.
|
||||
func (o *SecretKeysResponseAllOfLinks) SetSelf(v string) {
|
||||
o.Self = &v
|
||||
}
|
||||
|
||||
// GetOrg returns the Org field value if set, zero value otherwise.
|
||||
func (o *SecretKeysResponseAllOfLinks) GetOrg() string {
|
||||
if o == nil || o.Org == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Org
|
||||
}
|
||||
|
||||
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SecretKeysResponseAllOfLinks) GetOrgOk() (*string, bool) {
|
||||
if o == nil || o.Org == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Org, true
|
||||
}
|
||||
|
||||
// HasOrg returns a boolean if a field has been set.
|
||||
func (o *SecretKeysResponseAllOfLinks) HasOrg() bool {
|
||||
if o != nil && o.Org != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrg gets a reference to the given string and assigns it to the Org field.
|
||||
func (o *SecretKeysResponseAllOfLinks) SetOrg(v string) {
|
||||
o.Org = &v
|
||||
}
|
||||
|
||||
func (o SecretKeysResponseAllOfLinks) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Self != nil {
|
||||
toSerialize["self"] = o.Self
|
||||
}
|
||||
if o.Org != nil {
|
||||
toSerialize["org"] = o.Org
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableSecretKeysResponseAllOfLinks struct {
|
||||
value *SecretKeysResponseAllOfLinks
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponseAllOfLinks) Get() *SecretKeysResponseAllOfLinks {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponseAllOfLinks) Set(val *SecretKeysResponseAllOfLinks) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponseAllOfLinks) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponseAllOfLinks) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSecretKeysResponseAllOfLinks(val *SecretKeysResponseAllOfLinks) *NullableSecretKeysResponseAllOfLinks {
|
||||
return &NullableSecretKeysResponseAllOfLinks{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSecretKeysResponseAllOfLinks) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSecretKeysResponseAllOfLinks) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
Reference in New Issue
Block a user