mirror of
https://github.com/openziti/zrok.git
synced 2025-06-27 13:11:27 +02:00
parent
d2bebc9151
commit
7685c06e45
@ -46,7 +46,7 @@ func Run(inCfg *config.Config) error {
|
|||||||
api.AccountChangePasswordHandler = newChangePasswordHandler(cfg)
|
api.AccountChangePasswordHandler = newChangePasswordHandler(cfg)
|
||||||
api.AccountInviteHandler = newInviteHandler(cfg)
|
api.AccountInviteHandler = newInviteHandler(cfg)
|
||||||
api.AccountLoginHandler = account.LoginHandlerFunc(loginHandler)
|
api.AccountLoginHandler = account.LoginHandlerFunc(loginHandler)
|
||||||
api.AccountRegenerateTokenHandler = newRegenerateTokenHandler()
|
api.AccountRegenerateAccountTokenHandler = newRegenerateAccountTokenHandler()
|
||||||
api.AccountRegisterHandler = newRegisterHandler(cfg)
|
api.AccountRegisterHandler = newRegisterHandler(cfg)
|
||||||
api.AccountResetPasswordHandler = newResetPasswordHandler(cfg)
|
api.AccountResetPasswordHandler = newResetPasswordHandler(cfg)
|
||||||
api.AccountResetPasswordRequestHandler = newResetPasswordRequestHandler()
|
api.AccountResetPasswordRequestHandler = newResetPasswordRequestHandler()
|
||||||
|
63
controller/regenerateAccountToken.go
Normal file
63
controller/regenerateAccountToken.go
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
package controller
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/runtime/middleware"
|
||||||
|
"github.com/openziti/zrok/rest_model_zrok"
|
||||||
|
"github.com/openziti/zrok/rest_server_zrok/operations/account"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
type regenerateAccountTokenHandler struct{}
|
||||||
|
|
||||||
|
func newRegenerateAccountTokenHandler() *regenerateAccountTokenHandler {
|
||||||
|
return ®enerateAccountTokenHandler{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (handler *regenerateAccountTokenHandler) Handle(params account.RegenerateAccountTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||||
|
logrus.Infof("received account token regeneration request for email '%v'", principal.Email)
|
||||||
|
|
||||||
|
if params.Body.EmailAddress != principal.Email {
|
||||||
|
logrus.Errorf("mismatched account '%v' for '%v'", params.Body.EmailAddress, principal.Email)
|
||||||
|
return account.NewRegenerateAccountTokenNotFound()
|
||||||
|
}
|
||||||
|
|
||||||
|
tx, err := str.Begin()
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("error starting transaction for '%v': %v", params.Body.EmailAddress, err)
|
||||||
|
return account.NewRegenerateAccountTokenInternalServerError()
|
||||||
|
}
|
||||||
|
defer tx.Rollback()
|
||||||
|
|
||||||
|
a, err := str.FindAccountWithEmail(params.Body.EmailAddress, tx)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("error finding account for '%v': %v", params.Body.EmailAddress, err)
|
||||||
|
return account.NewRegenerateAccountTokenNotFound()
|
||||||
|
}
|
||||||
|
if a.Deleted {
|
||||||
|
logrus.Errorf("account '%v' for '%v' deleted", a.Email, a.Token)
|
||||||
|
return account.NewRegenerateAccountTokenNotFound()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Need to create new token and invalidate all other resources
|
||||||
|
accountToken, err := CreateToken()
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("error creating account token for request '%v': %v", params.Body.EmailAddress, err)
|
||||||
|
return account.NewRegenerateAccountTokenInternalServerError()
|
||||||
|
}
|
||||||
|
|
||||||
|
a.Token = accountToken
|
||||||
|
|
||||||
|
if _, err := str.UpdateAccount(a, tx); err != nil {
|
||||||
|
logrus.Errorf("error updating account for request '%v': %v", params.Body.EmailAddress, err)
|
||||||
|
return account.NewRegenerateAccountTokenInternalServerError()
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := tx.Commit(); err != nil {
|
||||||
|
logrus.Errorf("error committing '%v' (%v): %v", params.Body.EmailAddress, a.Email, err)
|
||||||
|
return account.NewRegenerateAccountTokenInternalServerError()
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Infof("regenerated account token '%v' for '%v'", a.Token, a.Email)
|
||||||
|
|
||||||
|
return account.NewRegenerateAccountTokenOK().WithPayload(&account.RegenerateAccountTokenOKBody{AccountToken: accountToken})
|
||||||
|
}
|
@ -1,63 +0,0 @@
|
|||||||
package controller
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
"github.com/openziti/zrok/rest_server_zrok/operations/account"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
type regenerateTokenHandler struct{}
|
|
||||||
|
|
||||||
func newRegenerateTokenHandler() *regenerateTokenHandler {
|
|
||||||
return ®enerateTokenHandler{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (handler *regenerateTokenHandler) Handle(params account.RegenerateTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
|
||||||
logrus.Infof("received token regeneration request for email '%v'", principal.Email)
|
|
||||||
|
|
||||||
if params.Body.EmailAddress != principal.Email {
|
|
||||||
logrus.Errorf("mismatched account '%v' for '%v'", params.Body.EmailAddress, principal.Email)
|
|
||||||
return account.NewRegenerateTokenNotFound()
|
|
||||||
}
|
|
||||||
|
|
||||||
tx, err := str.Begin()
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("error starting transaction for '%v': %v", params.Body.EmailAddress, err)
|
|
||||||
return account.NewRegenerateTokenInternalServerError()
|
|
||||||
}
|
|
||||||
defer tx.Rollback()
|
|
||||||
|
|
||||||
a, err := str.FindAccountWithEmail(params.Body.EmailAddress, tx)
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("error finding account for '%v': %v", params.Body.EmailAddress, err)
|
|
||||||
return account.NewRegenerateTokenNotFound()
|
|
||||||
}
|
|
||||||
if a.Deleted {
|
|
||||||
logrus.Errorf("account '%v' for '%v' deleted", a.Email, a.Token)
|
|
||||||
return account.NewRegenerateTokenNotFound()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Need to create new token and invalidate all other resources
|
|
||||||
token, err := CreateToken()
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("error creating token for request '%v': %v", params.Body.EmailAddress, err)
|
|
||||||
return account.NewRegenerateTokenInternalServerError()
|
|
||||||
}
|
|
||||||
|
|
||||||
a.Token = token
|
|
||||||
|
|
||||||
if _, err := str.UpdateAccount(a, tx); err != nil {
|
|
||||||
logrus.Errorf("error updating account for request '%v': %v", params.Body.EmailAddress, err)
|
|
||||||
return account.NewRegenerateTokenInternalServerError()
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := tx.Commit(); err != nil {
|
|
||||||
logrus.Errorf("error committing '%v' (%v): %v", params.Body.EmailAddress, a.Email, err)
|
|
||||||
return account.NewRegenerateTokenInternalServerError()
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("regenerated token '%v' for '%v'", a.Token, a.Email)
|
|
||||||
|
|
||||||
return account.NewRegenerateTokenOK().WithPayload(&account.RegenerateTokenOKBody{Token: token})
|
|
||||||
}
|
|
@ -36,7 +36,7 @@ type ClientService interface {
|
|||||||
|
|
||||||
Login(params *LoginParams, opts ...ClientOption) (*LoginOK, error)
|
Login(params *LoginParams, opts ...ClientOption) (*LoginOK, error)
|
||||||
|
|
||||||
RegenerateToken(params *RegenerateTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateTokenOK, error)
|
RegenerateAccountToken(params *RegenerateAccountTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateAccountTokenOK, error)
|
||||||
|
|
||||||
Register(params *RegisterParams, opts ...ClientOption) (*RegisterOK, error)
|
Register(params *RegisterParams, opts ...ClientOption) (*RegisterOK, error)
|
||||||
|
|
||||||
@ -165,22 +165,22 @@ func (a *Client) Login(params *LoginParams, opts ...ClientOption) (*LoginOK, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
RegenerateToken regenerate token API
|
RegenerateAccountToken regenerate account token API
|
||||||
*/
|
*/
|
||||||
func (a *Client) RegenerateToken(params *RegenerateTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateTokenOK, error) {
|
func (a *Client) RegenerateAccountToken(params *RegenerateAccountTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateAccountTokenOK, error) {
|
||||||
// TODO: Validate the params before sending
|
// TODO: Validate the params before sending
|
||||||
if params == nil {
|
if params == nil {
|
||||||
params = NewRegenerateTokenParams()
|
params = NewRegenerateAccountTokenParams()
|
||||||
}
|
}
|
||||||
op := &runtime.ClientOperation{
|
op := &runtime.ClientOperation{
|
||||||
ID: "regenerateToken",
|
ID: "regenerateAccountToken",
|
||||||
Method: "POST",
|
Method: "POST",
|
||||||
PathPattern: "/regenerateToken",
|
PathPattern: "/regenerateAccountToken",
|
||||||
ProducesMediaTypes: []string{"application/zrok.v1+json"},
|
ProducesMediaTypes: []string{"application/zrok.v1+json"},
|
||||||
ConsumesMediaTypes: []string{"application/zrok.v1+json"},
|
ConsumesMediaTypes: []string{"application/zrok.v1+json"},
|
||||||
Schemes: []string{"http"},
|
Schemes: []string{"http"},
|
||||||
Params: params,
|
Params: params,
|
||||||
Reader: &RegenerateTokenReader{formats: a.formats},
|
Reader: &RegenerateAccountTokenReader{formats: a.formats},
|
||||||
AuthInfo: authInfo,
|
AuthInfo: authInfo,
|
||||||
Context: params.Context,
|
Context: params.Context,
|
||||||
Client: params.HTTPClient,
|
Client: params.HTTPClient,
|
||||||
@ -193,13 +193,13 @@ func (a *Client) RegenerateToken(params *RegenerateTokenParams, authInfo runtime
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
success, ok := result.(*RegenerateTokenOK)
|
success, ok := result.(*RegenerateAccountTokenOK)
|
||||||
if ok {
|
if ok {
|
||||||
return success, nil
|
return success, nil
|
||||||
}
|
}
|
||||||
// unexpected success response
|
// unexpected success response
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||||
msg := fmt.Sprintf("unexpected success response for regenerateToken: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
msg := fmt.Sprintf("unexpected success response for regenerateAccountToken: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
146
rest_client_zrok/account/regenerate_account_token_parameters.go
Normal file
146
rest_client_zrok/account/regenerate_account_token_parameters.go
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
package account
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenParams creates a new RegenerateAccountTokenParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewRegenerateAccountTokenParams() *RegenerateAccountTokenParams {
|
||||||
|
return &RegenerateAccountTokenParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenParamsWithTimeout creates a new RegenerateAccountTokenParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewRegenerateAccountTokenParamsWithTimeout(timeout time.Duration) *RegenerateAccountTokenParams {
|
||||||
|
return &RegenerateAccountTokenParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenParamsWithContext creates a new RegenerateAccountTokenParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewRegenerateAccountTokenParamsWithContext(ctx context.Context) *RegenerateAccountTokenParams {
|
||||||
|
return &RegenerateAccountTokenParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenParamsWithHTTPClient creates a new RegenerateAccountTokenParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewRegenerateAccountTokenParamsWithHTTPClient(client *http.Client) *RegenerateAccountTokenParams {
|
||||||
|
return &RegenerateAccountTokenParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the regenerate account token operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenParams struct {
|
||||||
|
|
||||||
|
// Body.
|
||||||
|
Body RegenerateAccountTokenBody
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the regenerate account token params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *RegenerateAccountTokenParams) WithDefaults() *RegenerateAccountTokenParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the regenerate account token params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *RegenerateAccountTokenParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) WithTimeout(timeout time.Duration) *RegenerateAccountTokenParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) WithContext(ctx context.Context) *RegenerateAccountTokenParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) WithHTTPClient(client *http.Client) *RegenerateAccountTokenParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithBody adds the body to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) WithBody(body RegenerateAccountTokenBody) *RegenerateAccountTokenParams {
|
||||||
|
o.SetBody(body)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetBody adds the body to the regenerate account token params
|
||||||
|
func (o *RegenerateAccountTokenParams) SetBody(body RegenerateAccountTokenBody) {
|
||||||
|
o.Body = body
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *RegenerateAccountTokenParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if err := r.SetBodyParam(o.Body); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
303
rest_client_zrok/account/regenerate_account_token_responses.go
Normal file
303
rest_client_zrok/account/regenerate_account_token_responses.go
Normal file
@ -0,0 +1,303 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
package account
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegenerateAccountTokenReader is a Reader for the RegenerateAccountToken structure.
|
||||||
|
type RegenerateAccountTokenReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *RegenerateAccountTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewRegenerateAccountTokenOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 404:
|
||||||
|
result := NewRegenerateAccountTokenNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewRegenerateAccountTokenInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("[POST /regenerateAccountToken] regenerateAccountToken", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenOK creates a RegenerateAccountTokenOK with default headers values
|
||||||
|
func NewRegenerateAccountTokenOK() *RegenerateAccountTokenOK {
|
||||||
|
return &RegenerateAccountTokenOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
regenerate account token
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenOK struct {
|
||||||
|
Payload *RegenerateAccountTokenOKBody
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this regenerate account token o k response has a 2xx status code
|
||||||
|
func (o *RegenerateAccountTokenOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this regenerate account token o k response has a 3xx status code
|
||||||
|
func (o *RegenerateAccountTokenOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this regenerate account token o k response has a 4xx status code
|
||||||
|
func (o *RegenerateAccountTokenOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this regenerate account token o k response has a 5xx status code
|
||||||
|
func (o *RegenerateAccountTokenOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this regenerate account token o k response a status code equal to that given
|
||||||
|
func (o *RegenerateAccountTokenOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the regenerate account token o k response
|
||||||
|
func (o *RegenerateAccountTokenOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenOK) String() string {
|
||||||
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenOK) GetPayload() *RegenerateAccountTokenOKBody {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(RegenerateAccountTokenOKBody)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenNotFound creates a RegenerateAccountTokenNotFound with default headers values
|
||||||
|
func NewRegenerateAccountTokenNotFound() *RegenerateAccountTokenNotFound {
|
||||||
|
return &RegenerateAccountTokenNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
account not found
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenNotFound struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this regenerate account token not found response has a 2xx status code
|
||||||
|
func (o *RegenerateAccountTokenNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this regenerate account token not found response has a 3xx status code
|
||||||
|
func (o *RegenerateAccountTokenNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this regenerate account token not found response has a 4xx status code
|
||||||
|
func (o *RegenerateAccountTokenNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this regenerate account token not found response has a 5xx status code
|
||||||
|
func (o *RegenerateAccountTokenNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this regenerate account token not found response a status code equal to that given
|
||||||
|
func (o *RegenerateAccountTokenNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the regenerate account token not found response
|
||||||
|
func (o *RegenerateAccountTokenNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenNotFound ", 404)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenNotFound ", 404)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenInternalServerError creates a RegenerateAccountTokenInternalServerError with default headers values
|
||||||
|
func NewRegenerateAccountTokenInternalServerError() *RegenerateAccountTokenInternalServerError {
|
||||||
|
return &RegenerateAccountTokenInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
internal server error
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenInternalServerError struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this regenerate account token internal server error response has a 2xx status code
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this regenerate account token internal server error response has a 3xx status code
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this regenerate account token internal server error response has a 4xx status code
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this regenerate account token internal server error response has a 5xx status code
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this regenerate account token internal server error response a status code equal to that given
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the regenerate account token internal server error response
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenInternalServerError ", 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenInternalServerError ", 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenBody regenerate account token body
|
||||||
|
swagger:model RegenerateAccountTokenBody
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenBody struct {
|
||||||
|
|
||||||
|
// email address
|
||||||
|
EmailAddress string `json:"emailAddress,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this regenerate account token body
|
||||||
|
func (o *RegenerateAccountTokenBody) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validates this regenerate account token body based on context it is used
|
||||||
|
func (o *RegenerateAccountTokenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenBody) MarshalBinary() ([]byte, error) {
|
||||||
|
if o == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(o)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenBody) UnmarshalBinary(b []byte) error {
|
||||||
|
var res RegenerateAccountTokenBody
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*o = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenOKBody regenerate account token o k body
|
||||||
|
swagger:model RegenerateAccountTokenOKBody
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenOKBody struct {
|
||||||
|
|
||||||
|
// account token
|
||||||
|
AccountToken string `json:"accountToken,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this regenerate account token o k body
|
||||||
|
func (o *RegenerateAccountTokenOKBody) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validates this regenerate account token o k body based on context it is used
|
||||||
|
func (o *RegenerateAccountTokenOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenOKBody) MarshalBinary() ([]byte, error) {
|
||||||
|
if o == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(o)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenOKBody) UnmarshalBinary(b []byte) error {
|
||||||
|
var res RegenerateAccountTokenOKBody
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*o = res
|
||||||
|
return nil
|
||||||
|
}
|
@ -1,146 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package account
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewRegenerateTokenParams creates a new RegenerateTokenParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewRegenerateTokenParams() *RegenerateTokenParams {
|
|
||||||
return &RegenerateTokenParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenParamsWithTimeout creates a new RegenerateTokenParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewRegenerateTokenParamsWithTimeout(timeout time.Duration) *RegenerateTokenParams {
|
|
||||||
return &RegenerateTokenParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenParamsWithContext creates a new RegenerateTokenParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewRegenerateTokenParamsWithContext(ctx context.Context) *RegenerateTokenParams {
|
|
||||||
return &RegenerateTokenParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenParamsWithHTTPClient creates a new RegenerateTokenParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewRegenerateTokenParamsWithHTTPClient(client *http.Client) *RegenerateTokenParams {
|
|
||||||
return &RegenerateTokenParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the regenerate token operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type RegenerateTokenParams struct {
|
|
||||||
|
|
||||||
// Body.
|
|
||||||
Body RegenerateTokenBody
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the regenerate token params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *RegenerateTokenParams) WithDefaults() *RegenerateTokenParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the regenerate token params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *RegenerateTokenParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) WithTimeout(timeout time.Duration) *RegenerateTokenParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) WithContext(ctx context.Context) *RegenerateTokenParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) WithHTTPClient(client *http.Client) *RegenerateTokenParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBody adds the body to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) WithBody(body RegenerateTokenBody) *RegenerateTokenParams {
|
|
||||||
o.SetBody(body)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBody adds the body to the regenerate token params
|
|
||||||
func (o *RegenerateTokenParams) SetBody(body RegenerateTokenBody) {
|
|
||||||
o.Body = body
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *RegenerateTokenParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
if err := r.SetBodyParam(o.Body); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,303 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package account
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RegenerateTokenReader is a Reader for the RegenerateToken structure.
|
|
||||||
type RegenerateTokenReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *RegenerateTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewRegenerateTokenOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 404:
|
|
||||||
result := NewRegenerateTokenNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewRegenerateTokenInternalServerError()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
default:
|
|
||||||
return nil, runtime.NewAPIError("[POST /regenerateToken] regenerateToken", response, response.Code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenOK creates a RegenerateTokenOK with default headers values
|
|
||||||
func NewRegenerateTokenOK() *RegenerateTokenOK {
|
|
||||||
return &RegenerateTokenOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
regenerate account token
|
|
||||||
*/
|
|
||||||
type RegenerateTokenOK struct {
|
|
||||||
Payload *RegenerateTokenOKBody
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this regenerate token o k response has a 2xx status code
|
|
||||||
func (o *RegenerateTokenOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this regenerate token o k response has a 3xx status code
|
|
||||||
func (o *RegenerateTokenOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this regenerate token o k response has a 4xx status code
|
|
||||||
func (o *RegenerateTokenOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this regenerate token o k response has a 5xx status code
|
|
||||||
func (o *RegenerateTokenOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this regenerate token o k response a status code equal to that given
|
|
||||||
func (o *RegenerateTokenOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the regenerate token o k response
|
|
||||||
func (o *RegenerateTokenOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenOK) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenOK) String() string {
|
|
||||||
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenOK) GetPayload() *RegenerateTokenOKBody {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(RegenerateTokenOKBody)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenNotFound creates a RegenerateTokenNotFound with default headers values
|
|
||||||
func NewRegenerateTokenNotFound() *RegenerateTokenNotFound {
|
|
||||||
return &RegenerateTokenNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
account not found
|
|
||||||
*/
|
|
||||||
type RegenerateTokenNotFound struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this regenerate token not found response has a 2xx status code
|
|
||||||
func (o *RegenerateTokenNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this regenerate token not found response has a 3xx status code
|
|
||||||
func (o *RegenerateTokenNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this regenerate token not found response has a 4xx status code
|
|
||||||
func (o *RegenerateTokenNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this regenerate token not found response has a 5xx status code
|
|
||||||
func (o *RegenerateTokenNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this regenerate token not found response a status code equal to that given
|
|
||||||
func (o *RegenerateTokenNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the regenerate token not found response
|
|
||||||
func (o *RegenerateTokenNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenNotFound ", 404)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenNotFound ", 404)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenInternalServerError creates a RegenerateTokenInternalServerError with default headers values
|
|
||||||
func NewRegenerateTokenInternalServerError() *RegenerateTokenInternalServerError {
|
|
||||||
return &RegenerateTokenInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
internal server error
|
|
||||||
*/
|
|
||||||
type RegenerateTokenInternalServerError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this regenerate token internal server error response has a 2xx status code
|
|
||||||
func (o *RegenerateTokenInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this regenerate token internal server error response has a 3xx status code
|
|
||||||
func (o *RegenerateTokenInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this regenerate token internal server error response has a 4xx status code
|
|
||||||
func (o *RegenerateTokenInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this regenerate token internal server error response has a 5xx status code
|
|
||||||
func (o *RegenerateTokenInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this regenerate token internal server error response a status code equal to that given
|
|
||||||
func (o *RegenerateTokenInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the regenerate token internal server error response
|
|
||||||
func (o *RegenerateTokenInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenInternalServerError ", 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[POST /regenerateToken][%d] regenerateTokenInternalServerError ", 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateTokenInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenBody regenerate token body
|
|
||||||
swagger:model RegenerateTokenBody
|
|
||||||
*/
|
|
||||||
type RegenerateTokenBody struct {
|
|
||||||
|
|
||||||
// email address
|
|
||||||
EmailAddress string `json:"emailAddress,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this regenerate token body
|
|
||||||
func (o *RegenerateTokenBody) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this regenerate token body based on context it is used
|
|
||||||
func (o *RegenerateTokenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenBody) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenBody) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RegenerateTokenBody
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenOKBody regenerate token o k body
|
|
||||||
swagger:model RegenerateTokenOKBody
|
|
||||||
*/
|
|
||||||
type RegenerateTokenOKBody struct {
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this regenerate token o k body
|
|
||||||
func (o *RegenerateTokenOKBody) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this regenerate token o k body based on context it is used
|
|
||||||
func (o *RegenerateTokenOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenOKBody) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenOKBody) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RegenerateTokenOKBody
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,148 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metadata
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewListMembersParams creates a new ListMembersParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewListMembersParams() *ListMembersParams {
|
|
||||||
return &ListMembersParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersParamsWithTimeout creates a new ListMembersParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewListMembersParamsWithTimeout(timeout time.Duration) *ListMembersParams {
|
|
||||||
return &ListMembersParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersParamsWithContext creates a new ListMembersParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewListMembersParamsWithContext(ctx context.Context) *ListMembersParams {
|
|
||||||
return &ListMembersParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersParamsWithHTTPClient creates a new ListMembersParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewListMembersParamsWithHTTPClient(client *http.Client) *ListMembersParams {
|
|
||||||
return &ListMembersParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the list members operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type ListMembersParams struct {
|
|
||||||
|
|
||||||
// OrganizationToken.
|
|
||||||
OrganizationToken string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the list members params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *ListMembersParams) WithDefaults() *ListMembersParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the list members params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *ListMembersParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the list members params
|
|
||||||
func (o *ListMembersParams) WithTimeout(timeout time.Duration) *ListMembersParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the list members params
|
|
||||||
func (o *ListMembersParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the list members params
|
|
||||||
func (o *ListMembersParams) WithContext(ctx context.Context) *ListMembersParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the list members params
|
|
||||||
func (o *ListMembersParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the list members params
|
|
||||||
func (o *ListMembersParams) WithHTTPClient(client *http.Client) *ListMembersParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the list members params
|
|
||||||
func (o *ListMembersParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOrganizationToken adds the organizationToken to the list members params
|
|
||||||
func (o *ListMembersParams) WithOrganizationToken(organizationToken string) *ListMembersParams {
|
|
||||||
o.SetOrganizationToken(organizationToken)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetOrganizationToken adds the organizationToken to the list members params
|
|
||||||
func (o *ListMembersParams) SetOrganizationToken(organizationToken string) {
|
|
||||||
o.OrganizationToken = organizationToken
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *ListMembersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// path param organizationToken
|
|
||||||
if err := r.SetPathParam("organizationToken", o.OrganizationToken); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,377 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metadata
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ListMembersReader is a Reader for the ListMembers structure.
|
|
||||||
type ListMembersReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *ListMembersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewListMembersOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 404:
|
|
||||||
result := NewListMembersNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewListMembersInternalServerError()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
default:
|
|
||||||
return nil, runtime.NewAPIError("[GET /members/{organizationToken}] listMembers", response, response.Code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersOK creates a ListMembersOK with default headers values
|
|
||||||
func NewListMembersOK() *ListMembersOK {
|
|
||||||
return &ListMembersOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
ok
|
|
||||||
*/
|
|
||||||
type ListMembersOK struct {
|
|
||||||
Payload *ListMembersOKBody
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this list members o k response has a 2xx status code
|
|
||||||
func (o *ListMembersOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this list members o k response has a 3xx status code
|
|
||||||
func (o *ListMembersOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this list members o k response has a 4xx status code
|
|
||||||
func (o *ListMembersOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this list members o k response has a 5xx status code
|
|
||||||
func (o *ListMembersOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this list members o k response a status code equal to that given
|
|
||||||
func (o *ListMembersOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the list members o k response
|
|
||||||
func (o *ListMembersOK) Code() int {
|
|
||||||
return 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listMembersOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listMembersOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOK) GetPayload() *ListMembersOKBody {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(ListMembersOKBody)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersNotFound creates a ListMembersNotFound with default headers values
|
|
||||||
func NewListMembersNotFound() *ListMembersNotFound {
|
|
||||||
return &ListMembersNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
not found
|
|
||||||
*/
|
|
||||||
type ListMembersNotFound struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this list members not found response has a 2xx status code
|
|
||||||
func (o *ListMembersNotFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this list members not found response has a 3xx status code
|
|
||||||
func (o *ListMembersNotFound) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this list members not found response has a 4xx status code
|
|
||||||
func (o *ListMembersNotFound) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this list members not found response has a 5xx status code
|
|
||||||
func (o *ListMembersNotFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this list members not found response a status code equal to that given
|
|
||||||
func (o *ListMembersNotFound) IsCode(code int) bool {
|
|
||||||
return code == 404
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the list members not found response
|
|
||||||
func (o *ListMembersNotFound) Code() int {
|
|
||||||
return 404
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listMembersNotFound ", 404)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersNotFound) String() string {
|
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listMembersNotFound ", 404)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersInternalServerError creates a ListMembersInternalServerError with default headers values
|
|
||||||
func NewListMembersInternalServerError() *ListMembersInternalServerError {
|
|
||||||
return &ListMembersInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
internal server error
|
|
||||||
*/
|
|
||||||
type ListMembersInternalServerError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this list members internal server error response has a 2xx status code
|
|
||||||
func (o *ListMembersInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this list members internal server error response has a 3xx status code
|
|
||||||
func (o *ListMembersInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this list members internal server error response has a 4xx status code
|
|
||||||
func (o *ListMembersInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this list members internal server error response has a 5xx status code
|
|
||||||
func (o *ListMembersInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this list members internal server error response a status code equal to that given
|
|
||||||
func (o *ListMembersInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code gets the status code for the list members internal server error response
|
|
||||||
func (o *ListMembersInternalServerError) Code() int {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listMembersInternalServerError ", 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listMembersInternalServerError ", 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersOKBody list members o k body
|
|
||||||
swagger:model ListMembersOKBody
|
|
||||||
*/
|
|
||||||
type ListMembersOKBody struct {
|
|
||||||
|
|
||||||
// members
|
|
||||||
Members []*ListMembersOKBodyMembersItems0 `json:"members"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this list members o k body
|
|
||||||
func (o *ListMembersOKBody) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := o.validateMembers(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOKBody) validateMembers(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(o.Members) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(o.Members); i++ {
|
|
||||||
if swag.IsZero(o.Members[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Members[i] != nil {
|
|
||||||
if err := o.Members[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this list members o k body based on the context it is used
|
|
||||||
func (o *ListMembersOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := o.contextValidateMembers(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOKBody) contextValidateMembers(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(o.Members); i++ {
|
|
||||||
|
|
||||||
if o.Members[i] != nil {
|
|
||||||
|
|
||||||
if swag.IsZero(o.Members[i]) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Members[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBody) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBody) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ListMembersOKBody
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersOKBodyMembersItems0 list members o k body members items0
|
|
||||||
swagger:model ListMembersOKBodyMembersItems0
|
|
||||||
*/
|
|
||||||
type ListMembersOKBodyMembersItems0 struct {
|
|
||||||
|
|
||||||
// admin
|
|
||||||
Admin bool `json:"admin,omitempty"`
|
|
||||||
|
|
||||||
// email
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this list members o k body members items0
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this list members o k body members items0 based on context it is used
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ListMembersOKBodyMembersItems0
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,161 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetAccountMetricsParams creates a new GetAccountMetricsParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetAccountMetricsParams() *GetAccountMetricsParams {
|
|
||||||
return &GetAccountMetricsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetAccountMetricsParamsWithTimeout creates a new GetAccountMetricsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetAccountMetricsParamsWithTimeout(timeout time.Duration) *GetAccountMetricsParams {
|
|
||||||
return &GetAccountMetricsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetAccountMetricsParamsWithContext creates a new GetAccountMetricsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetAccountMetricsParamsWithContext(ctx context.Context) *GetAccountMetricsParams {
|
|
||||||
return &GetAccountMetricsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetAccountMetricsParamsWithHTTPClient creates a new GetAccountMetricsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetAccountMetricsParamsWithHTTPClient(client *http.Client) *GetAccountMetricsParams {
|
|
||||||
return &GetAccountMetricsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetAccountMetricsParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get account metrics operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetAccountMetricsParams struct {
|
|
||||||
|
|
||||||
// Duration.
|
|
||||||
Duration *float64
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get account metrics params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetAccountMetricsParams) WithDefaults() *GetAccountMetricsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get account metrics params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetAccountMetricsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) WithTimeout(timeout time.Duration) *GetAccountMetricsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) WithContext(ctx context.Context) *GetAccountMetricsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) WithHTTPClient(client *http.Client) *GetAccountMetricsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDuration adds the duration to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) WithDuration(duration *float64) *GetAccountMetricsParams {
|
|
||||||
o.SetDuration(duration)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDuration adds the duration to the get account metrics params
|
|
||||||
func (o *GetAccountMetricsParams) SetDuration(duration *float64) {
|
|
||||||
o.Duration = duration
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetAccountMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.Duration != nil {
|
|
||||||
|
|
||||||
// query param duration
|
|
||||||
var qrDuration float64
|
|
||||||
|
|
||||||
if o.Duration != nil {
|
|
||||||
qrDuration = *o.Duration
|
|
||||||
}
|
|
||||||
qDuration := swag.FormatFloat64(qrDuration)
|
|
||||||
if qDuration != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("duration", qDuration); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,98 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetAccountMetricsReader is a Reader for the GetAccountMetrics structure.
|
|
||||||
type GetAccountMetricsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetAccountMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetAccountMetricsOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
default:
|
|
||||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetAccountMetricsOK creates a GetAccountMetricsOK with default headers values
|
|
||||||
func NewGetAccountMetricsOK() *GetAccountMetricsOK {
|
|
||||||
return &GetAccountMetricsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetAccountMetricsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
account metrics
|
|
||||||
*/
|
|
||||||
type GetAccountMetricsOK struct {
|
|
||||||
Payload *rest_model_zrok.Metrics
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get account metrics o k response has a 2xx status code
|
|
||||||
func (o *GetAccountMetricsOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get account metrics o k response has a 3xx status code
|
|
||||||
func (o *GetAccountMetricsOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get account metrics o k response has a 4xx status code
|
|
||||||
func (o *GetAccountMetricsOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get account metrics o k response has a 5xx status code
|
|
||||||
func (o *GetAccountMetricsOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get account metrics o k response a status code equal to that given
|
|
||||||
func (o *GetAccountMetricsOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/account][%d] getAccountMetricsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/account][%d] getAccountMetricsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(rest_model_zrok.Metrics)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,180 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsParams creates a new GetEnvironmentMetricsParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetEnvironmentMetricsParams() *GetEnvironmentMetricsParams {
|
|
||||||
return &GetEnvironmentMetricsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsParamsWithTimeout creates a new GetEnvironmentMetricsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetEnvironmentMetricsParamsWithTimeout(timeout time.Duration) *GetEnvironmentMetricsParams {
|
|
||||||
return &GetEnvironmentMetricsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsParamsWithContext creates a new GetEnvironmentMetricsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetEnvironmentMetricsParamsWithContext(ctx context.Context) *GetEnvironmentMetricsParams {
|
|
||||||
return &GetEnvironmentMetricsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsParamsWithHTTPClient creates a new GetEnvironmentMetricsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetEnvironmentMetricsParamsWithHTTPClient(client *http.Client) *GetEnvironmentMetricsParams {
|
|
||||||
return &GetEnvironmentMetricsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetricsParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get environment metrics operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetEnvironmentMetricsParams struct {
|
|
||||||
|
|
||||||
// Duration.
|
|
||||||
Duration *float64
|
|
||||||
|
|
||||||
// EnvID.
|
|
||||||
EnvID string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get environment metrics params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetEnvironmentMetricsParams) WithDefaults() *GetEnvironmentMetricsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get environment metrics params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetEnvironmentMetricsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) WithTimeout(timeout time.Duration) *GetEnvironmentMetricsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) WithContext(ctx context.Context) *GetEnvironmentMetricsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) WithHTTPClient(client *http.Client) *GetEnvironmentMetricsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDuration adds the duration to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) WithDuration(duration *float64) *GetEnvironmentMetricsParams {
|
|
||||||
o.SetDuration(duration)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDuration adds the duration to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) SetDuration(duration *float64) {
|
|
||||||
o.Duration = duration
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithEnvID adds the envID to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) WithEnvID(envID string) *GetEnvironmentMetricsParams {
|
|
||||||
o.SetEnvID(envID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetEnvID adds the envId to the get environment metrics params
|
|
||||||
func (o *GetEnvironmentMetricsParams) SetEnvID(envID string) {
|
|
||||||
o.EnvID = envID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetEnvironmentMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.Duration != nil {
|
|
||||||
|
|
||||||
// query param duration
|
|
||||||
var qrDuration float64
|
|
||||||
|
|
||||||
if o.Duration != nil {
|
|
||||||
qrDuration = *o.Duration
|
|
||||||
}
|
|
||||||
qDuration := swag.FormatFloat64(qrDuration)
|
|
||||||
if qDuration != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("duration", qDuration); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// path param envId
|
|
||||||
if err := r.SetPathParam("envId", o.EnvID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,155 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsReader is a Reader for the GetEnvironmentMetrics structure.
|
|
||||||
type GetEnvironmentMetricsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetEnvironmentMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetEnvironmentMetricsOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetEnvironmentMetricsUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
default:
|
|
||||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsOK creates a GetEnvironmentMetricsOK with default headers values
|
|
||||||
func NewGetEnvironmentMetricsOK() *GetEnvironmentMetricsOK {
|
|
||||||
return &GetEnvironmentMetricsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetricsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
environment metrics
|
|
||||||
*/
|
|
||||||
type GetEnvironmentMetricsOK struct {
|
|
||||||
Payload *rest_model_zrok.Metrics
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get environment metrics o k response has a 2xx status code
|
|
||||||
func (o *GetEnvironmentMetricsOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get environment metrics o k response has a 3xx status code
|
|
||||||
func (o *GetEnvironmentMetricsOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get environment metrics o k response has a 4xx status code
|
|
||||||
func (o *GetEnvironmentMetricsOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get environment metrics o k response has a 5xx status code
|
|
||||||
func (o *GetEnvironmentMetricsOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get environment metrics o k response a status code equal to that given
|
|
||||||
func (o *GetEnvironmentMetricsOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(rest_model_zrok.Metrics)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsUnauthorized creates a GetEnvironmentMetricsUnauthorized with default headers values
|
|
||||||
func NewGetEnvironmentMetricsUnauthorized() *GetEnvironmentMetricsUnauthorized {
|
|
||||||
return &GetEnvironmentMetricsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetricsUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
unauthorized
|
|
||||||
*/
|
|
||||||
type GetEnvironmentMetricsUnauthorized struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get environment metrics unauthorized response has a 2xx status code
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get environment metrics unauthorized response has a 3xx status code
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get environment metrics unauthorized response has a 4xx status code
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get environment metrics unauthorized response has a 5xx status code
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get environment metrics unauthorized response a status code equal to that given
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsUnauthorized ", 401)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsUnauthorized ", 401)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,180 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetShareMetricsParams creates a new GetShareMetricsParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewGetShareMetricsParams() *GetShareMetricsParams {
|
|
||||||
return &GetShareMetricsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsParamsWithTimeout creates a new GetShareMetricsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetShareMetricsParamsWithTimeout(timeout time.Duration) *GetShareMetricsParams {
|
|
||||||
return &GetShareMetricsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsParamsWithContext creates a new GetShareMetricsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetShareMetricsParamsWithContext(ctx context.Context) *GetShareMetricsParams {
|
|
||||||
return &GetShareMetricsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsParamsWithHTTPClient creates a new GetShareMetricsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetShareMetricsParamsWithHTTPClient(client *http.Client) *GetShareMetricsParams {
|
|
||||||
return &GetShareMetricsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetricsParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the get share metrics operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetShareMetricsParams struct {
|
|
||||||
|
|
||||||
// Duration.
|
|
||||||
Duration *float64
|
|
||||||
|
|
||||||
// ShrToken.
|
|
||||||
ShrToken string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get share metrics params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetShareMetricsParams) WithDefaults() *GetShareMetricsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get share metrics params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetShareMetricsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) WithTimeout(timeout time.Duration) *GetShareMetricsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) WithContext(ctx context.Context) *GetShareMetricsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) WithHTTPClient(client *http.Client) *GetShareMetricsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDuration adds the duration to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) WithDuration(duration *float64) *GetShareMetricsParams {
|
|
||||||
o.SetDuration(duration)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDuration adds the duration to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) SetDuration(duration *float64) {
|
|
||||||
o.Duration = duration
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithShrToken adds the shrToken to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) WithShrToken(shrToken string) *GetShareMetricsParams {
|
|
||||||
o.SetShrToken(shrToken)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetShrToken adds the shrToken to the get share metrics params
|
|
||||||
func (o *GetShareMetricsParams) SetShrToken(shrToken string) {
|
|
||||||
o.ShrToken = shrToken
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetShareMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.Duration != nil {
|
|
||||||
|
|
||||||
// query param duration
|
|
||||||
var qrDuration float64
|
|
||||||
|
|
||||||
if o.Duration != nil {
|
|
||||||
qrDuration = *o.Duration
|
|
||||||
}
|
|
||||||
qDuration := swag.FormatFloat64(qrDuration)
|
|
||||||
if qDuration != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("duration", qDuration); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// path param shrToken
|
|
||||||
if err := r.SetPathParam("shrToken", o.ShrToken); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,155 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetShareMetricsReader is a Reader for the GetShareMetrics structure.
|
|
||||||
type GetShareMetricsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetShareMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetShareMetricsOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetShareMetricsUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
default:
|
|
||||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsOK creates a GetShareMetricsOK with default headers values
|
|
||||||
func NewGetShareMetricsOK() *GetShareMetricsOK {
|
|
||||||
return &GetShareMetricsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetricsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
share metrics
|
|
||||||
*/
|
|
||||||
type GetShareMetricsOK struct {
|
|
||||||
Payload *rest_model_zrok.Metrics
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get share metrics o k response has a 2xx status code
|
|
||||||
func (o *GetShareMetricsOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get share metrics o k response has a 3xx status code
|
|
||||||
func (o *GetShareMetricsOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get share metrics o k response has a 4xx status code
|
|
||||||
func (o *GetShareMetricsOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get share metrics o k response has a 5xx status code
|
|
||||||
func (o *GetShareMetricsOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get share metrics o k response a status code equal to that given
|
|
||||||
func (o *GetShareMetricsOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(rest_model_zrok.Metrics)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsUnauthorized creates a GetShareMetricsUnauthorized with default headers values
|
|
||||||
func NewGetShareMetricsUnauthorized() *GetShareMetricsUnauthorized {
|
|
||||||
return &GetShareMetricsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetricsUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
unauthorized
|
|
||||||
*/
|
|
||||||
type GetShareMetricsUnauthorized struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this get share metrics unauthorized response has a 2xx status code
|
|
||||||
func (o *GetShareMetricsUnauthorized) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this get share metrics unauthorized response has a 3xx status code
|
|
||||||
func (o *GetShareMetricsUnauthorized) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this get share metrics unauthorized response has a 4xx status code
|
|
||||||
func (o *GetShareMetricsUnauthorized) IsClientError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this get share metrics unauthorized response has a 5xx status code
|
|
||||||
func (o *GetShareMetricsUnauthorized) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this get share metrics unauthorized response a status code equal to that given
|
|
||||||
func (o *GetShareMetricsUnauthorized) IsCode(code int) bool {
|
|
||||||
return code == 401
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsUnauthorized ", 401)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsUnauthorized) String() string {
|
|
||||||
return fmt.Sprintf("[GET /metrics/share/{shrToken}][%d] getShareMetricsUnauthorized ", 401)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetricsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,162 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// New creates a new metrics API client.
|
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
|
||||||
return &Client{transport: transport, formats: formats}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Client for metrics API
|
|
||||||
*/
|
|
||||||
type Client struct {
|
|
||||||
transport runtime.ClientTransport
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientOption is the option for Client methods
|
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
|
||||||
type ClientService interface {
|
|
||||||
GetAccountMetrics(params *GetAccountMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountMetricsOK, error)
|
|
||||||
|
|
||||||
GetEnvironmentMetrics(params *GetEnvironmentMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEnvironmentMetricsOK, error)
|
|
||||||
|
|
||||||
GetShareMetrics(params *GetShareMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetShareMetricsOK, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetAccountMetrics get account metrics API
|
|
||||||
*/
|
|
||||||
func (a *Client) GetAccountMetrics(params *GetAccountMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountMetricsOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetAccountMetricsParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getAccountMetrics",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/metrics/account",
|
|
||||||
ProducesMediaTypes: []string{"application/zrok.v1+json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/zrok.v1+json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetAccountMetricsReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetAccountMetricsOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getAccountMetrics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetrics get environment metrics API
|
|
||||||
*/
|
|
||||||
func (a *Client) GetEnvironmentMetrics(params *GetEnvironmentMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEnvironmentMetricsOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetEnvironmentMetricsParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getEnvironmentMetrics",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/metrics/environment/{envId}",
|
|
||||||
ProducesMediaTypes: []string{"application/zrok.v1+json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/zrok.v1+json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetEnvironmentMetricsReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetEnvironmentMetricsOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getEnvironmentMetrics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetrics get share metrics API
|
|
||||||
*/
|
|
||||||
func (a *Client) GetShareMetrics(params *GetShareMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetShareMetricsOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetShareMetricsParams()
|
|
||||||
}
|
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getShareMetrics",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/metrics/share/{shrToken}",
|
|
||||||
ProducesMediaTypes: []string{"application/zrok.v1+json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/zrok.v1+json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetShareMetricsReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
}
|
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetShareMetricsOK)
|
|
||||||
if ok {
|
|
||||||
return success, nil
|
|
||||||
}
|
|
||||||
// unexpected success response
|
|
||||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
||||||
msg := fmt.Sprintf("unexpected success response for getShareMetrics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTransport changes the transport on the client
|
|
||||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
||||||
a.transport = transport
|
|
||||||
}
|
|
@ -1,184 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package share
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
cr "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewOauthAuthenticateParams creates a new OauthAuthenticateParams object,
|
|
||||||
// with the default timeout for this client.
|
|
||||||
//
|
|
||||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
||||||
//
|
|
||||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
||||||
func NewOauthAuthenticateParams() *OauthAuthenticateParams {
|
|
||||||
return &OauthAuthenticateParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateParamsWithTimeout creates a new OauthAuthenticateParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewOauthAuthenticateParamsWithTimeout(timeout time.Duration) *OauthAuthenticateParams {
|
|
||||||
return &OauthAuthenticateParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateParamsWithContext creates a new OauthAuthenticateParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewOauthAuthenticateParamsWithContext(ctx context.Context) *OauthAuthenticateParams {
|
|
||||||
return &OauthAuthenticateParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateParamsWithHTTPClient creates a new OauthAuthenticateParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewOauthAuthenticateParamsWithHTTPClient(client *http.Client) *OauthAuthenticateParams {
|
|
||||||
return &OauthAuthenticateParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateParams contains all the parameters to send to the API endpoint
|
|
||||||
|
|
||||||
for the oauth authenticate operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateParams struct {
|
|
||||||
|
|
||||||
// Code.
|
|
||||||
Code string
|
|
||||||
|
|
||||||
// State.
|
|
||||||
State *string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the oauth authenticate params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *OauthAuthenticateParams) WithDefaults() *OauthAuthenticateParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the oauth authenticate params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *OauthAuthenticateParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) WithTimeout(timeout time.Duration) *OauthAuthenticateParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) WithContext(ctx context.Context) *OauthAuthenticateParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) WithHTTPClient(client *http.Client) *OauthAuthenticateParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCode adds the code to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) WithCode(code string) *OauthAuthenticateParams {
|
|
||||||
o.SetCode(code)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetCode adds the code to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) SetCode(code string) {
|
|
||||||
o.Code = code
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithState adds the state to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) WithState(state *string) *OauthAuthenticateParams {
|
|
||||||
o.SetState(state)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetState adds the state to the oauth authenticate params
|
|
||||||
func (o *OauthAuthenticateParams) SetState(state *string) {
|
|
||||||
o.State = state
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *OauthAuthenticateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
// query param code
|
|
||||||
qrCode := o.Code
|
|
||||||
qCode := qrCode
|
|
||||||
if qCode != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("code", qCode); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.State != nil {
|
|
||||||
|
|
||||||
// query param state
|
|
||||||
var qrState string
|
|
||||||
|
|
||||||
if o.State != nil {
|
|
||||||
qrState = *o.State
|
|
||||||
}
|
|
||||||
qState := qrState
|
|
||||||
if qState != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("state", qState); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,208 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package share
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// OauthAuthenticateReader is a Reader for the OauthAuthenticate structure.
|
|
||||||
type OauthAuthenticateReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *OauthAuthenticateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewOauthAuthenticateOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 302:
|
|
||||||
result := NewOauthAuthenticateFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewOauthAuthenticateInternalServerError()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
default:
|
|
||||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateOK creates a OauthAuthenticateOK with default headers values
|
|
||||||
func NewOauthAuthenticateOK() *OauthAuthenticateOK {
|
|
||||||
return &OauthAuthenticateOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
testing
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateOK struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this oauth authenticate o k response has a 2xx status code
|
|
||||||
func (o *OauthAuthenticateOK) IsSuccess() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this oauth authenticate o k response has a 3xx status code
|
|
||||||
func (o *OauthAuthenticateOK) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this oauth authenticate o k response has a 4xx status code
|
|
||||||
func (o *OauthAuthenticateOK) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this oauth authenticate o k response has a 5xx status code
|
|
||||||
func (o *OauthAuthenticateOK) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this oauth authenticate o k response a status code equal to that given
|
|
||||||
func (o *OauthAuthenticateOK) IsCode(code int) bool {
|
|
||||||
return code == 200
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /oauth/authorize][%d] oauthAuthenticateOK ", 200)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateOK) String() string {
|
|
||||||
return fmt.Sprintf("[GET /oauth/authorize][%d] oauthAuthenticateOK ", 200)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateFound creates a OauthAuthenticateFound with default headers values
|
|
||||||
func NewOauthAuthenticateFound() *OauthAuthenticateFound {
|
|
||||||
return &OauthAuthenticateFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateFound describes a response with status code 302, with default header values.
|
|
||||||
|
|
||||||
redirect back to share
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateFound struct {
|
|
||||||
|
|
||||||
/* Redirect URL
|
|
||||||
*/
|
|
||||||
Location string
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this oauth authenticate found response has a 2xx status code
|
|
||||||
func (o *OauthAuthenticateFound) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this oauth authenticate found response has a 3xx status code
|
|
||||||
func (o *OauthAuthenticateFound) IsRedirect() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this oauth authenticate found response has a 4xx status code
|
|
||||||
func (o *OauthAuthenticateFound) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this oauth authenticate found response has a 5xx status code
|
|
||||||
func (o *OauthAuthenticateFound) IsServerError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this oauth authenticate found response a status code equal to that given
|
|
||||||
func (o *OauthAuthenticateFound) IsCode(code int) bool {
|
|
||||||
return code == 302
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /oauth/authorize][%d] oauthAuthenticateFound ", 302)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateFound) String() string {
|
|
||||||
return fmt.Sprintf("[GET /oauth/authorize][%d] oauthAuthenticateFound ", 302)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
// hydrates response header location
|
|
||||||
hdrLocation := response.GetHeader("location")
|
|
||||||
|
|
||||||
if hdrLocation != "" {
|
|
||||||
o.Location = hdrLocation
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateInternalServerError creates a OauthAuthenticateInternalServerError with default headers values
|
|
||||||
func NewOauthAuthenticateInternalServerError() *OauthAuthenticateInternalServerError {
|
|
||||||
return &OauthAuthenticateInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
internal server error
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateInternalServerError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsSuccess returns true when this oauth authenticate internal server error response has a 2xx status code
|
|
||||||
func (o *OauthAuthenticateInternalServerError) IsSuccess() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsRedirect returns true when this oauth authenticate internal server error response has a 3xx status code
|
|
||||||
func (o *OauthAuthenticateInternalServerError) IsRedirect() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsClientError returns true when this oauth authenticate internal server error response has a 4xx status code
|
|
||||||
func (o *OauthAuthenticateInternalServerError) IsClientError() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsServerError returns true when this oauth authenticate internal server error response has a 5xx status code
|
|
||||||
func (o *OauthAuthenticateInternalServerError) IsServerError() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsCode returns true when this oauth authenticate internal server error response a status code equal to that given
|
|
||||||
func (o *OauthAuthenticateInternalServerError) IsCode(code int) bool {
|
|
||||||
return code == 500
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /oauth/authorize][%d] oauthAuthenticateInternalServerError ", 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateInternalServerError) String() string {
|
|
||||||
return fmt.Sprintf("[GET /oauth/authorize][%d] oauthAuthenticateInternalServerError ", 500)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AccessRequest access request
|
|
||||||
//
|
|
||||||
// swagger:model accessRequest
|
|
||||||
type AccessRequest struct {
|
|
||||||
|
|
||||||
// env z Id
|
|
||||||
EnvZID string `json:"envZId,omitempty"`
|
|
||||||
|
|
||||||
// shr token
|
|
||||||
ShrToken string `json:"shrToken,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this access request
|
|
||||||
func (m *AccessRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this access request based on context it is used
|
|
||||||
func (m *AccessRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *AccessRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *AccessRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res AccessRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AccessResponse access response
|
|
||||||
//
|
|
||||||
// swagger:model accessResponse
|
|
||||||
type AccessResponse struct {
|
|
||||||
|
|
||||||
// backend mode
|
|
||||||
BackendMode string `json:"backendMode,omitempty"`
|
|
||||||
|
|
||||||
// frontend token
|
|
||||||
FrontendToken string `json:"frontendToken,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this access response
|
|
||||||
func (m *AccessResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this access response based on context it is used
|
|
||||||
func (m *AccessResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *AccessResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *AccessResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res AccessResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ChangePasswordRequest change password request
|
|
||||||
//
|
|
||||||
// swagger:model changePasswordRequest
|
|
||||||
type ChangePasswordRequest struct {
|
|
||||||
|
|
||||||
// email
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
|
|
||||||
// new password
|
|
||||||
NewPassword string `json:"newPassword,omitempty"`
|
|
||||||
|
|
||||||
// old password
|
|
||||||
OldPassword string `json:"oldPassword,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this change password request
|
|
||||||
func (m *ChangePasswordRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this change password request based on context it is used
|
|
||||||
func (m *ChangePasswordRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *ChangePasswordRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *ChangePasswordRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ChangePasswordRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,114 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
"github.com/go-openapi/validate"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateFrontendRequest create frontend request
|
|
||||||
//
|
|
||||||
// swagger:model createFrontendRequest
|
|
||||||
type CreateFrontendRequest struct {
|
|
||||||
|
|
||||||
// permission mode
|
|
||||||
// Enum: [open closed]
|
|
||||||
PermissionMode string `json:"permissionMode,omitempty"`
|
|
||||||
|
|
||||||
// public name
|
|
||||||
PublicName string `json:"public_name,omitempty"`
|
|
||||||
|
|
||||||
// url template
|
|
||||||
URLTemplate string `json:"url_template,omitempty"`
|
|
||||||
|
|
||||||
// z Id
|
|
||||||
ZID string `json:"zId,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this create frontend request
|
|
||||||
func (m *CreateFrontendRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validatePermissionMode(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var createFrontendRequestTypePermissionModePropEnum []interface{}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
var res []string
|
|
||||||
if err := json.Unmarshal([]byte(`["open","closed"]`), &res); err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
for _, v := range res {
|
|
||||||
createFrontendRequestTypePermissionModePropEnum = append(createFrontendRequestTypePermissionModePropEnum, v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
|
|
||||||
// CreateFrontendRequestPermissionModeOpen captures enum value "open"
|
|
||||||
CreateFrontendRequestPermissionModeOpen string = "open"
|
|
||||||
|
|
||||||
// CreateFrontendRequestPermissionModeClosed captures enum value "closed"
|
|
||||||
CreateFrontendRequestPermissionModeClosed string = "closed"
|
|
||||||
)
|
|
||||||
|
|
||||||
// prop value enum
|
|
||||||
func (m *CreateFrontendRequest) validatePermissionModeEnum(path, location string, value string) error {
|
|
||||||
if err := validate.EnumCase(path, location, value, createFrontendRequestTypePermissionModePropEnum, true); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *CreateFrontendRequest) validatePermissionMode(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.PermissionMode) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// value enum
|
|
||||||
if err := m.validatePermissionModeEnum("permissionMode", "body", m.PermissionMode); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this create frontend request based on context it is used
|
|
||||||
func (m *CreateFrontendRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *CreateFrontendRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *CreateFrontendRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res CreateFrontendRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateFrontendResponse create frontend response
|
|
||||||
//
|
|
||||||
// swagger:model createFrontendResponse
|
|
||||||
type CreateFrontendResponse struct {
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this create frontend response
|
|
||||||
func (m *CreateFrontendResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this create frontend response based on context it is used
|
|
||||||
func (m *CreateFrontendResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *CreateFrontendResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *CreateFrontendResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res CreateFrontendResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeleteFrontendRequest delete frontend request
|
|
||||||
//
|
|
||||||
// swagger:model deleteFrontendRequest
|
|
||||||
type DeleteFrontendRequest struct {
|
|
||||||
|
|
||||||
// frontend token
|
|
||||||
FrontendToken string `json:"frontendToken,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this delete frontend request
|
|
||||||
func (m *DeleteFrontendRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this delete frontend request based on context it is used
|
|
||||||
func (m *DeleteFrontendRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *DeleteFrontendRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *DeleteFrontendRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res DeleteFrontendRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DisableRequest disable request
|
|
||||||
//
|
|
||||||
// swagger:model disableRequest
|
|
||||||
type DisableRequest struct {
|
|
||||||
|
|
||||||
// identity
|
|
||||||
Identity string `json:"identity,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this disable request
|
|
||||||
func (m *DisableRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this disable request based on context it is used
|
|
||||||
func (m *DisableRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *DisableRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *DisableRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res DisableRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EnableRequest enable request
|
|
||||||
//
|
|
||||||
// swagger:model enableRequest
|
|
||||||
type EnableRequest struct {
|
|
||||||
|
|
||||||
// description
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
|
|
||||||
// host
|
|
||||||
Host string `json:"host,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this enable request
|
|
||||||
func (m *EnableRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this enable request based on context it is used
|
|
||||||
func (m *EnableRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *EnableRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *EnableRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res EnableRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EnableResponse enable response
|
|
||||||
//
|
|
||||||
// swagger:model enableResponse
|
|
||||||
type EnableResponse struct {
|
|
||||||
|
|
||||||
// cfg
|
|
||||||
Cfg string `json:"cfg,omitempty"`
|
|
||||||
|
|
||||||
// identity
|
|
||||||
Identity string `json:"identity,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this enable response
|
|
||||||
func (m *EnableResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this enable response based on context it is used
|
|
||||||
func (m *EnableResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *EnableResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *EnableResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res EnableResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,146 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EnvironmentShares environment shares
|
|
||||||
//
|
|
||||||
// swagger:model environmentShares
|
|
||||||
type EnvironmentShares struct {
|
|
||||||
|
|
||||||
// environment
|
|
||||||
Environment *Environment `json:"environment,omitempty"`
|
|
||||||
|
|
||||||
// shares
|
|
||||||
Shares Shares `json:"shares,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this environment shares
|
|
||||||
func (m *EnvironmentShares) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateEnvironment(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateShares(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EnvironmentShares) validateEnvironment(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.Environment) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Environment != nil {
|
|
||||||
if err := m.Environment.Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("environment")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("environment")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EnvironmentShares) validateShares(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.Shares) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.Shares.Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("shares")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("shares")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this environment shares based on the context it is used
|
|
||||||
func (m *EnvironmentShares) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.contextValidateEnvironment(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.contextValidateShares(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EnvironmentShares) contextValidateEnvironment(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if m.Environment != nil {
|
|
||||||
if err := m.Environment.ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("environment")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("environment")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EnvironmentShares) contextValidateShares(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := m.Shares.ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("shares")
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("shares")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *EnvironmentShares) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *EnvironmentShares) UnmarshalBinary(b []byte) error {
|
|
||||||
var res EnvironmentShares
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EnvironmentSharesList environment shares list
|
|
||||||
//
|
|
||||||
// swagger:model environmentSharesList
|
|
||||||
type EnvironmentSharesList []*EnvironmentShares
|
|
||||||
|
|
||||||
// Validate validates this environment shares list
|
|
||||||
func (m EnvironmentSharesList) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
for i := 0; i < len(m); i++ {
|
|
||||||
if swag.IsZero(m[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m[i] != nil {
|
|
||||||
if err := m[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName(strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName(strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this environment shares list based on the context it is used
|
|
||||||
func (m EnvironmentSharesList) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
for i := 0; i < len(m); i++ {
|
|
||||||
|
|
||||||
if m[i] != nil {
|
|
||||||
if err := m[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName(strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName(strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// InviteRequest invite request
|
|
||||||
//
|
|
||||||
// swagger:model inviteRequest
|
|
||||||
type InviteRequest struct {
|
|
||||||
|
|
||||||
// email
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this invite request
|
|
||||||
func (m *InviteRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this invite request based on context it is used
|
|
||||||
func (m *InviteRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *InviteRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *InviteRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res InviteRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// InviteTokenGenerateRequest invite token generate request
|
|
||||||
//
|
|
||||||
// swagger:model inviteTokenGenerateRequest
|
|
||||||
type InviteTokenGenerateRequest struct {
|
|
||||||
|
|
||||||
// tokens
|
|
||||||
Tokens []string `json:"tokens"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this invite token generate request
|
|
||||||
func (m *InviteTokenGenerateRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this invite token generate request based on context it is used
|
|
||||||
func (m *InviteTokenGenerateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *InviteTokenGenerateRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *InviteTokenGenerateRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res InviteTokenGenerateRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LoginRequest login request
|
|
||||||
//
|
|
||||||
// swagger:model loginRequest
|
|
||||||
type LoginRequest struct {
|
|
||||||
|
|
||||||
// email
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
|
|
||||||
// password
|
|
||||||
Password string `json:"password,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this login request
|
|
||||||
func (m *LoginRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this login request based on context it is used
|
|
||||||
func (m *LoginRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *LoginRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *LoginRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res LoginRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LoginResponse login response
|
|
||||||
//
|
|
||||||
// swagger:model loginResponse
|
|
||||||
type LoginResponse string
|
|
||||||
|
|
||||||
// Validate validates this login response
|
|
||||||
func (m LoginResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this login response based on context it is used
|
|
||||||
func (m LoginResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PasswordRequirements password requirements
|
|
||||||
//
|
|
||||||
// swagger:model passwordRequirements
|
|
||||||
type PasswordRequirements struct {
|
|
||||||
|
|
||||||
// length
|
|
||||||
Length int64 `json:"length,omitempty"`
|
|
||||||
|
|
||||||
// require capital
|
|
||||||
RequireCapital bool `json:"requireCapital,omitempty"`
|
|
||||||
|
|
||||||
// require numeric
|
|
||||||
RequireNumeric bool `json:"requireNumeric,omitempty"`
|
|
||||||
|
|
||||||
// require special
|
|
||||||
RequireSpecial bool `json:"requireSpecial,omitempty"`
|
|
||||||
|
|
||||||
// valid special characters
|
|
||||||
ValidSpecialCharacters string `json:"validSpecialCharacters,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this password requirements
|
|
||||||
func (m *PasswordRequirements) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this password requirements based on context it is used
|
|
||||||
func (m *PasswordRequirements) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *PasswordRequirements) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *PasswordRequirements) UnmarshalBinary(b []byte) error {
|
|
||||||
var res PasswordRequirements
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PublicFrontend public frontend
|
|
||||||
//
|
|
||||||
// swagger:model publicFrontend
|
|
||||||
type PublicFrontend struct {
|
|
||||||
|
|
||||||
// created at
|
|
||||||
CreatedAt int64 `json:"createdAt,omitempty"`
|
|
||||||
|
|
||||||
// public name
|
|
||||||
PublicName string `json:"publicName,omitempty"`
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
|
|
||||||
// updated at
|
|
||||||
UpdatedAt int64 `json:"updatedAt,omitempty"`
|
|
||||||
|
|
||||||
// url template
|
|
||||||
URLTemplate string `json:"urlTemplate,omitempty"`
|
|
||||||
|
|
||||||
// z Id
|
|
||||||
ZID string `json:"zId,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this public frontend
|
|
||||||
func (m *PublicFrontend) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this public frontend based on context it is used
|
|
||||||
func (m *PublicFrontend) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *PublicFrontend) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *PublicFrontend) UnmarshalBinary(b []byte) error {
|
|
||||||
var res PublicFrontend
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PublicFrontendList public frontend list
|
|
||||||
//
|
|
||||||
// swagger:model publicFrontendList
|
|
||||||
type PublicFrontendList []*PublicFrontend
|
|
||||||
|
|
||||||
// Validate validates this public frontend list
|
|
||||||
func (m PublicFrontendList) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
for i := 0; i < len(m); i++ {
|
|
||||||
if swag.IsZero(m[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m[i] != nil {
|
|
||||||
if err := m[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName(strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName(strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this public frontend list based on the context it is used
|
|
||||||
func (m PublicFrontendList) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
for i := 0; i < len(m); i++ {
|
|
||||||
|
|
||||||
if m[i] != nil {
|
|
||||||
|
|
||||||
if swag.IsZero(m[i]) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName(strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName(strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RegisterRequest register request
|
|
||||||
//
|
|
||||||
// swagger:model registerRequest
|
|
||||||
type RegisterRequest struct {
|
|
||||||
|
|
||||||
// password
|
|
||||||
Password string `json:"password,omitempty"`
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this register request
|
|
||||||
func (m *RegisterRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this register request based on context it is used
|
|
||||||
func (m *RegisterRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *RegisterRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *RegisterRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RegisterRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RegisterResponse register response
|
|
||||||
//
|
|
||||||
// swagger:model registerResponse
|
|
||||||
type RegisterResponse struct {
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this register response
|
|
||||||
func (m *RegisterResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this register response based on context it is used
|
|
||||||
func (m *RegisterResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *RegisterResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *RegisterResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RegisterResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResetPasswordRequest reset password request
|
|
||||||
//
|
|
||||||
// swagger:model resetPasswordRequest
|
|
||||||
type ResetPasswordRequest struct {
|
|
||||||
|
|
||||||
// password
|
|
||||||
Password string `json:"password,omitempty"`
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this reset password request
|
|
||||||
func (m *ResetPasswordRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this reset password request based on context it is used
|
|
||||||
func (m *ResetPasswordRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *ResetPasswordRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *ResetPasswordRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ResetPasswordRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ShareMetrics share metrics
|
|
||||||
//
|
|
||||||
// swagger:model shareMetrics
|
|
||||||
type ShareMetrics []*ShareMetricsSample
|
|
||||||
|
|
||||||
// Validate validates this share metrics
|
|
||||||
func (m ShareMetrics) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
for i := 0; i < len(m); i++ {
|
|
||||||
if swag.IsZero(m[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m[i] != nil {
|
|
||||||
if err := m[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName(strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName(strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this share metrics based on the context it is used
|
|
||||||
func (m ShareMetrics) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
for i := 0; i < len(m); i++ {
|
|
||||||
|
|
||||||
if m[i] != nil {
|
|
||||||
if err := m[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName(strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName(strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ShareMetricsSample share metrics sample
|
|
||||||
//
|
|
||||||
// swagger:model shareMetricsSample
|
|
||||||
type ShareMetricsSample struct {
|
|
||||||
|
|
||||||
// rx
|
|
||||||
Rx float64 `json:"rx,omitempty"`
|
|
||||||
|
|
||||||
// timestamp
|
|
||||||
Timestamp float64 `json:"timestamp,omitempty"`
|
|
||||||
|
|
||||||
// tx
|
|
||||||
Tx float64 `json:"tx,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this share metrics sample
|
|
||||||
func (m *ShareMetricsSample) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this share metrics sample based on context it is used
|
|
||||||
func (m *ShareMetricsSample) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *ShareMetricsSample) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *ShareMetricsSample) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ShareMetricsSample
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// UnaccessRequest unaccess request
|
|
||||||
//
|
|
||||||
// swagger:model unaccessRequest
|
|
||||||
type UnaccessRequest struct {
|
|
||||||
|
|
||||||
// env z Id
|
|
||||||
EnvZID string `json:"envZId,omitempty"`
|
|
||||||
|
|
||||||
// frontend token
|
|
||||||
FrontendToken string `json:"frontendToken,omitempty"`
|
|
||||||
|
|
||||||
// shr token
|
|
||||||
ShrToken string `json:"shrToken,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this unaccess request
|
|
||||||
func (m *UnaccessRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this unaccess request based on context it is used
|
|
||||||
func (m *UnaccessRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UnaccessRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UnaccessRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UnaccessRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// UnshareRequest unshare request
|
|
||||||
//
|
|
||||||
// swagger:model unshareRequest
|
|
||||||
type UnshareRequest struct {
|
|
||||||
|
|
||||||
// env z Id
|
|
||||||
EnvZID string `json:"envZId,omitempty"`
|
|
||||||
|
|
||||||
// reserved
|
|
||||||
Reserved bool `json:"reserved,omitempty"`
|
|
||||||
|
|
||||||
// shr token
|
|
||||||
ShrToken string `json:"shrToken,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this unshare request
|
|
||||||
func (m *UnshareRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this unshare request based on context it is used
|
|
||||||
func (m *UnshareRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UnshareRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UnshareRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UnshareRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// UpdateFrontendRequest update frontend request
|
|
||||||
//
|
|
||||||
// swagger:model updateFrontendRequest
|
|
||||||
type UpdateFrontendRequest struct {
|
|
||||||
|
|
||||||
// frontend token
|
|
||||||
FrontendToken string `json:"frontendToken,omitempty"`
|
|
||||||
|
|
||||||
// public name
|
|
||||||
PublicName string `json:"publicName,omitempty"`
|
|
||||||
|
|
||||||
// url template
|
|
||||||
URLTemplate string `json:"urlTemplate,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this update frontend request
|
|
||||||
func (m *UpdateFrontendRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this update frontend request based on context it is used
|
|
||||||
func (m *UpdateFrontendRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UpdateFrontendRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UpdateFrontendRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UpdateFrontendRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// UpdateShareRequest update share request
|
|
||||||
//
|
|
||||||
// swagger:model updateShareRequest
|
|
||||||
type UpdateShareRequest struct {
|
|
||||||
|
|
||||||
// add access grants
|
|
||||||
AddAccessGrants []string `json:"addAccessGrants"`
|
|
||||||
|
|
||||||
// backend proxy endpoint
|
|
||||||
BackendProxyEndpoint string `json:"backendProxyEndpoint,omitempty"`
|
|
||||||
|
|
||||||
// remove access grants
|
|
||||||
RemoveAccessGrants []string `json:"removeAccessGrants"`
|
|
||||||
|
|
||||||
// shr token
|
|
||||||
ShrToken string `json:"shrToken,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this update share request
|
|
||||||
func (m *UpdateShareRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this update share request based on context it is used
|
|
||||||
func (m *UpdateShareRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *UpdateShareRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *UpdateShareRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res UpdateShareRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// VerifyRequest verify request
|
|
||||||
//
|
|
||||||
// swagger:model verifyRequest
|
|
||||||
type VerifyRequest struct {
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this verify request
|
|
||||||
func (m *VerifyRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this verify request based on context it is used
|
|
||||||
func (m *VerifyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *VerifyRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *VerifyRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res VerifyRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package rest_model_zrok
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// VerifyResponse verify response
|
|
||||||
//
|
|
||||||
// swagger:model verifyResponse
|
|
||||||
type VerifyResponse struct {
|
|
||||||
|
|
||||||
// email
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this verify response
|
|
||||||
func (m *VerifyResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this verify response based on context it is used
|
|
||||||
func (m *VerifyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *VerifyResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *VerifyResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res VerifyResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1383,7 +1383,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/regenerateToken": {
|
"/regenerateAccountToken": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@ -1393,7 +1393,7 @@ func init() {
|
|||||||
"tags": [
|
"tags": [
|
||||||
"account"
|
"account"
|
||||||
],
|
],
|
||||||
"operationId": "regenerateToken",
|
"operationId": "regenerateAccountToken",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "body",
|
"name": "body",
|
||||||
@ -1412,7 +1412,7 @@ func init() {
|
|||||||
"description": "regenerate account token",
|
"description": "regenerate account token",
|
||||||
"schema": {
|
"schema": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"token": {
|
"accountToken": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3529,7 +3529,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/regenerateToken": {
|
"/regenerateAccountToken": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@ -3539,7 +3539,7 @@ func init() {
|
|||||||
"tags": [
|
"tags": [
|
||||||
"account"
|
"account"
|
||||||
],
|
],
|
||||||
"operationId": "regenerateToken",
|
"operationId": "regenerateAccountToken",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "body",
|
"name": "body",
|
||||||
@ -3558,7 +3558,7 @@ func init() {
|
|||||||
"description": "regenerate account token",
|
"description": "regenerate account token",
|
||||||
"schema": {
|
"schema": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"token": {
|
"accountToken": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
148
rest_server_zrok/operations/account/regenerate_account_token.go
Normal file
148
rest_server_zrok/operations/account/regenerate_account_token.go
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
package account
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime/middleware"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
|
||||||
|
"github.com/openziti/zrok/rest_model_zrok"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegenerateAccountTokenHandlerFunc turns a function with the right signature into a regenerate account token handler
|
||||||
|
type RegenerateAccountTokenHandlerFunc func(RegenerateAccountTokenParams, *rest_model_zrok.Principal) middleware.Responder
|
||||||
|
|
||||||
|
// Handle executing the request and returning a response
|
||||||
|
func (fn RegenerateAccountTokenHandlerFunc) Handle(params RegenerateAccountTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||||
|
return fn(params, principal)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegenerateAccountTokenHandler interface for that can handle valid regenerate account token params
|
||||||
|
type RegenerateAccountTokenHandler interface {
|
||||||
|
Handle(RegenerateAccountTokenParams, *rest_model_zrok.Principal) middleware.Responder
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountToken creates a new http.Handler for the regenerate account token operation
|
||||||
|
func NewRegenerateAccountToken(ctx *middleware.Context, handler RegenerateAccountTokenHandler) *RegenerateAccountToken {
|
||||||
|
return &RegenerateAccountToken{Context: ctx, Handler: handler}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountToken swagger:route POST /regenerateAccountToken account regenerateAccountToken
|
||||||
|
|
||||||
|
RegenerateAccountToken regenerate account token API
|
||||||
|
*/
|
||||||
|
type RegenerateAccountToken struct {
|
||||||
|
Context *middleware.Context
|
||||||
|
Handler RegenerateAccountTokenHandler
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *RegenerateAccountToken) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||||
|
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||||
|
if rCtx != nil {
|
||||||
|
*r = *rCtx
|
||||||
|
}
|
||||||
|
var Params = NewRegenerateAccountTokenParams()
|
||||||
|
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||||
|
if err != nil {
|
||||||
|
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if aCtx != nil {
|
||||||
|
*r = *aCtx
|
||||||
|
}
|
||||||
|
var principal *rest_model_zrok.Principal
|
||||||
|
if uprinc != nil {
|
||||||
|
principal = uprinc.(*rest_model_zrok.Principal) // this is really a rest_model_zrok.Principal, I promise
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
||||||
|
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||||
|
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegenerateAccountTokenBody regenerate account token body
|
||||||
|
//
|
||||||
|
// swagger:model RegenerateAccountTokenBody
|
||||||
|
type RegenerateAccountTokenBody struct {
|
||||||
|
|
||||||
|
// email address
|
||||||
|
EmailAddress string `json:"emailAddress,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this regenerate account token body
|
||||||
|
func (o *RegenerateAccountTokenBody) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validates this regenerate account token body based on context it is used
|
||||||
|
func (o *RegenerateAccountTokenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenBody) MarshalBinary() ([]byte, error) {
|
||||||
|
if o == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(o)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenBody) UnmarshalBinary(b []byte) error {
|
||||||
|
var res RegenerateAccountTokenBody
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*o = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegenerateAccountTokenOKBody regenerate account token o k body
|
||||||
|
//
|
||||||
|
// swagger:model RegenerateAccountTokenOKBody
|
||||||
|
type RegenerateAccountTokenOKBody struct {
|
||||||
|
|
||||||
|
// account token
|
||||||
|
AccountToken string `json:"accountToken,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this regenerate account token o k body
|
||||||
|
func (o *RegenerateAccountTokenOKBody) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validates this regenerate account token o k body based on context it is used
|
||||||
|
func (o *RegenerateAccountTokenOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenOKBody) MarshalBinary() ([]byte, error) {
|
||||||
|
if o == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(o)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (o *RegenerateAccountTokenOKBody) UnmarshalBinary(b []byte) error {
|
||||||
|
var res RegenerateAccountTokenOKBody
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*o = res
|
||||||
|
return nil
|
||||||
|
}
|
@ -14,19 +14,19 @@ import (
|
|||||||
"github.com/go-openapi/validate"
|
"github.com/go-openapi/validate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewRegenerateTokenParams creates a new RegenerateTokenParams object
|
// NewRegenerateAccountTokenParams creates a new RegenerateAccountTokenParams object
|
||||||
//
|
//
|
||||||
// There are no default values defined in the spec.
|
// There are no default values defined in the spec.
|
||||||
func NewRegenerateTokenParams() RegenerateTokenParams {
|
func NewRegenerateAccountTokenParams() RegenerateAccountTokenParams {
|
||||||
|
|
||||||
return RegenerateTokenParams{}
|
return RegenerateAccountTokenParams{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegenerateTokenParams contains all the bound params for the regenerate token operation
|
// RegenerateAccountTokenParams contains all the bound params for the regenerate account token operation
|
||||||
// typically these are obtained from a http.Request
|
// typically these are obtained from a http.Request
|
||||||
//
|
//
|
||||||
// swagger:parameters regenerateToken
|
// swagger:parameters regenerateAccountToken
|
||||||
type RegenerateTokenParams struct {
|
type RegenerateAccountTokenParams struct {
|
||||||
|
|
||||||
// HTTP Request Object
|
// HTTP Request Object
|
||||||
HTTPRequest *http.Request `json:"-"`
|
HTTPRequest *http.Request `json:"-"`
|
||||||
@ -34,21 +34,21 @@ type RegenerateTokenParams struct {
|
|||||||
/*
|
/*
|
||||||
In: body
|
In: body
|
||||||
*/
|
*/
|
||||||
Body RegenerateTokenBody
|
Body RegenerateAccountTokenBody
|
||||||
}
|
}
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||||
// for simple values it will use straight method calls.
|
// for simple values it will use straight method calls.
|
||||||
//
|
//
|
||||||
// To ensure default values, the struct must have been initialized with NewRegenerateTokenParams() beforehand.
|
// To ensure default values, the struct must have been initialized with NewRegenerateAccountTokenParams() beforehand.
|
||||||
func (o *RegenerateTokenParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
func (o *RegenerateAccountTokenParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
||||||
var res []error
|
var res []error
|
||||||
|
|
||||||
o.HTTPRequest = r
|
o.HTTPRequest = r
|
||||||
|
|
||||||
if runtime.HasBody(r) {
|
if runtime.HasBody(r) {
|
||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
var body RegenerateTokenBody
|
var body RegenerateAccountTokenBody
|
||||||
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
||||||
res = append(res, errors.NewParseError("body", "body", "", err))
|
res = append(res, errors.NewParseError("body", "body", "", err))
|
||||||
} else {
|
} else {
|
@ -0,0 +1,107 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
package account
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegenerateAccountTokenOKCode is the HTTP code returned for type RegenerateAccountTokenOK
|
||||||
|
const RegenerateAccountTokenOKCode int = 200
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenOK regenerate account token
|
||||||
|
|
||||||
|
swagger:response regenerateAccountTokenOK
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenOK struct {
|
||||||
|
|
||||||
|
/*
|
||||||
|
In: Body
|
||||||
|
*/
|
||||||
|
Payload *RegenerateAccountTokenOKBody `json:"body,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenOK creates RegenerateAccountTokenOK with default headers values
|
||||||
|
func NewRegenerateAccountTokenOK() *RegenerateAccountTokenOK {
|
||||||
|
|
||||||
|
return &RegenerateAccountTokenOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithPayload adds the payload to the regenerate account token o k response
|
||||||
|
func (o *RegenerateAccountTokenOK) WithPayload(payload *RegenerateAccountTokenOKBody) *RegenerateAccountTokenOK {
|
||||||
|
o.Payload = payload
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPayload sets the payload to the regenerate account token o k response
|
||||||
|
func (o *RegenerateAccountTokenOK) SetPayload(payload *RegenerateAccountTokenOKBody) {
|
||||||
|
o.Payload = payload
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteResponse to the client
|
||||||
|
func (o *RegenerateAccountTokenOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||||
|
|
||||||
|
rw.WriteHeader(200)
|
||||||
|
if o.Payload != nil {
|
||||||
|
payload := o.Payload
|
||||||
|
if err := producer.Produce(rw, payload); err != nil {
|
||||||
|
panic(err) // let the recovery middleware deal with this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegenerateAccountTokenNotFoundCode is the HTTP code returned for type RegenerateAccountTokenNotFound
|
||||||
|
const RegenerateAccountTokenNotFoundCode int = 404
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenNotFound account not found
|
||||||
|
|
||||||
|
swagger:response regenerateAccountTokenNotFound
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenNotFound struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenNotFound creates RegenerateAccountTokenNotFound with default headers values
|
||||||
|
func NewRegenerateAccountTokenNotFound() *RegenerateAccountTokenNotFound {
|
||||||
|
|
||||||
|
return &RegenerateAccountTokenNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteResponse to the client
|
||||||
|
func (o *RegenerateAccountTokenNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||||
|
|
||||||
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||||||
|
|
||||||
|
rw.WriteHeader(404)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegenerateAccountTokenInternalServerErrorCode is the HTTP code returned for type RegenerateAccountTokenInternalServerError
|
||||||
|
const RegenerateAccountTokenInternalServerErrorCode int = 500
|
||||||
|
|
||||||
|
/*
|
||||||
|
RegenerateAccountTokenInternalServerError internal server error
|
||||||
|
|
||||||
|
swagger:response regenerateAccountTokenInternalServerError
|
||||||
|
*/
|
||||||
|
type RegenerateAccountTokenInternalServerError struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRegenerateAccountTokenInternalServerError creates RegenerateAccountTokenInternalServerError with default headers values
|
||||||
|
func NewRegenerateAccountTokenInternalServerError() *RegenerateAccountTokenInternalServerError {
|
||||||
|
|
||||||
|
return &RegenerateAccountTokenInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteResponse to the client
|
||||||
|
func (o *RegenerateAccountTokenInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||||
|
|
||||||
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||||||
|
|
||||||
|
rw.WriteHeader(500)
|
||||||
|
}
|
@ -11,15 +11,15 @@ import (
|
|||||||
golangswaggerpaths "path"
|
golangswaggerpaths "path"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RegenerateTokenURL generates an URL for the regenerate token operation
|
// RegenerateAccountTokenURL generates an URL for the regenerate account token operation
|
||||||
type RegenerateTokenURL struct {
|
type RegenerateAccountTokenURL struct {
|
||||||
_basePath string
|
_basePath string
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||||
// base path specified in the swagger spec.
|
// base path specified in the swagger spec.
|
||||||
// When the value of the base path is an empty string
|
// When the value of the base path is an empty string
|
||||||
func (o *RegenerateTokenURL) WithBasePath(bp string) *RegenerateTokenURL {
|
func (o *RegenerateAccountTokenURL) WithBasePath(bp string) *RegenerateAccountTokenURL {
|
||||||
o.SetBasePath(bp)
|
o.SetBasePath(bp)
|
||||||
return o
|
return o
|
||||||
}
|
}
|
||||||
@ -27,15 +27,15 @@ func (o *RegenerateTokenURL) WithBasePath(bp string) *RegenerateTokenURL {
|
|||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
||||||
// base path specified in the swagger spec.
|
// base path specified in the swagger spec.
|
||||||
// When the value of the base path is an empty string
|
// When the value of the base path is an empty string
|
||||||
func (o *RegenerateTokenURL) SetBasePath(bp string) {
|
func (o *RegenerateAccountTokenURL) SetBasePath(bp string) {
|
||||||
o._basePath = bp
|
o._basePath = bp
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build a url path and query string
|
// Build a url path and query string
|
||||||
func (o *RegenerateTokenURL) Build() (*url.URL, error) {
|
func (o *RegenerateAccountTokenURL) Build() (*url.URL, error) {
|
||||||
var _result url.URL
|
var _result url.URL
|
||||||
|
|
||||||
var _path = "/regenerateToken"
|
var _path = "/regenerateAccountToken"
|
||||||
|
|
||||||
_basePath := o._basePath
|
_basePath := o._basePath
|
||||||
if _basePath == "" {
|
if _basePath == "" {
|
||||||
@ -47,7 +47,7 @@ func (o *RegenerateTokenURL) Build() (*url.URL, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
// Must is a helper function to panic when the url builder returns an error
|
||||||
func (o *RegenerateTokenURL) Must(u *url.URL, err error) *url.URL {
|
func (o *RegenerateAccountTokenURL) Must(u *url.URL, err error) *url.URL {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -58,17 +58,17 @@ func (o *RegenerateTokenURL) Must(u *url.URL, err error) *url.URL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
// String returns the string representation of the path with query string
|
||||||
func (o *RegenerateTokenURL) String() string {
|
func (o *RegenerateAccountTokenURL) String() string {
|
||||||
return o.Must(o.Build()).String()
|
return o.Must(o.Build()).String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
// BuildFull builds a full url with scheme, host, path and query string
|
||||||
func (o *RegenerateTokenURL) BuildFull(scheme, host string) (*url.URL, error) {
|
func (o *RegenerateAccountTokenURL) BuildFull(scheme, host string) (*url.URL, error) {
|
||||||
if scheme == "" {
|
if scheme == "" {
|
||||||
return nil, errors.New("scheme is required for a full url on RegenerateTokenURL")
|
return nil, errors.New("scheme is required for a full url on RegenerateAccountTokenURL")
|
||||||
}
|
}
|
||||||
if host == "" {
|
if host == "" {
|
||||||
return nil, errors.New("host is required for a full url on RegenerateTokenURL")
|
return nil, errors.New("host is required for a full url on RegenerateAccountTokenURL")
|
||||||
}
|
}
|
||||||
|
|
||||||
base, err := o.Build()
|
base, err := o.Build()
|
||||||
@ -82,6 +82,6 @@ func (o *RegenerateTokenURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
// StringFull returns the string representation of a complete url
|
||||||
func (o *RegenerateTokenURL) StringFull(scheme, host string) string {
|
func (o *RegenerateAccountTokenURL) StringFull(scheme, host string) string {
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
return o.Must(o.BuildFull(scheme, host)).String()
|
||||||
}
|
}
|
@ -1,148 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package account
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RegenerateTokenHandlerFunc turns a function with the right signature into a regenerate token handler
|
|
||||||
type RegenerateTokenHandlerFunc func(RegenerateTokenParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn RegenerateTokenHandlerFunc) Handle(params RegenerateTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
|
||||||
return fn(params, principal)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegenerateTokenHandler interface for that can handle valid regenerate token params
|
|
||||||
type RegenerateTokenHandler interface {
|
|
||||||
Handle(RegenerateTokenParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateToken creates a new http.Handler for the regenerate token operation
|
|
||||||
func NewRegenerateToken(ctx *middleware.Context, handler RegenerateTokenHandler) *RegenerateToken {
|
|
||||||
return &RegenerateToken{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateToken swagger:route POST /regenerateToken account regenerateToken
|
|
||||||
|
|
||||||
RegenerateToken regenerate token API
|
|
||||||
*/
|
|
||||||
type RegenerateToken struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler RegenerateTokenHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *RegenerateToken) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewRegenerateTokenParams()
|
|
||||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
|
||||||
if err != nil {
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if aCtx != nil {
|
|
||||||
*r = *aCtx
|
|
||||||
}
|
|
||||||
var principal *rest_model_zrok.Principal
|
|
||||||
if uprinc != nil {
|
|
||||||
principal = uprinc.(*rest_model_zrok.Principal) // this is really a rest_model_zrok.Principal, I promise
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegenerateTokenBody regenerate token body
|
|
||||||
//
|
|
||||||
// swagger:model RegenerateTokenBody
|
|
||||||
type RegenerateTokenBody struct {
|
|
||||||
|
|
||||||
// email address
|
|
||||||
EmailAddress string `json:"emailAddress,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this regenerate token body
|
|
||||||
func (o *RegenerateTokenBody) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this regenerate token body based on context it is used
|
|
||||||
func (o *RegenerateTokenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenBody) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenBody) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RegenerateTokenBody
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegenerateTokenOKBody regenerate token o k body
|
|
||||||
//
|
|
||||||
// swagger:model RegenerateTokenOKBody
|
|
||||||
type RegenerateTokenOKBody struct {
|
|
||||||
|
|
||||||
// token
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this regenerate token o k body
|
|
||||||
func (o *RegenerateTokenOKBody) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this regenerate token o k body based on context it is used
|
|
||||||
func (o *RegenerateTokenOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenOKBody) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *RegenerateTokenOKBody) UnmarshalBinary(b []byte) error {
|
|
||||||
var res RegenerateTokenOKBody
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,107 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package account
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RegenerateTokenOKCode is the HTTP code returned for type RegenerateTokenOK
|
|
||||||
const RegenerateTokenOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenOK regenerate account token
|
|
||||||
|
|
||||||
swagger:response regenerateTokenOK
|
|
||||||
*/
|
|
||||||
type RegenerateTokenOK struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *RegenerateTokenOKBody `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenOK creates RegenerateTokenOK with default headers values
|
|
||||||
func NewRegenerateTokenOK() *RegenerateTokenOK {
|
|
||||||
|
|
||||||
return &RegenerateTokenOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the regenerate token o k response
|
|
||||||
func (o *RegenerateTokenOK) WithPayload(payload *RegenerateTokenOKBody) *RegenerateTokenOK {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the regenerate token o k response
|
|
||||||
func (o *RegenerateTokenOK) SetPayload(payload *RegenerateTokenOKBody) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *RegenerateTokenOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegenerateTokenNotFoundCode is the HTTP code returned for type RegenerateTokenNotFound
|
|
||||||
const RegenerateTokenNotFoundCode int = 404
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenNotFound account not found
|
|
||||||
|
|
||||||
swagger:response regenerateTokenNotFound
|
|
||||||
*/
|
|
||||||
type RegenerateTokenNotFound struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenNotFound creates RegenerateTokenNotFound with default headers values
|
|
||||||
func NewRegenerateTokenNotFound() *RegenerateTokenNotFound {
|
|
||||||
|
|
||||||
return &RegenerateTokenNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *RegenerateTokenNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(404)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegenerateTokenInternalServerErrorCode is the HTTP code returned for type RegenerateTokenInternalServerError
|
|
||||||
const RegenerateTokenInternalServerErrorCode int = 500
|
|
||||||
|
|
||||||
/*
|
|
||||||
RegenerateTokenInternalServerError internal server error
|
|
||||||
|
|
||||||
swagger:response regenerateTokenInternalServerError
|
|
||||||
*/
|
|
||||||
type RegenerateTokenInternalServerError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewRegenerateTokenInternalServerError creates RegenerateTokenInternalServerError with default headers values
|
|
||||||
func NewRegenerateTokenInternalServerError() *RegenerateTokenInternalServerError {
|
|
||||||
|
|
||||||
return &RegenerateTokenInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *RegenerateTokenInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(500)
|
|
||||||
}
|
|
@ -1,222 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metadata
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"net/http"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ListMembersHandlerFunc turns a function with the right signature into a list members handler
|
|
||||||
type ListMembersHandlerFunc func(ListMembersParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn ListMembersHandlerFunc) Handle(params ListMembersParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
|
||||||
return fn(params, principal)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMembersHandler interface for that can handle valid list members params
|
|
||||||
type ListMembersHandler interface {
|
|
||||||
Handle(ListMembersParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembers creates a new http.Handler for the list members operation
|
|
||||||
func NewListMembers(ctx *middleware.Context, handler ListMembersHandler) *ListMembers {
|
|
||||||
return &ListMembers{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembers swagger:route GET /members/{organizationToken} metadata listMembers
|
|
||||||
|
|
||||||
ListMembers list members API
|
|
||||||
*/
|
|
||||||
type ListMembers struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler ListMembersHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembers) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewListMembersParams()
|
|
||||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
|
||||||
if err != nil {
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if aCtx != nil {
|
|
||||||
*r = *aCtx
|
|
||||||
}
|
|
||||||
var principal *rest_model_zrok.Principal
|
|
||||||
if uprinc != nil {
|
|
||||||
principal = uprinc.(*rest_model_zrok.Principal) // this is really a rest_model_zrok.Principal, I promise
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMembersOKBody list members o k body
|
|
||||||
//
|
|
||||||
// swagger:model ListMembersOKBody
|
|
||||||
type ListMembersOKBody struct {
|
|
||||||
|
|
||||||
// members
|
|
||||||
Members []*ListMembersOKBodyMembersItems0 `json:"members"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this list members o k body
|
|
||||||
func (o *ListMembersOKBody) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := o.validateMembers(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOKBody) validateMembers(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(o.Members) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(o.Members); i++ {
|
|
||||||
if swag.IsZero(o.Members[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Members[i] != nil {
|
|
||||||
if err := o.Members[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this list members o k body based on the context it is used
|
|
||||||
func (o *ListMembersOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := o.contextValidateMembers(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *ListMembersOKBody) contextValidateMembers(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(o.Members); i++ {
|
|
||||||
|
|
||||||
if o.Members[i] != nil {
|
|
||||||
|
|
||||||
if swag.IsZero(o.Members[i]) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Members[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
||||||
return ce.ValidateName("listMembersOK" + "." + "members" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBody) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBody) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ListMembersOKBody
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMembersOKBodyMembersItems0 list members o k body members items0
|
|
||||||
//
|
|
||||||
// swagger:model ListMembersOKBodyMembersItems0
|
|
||||||
type ListMembersOKBodyMembersItems0 struct {
|
|
||||||
|
|
||||||
// admin
|
|
||||||
Admin bool `json:"admin,omitempty"`
|
|
||||||
|
|
||||||
// email
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this list members o k body members items0
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this list members o k body members items0 based on context it is used
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) MarshalBinary() ([]byte, error) {
|
|
||||||
if o == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(o)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (o *ListMembersOKBodyMembersItems0) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ListMembersOKBodyMembersItems0
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*o = res
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metadata
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewListMembersParams creates a new ListMembersParams object
|
|
||||||
//
|
|
||||||
// There are no default values defined in the spec.
|
|
||||||
func NewListMembersParams() ListMembersParams {
|
|
||||||
|
|
||||||
return ListMembersParams{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMembersParams contains all the bound params for the list members operation
|
|
||||||
// typically these are obtained from a http.Request
|
|
||||||
//
|
|
||||||
// swagger:parameters listMembers
|
|
||||||
type ListMembersParams struct {
|
|
||||||
|
|
||||||
// HTTP Request Object
|
|
||||||
HTTPRequest *http.Request `json:"-"`
|
|
||||||
|
|
||||||
/*
|
|
||||||
Required: true
|
|
||||||
In: path
|
|
||||||
*/
|
|
||||||
OrganizationToken string
|
|
||||||
}
|
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
|
||||||
// for simple values it will use straight method calls.
|
|
||||||
//
|
|
||||||
// To ensure default values, the struct must have been initialized with NewListMembersParams() beforehand.
|
|
||||||
func (o *ListMembersParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
o.HTTPRequest = r
|
|
||||||
|
|
||||||
rOrganizationToken, rhkOrganizationToken, _ := route.Params.GetOK("organizationToken")
|
|
||||||
if err := o.bindOrganizationToken(rOrganizationToken, rhkOrganizationToken, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindOrganizationToken binds and validates parameter OrganizationToken from path.
|
|
||||||
func (o *ListMembersParams) bindOrganizationToken(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: true
|
|
||||||
// Parameter is provided by construction from the route
|
|
||||||
o.OrganizationToken = raw
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,107 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metadata
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ListMembersOKCode is the HTTP code returned for type ListMembersOK
|
|
||||||
const ListMembersOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersOK ok
|
|
||||||
|
|
||||||
swagger:response listMembersOK
|
|
||||||
*/
|
|
||||||
type ListMembersOK struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *ListMembersOKBody `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersOK creates ListMembersOK with default headers values
|
|
||||||
func NewListMembersOK() *ListMembersOK {
|
|
||||||
|
|
||||||
return &ListMembersOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the list members o k response
|
|
||||||
func (o *ListMembersOK) WithPayload(payload *ListMembersOKBody) *ListMembersOK {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the list members o k response
|
|
||||||
func (o *ListMembersOK) SetPayload(payload *ListMembersOKBody) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *ListMembersOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMembersNotFoundCode is the HTTP code returned for type ListMembersNotFound
|
|
||||||
const ListMembersNotFoundCode int = 404
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersNotFound not found
|
|
||||||
|
|
||||||
swagger:response listMembersNotFound
|
|
||||||
*/
|
|
||||||
type ListMembersNotFound struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersNotFound creates ListMembersNotFound with default headers values
|
|
||||||
func NewListMembersNotFound() *ListMembersNotFound {
|
|
||||||
|
|
||||||
return &ListMembersNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *ListMembersNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(404)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMembersInternalServerErrorCode is the HTTP code returned for type ListMembersInternalServerError
|
|
||||||
const ListMembersInternalServerErrorCode int = 500
|
|
||||||
|
|
||||||
/*
|
|
||||||
ListMembersInternalServerError internal server error
|
|
||||||
|
|
||||||
swagger:response listMembersInternalServerError
|
|
||||||
*/
|
|
||||||
type ListMembersInternalServerError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewListMembersInternalServerError creates ListMembersInternalServerError with default headers values
|
|
||||||
func NewListMembersInternalServerError() *ListMembersInternalServerError {
|
|
||||||
|
|
||||||
return &ListMembersInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *ListMembersInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(500)
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metadata
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/url"
|
|
||||||
golangswaggerpaths "path"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ListMembersURL generates an URL for the list members operation
|
|
||||||
type ListMembersURL struct {
|
|
||||||
OrganizationToken string
|
|
||||||
|
|
||||||
_basePath string
|
|
||||||
// avoid unkeyed usage
|
|
||||||
_ struct{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *ListMembersURL) WithBasePath(bp string) *ListMembersURL {
|
|
||||||
o.SetBasePath(bp)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *ListMembersURL) SetBasePath(bp string) {
|
|
||||||
o._basePath = bp
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a url path and query string
|
|
||||||
func (o *ListMembersURL) Build() (*url.URL, error) {
|
|
||||||
var _result url.URL
|
|
||||||
|
|
||||||
var _path = "/members/{organizationToken}"
|
|
||||||
|
|
||||||
organizationToken := o.OrganizationToken
|
|
||||||
if organizationToken != "" {
|
|
||||||
_path = strings.Replace(_path, "{organizationToken}", organizationToken, -1)
|
|
||||||
} else {
|
|
||||||
return nil, errors.New("organizationToken is required on ListMembersURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
_basePath := o._basePath
|
|
||||||
if _basePath == "" {
|
|
||||||
_basePath = "/api/v1"
|
|
||||||
}
|
|
||||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
|
||||||
|
|
||||||
return &_result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
|
||||||
func (o *ListMembersURL) Must(u *url.URL, err error) *url.URL {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
if u == nil {
|
|
||||||
panic("url can't be nil")
|
|
||||||
}
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
|
||||||
func (o *ListMembersURL) String() string {
|
|
||||||
return o.Must(o.Build()).String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
|
||||||
func (o *ListMembersURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|
||||||
if scheme == "" {
|
|
||||||
return nil, errors.New("scheme is required for a full url on ListMembersURL")
|
|
||||||
}
|
|
||||||
if host == "" {
|
|
||||||
return nil, errors.New("host is required for a full url on ListMembersURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := o.Build()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Scheme = scheme
|
|
||||||
base.Host = host
|
|
||||||
return base, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
|
||||||
func (o *ListMembersURL) StringFull(scheme, host string) string {
|
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetAccountMetricsHandlerFunc turns a function with the right signature into a get account metrics handler
|
|
||||||
type GetAccountMetricsHandlerFunc func(GetAccountMetricsParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn GetAccountMetricsHandlerFunc) Handle(params GetAccountMetricsParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
|
||||||
return fn(params, principal)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAccountMetricsHandler interface for that can handle valid get account metrics params
|
|
||||||
type GetAccountMetricsHandler interface {
|
|
||||||
Handle(GetAccountMetricsParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetAccountMetrics creates a new http.Handler for the get account metrics operation
|
|
||||||
func NewGetAccountMetrics(ctx *middleware.Context, handler GetAccountMetricsHandler) *GetAccountMetrics {
|
|
||||||
return &GetAccountMetrics{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetAccountMetrics swagger:route GET /metrics/account metrics getAccountMetrics
|
|
||||||
|
|
||||||
GetAccountMetrics get account metrics API
|
|
||||||
*/
|
|
||||||
type GetAccountMetrics struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler GetAccountMetricsHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetAccountMetrics) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewGetAccountMetricsParams()
|
|
||||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
|
||||||
if err != nil {
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if aCtx != nil {
|
|
||||||
*r = *aCtx
|
|
||||||
}
|
|
||||||
var principal *rest_model_zrok.Principal
|
|
||||||
if uprinc != nil {
|
|
||||||
principal = uprinc.(*rest_model_zrok.Principal) // this is really a rest_model_zrok.Principal, I promise
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
@ -1,83 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetAccountMetricsParams creates a new GetAccountMetricsParams object
|
|
||||||
//
|
|
||||||
// There are no default values defined in the spec.
|
|
||||||
func NewGetAccountMetricsParams() GetAccountMetricsParams {
|
|
||||||
|
|
||||||
return GetAccountMetricsParams{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAccountMetricsParams contains all the bound params for the get account metrics operation
|
|
||||||
// typically these are obtained from a http.Request
|
|
||||||
//
|
|
||||||
// swagger:parameters getAccountMetrics
|
|
||||||
type GetAccountMetricsParams struct {
|
|
||||||
|
|
||||||
// HTTP Request Object
|
|
||||||
HTTPRequest *http.Request `json:"-"`
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: query
|
|
||||||
*/
|
|
||||||
Duration *float64
|
|
||||||
}
|
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
|
||||||
// for simple values it will use straight method calls.
|
|
||||||
//
|
|
||||||
// To ensure default values, the struct must have been initialized with NewGetAccountMetricsParams() beforehand.
|
|
||||||
func (o *GetAccountMetricsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
o.HTTPRequest = r
|
|
||||||
|
|
||||||
qs := runtime.Values(r.URL.Query())
|
|
||||||
|
|
||||||
qDuration, qhkDuration, _ := qs.GetOK("duration")
|
|
||||||
if err := o.bindDuration(qDuration, qhkDuration, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindDuration binds and validates parameter Duration from query.
|
|
||||||
func (o *GetAccountMetricsParams) bindDuration(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: false
|
|
||||||
// AllowEmptyValue: false
|
|
||||||
|
|
||||||
if raw == "" { // empty values pass all other validations
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
value, err := swag.ConvertFloat64(raw)
|
|
||||||
if err != nil {
|
|
||||||
return errors.InvalidType("duration", "query", "float64", raw)
|
|
||||||
}
|
|
||||||
o.Duration = &value
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetAccountMetricsOKCode is the HTTP code returned for type GetAccountMetricsOK
|
|
||||||
const GetAccountMetricsOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetAccountMetricsOK account metrics
|
|
||||||
|
|
||||||
swagger:response getAccountMetricsOK
|
|
||||||
*/
|
|
||||||
type GetAccountMetricsOK struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *rest_model_zrok.Metrics `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetAccountMetricsOK creates GetAccountMetricsOK with default headers values
|
|
||||||
func NewGetAccountMetricsOK() *GetAccountMetricsOK {
|
|
||||||
|
|
||||||
return &GetAccountMetricsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the get account metrics o k response
|
|
||||||
func (o *GetAccountMetricsOK) WithPayload(payload *rest_model_zrok.Metrics) *GetAccountMetricsOK {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the get account metrics o k response
|
|
||||||
func (o *GetAccountMetricsOK) SetPayload(payload *rest_model_zrok.Metrics) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *GetAccountMetricsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,105 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/url"
|
|
||||||
golangswaggerpaths "path"
|
|
||||||
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetAccountMetricsURL generates an URL for the get account metrics operation
|
|
||||||
type GetAccountMetricsURL struct {
|
|
||||||
Duration *float64
|
|
||||||
|
|
||||||
_basePath string
|
|
||||||
// avoid unkeyed usage
|
|
||||||
_ struct{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *GetAccountMetricsURL) WithBasePath(bp string) *GetAccountMetricsURL {
|
|
||||||
o.SetBasePath(bp)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *GetAccountMetricsURL) SetBasePath(bp string) {
|
|
||||||
o._basePath = bp
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a url path and query string
|
|
||||||
func (o *GetAccountMetricsURL) Build() (*url.URL, error) {
|
|
||||||
var _result url.URL
|
|
||||||
|
|
||||||
var _path = "/metrics/account"
|
|
||||||
|
|
||||||
_basePath := o._basePath
|
|
||||||
if _basePath == "" {
|
|
||||||
_basePath = "/api/v1"
|
|
||||||
}
|
|
||||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
|
||||||
|
|
||||||
qs := make(url.Values)
|
|
||||||
|
|
||||||
var durationQ string
|
|
||||||
if o.Duration != nil {
|
|
||||||
durationQ = swag.FormatFloat64(*o.Duration)
|
|
||||||
}
|
|
||||||
if durationQ != "" {
|
|
||||||
qs.Set("duration", durationQ)
|
|
||||||
}
|
|
||||||
|
|
||||||
_result.RawQuery = qs.Encode()
|
|
||||||
|
|
||||||
return &_result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
|
||||||
func (o *GetAccountMetricsURL) Must(u *url.URL, err error) *url.URL {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
if u == nil {
|
|
||||||
panic("url can't be nil")
|
|
||||||
}
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
|
||||||
func (o *GetAccountMetricsURL) String() string {
|
|
||||||
return o.Must(o.Build()).String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
|
||||||
func (o *GetAccountMetricsURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|
||||||
if scheme == "" {
|
|
||||||
return nil, errors.New("scheme is required for a full url on GetAccountMetricsURL")
|
|
||||||
}
|
|
||||||
if host == "" {
|
|
||||||
return nil, errors.New("host is required for a full url on GetAccountMetricsURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := o.Build()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Scheme = scheme
|
|
||||||
base.Host = host
|
|
||||||
return base, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
|
||||||
func (o *GetAccountMetricsURL) StringFull(scheme, host string) string {
|
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsHandlerFunc turns a function with the right signature into a get environment metrics handler
|
|
||||||
type GetEnvironmentMetricsHandlerFunc func(GetEnvironmentMetricsParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn GetEnvironmentMetricsHandlerFunc) Handle(params GetEnvironmentMetricsParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
|
||||||
return fn(params, principal)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsHandler interface for that can handle valid get environment metrics params
|
|
||||||
type GetEnvironmentMetricsHandler interface {
|
|
||||||
Handle(GetEnvironmentMetricsParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetrics creates a new http.Handler for the get environment metrics operation
|
|
||||||
func NewGetEnvironmentMetrics(ctx *middleware.Context, handler GetEnvironmentMetricsHandler) *GetEnvironmentMetrics {
|
|
||||||
return &GetEnvironmentMetrics{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetrics swagger:route GET /metrics/environment/{envId} metrics getEnvironmentMetrics
|
|
||||||
|
|
||||||
GetEnvironmentMetrics get environment metrics API
|
|
||||||
*/
|
|
||||||
type GetEnvironmentMetrics struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler GetEnvironmentMetricsHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetEnvironmentMetrics) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewGetEnvironmentMetricsParams()
|
|
||||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
|
||||||
if err != nil {
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if aCtx != nil {
|
|
||||||
*r = *aCtx
|
|
||||||
}
|
|
||||||
var principal *rest_model_zrok.Principal
|
|
||||||
if uprinc != nil {
|
|
||||||
principal = uprinc.(*rest_model_zrok.Principal) // this is really a rest_model_zrok.Principal, I promise
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
@ -1,107 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsParams creates a new GetEnvironmentMetricsParams object
|
|
||||||
//
|
|
||||||
// There are no default values defined in the spec.
|
|
||||||
func NewGetEnvironmentMetricsParams() GetEnvironmentMetricsParams {
|
|
||||||
|
|
||||||
return GetEnvironmentMetricsParams{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsParams contains all the bound params for the get environment metrics operation
|
|
||||||
// typically these are obtained from a http.Request
|
|
||||||
//
|
|
||||||
// swagger:parameters getEnvironmentMetrics
|
|
||||||
type GetEnvironmentMetricsParams struct {
|
|
||||||
|
|
||||||
// HTTP Request Object
|
|
||||||
HTTPRequest *http.Request `json:"-"`
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: query
|
|
||||||
*/
|
|
||||||
Duration *float64
|
|
||||||
/*
|
|
||||||
Required: true
|
|
||||||
In: path
|
|
||||||
*/
|
|
||||||
EnvID string
|
|
||||||
}
|
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
|
||||||
// for simple values it will use straight method calls.
|
|
||||||
//
|
|
||||||
// To ensure default values, the struct must have been initialized with NewGetEnvironmentMetricsParams() beforehand.
|
|
||||||
func (o *GetEnvironmentMetricsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
o.HTTPRequest = r
|
|
||||||
|
|
||||||
qs := runtime.Values(r.URL.Query())
|
|
||||||
|
|
||||||
qDuration, qhkDuration, _ := qs.GetOK("duration")
|
|
||||||
if err := o.bindDuration(qDuration, qhkDuration, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
rEnvID, rhkEnvID, _ := route.Params.GetOK("envId")
|
|
||||||
if err := o.bindEnvID(rEnvID, rhkEnvID, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindDuration binds and validates parameter Duration from query.
|
|
||||||
func (o *GetEnvironmentMetricsParams) bindDuration(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: false
|
|
||||||
// AllowEmptyValue: false
|
|
||||||
|
|
||||||
if raw == "" { // empty values pass all other validations
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
value, err := swag.ConvertFloat64(raw)
|
|
||||||
if err != nil {
|
|
||||||
return errors.InvalidType("duration", "query", "float64", raw)
|
|
||||||
}
|
|
||||||
o.Duration = &value
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindEnvID binds and validates parameter EnvID from path.
|
|
||||||
func (o *GetEnvironmentMetricsParams) bindEnvID(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: true
|
|
||||||
// Parameter is provided by construction from the route
|
|
||||||
o.EnvID = raw
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsOKCode is the HTTP code returned for type GetEnvironmentMetricsOK
|
|
||||||
const GetEnvironmentMetricsOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetricsOK environment metrics
|
|
||||||
|
|
||||||
swagger:response getEnvironmentMetricsOK
|
|
||||||
*/
|
|
||||||
type GetEnvironmentMetricsOK struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *rest_model_zrok.Metrics `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsOK creates GetEnvironmentMetricsOK with default headers values
|
|
||||||
func NewGetEnvironmentMetricsOK() *GetEnvironmentMetricsOK {
|
|
||||||
|
|
||||||
return &GetEnvironmentMetricsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the get environment metrics o k response
|
|
||||||
func (o *GetEnvironmentMetricsOK) WithPayload(payload *rest_model_zrok.Metrics) *GetEnvironmentMetricsOK {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the get environment metrics o k response
|
|
||||||
func (o *GetEnvironmentMetricsOK) SetPayload(payload *rest_model_zrok.Metrics) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *GetEnvironmentMetricsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsUnauthorizedCode is the HTTP code returned for type GetEnvironmentMetricsUnauthorized
|
|
||||||
const GetEnvironmentMetricsUnauthorizedCode int = 401
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetEnvironmentMetricsUnauthorized unauthorized
|
|
||||||
|
|
||||||
swagger:response getEnvironmentMetricsUnauthorized
|
|
||||||
*/
|
|
||||||
type GetEnvironmentMetricsUnauthorized struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetEnvironmentMetricsUnauthorized creates GetEnvironmentMetricsUnauthorized with default headers values
|
|
||||||
func NewGetEnvironmentMetricsUnauthorized() *GetEnvironmentMetricsUnauthorized {
|
|
||||||
|
|
||||||
return &GetEnvironmentMetricsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *GetEnvironmentMetricsUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(401)
|
|
||||||
}
|
|
@ -1,115 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/url"
|
|
||||||
golangswaggerpaths "path"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetEnvironmentMetricsURL generates an URL for the get environment metrics operation
|
|
||||||
type GetEnvironmentMetricsURL struct {
|
|
||||||
EnvID string
|
|
||||||
|
|
||||||
Duration *float64
|
|
||||||
|
|
||||||
_basePath string
|
|
||||||
// avoid unkeyed usage
|
|
||||||
_ struct{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *GetEnvironmentMetricsURL) WithBasePath(bp string) *GetEnvironmentMetricsURL {
|
|
||||||
o.SetBasePath(bp)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *GetEnvironmentMetricsURL) SetBasePath(bp string) {
|
|
||||||
o._basePath = bp
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a url path and query string
|
|
||||||
func (o *GetEnvironmentMetricsURL) Build() (*url.URL, error) {
|
|
||||||
var _result url.URL
|
|
||||||
|
|
||||||
var _path = "/metrics/environment/{envId}"
|
|
||||||
|
|
||||||
envID := o.EnvID
|
|
||||||
if envID != "" {
|
|
||||||
_path = strings.Replace(_path, "{envId}", envID, -1)
|
|
||||||
} else {
|
|
||||||
return nil, errors.New("envId is required on GetEnvironmentMetricsURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
_basePath := o._basePath
|
|
||||||
if _basePath == "" {
|
|
||||||
_basePath = "/api/v1"
|
|
||||||
}
|
|
||||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
|
||||||
|
|
||||||
qs := make(url.Values)
|
|
||||||
|
|
||||||
var durationQ string
|
|
||||||
if o.Duration != nil {
|
|
||||||
durationQ = swag.FormatFloat64(*o.Duration)
|
|
||||||
}
|
|
||||||
if durationQ != "" {
|
|
||||||
qs.Set("duration", durationQ)
|
|
||||||
}
|
|
||||||
|
|
||||||
_result.RawQuery = qs.Encode()
|
|
||||||
|
|
||||||
return &_result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
|
||||||
func (o *GetEnvironmentMetricsURL) Must(u *url.URL, err error) *url.URL {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
if u == nil {
|
|
||||||
panic("url can't be nil")
|
|
||||||
}
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
|
||||||
func (o *GetEnvironmentMetricsURL) String() string {
|
|
||||||
return o.Must(o.Build()).String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
|
||||||
func (o *GetEnvironmentMetricsURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|
||||||
if scheme == "" {
|
|
||||||
return nil, errors.New("scheme is required for a full url on GetEnvironmentMetricsURL")
|
|
||||||
}
|
|
||||||
if host == "" {
|
|
||||||
return nil, errors.New("host is required for a full url on GetEnvironmentMetricsURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := o.Build()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Scheme = scheme
|
|
||||||
base.Host = host
|
|
||||||
return base, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
|
||||||
func (o *GetEnvironmentMetricsURL) StringFull(scheme, host string) string {
|
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetShareMetricsHandlerFunc turns a function with the right signature into a get share metrics handler
|
|
||||||
type GetShareMetricsHandlerFunc func(GetShareMetricsParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn GetShareMetricsHandlerFunc) Handle(params GetShareMetricsParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
|
||||||
return fn(params, principal)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetShareMetricsHandler interface for that can handle valid get share metrics params
|
|
||||||
type GetShareMetricsHandler interface {
|
|
||||||
Handle(GetShareMetricsParams, *rest_model_zrok.Principal) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetrics creates a new http.Handler for the get share metrics operation
|
|
||||||
func NewGetShareMetrics(ctx *middleware.Context, handler GetShareMetricsHandler) *GetShareMetrics {
|
|
||||||
return &GetShareMetrics{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetrics swagger:route GET /metrics/share/{shrToken} metrics getShareMetrics
|
|
||||||
|
|
||||||
GetShareMetrics get share metrics API
|
|
||||||
*/
|
|
||||||
type GetShareMetrics struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler GetShareMetricsHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetShareMetrics) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewGetShareMetricsParams()
|
|
||||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
|
||||||
if err != nil {
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if aCtx != nil {
|
|
||||||
*r = *aCtx
|
|
||||||
}
|
|
||||||
var principal *rest_model_zrok.Principal
|
|
||||||
if uprinc != nil {
|
|
||||||
principal = uprinc.(*rest_model_zrok.Principal) // this is really a rest_model_zrok.Principal, I promise
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
@ -1,107 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetShareMetricsParams creates a new GetShareMetricsParams object
|
|
||||||
//
|
|
||||||
// There are no default values defined in the spec.
|
|
||||||
func NewGetShareMetricsParams() GetShareMetricsParams {
|
|
||||||
|
|
||||||
return GetShareMetricsParams{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetShareMetricsParams contains all the bound params for the get share metrics operation
|
|
||||||
// typically these are obtained from a http.Request
|
|
||||||
//
|
|
||||||
// swagger:parameters getShareMetrics
|
|
||||||
type GetShareMetricsParams struct {
|
|
||||||
|
|
||||||
// HTTP Request Object
|
|
||||||
HTTPRequest *http.Request `json:"-"`
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: query
|
|
||||||
*/
|
|
||||||
Duration *float64
|
|
||||||
/*
|
|
||||||
Required: true
|
|
||||||
In: path
|
|
||||||
*/
|
|
||||||
ShrToken string
|
|
||||||
}
|
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
|
||||||
// for simple values it will use straight method calls.
|
|
||||||
//
|
|
||||||
// To ensure default values, the struct must have been initialized with NewGetShareMetricsParams() beforehand.
|
|
||||||
func (o *GetShareMetricsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
o.HTTPRequest = r
|
|
||||||
|
|
||||||
qs := runtime.Values(r.URL.Query())
|
|
||||||
|
|
||||||
qDuration, qhkDuration, _ := qs.GetOK("duration")
|
|
||||||
if err := o.bindDuration(qDuration, qhkDuration, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
rShrToken, rhkShrToken, _ := route.Params.GetOK("shrToken")
|
|
||||||
if err := o.bindShrToken(rShrToken, rhkShrToken, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindDuration binds and validates parameter Duration from query.
|
|
||||||
func (o *GetShareMetricsParams) bindDuration(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: false
|
|
||||||
// AllowEmptyValue: false
|
|
||||||
|
|
||||||
if raw == "" { // empty values pass all other validations
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
value, err := swag.ConvertFloat64(raw)
|
|
||||||
if err != nil {
|
|
||||||
return errors.InvalidType("duration", "query", "float64", raw)
|
|
||||||
}
|
|
||||||
o.Duration = &value
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindShrToken binds and validates parameter ShrToken from path.
|
|
||||||
func (o *GetShareMetricsParams) bindShrToken(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: true
|
|
||||||
// Parameter is provided by construction from the route
|
|
||||||
o.ShrToken = raw
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
|
|
||||||
"github.com/openziti/zrok/rest_model_zrok"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetShareMetricsOKCode is the HTTP code returned for type GetShareMetricsOK
|
|
||||||
const GetShareMetricsOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetricsOK share metrics
|
|
||||||
|
|
||||||
swagger:response getShareMetricsOK
|
|
||||||
*/
|
|
||||||
type GetShareMetricsOK struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *rest_model_zrok.Metrics `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsOK creates GetShareMetricsOK with default headers values
|
|
||||||
func NewGetShareMetricsOK() *GetShareMetricsOK {
|
|
||||||
|
|
||||||
return &GetShareMetricsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the get share metrics o k response
|
|
||||||
func (o *GetShareMetricsOK) WithPayload(payload *rest_model_zrok.Metrics) *GetShareMetricsOK {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the get share metrics o k response
|
|
||||||
func (o *GetShareMetricsOK) SetPayload(payload *rest_model_zrok.Metrics) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *GetShareMetricsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetShareMetricsUnauthorizedCode is the HTTP code returned for type GetShareMetricsUnauthorized
|
|
||||||
const GetShareMetricsUnauthorizedCode int = 401
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetShareMetricsUnauthorized unauthorized
|
|
||||||
|
|
||||||
swagger:response getShareMetricsUnauthorized
|
|
||||||
*/
|
|
||||||
type GetShareMetricsUnauthorized struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetShareMetricsUnauthorized creates GetShareMetricsUnauthorized with default headers values
|
|
||||||
func NewGetShareMetricsUnauthorized() *GetShareMetricsUnauthorized {
|
|
||||||
|
|
||||||
return &GetShareMetricsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *GetShareMetricsUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(401)
|
|
||||||
}
|
|
@ -1,115 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package metrics
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/url"
|
|
||||||
golangswaggerpaths "path"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetShareMetricsURL generates an URL for the get share metrics operation
|
|
||||||
type GetShareMetricsURL struct {
|
|
||||||
ShrToken string
|
|
||||||
|
|
||||||
Duration *float64
|
|
||||||
|
|
||||||
_basePath string
|
|
||||||
// avoid unkeyed usage
|
|
||||||
_ struct{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *GetShareMetricsURL) WithBasePath(bp string) *GetShareMetricsURL {
|
|
||||||
o.SetBasePath(bp)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *GetShareMetricsURL) SetBasePath(bp string) {
|
|
||||||
o._basePath = bp
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a url path and query string
|
|
||||||
func (o *GetShareMetricsURL) Build() (*url.URL, error) {
|
|
||||||
var _result url.URL
|
|
||||||
|
|
||||||
var _path = "/metrics/share/{shrToken}"
|
|
||||||
|
|
||||||
shrToken := o.ShrToken
|
|
||||||
if shrToken != "" {
|
|
||||||
_path = strings.Replace(_path, "{shrToken}", shrToken, -1)
|
|
||||||
} else {
|
|
||||||
return nil, errors.New("shrToken is required on GetShareMetricsURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
_basePath := o._basePath
|
|
||||||
if _basePath == "" {
|
|
||||||
_basePath = "/api/v1"
|
|
||||||
}
|
|
||||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
|
||||||
|
|
||||||
qs := make(url.Values)
|
|
||||||
|
|
||||||
var durationQ string
|
|
||||||
if o.Duration != nil {
|
|
||||||
durationQ = swag.FormatFloat64(*o.Duration)
|
|
||||||
}
|
|
||||||
if durationQ != "" {
|
|
||||||
qs.Set("duration", durationQ)
|
|
||||||
}
|
|
||||||
|
|
||||||
_result.RawQuery = qs.Encode()
|
|
||||||
|
|
||||||
return &_result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
|
||||||
func (o *GetShareMetricsURL) Must(u *url.URL, err error) *url.URL {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
if u == nil {
|
|
||||||
panic("url can't be nil")
|
|
||||||
}
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
|
||||||
func (o *GetShareMetricsURL) String() string {
|
|
||||||
return o.Must(o.Build()).String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
|
||||||
func (o *GetShareMetricsURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|
||||||
if scheme == "" {
|
|
||||||
return nil, errors.New("scheme is required for a full url on GetShareMetricsURL")
|
|
||||||
}
|
|
||||||
if host == "" {
|
|
||||||
return nil, errors.New("host is required for a full url on GetShareMetricsURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := o.Build()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Scheme = scheme
|
|
||||||
base.Host = host
|
|
||||||
return base, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
|
||||||
func (o *GetShareMetricsURL) StringFull(scheme, host string) string {
|
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package share
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
)
|
|
||||||
|
|
||||||
// OauthAuthenticateHandlerFunc turns a function with the right signature into a oauth authenticate handler
|
|
||||||
type OauthAuthenticateHandlerFunc func(OauthAuthenticateParams) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn OauthAuthenticateHandlerFunc) Handle(params OauthAuthenticateParams) middleware.Responder {
|
|
||||||
return fn(params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// OauthAuthenticateHandler interface for that can handle valid oauth authenticate params
|
|
||||||
type OauthAuthenticateHandler interface {
|
|
||||||
Handle(OauthAuthenticateParams) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticate creates a new http.Handler for the oauth authenticate operation
|
|
||||||
func NewOauthAuthenticate(ctx *middleware.Context, handler OauthAuthenticateHandler) *OauthAuthenticate {
|
|
||||||
return &OauthAuthenticate{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticate swagger:route GET /oauth/authorize share oauthAuthenticate
|
|
||||||
|
|
||||||
OauthAuthenticate oauth authenticate API
|
|
||||||
*/
|
|
||||||
type OauthAuthenticate struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler OauthAuthenticateHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *OauthAuthenticate) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewOauthAuthenticateParams()
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package share
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/validate"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewOauthAuthenticateParams creates a new OauthAuthenticateParams object
|
|
||||||
//
|
|
||||||
// There are no default values defined in the spec.
|
|
||||||
func NewOauthAuthenticateParams() OauthAuthenticateParams {
|
|
||||||
|
|
||||||
return OauthAuthenticateParams{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// OauthAuthenticateParams contains all the bound params for the oauth authenticate operation
|
|
||||||
// typically these are obtained from a http.Request
|
|
||||||
//
|
|
||||||
// swagger:parameters oauthAuthenticate
|
|
||||||
type OauthAuthenticateParams struct {
|
|
||||||
|
|
||||||
// HTTP Request Object
|
|
||||||
HTTPRequest *http.Request `json:"-"`
|
|
||||||
|
|
||||||
/*
|
|
||||||
Required: true
|
|
||||||
In: query
|
|
||||||
*/
|
|
||||||
Code string
|
|
||||||
/*
|
|
||||||
In: query
|
|
||||||
*/
|
|
||||||
State *string
|
|
||||||
}
|
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
|
||||||
// for simple values it will use straight method calls.
|
|
||||||
//
|
|
||||||
// To ensure default values, the struct must have been initialized with NewOauthAuthenticateParams() beforehand.
|
|
||||||
func (o *OauthAuthenticateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
o.HTTPRequest = r
|
|
||||||
|
|
||||||
qs := runtime.Values(r.URL.Query())
|
|
||||||
|
|
||||||
qCode, qhkCode, _ := qs.GetOK("code")
|
|
||||||
if err := o.bindCode(qCode, qhkCode, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
qState, qhkState, _ := qs.GetOK("state")
|
|
||||||
if err := o.bindState(qState, qhkState, route.Formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindCode binds and validates parameter Code from query.
|
|
||||||
func (o *OauthAuthenticateParams) bindCode(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
if !hasKey {
|
|
||||||
return errors.Required("code", "query", rawData)
|
|
||||||
}
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: true
|
|
||||||
// AllowEmptyValue: false
|
|
||||||
|
|
||||||
if err := validate.RequiredString("code", "query", raw); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
o.Code = raw
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// bindState binds and validates parameter State from query.
|
|
||||||
func (o *OauthAuthenticateParams) bindState(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
|
||||||
var raw string
|
|
||||||
if len(rawData) > 0 {
|
|
||||||
raw = rawData[len(rawData)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Required: false
|
|
||||||
// AllowEmptyValue: false
|
|
||||||
|
|
||||||
if raw == "" { // empty values pass all other validations
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
o.State = &raw
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package share
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// OauthAuthenticateOKCode is the HTTP code returned for type OauthAuthenticateOK
|
|
||||||
const OauthAuthenticateOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateOK testing
|
|
||||||
|
|
||||||
swagger:response oauthAuthenticateOK
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateOK struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateOK creates OauthAuthenticateOK with default headers values
|
|
||||||
func NewOauthAuthenticateOK() *OauthAuthenticateOK {
|
|
||||||
|
|
||||||
return &OauthAuthenticateOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *OauthAuthenticateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
}
|
|
||||||
|
|
||||||
// OauthAuthenticateFoundCode is the HTTP code returned for type OauthAuthenticateFound
|
|
||||||
const OauthAuthenticateFoundCode int = 302
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateFound redirect back to share
|
|
||||||
|
|
||||||
swagger:response oauthAuthenticateFound
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateFound struct {
|
|
||||||
/*Redirect URL
|
|
||||||
|
|
||||||
*/
|
|
||||||
Location string `json:"location"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateFound creates OauthAuthenticateFound with default headers values
|
|
||||||
func NewOauthAuthenticateFound() *OauthAuthenticateFound {
|
|
||||||
|
|
||||||
return &OauthAuthenticateFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLocation adds the location to the oauth authenticate found response
|
|
||||||
func (o *OauthAuthenticateFound) WithLocation(location string) *OauthAuthenticateFound {
|
|
||||||
o.Location = location
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetLocation sets the location to the oauth authenticate found response
|
|
||||||
func (o *OauthAuthenticateFound) SetLocation(location string) {
|
|
||||||
o.Location = location
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *OauthAuthenticateFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
// response header location
|
|
||||||
|
|
||||||
location := o.Location
|
|
||||||
if location != "" {
|
|
||||||
rw.Header().Set("location", location)
|
|
||||||
}
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(302)
|
|
||||||
}
|
|
||||||
|
|
||||||
// OauthAuthenticateInternalServerErrorCode is the HTTP code returned for type OauthAuthenticateInternalServerError
|
|
||||||
const OauthAuthenticateInternalServerErrorCode int = 500
|
|
||||||
|
|
||||||
/*
|
|
||||||
OauthAuthenticateInternalServerError internal server error
|
|
||||||
|
|
||||||
swagger:response oauthAuthenticateInternalServerError
|
|
||||||
*/
|
|
||||||
type OauthAuthenticateInternalServerError struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewOauthAuthenticateInternalServerError creates OauthAuthenticateInternalServerError with default headers values
|
|
||||||
func NewOauthAuthenticateInternalServerError() *OauthAuthenticateInternalServerError {
|
|
||||||
|
|
||||||
return &OauthAuthenticateInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *OauthAuthenticateInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
||||||
|
|
||||||
rw.WriteHeader(500)
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
package share
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/url"
|
|
||||||
golangswaggerpaths "path"
|
|
||||||
)
|
|
||||||
|
|
||||||
// OauthAuthenticateURL generates an URL for the oauth authenticate operation
|
|
||||||
type OauthAuthenticateURL struct {
|
|
||||||
Code string
|
|
||||||
State *string
|
|
||||||
|
|
||||||
_basePath string
|
|
||||||
// avoid unkeyed usage
|
|
||||||
_ struct{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *OauthAuthenticateURL) WithBasePath(bp string) *OauthAuthenticateURL {
|
|
||||||
o.SetBasePath(bp)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *OauthAuthenticateURL) SetBasePath(bp string) {
|
|
||||||
o._basePath = bp
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a url path and query string
|
|
||||||
func (o *OauthAuthenticateURL) Build() (*url.URL, error) {
|
|
||||||
var _result url.URL
|
|
||||||
|
|
||||||
var _path = "/oauth/authorize"
|
|
||||||
|
|
||||||
_basePath := o._basePath
|
|
||||||
if _basePath == "" {
|
|
||||||
_basePath = "/api/v1"
|
|
||||||
}
|
|
||||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
|
||||||
|
|
||||||
qs := make(url.Values)
|
|
||||||
|
|
||||||
codeQ := o.Code
|
|
||||||
if codeQ != "" {
|
|
||||||
qs.Set("code", codeQ)
|
|
||||||
}
|
|
||||||
|
|
||||||
var stateQ string
|
|
||||||
if o.State != nil {
|
|
||||||
stateQ = *o.State
|
|
||||||
}
|
|
||||||
if stateQ != "" {
|
|
||||||
qs.Set("state", stateQ)
|
|
||||||
}
|
|
||||||
|
|
||||||
_result.RawQuery = qs.Encode()
|
|
||||||
|
|
||||||
return &_result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
|
||||||
func (o *OauthAuthenticateURL) Must(u *url.URL, err error) *url.URL {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
if u == nil {
|
|
||||||
panic("url can't be nil")
|
|
||||||
}
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
|
||||||
func (o *OauthAuthenticateURL) String() string {
|
|
||||||
return o.Must(o.Build()).String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
|
||||||
func (o *OauthAuthenticateURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|
||||||
if scheme == "" {
|
|
||||||
return nil, errors.New("scheme is required for a full url on OauthAuthenticateURL")
|
|
||||||
}
|
|
||||||
if host == "" {
|
|
||||||
return nil, errors.New("host is required for a full url on OauthAuthenticateURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := o.Build()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Scheme = scheme
|
|
||||||
base.Host = host
|
|
||||||
return base, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
|
||||||
func (o *OauthAuthenticateURL) StringFull(scheme, host string) string {
|
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
|
||||||
}
|
|
@ -142,8 +142,8 @@ func NewZrokAPI(spec *loads.Document) *ZrokAPI {
|
|||||||
MetadataOverviewHandler: metadata.OverviewHandlerFunc(func(params metadata.OverviewParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
MetadataOverviewHandler: metadata.OverviewHandlerFunc(func(params metadata.OverviewParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||||
return middleware.NotImplemented("operation metadata.Overview has not yet been implemented")
|
return middleware.NotImplemented("operation metadata.Overview has not yet been implemented")
|
||||||
}),
|
}),
|
||||||
AccountRegenerateTokenHandler: account.RegenerateTokenHandlerFunc(func(params account.RegenerateTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
AccountRegenerateAccountTokenHandler: account.RegenerateAccountTokenHandlerFunc(func(params account.RegenerateAccountTokenParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||||
return middleware.NotImplemented("operation account.RegenerateToken has not yet been implemented")
|
return middleware.NotImplemented("operation account.RegenerateAccountToken has not yet been implemented")
|
||||||
}),
|
}),
|
||||||
AccountRegisterHandler: account.RegisterHandlerFunc(func(params account.RegisterParams) middleware.Responder {
|
AccountRegisterHandler: account.RegisterHandlerFunc(func(params account.RegisterParams) middleware.Responder {
|
||||||
return middleware.NotImplemented("operation account.Register has not yet been implemented")
|
return middleware.NotImplemented("operation account.Register has not yet been implemented")
|
||||||
@ -290,8 +290,8 @@ type ZrokAPI struct {
|
|||||||
MetadataOrgAccountOverviewHandler metadata.OrgAccountOverviewHandler
|
MetadataOrgAccountOverviewHandler metadata.OrgAccountOverviewHandler
|
||||||
// MetadataOverviewHandler sets the operation handler for the overview operation
|
// MetadataOverviewHandler sets the operation handler for the overview operation
|
||||||
MetadataOverviewHandler metadata.OverviewHandler
|
MetadataOverviewHandler metadata.OverviewHandler
|
||||||
// AccountRegenerateTokenHandler sets the operation handler for the regenerate token operation
|
// AccountRegenerateAccountTokenHandler sets the operation handler for the regenerate account token operation
|
||||||
AccountRegenerateTokenHandler account.RegenerateTokenHandler
|
AccountRegenerateAccountTokenHandler account.RegenerateAccountTokenHandler
|
||||||
// AccountRegisterHandler sets the operation handler for the register operation
|
// AccountRegisterHandler sets the operation handler for the register operation
|
||||||
AccountRegisterHandler account.RegisterHandler
|
AccountRegisterHandler account.RegisterHandler
|
||||||
// AdminRemoveOrganizationMemberHandler sets the operation handler for the remove organization member operation
|
// AdminRemoveOrganizationMemberHandler sets the operation handler for the remove organization member operation
|
||||||
@ -488,8 +488,8 @@ func (o *ZrokAPI) Validate() error {
|
|||||||
if o.MetadataOverviewHandler == nil {
|
if o.MetadataOverviewHandler == nil {
|
||||||
unregistered = append(unregistered, "metadata.OverviewHandler")
|
unregistered = append(unregistered, "metadata.OverviewHandler")
|
||||||
}
|
}
|
||||||
if o.AccountRegenerateTokenHandler == nil {
|
if o.AccountRegenerateAccountTokenHandler == nil {
|
||||||
unregistered = append(unregistered, "account.RegenerateTokenHandler")
|
unregistered = append(unregistered, "account.RegenerateAccountTokenHandler")
|
||||||
}
|
}
|
||||||
if o.AccountRegisterHandler == nil {
|
if o.AccountRegisterHandler == nil {
|
||||||
unregistered = append(unregistered, "account.RegisterHandler")
|
unregistered = append(unregistered, "account.RegisterHandler")
|
||||||
@ -750,7 +750,7 @@ func (o *ZrokAPI) initHandlerCache() {
|
|||||||
if o.handlers["POST"] == nil {
|
if o.handlers["POST"] == nil {
|
||||||
o.handlers["POST"] = make(map[string]http.Handler)
|
o.handlers["POST"] = make(map[string]http.Handler)
|
||||||
}
|
}
|
||||||
o.handlers["POST"]["/regenerateToken"] = account.NewRegenerateToken(o.context, o.AccountRegenerateTokenHandler)
|
o.handlers["POST"]["/regenerateAccountToken"] = account.NewRegenerateAccountToken(o.context, o.AccountRegenerateAccountTokenHandler)
|
||||||
if o.handlers["POST"] == nil {
|
if o.handlers["POST"] == nil {
|
||||||
o.handlers["POST"] = make(map[string]http.Handler)
|
o.handlers["POST"] = make(map[string]http.Handler)
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,9 @@ model/metricsSample.ts
|
|||||||
model/models.ts
|
model/models.ts
|
||||||
model/overview.ts
|
model/overview.ts
|
||||||
model/principal.ts
|
model/principal.ts
|
||||||
model/regenerateToken200Response.ts
|
model/regenerateAccountToken200Response.ts
|
||||||
model/regenerateTokenRequest.ts
|
model/regenerateAccountTokenRequest.ts
|
||||||
|
model/register200Response.ts
|
||||||
model/registerRequest.ts
|
model/registerRequest.ts
|
||||||
model/removeOrganizationMemberRequest.ts
|
model/removeOrganizationMemberRequest.ts
|
||||||
model/share.ts
|
model/share.ts
|
||||||
|
@ -18,8 +18,9 @@ import http from 'http';
|
|||||||
import { ChangePasswordRequest } from '../model/changePasswordRequest';
|
import { ChangePasswordRequest } from '../model/changePasswordRequest';
|
||||||
import { InviteRequest } from '../model/inviteRequest';
|
import { InviteRequest } from '../model/inviteRequest';
|
||||||
import { LoginRequest } from '../model/loginRequest';
|
import { LoginRequest } from '../model/loginRequest';
|
||||||
import { RegenerateToken200Response } from '../model/regenerateToken200Response';
|
import { RegenerateAccountToken200Response } from '../model/regenerateAccountToken200Response';
|
||||||
import { RegenerateTokenRequest } from '../model/regenerateTokenRequest';
|
import { RegenerateAccountTokenRequest } from '../model/regenerateAccountTokenRequest';
|
||||||
|
import { Register200Response } from '../model/register200Response';
|
||||||
import { RegisterRequest } from '../model/registerRequest';
|
import { RegisterRequest } from '../model/registerRequest';
|
||||||
import { Verify200Response } from '../model/verify200Response';
|
import { Verify200Response } from '../model/verify200Response';
|
||||||
|
|
||||||
@ -289,8 +290,8 @@ export class AccountApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async regenerateToken (body?: RegenerateTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
public async regenerateAccountToken (body?: RegenerateAccountTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateAccountToken200Response; }> {
|
||||||
const localVarPath = this.basePath + '/regenerateToken';
|
const localVarPath = this.basePath + '/regenerateAccountToken';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
const produces = ['application/zrok.v1+json'];
|
const produces = ['application/zrok.v1+json'];
|
||||||
@ -313,7 +314,7 @@ export class AccountApi {
|
|||||||
uri: localVarPath,
|
uri: localVarPath,
|
||||||
useQuerystring: this._useQuerystring,
|
useQuerystring: this._useQuerystring,
|
||||||
json: true,
|
json: true,
|
||||||
body: ObjectSerializer.serialize(body, "RegenerateTokenRequest")
|
body: ObjectSerializer.serialize(body, "RegenerateAccountTokenRequest")
|
||||||
};
|
};
|
||||||
|
|
||||||
let authenticationPromise = Promise.resolve();
|
let authenticationPromise = Promise.resolve();
|
||||||
@ -335,13 +336,13 @@ export class AccountApi {
|
|||||||
localVarRequestOptions.form = localVarFormParams;
|
localVarRequestOptions.form = localVarFormParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
return new Promise<{ response: http.IncomingMessage; body: RegenerateAccountToken200Response; }>((resolve, reject) => {
|
||||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
body = ObjectSerializer.deserialize(body, "RegenerateAccountToken200Response");
|
||||||
resolve({ response: response, body: body });
|
resolve({ response: response, body: body });
|
||||||
} else {
|
} else {
|
||||||
reject(new HttpError(response, body, response.statusCode));
|
reject(new HttpError(response, body, response.statusCode));
|
||||||
@ -355,7 +356,7 @@ export class AccountApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async register (body?: RegisterRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
public async register (body?: RegisterRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Register200Response; }> {
|
||||||
const localVarPath = this.basePath + '/register';
|
const localVarPath = this.basePath + '/register';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -398,13 +399,13 @@ export class AccountApi {
|
|||||||
localVarRequestOptions.form = localVarFormParams;
|
localVarRequestOptions.form = localVarFormParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
return new Promise<{ response: http.IncomingMessage; body: Register200Response; }>((resolve, reject) => {
|
||||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
body = ObjectSerializer.deserialize(body, "Register200Response");
|
||||||
resolve({ response: response, body: body });
|
resolve({ response: response, body: body });
|
||||||
} else {
|
} else {
|
||||||
reject(new HttpError(response, body, response.statusCode));
|
reject(new HttpError(response, body, response.statusCode));
|
||||||
@ -480,7 +481,7 @@ export class AccountApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async resetPasswordRequest (body?: RegenerateTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
public async resetPasswordRequest (body?: RegenerateAccountTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||||
const localVarPath = this.basePath + '/resetPasswordRequest';
|
const localVarPath = this.basePath + '/resetPasswordRequest';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -497,7 +498,7 @@ export class AccountApi {
|
|||||||
uri: localVarPath,
|
uri: localVarPath,
|
||||||
useQuerystring: this._useQuerystring,
|
useQuerystring: this._useQuerystring,
|
||||||
json: true,
|
json: true,
|
||||||
body: ObjectSerializer.serialize(body, "RegenerateTokenRequest")
|
body: ObjectSerializer.serialize(body, "RegenerateAccountTokenRequest")
|
||||||
};
|
};
|
||||||
|
|
||||||
let authenticationPromise = Promise.resolve();
|
let authenticationPromise = Promise.resolve();
|
||||||
@ -535,7 +536,7 @@ export class AccountApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async verify (body?: RegenerateToken200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Verify200Response; }> {
|
public async verify (body?: Register200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Verify200Response; }> {
|
||||||
const localVarPath = this.basePath + '/verify';
|
const localVarPath = this.basePath + '/verify';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -559,7 +560,7 @@ export class AccountApi {
|
|||||||
uri: localVarPath,
|
uri: localVarPath,
|
||||||
useQuerystring: this._useQuerystring,
|
useQuerystring: this._useQuerystring,
|
||||||
json: true,
|
json: true,
|
||||||
body: ObjectSerializer.serialize(body, "RegenerateToken200Response")
|
body: ObjectSerializer.serialize(body, "Register200Response")
|
||||||
};
|
};
|
||||||
|
|
||||||
let authenticationPromise = Promise.resolve();
|
let authenticationPromise = Promise.resolve();
|
||||||
|
@ -26,7 +26,7 @@ import { ListFrontends200ResponseInner } from '../model/listFrontends200Response
|
|||||||
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
|
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
|
||||||
import { ListOrganizations200Response } from '../model/listOrganizations200Response';
|
import { ListOrganizations200Response } from '../model/listOrganizations200Response';
|
||||||
import { LoginRequest } from '../model/loginRequest';
|
import { LoginRequest } from '../model/loginRequest';
|
||||||
import { RegenerateToken200Response } from '../model/regenerateToken200Response';
|
import { Register200Response } from '../model/register200Response';
|
||||||
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
|
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
|
||||||
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
|
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
|
||||||
import { Verify200Response } from '../model/verify200Response';
|
import { Verify200Response } from '../model/verify200Response';
|
||||||
@ -165,7 +165,7 @@ export class AdminApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async createAccount (body?: LoginRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
public async createAccount (body?: LoginRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Register200Response; }> {
|
||||||
const localVarPath = this.basePath + '/account';
|
const localVarPath = this.basePath + '/account';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -211,13 +211,13 @@ export class AdminApi {
|
|||||||
localVarRequestOptions.form = localVarFormParams;
|
localVarRequestOptions.form = localVarFormParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
return new Promise<{ response: http.IncomingMessage; body: Register200Response; }>((resolve, reject) => {
|
||||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
body = ObjectSerializer.deserialize(body, "Register200Response");
|
||||||
resolve({ response: response, body: body });
|
resolve({ response: response, body: body });
|
||||||
} else {
|
} else {
|
||||||
reject(new HttpError(response, body, response.statusCode));
|
reject(new HttpError(response, body, response.statusCode));
|
||||||
@ -231,7 +231,7 @@ export class AdminApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async createFrontend (body?: CreateFrontendRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
public async createFrontend (body?: CreateFrontendRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Register200Response; }> {
|
||||||
const localVarPath = this.basePath + '/frontend';
|
const localVarPath = this.basePath + '/frontend';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -277,13 +277,13 @@ export class AdminApi {
|
|||||||
localVarRequestOptions.form = localVarFormParams;
|
localVarRequestOptions.form = localVarFormParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
return new Promise<{ response: http.IncomingMessage; body: Register200Response; }>((resolve, reject) => {
|
||||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
body = ObjectSerializer.deserialize(body, "Register200Response");
|
||||||
resolve({ response: response, body: body });
|
resolve({ response: response, body: body });
|
||||||
} else {
|
} else {
|
||||||
reject(new HttpError(response, body, response.statusCode));
|
reject(new HttpError(response, body, response.statusCode));
|
||||||
@ -363,7 +363,7 @@ export class AdminApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async createOrganization (body?: CreateOrganizationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
public async createOrganization (body?: CreateOrganizationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Register200Response; }> {
|
||||||
const localVarPath = this.basePath + '/organization';
|
const localVarPath = this.basePath + '/organization';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -409,13 +409,13 @@ export class AdminApi {
|
|||||||
localVarRequestOptions.form = localVarFormParams;
|
localVarRequestOptions.form = localVarFormParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
return new Promise<{ response: http.IncomingMessage; body: Register200Response; }>((resolve, reject) => {
|
||||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
body = ObjectSerializer.deserialize(body, "Register200Response");
|
||||||
resolve({ response: response, body: body });
|
resolve({ response: response, body: body });
|
||||||
} else {
|
} else {
|
||||||
reject(new HttpError(response, body, response.statusCode));
|
reject(new HttpError(response, body, response.statusCode));
|
||||||
@ -487,7 +487,7 @@ export class AdminApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async deleteOrganization (body?: RegenerateToken200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
public async deleteOrganization (body?: Register200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||||
const localVarPath = this.basePath + '/organization';
|
const localVarPath = this.basePath + '/organization';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -504,7 +504,7 @@ export class AdminApi {
|
|||||||
uri: localVarPath,
|
uri: localVarPath,
|
||||||
useQuerystring: this._useQuerystring,
|
useQuerystring: this._useQuerystring,
|
||||||
json: true,
|
json: true,
|
||||||
body: ObjectSerializer.serialize(body, "RegenerateToken200Response")
|
body: ObjectSerializer.serialize(body, "Register200Response")
|
||||||
};
|
};
|
||||||
|
|
||||||
let authenticationPromise = Promise.resolve();
|
let authenticationPromise = Promise.resolve();
|
||||||
@ -725,7 +725,7 @@ export class AdminApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async listOrganizationMembers (body?: RegenerateToken200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListOrganizationMembers200Response; }> {
|
public async listOrganizationMembers (body?: Register200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListOrganizationMembers200Response; }> {
|
||||||
const localVarPath = this.basePath + '/organization/list';
|
const localVarPath = this.basePath + '/organization/list';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -749,7 +749,7 @@ export class AdminApi {
|
|||||||
uri: localVarPath,
|
uri: localVarPath,
|
||||||
useQuerystring: this._useQuerystring,
|
useQuerystring: this._useQuerystring,
|
||||||
json: true,
|
json: true,
|
||||||
body: ObjectSerializer.serialize(body, "RegenerateToken200Response")
|
body: ObjectSerializer.serialize(body, "Register200Response")
|
||||||
};
|
};
|
||||||
|
|
||||||
let authenticationPromise = Promise.resolve();
|
let authenticationPromise = Promise.resolve();
|
||||||
|
@ -32,8 +32,9 @@ export * from './metrics';
|
|||||||
export * from './metricsSample';
|
export * from './metricsSample';
|
||||||
export * from './overview';
|
export * from './overview';
|
||||||
export * from './principal';
|
export * from './principal';
|
||||||
export * from './regenerateToken200Response';
|
export * from './regenerateAccountToken200Response';
|
||||||
export * from './regenerateTokenRequest';
|
export * from './regenerateAccountTokenRequest';
|
||||||
|
export * from './register200Response';
|
||||||
export * from './registerRequest';
|
export * from './registerRequest';
|
||||||
export * from './removeOrganizationMemberRequest';
|
export * from './removeOrganizationMemberRequest';
|
||||||
export * from './share';
|
export * from './share';
|
||||||
@ -91,8 +92,9 @@ import { Metrics } from './metrics';
|
|||||||
import { MetricsSample } from './metricsSample';
|
import { MetricsSample } from './metricsSample';
|
||||||
import { Overview } from './overview';
|
import { Overview } from './overview';
|
||||||
import { Principal } from './principal';
|
import { Principal } from './principal';
|
||||||
import { RegenerateToken200Response } from './regenerateToken200Response';
|
import { RegenerateAccountToken200Response } from './regenerateAccountToken200Response';
|
||||||
import { RegenerateTokenRequest } from './regenerateTokenRequest';
|
import { RegenerateAccountTokenRequest } from './regenerateAccountTokenRequest';
|
||||||
|
import { Register200Response } from './register200Response';
|
||||||
import { RegisterRequest } from './registerRequest';
|
import { RegisterRequest } from './registerRequest';
|
||||||
import { RemoveOrganizationMemberRequest } from './removeOrganizationMemberRequest';
|
import { RemoveOrganizationMemberRequest } from './removeOrganizationMemberRequest';
|
||||||
import { Share } from './share';
|
import { Share } from './share';
|
||||||
@ -158,8 +160,9 @@ let typeMap: {[index: string]: any} = {
|
|||||||
"MetricsSample": MetricsSample,
|
"MetricsSample": MetricsSample,
|
||||||
"Overview": Overview,
|
"Overview": Overview,
|
||||||
"Principal": Principal,
|
"Principal": Principal,
|
||||||
"RegenerateToken200Response": RegenerateToken200Response,
|
"RegenerateAccountToken200Response": RegenerateAccountToken200Response,
|
||||||
"RegenerateTokenRequest": RegenerateTokenRequest,
|
"RegenerateAccountTokenRequest": RegenerateAccountTokenRequest,
|
||||||
|
"Register200Response": Register200Response,
|
||||||
"RegisterRequest": RegisterRequest,
|
"RegisterRequest": RegisterRequest,
|
||||||
"RemoveOrganizationMemberRequest": RemoveOrganizationMemberRequest,
|
"RemoveOrganizationMemberRequest": RemoveOrganizationMemberRequest,
|
||||||
"Share": Share,
|
"Share": Share,
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* zrok
|
||||||
|
* zrok client access
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { RequestFile } from './models';
|
||||||
|
|
||||||
|
export class RegenerateAccountToken200Response {
|
||||||
|
'accountToken'?: string;
|
||||||
|
|
||||||
|
static discriminator: string | undefined = undefined;
|
||||||
|
|
||||||
|
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||||
|
{
|
||||||
|
"name": "accountToken",
|
||||||
|
"baseName": "accountToken",
|
||||||
|
"type": "string"
|
||||||
|
} ];
|
||||||
|
|
||||||
|
static getAttributeTypeMap() {
|
||||||
|
return RegenerateAccountToken200Response.attributeTypeMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* zrok
|
||||||
|
* zrok client access
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { RequestFile } from './models';
|
||||||
|
|
||||||
|
export class RegenerateAccountTokenRequest {
|
||||||
|
'emailAddress'?: string;
|
||||||
|
|
||||||
|
static discriminator: string | undefined = undefined;
|
||||||
|
|
||||||
|
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||||
|
{
|
||||||
|
"name": "emailAddress",
|
||||||
|
"baseName": "emailAddress",
|
||||||
|
"type": "string"
|
||||||
|
} ];
|
||||||
|
|
||||||
|
static getAttributeTypeMap() {
|
||||||
|
return RegenerateAccountTokenRequest.attributeTypeMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
31
sdk/nodejs/sdk/src/zrok/api/model/register200Response.ts
Normal file
31
sdk/nodejs/sdk/src/zrok/api/model/register200Response.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* zrok
|
||||||
|
* zrok client access
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { RequestFile } from './models';
|
||||||
|
|
||||||
|
export class Register200Response {
|
||||||
|
'token'?: string;
|
||||||
|
|
||||||
|
static discriminator: string | undefined = undefined;
|
||||||
|
|
||||||
|
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||||
|
{
|
||||||
|
"name": "token",
|
||||||
|
"baseName": "token",
|
||||||
|
"type": "string"
|
||||||
|
} ];
|
||||||
|
|
||||||
|
static getAttributeTypeMap() {
|
||||||
|
return Register200Response.attributeTypeMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -93,13 +93,13 @@ configuration.api_key['x-token'] = 'YOUR_API_KEY'
|
|||||||
|
|
||||||
# create an instance of the API class
|
# create an instance of the API class
|
||||||
api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
|
api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
|
||||||
body = zrok_api.RegenerateTokenBody() # RegenerateTokenBody | (optional)
|
body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
api_response = api_instance.regenerate_token(body=body)
|
api_response = api_instance.regenerate_account_token(body=body)
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
print("Exception when calling AccountApi->regenerate_token: %s\n" % e)
|
print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e)
|
||||||
|
|
||||||
# create an instance of the API class
|
# create an instance of the API class
|
||||||
api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
|
api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
|
||||||
@ -149,7 +149,7 @@ Class | Method | HTTP request | Description
|
|||||||
*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword |
|
*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword |
|
||||||
*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite |
|
*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite |
|
||||||
*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login |
|
*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login |
|
||||||
*AccountApi* | [**regenerate_token**](docs/AccountApi.md#regenerate_token) | **POST** /regenerateToken |
|
*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken |
|
||||||
*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register |
|
*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register |
|
||||||
*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword |
|
*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword |
|
||||||
*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest |
|
*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest |
|
||||||
@ -214,12 +214,13 @@ Class | Method | HTTP request | Description
|
|||||||
- [InlineResponse2001](docs/InlineResponse2001.md)
|
- [InlineResponse2001](docs/InlineResponse2001.md)
|
||||||
- [InlineResponse2002](docs/InlineResponse2002.md)
|
- [InlineResponse2002](docs/InlineResponse2002.md)
|
||||||
- [InlineResponse2003](docs/InlineResponse2003.md)
|
- [InlineResponse2003](docs/InlineResponse2003.md)
|
||||||
- [InlineResponse2003Members](docs/InlineResponse2003Members.md)
|
|
||||||
- [InlineResponse2004](docs/InlineResponse2004.md)
|
- [InlineResponse2004](docs/InlineResponse2004.md)
|
||||||
- [InlineResponse2004Organizations](docs/InlineResponse2004Organizations.md)
|
- [InlineResponse2004Members](docs/InlineResponse2004Members.md)
|
||||||
- [InlineResponse2005](docs/InlineResponse2005.md)
|
- [InlineResponse2005](docs/InlineResponse2005.md)
|
||||||
- [InlineResponse2005Memberships](docs/InlineResponse2005Memberships.md)
|
- [InlineResponse2005Organizations](docs/InlineResponse2005Organizations.md)
|
||||||
- [InlineResponse2006](docs/InlineResponse2006.md)
|
- [InlineResponse2006](docs/InlineResponse2006.md)
|
||||||
|
- [InlineResponse2006Memberships](docs/InlineResponse2006Memberships.md)
|
||||||
|
- [InlineResponse2007](docs/InlineResponse2007.md)
|
||||||
- [InlineResponse201](docs/InlineResponse201.md)
|
- [InlineResponse201](docs/InlineResponse201.md)
|
||||||
- [InlineResponse2011](docs/InlineResponse2011.md)
|
- [InlineResponse2011](docs/InlineResponse2011.md)
|
||||||
- [InviteBody](docs/InviteBody.md)
|
- [InviteBody](docs/InviteBody.md)
|
||||||
@ -233,7 +234,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [OrganizationRemoveBody](docs/OrganizationRemoveBody.md)
|
- [OrganizationRemoveBody](docs/OrganizationRemoveBody.md)
|
||||||
- [Overview](docs/Overview.md)
|
- [Overview](docs/Overview.md)
|
||||||
- [Principal](docs/Principal.md)
|
- [Principal](docs/Principal.md)
|
||||||
- [RegenerateTokenBody](docs/RegenerateTokenBody.md)
|
- [RegenerateAccountTokenBody](docs/RegenerateAccountTokenBody.md)
|
||||||
- [RegisterBody](docs/RegisterBody.md)
|
- [RegisterBody](docs/RegisterBody.md)
|
||||||
- [ResetPasswordBody](docs/ResetPasswordBody.md)
|
- [ResetPasswordBody](docs/ResetPasswordBody.md)
|
||||||
- [ResetPasswordRequestBody](docs/ResetPasswordRequestBody.md)
|
- [ResetPasswordRequestBody](docs/ResetPasswordRequestBody.md)
|
||||||
|
@ -7,7 +7,7 @@ Method | HTTP request | Description
|
|||||||
[**change_password**](AccountApi.md#change_password) | **POST** /changePassword |
|
[**change_password**](AccountApi.md#change_password) | **POST** /changePassword |
|
||||||
[**invite**](AccountApi.md#invite) | **POST** /invite |
|
[**invite**](AccountApi.md#invite) | **POST** /invite |
|
||||||
[**login**](AccountApi.md#login) | **POST** /login |
|
[**login**](AccountApi.md#login) | **POST** /login |
|
||||||
[**regenerate_token**](AccountApi.md#regenerate_token) | **POST** /regenerateToken |
|
[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken |
|
||||||
[**register**](AccountApi.md#register) | **POST** /register |
|
[**register**](AccountApi.md#register) | **POST** /register |
|
||||||
[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword |
|
[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword |
|
||||||
[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest |
|
[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest |
|
||||||
@ -152,8 +152,8 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **regenerate_token**
|
# **regenerate_account_token**
|
||||||
> InlineResponse200 regenerate_token(body=body)
|
> InlineResponse200 regenerate_account_token(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -173,20 +173,20 @@ configuration.api_key['x-token'] = 'YOUR_API_KEY'
|
|||||||
|
|
||||||
# create an instance of the API class
|
# create an instance of the API class
|
||||||
api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
|
api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
|
||||||
body = zrok_api.RegenerateTokenBody() # RegenerateTokenBody | (optional)
|
body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
api_response = api_instance.regenerate_token(body=body)
|
api_response = api_instance.regenerate_account_token(body=body)
|
||||||
pprint(api_response)
|
pprint(api_response)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
print("Exception when calling AccountApi->regenerate_token: %s\n" % e)
|
print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**RegenerateTokenBody**](RegenerateTokenBody.md)| | [optional]
|
**body** | [**RegenerateAccountTokenBody**](RegenerateAccountTokenBody.md)| | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ Name | Type | Description | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **register**
|
# **register**
|
||||||
> InlineResponse200 register(body=body)
|
> InlineResponse2001 register(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse200**](InlineResponse200.md)
|
[**InlineResponse2001**](InlineResponse2001.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ No authorization required
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **verify**
|
# **verify**
|
||||||
> InlineResponse2001 verify(body=body)
|
> InlineResponse2002 verify(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse2001**](InlineResponse2001.md)
|
[**InlineResponse2002**](InlineResponse2002.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ void (empty response body)
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **list_frontends**
|
# **list_frontends**
|
||||||
> list[InlineResponse2002] list_frontends()
|
> list[InlineResponse2003] list_frontends()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -507,7 +507,7 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**list[InlineResponse2002]**](InlineResponse2002.md)
|
[**list[InlineResponse2003]**](InlineResponse2003.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -521,7 +521,7 @@ This endpoint does not need any parameter.
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **list_organization_members**
|
# **list_organization_members**
|
||||||
> InlineResponse2003 list_organization_members(body=body)
|
> InlineResponse2004 list_organization_members(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse2003**](InlineResponse2003.md)
|
[**InlineResponse2004**](InlineResponse2004.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ Name | Type | Description | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **list_organizations**
|
# **list_organizations**
|
||||||
> InlineResponse2004 list_organizations()
|
> InlineResponse2005 list_organizations()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse2004**](InlineResponse2004.md)
|
[**InlineResponse2005**](InlineResponse2005.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**token** | **str** | | [optional]
|
**account_token** | **str** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**email** | **str** | | [optional]
|
**token** | **str** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -3,12 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**token** | **str** | | [optional]
|
**email** | **str** | | [optional]
|
||||||
**z_id** | **str** | | [optional]
|
|
||||||
**url_template** | **str** | | [optional]
|
|
||||||
**public_name** | **str** | | [optional]
|
|
||||||
**created_at** | **int** | | [optional]
|
|
||||||
**updated_at** | **int** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**members** | [**list[InlineResponse2003Members]**](InlineResponse2003Members.md) | | [optional]
|
**token** | **str** | | [optional]
|
||||||
|
**z_id** | **str** | | [optional]
|
||||||
|
**url_template** | **str** | | [optional]
|
||||||
|
**public_name** | **str** | | [optional]
|
||||||
|
**created_at** | **int** | | [optional]
|
||||||
|
**updated_at** | **int** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**organizations** | [**list[InlineResponse2004Organizations]**](InlineResponse2004Organizations.md) | | [optional]
|
**members** | [**list[InlineResponse2004Members]**](InlineResponse2004Members.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
10
sdk/python/sdk/zrok/docs/InlineResponse2004Members.md
Normal file
10
sdk/python/sdk/zrok/docs/InlineResponse2004Members.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# InlineResponse2004Members
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**email** | **str** | | [optional]
|
||||||
|
**admin** | **bool** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**memberships** | [**list[InlineResponse2005Memberships]**](InlineResponse2005Memberships.md) | | [optional]
|
**organizations** | [**list[InlineResponse2005Organizations]**](InlineResponse2005Organizations.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
10
sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md
Normal file
10
sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# InlineResponse2005Organizations
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**token** | **str** | | [optional]
|
||||||
|
**description** | **str** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**sparklines** | [**list[Metrics]**](Metrics.md) | | [optional]
|
**memberships** | [**list[InlineResponse2006Memberships]**](InlineResponse2006Memberships.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
11
sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md
Normal file
11
sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# InlineResponse2006Memberships
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**token** | **str** | | [optional]
|
||||||
|
**description** | **str** | | [optional]
|
||||||
|
**admin** | **bool** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
9
sdk/python/sdk/zrok/docs/InlineResponse2007.md
Normal file
9
sdk/python/sdk/zrok/docs/InlineResponse2007.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# InlineResponse2007
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**sparklines** | [**list[Metrics]**](Metrics.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -418,7 +418,7 @@ Name | Type | Description | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **get_sparklines**
|
# **get_sparklines**
|
||||||
> InlineResponse2006 get_sparklines(body=body)
|
> InlineResponse2007 get_sparklines(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse2006**](InlineResponse2006.md)
|
[**InlineResponse2007**](InlineResponse2007.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ Name | Type | Description | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **list_memberships**
|
# **list_memberships**
|
||||||
> InlineResponse2005 list_memberships()
|
> InlineResponse2006 list_memberships()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse2005**](InlineResponse2005.md)
|
[**InlineResponse2006**](InlineResponse2006.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ This endpoint does not need any parameter.
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **list_org_members**
|
# **list_org_members**
|
||||||
> InlineResponse2003 list_org_members(organization_token)
|
> InlineResponse2004 list_org_members(organization_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -553,7 +553,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**InlineResponse2003**](InlineResponse2003.md)
|
[**InlineResponse2004**](InlineResponse2004.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
|
9
sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md
Normal file
9
sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# RegenerateAccountTokenBody
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**email_address** | **str** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
39
sdk/python/sdk/zrok/test/test_inline_response2004_members.py
Normal file
39
sdk/python/sdk/zrok/test/test_inline_response2004_members.py
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
zrok
|
||||||
|
|
||||||
|
zrok client access # noqa: E501
|
||||||
|
|
||||||
|
OpenAPI spec version: 1.0.0
|
||||||
|
|
||||||
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import zrok_api
|
||||||
|
from zrok_api.models.inline_response2004_members import InlineResponse2004Members # noqa: E501
|
||||||
|
from zrok_api.rest import ApiException
|
||||||
|
|
||||||
|
|
||||||
|
class TestInlineResponse2004Members(unittest.TestCase):
|
||||||
|
"""InlineResponse2004Members unit test stubs"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def testInlineResponse2004Members(self):
|
||||||
|
"""Test InlineResponse2004Members"""
|
||||||
|
# FIXME: construct object with mandatory attributes with example values
|
||||||
|
# model = zrok_api.models.inline_response2004_members.InlineResponse2004Members() # noqa: E501
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user