mirror of https://github.com/vernonkeenan/lib
parent
01cf1c8725
commit
65e4a4c9c4
81
Makefile
81
Makefile
|
@ -1,9 +1,9 @@
|
||||||
TELNEXUS_BUILD_ENV ?= dev
|
VERNONKEENAN_BUILD_ENV ?= dev
|
||||||
TELNEXUS_GELF_URI ?= udp://packrat.noc.tnxs.net:12201
|
VERNONKEENAN_GELF_URI ?= udp://packrat.noc.tnxs.net:12201
|
||||||
TELNEXUS_REGISTRY_PRIV ?= hub.tnxs.net
|
VERNONKEENAN_REGISTRY_PRIV ?= hub.tnxs.net
|
||||||
TELNEXUS_REGISTRY_PUB ?= docker.io
|
VERNONKEENAN_REGISTRY_PUB ?= docker.io
|
||||||
TELNEXUS_REPO_NAME = lib
|
VERNONKEENAN_REPO_NAME = lib
|
||||||
TELNEXUS_VERSION ?= 0.0.1
|
VERNONKEENAN_VERSION ?= 0.0.1
|
||||||
|
|
||||||
.PHONY: swagger
|
.PHONY: swagger
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@ swagger:
|
||||||
#
|
#
|
||||||
# generate auth0 client
|
# generate auth0 client
|
||||||
#
|
#
|
||||||
mkdir -p lib/auth0
|
mkdir -p api/auth0
|
||||||
swagger generate client \
|
swagger generate client \
|
||||||
--log-output=./swagger/logs/generate-auth0-client.log \
|
--log-output=./swagger/logs/generate-auth0-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=auth0 \
|
--name=auth0 \
|
||||||
--spec=./swagger/auth0.yaml \
|
--spec=./swagger/auth0.yaml \
|
||||||
--target=./lib/auth0 \
|
--target=./api/auth0 \
|
||||||
--client-package=auth0-client \
|
--client-package=auth0-client \
|
||||||
--model-package=auth0-models
|
--model-package=auth0-models
|
||||||
#
|
#
|
||||||
|
@ -29,25 +29,12 @@ swagger:
|
||||||
--log-output=./swagger/logs/generate-auth-client.log \
|
--log-output=./swagger/logs/generate-auth-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=auth \
|
--name=auth \
|
||||||
--spec=./swagger/auth-telnexus.yaml \
|
--spec=./swagger/auth-kvision.yaml \
|
||||||
--target=./api/auth \
|
--target=./api/auth \
|
||||||
--client-package=auth-client \
|
--client-package=auth-client \
|
||||||
--model-package=auth-models \
|
--model-package=auth-models \
|
||||||
--principal=app.User
|
--principal=app.User
|
||||||
#
|
#
|
||||||
# generate cloud client
|
|
||||||
#
|
|
||||||
mkdir api/cloud
|
|
||||||
swagger-new generate client \
|
|
||||||
--log-output=./swagger/logs/generate-cloud-client.log \
|
|
||||||
--copyright-file=./build/COPYRIGHT \
|
|
||||||
--name=cloud \
|
|
||||||
--spec=./swagger/cloud-telnexus.yaml \
|
|
||||||
--target=./api/cloud \
|
|
||||||
--client-package=cloud-client \
|
|
||||||
--model-package=cloud-models \
|
|
||||||
--principal=app.User
|
|
||||||
#
|
|
||||||
# generate crm client
|
# generate crm client
|
||||||
#
|
#
|
||||||
mkdir api/crm
|
mkdir api/crm
|
||||||
|
@ -55,7 +42,7 @@ swagger:
|
||||||
--log-output=./swagger/logs/generate-crm-client.log \
|
--log-output=./swagger/logs/generate-crm-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=crm \
|
--name=crm \
|
||||||
--spec=./swagger/crm-telnexus.yaml \
|
--spec=./swagger/crm-kvision.yaml \
|
||||||
--target=./api/crm \
|
--target=./api/crm \
|
||||||
--client-package=crm-client \
|
--client-package=crm-client \
|
||||||
--model-package=crm-models \
|
--model-package=crm-models \
|
||||||
|
@ -68,38 +55,12 @@ swagger:
|
||||||
--log-output=./swagger/logs/generate-devops-client.log \
|
--log-output=./swagger/logs/generate-devops-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=devops \
|
--name=devops \
|
||||||
--spec=./swagger/devops-telnexus.yaml \
|
--spec=./swagger/devops-kvision.yaml \
|
||||||
--target=./api/devops \
|
--target=./api/devops \
|
||||||
--client-package=devops-client \
|
--client-package=devops-client \
|
||||||
--model-package=devops-models \
|
--model-package=devops-models \
|
||||||
--principal=app.User
|
--principal=app.User
|
||||||
#
|
#
|
||||||
# generate isp client
|
|
||||||
#
|
|
||||||
mkdir api/isp
|
|
||||||
swagger-new generate client \
|
|
||||||
--log-output=./swagger/logs/generate-isp-client.log \
|
|
||||||
--copyright-file=./build/COPYRIGHT \
|
|
||||||
--name=isp \
|
|
||||||
--spec=./swagger/isp-telnexus.yaml \
|
|
||||||
--target=./api/isp \
|
|
||||||
--client-package=isp-client \
|
|
||||||
--model-package=isp-models \
|
|
||||||
--principal=app.User
|
|
||||||
#
|
|
||||||
# generate kazoo client
|
|
||||||
#
|
|
||||||
mkdir api/kazoo
|
|
||||||
swagger-new generate client \
|
|
||||||
--log-output=./swagger/logs/generate-kazoo-client.log \
|
|
||||||
--copyright-file=./build/COPYRIGHT \
|
|
||||||
--name=kazoo \
|
|
||||||
--spec=./swagger/kazoo-telnexus.yaml \
|
|
||||||
--target=./api/kazoo \
|
|
||||||
--client-package=kazoo-client \
|
|
||||||
--model-package=kazoo-models \
|
|
||||||
--principal=app.User
|
|
||||||
#
|
|
||||||
# generate stash client
|
# generate stash client
|
||||||
#
|
#
|
||||||
mkdir api/stash
|
mkdir api/stash
|
||||||
|
@ -107,23 +68,23 @@ swagger:
|
||||||
--log-output=./swagger/logs/generate-stash-client.log \
|
--log-output=./swagger/logs/generate-stash-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=stash \
|
--name=stash \
|
||||||
--spec=./swagger/stash-telnexus.yaml \
|
--spec=./swagger/stash-kvision.yaml \
|
||||||
--target=./api/stash \
|
--target=./api/stash \
|
||||||
--client-package=stash-client \
|
--client-package=stash-client \
|
||||||
--model-package=stash-models \
|
--model-package=stash-models \
|
||||||
--principal=app.User
|
--principal=app.User
|
||||||
#
|
#
|
||||||
# generate voip client
|
# generate sfgate client
|
||||||
#
|
#
|
||||||
mkdir api/voip
|
mkdir api/sfgate
|
||||||
swagger-new generate client \
|
swagger-new generate client \
|
||||||
--log-output=./swagger/logs/generate-voip-client.log \
|
--log-output=./swagger/logs/generate-sfgate-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=voip \
|
--name=sfgate \
|
||||||
--spec=./swagger/voip-telnexus.yaml \
|
--spec=./swagger/sf-gate-kvision.yaml \
|
||||||
--target=./api/voip \
|
--target=./api/sfgate \
|
||||||
--client-package=voip-client \
|
--client-package=sfgate-client \
|
||||||
--model-package=voip-models \
|
--model-package=sfgate-models \
|
||||||
--principal=app.User
|
--principal=app.User
|
||||||
#
|
#
|
||||||
# generate workflow client
|
# generate workflow client
|
||||||
|
@ -133,7 +94,7 @@ swagger:
|
||||||
--log-output=./swagger/logs/generate-workflow-client.log \
|
--log-output=./swagger/logs/generate-workflow-client.log \
|
||||||
--copyright-file=./build/COPYRIGHT \
|
--copyright-file=./build/COPYRIGHT \
|
||||||
--name=workflow \
|
--name=workflow \
|
||||||
--spec=./swagger/workflow-telnexus.yaml \
|
--spec=./swagger/workflow-kvision.yaml \
|
||||||
--target=./api/workflow \
|
--target=./api/workflow \
|
||||||
--client-package=workflow-client \
|
--client-package=workflow-client \
|
||||||
--model-package=workflow-models \
|
--model-package=workflow-models \
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# lib
|
# lib
|
||||||
|
|
||||||
Telnexus Shared Libraries (go)
|
VernonKeenan/KVision Shared Libraries (go)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ var Default = NewHTTPClient(nil)
|
||||||
const (
|
const (
|
||||||
// DefaultHost is the default Host
|
// DefaultHost is the default Host
|
||||||
// found in Meta (info) section of spec file
|
// found in Meta (info) section of spec file
|
||||||
DefaultHost string = "auth.infra.tnxs.net:8080"
|
DefaultHost string = "auth.vernonkeenan.com:8080"
|
||||||
// DefaultBasePath is the default BasePath
|
// DefaultBasePath is the default BasePath
|
||||||
// found in Meta (info) section of spec file
|
// found in Meta (info) section of spec file
|
||||||
DefaultBasePath string = "/v1"
|
DefaultBasePath string = "/v1"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetUsersOK() *GetUsersOK {
|
||||||
|
|
||||||
/* GetUsersOK describes a response with status code 200, with default header values.
|
/* GetUsersOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with User objects
|
Taxnexus Response with User objects
|
||||||
*/
|
*/
|
||||||
type GetUsersOK struct {
|
type GetUsersOK struct {
|
||||||
Payload *auth_models.UserResponse
|
Payload *auth_models.UserResponse
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ type ResponseMeta struct {
|
||||||
// Backend Server Timestamp
|
// Backend Server Timestamp
|
||||||
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
||||||
|
|
||||||
// Telnexus Account Number used for recording transactions
|
// Taxnexus Account Number used for recording transactions
|
||||||
TelnexusAccount string `json:"TelnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this response meta
|
// Validate validates this response meta
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ type TenantUser struct {
|
||||||
// Contact ID
|
// Contact ID
|
||||||
ContactID string `json:"ContactID,omitempty"`
|
ContactID string `json:"ContactID,omitempty"`
|
||||||
|
|
||||||
// Telnexus Account
|
// Taxnexus Account
|
||||||
TelnexusAccount string `json:"TelnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
|
|
||||||
// Tenant active?
|
// Tenant active?
|
||||||
TenantActive bool `json:"TenantActive,omitempty"`
|
TenantActive bool `json:"TenantActive,omitempty"`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ type User struct {
|
||||||
// Full Photo URL
|
// Full Photo URL
|
||||||
FullPhotoURL string `json:"FullPhotoURL,omitempty"`
|
FullPhotoURL string `json:"FullPhotoURL,omitempty"`
|
||||||
|
|
||||||
// Telnexus ID
|
// Taxnexus ID
|
||||||
ID string `json:"ID,omitempty"`
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
// Active
|
// Active
|
||||||
|
@ -170,8 +170,8 @@ type User struct {
|
||||||
// The time day starts
|
// The time day starts
|
||||||
StartOfDay string `json:"StartOfDay,omitempty"`
|
StartOfDay string `json:"StartOfDay,omitempty"`
|
||||||
|
|
||||||
// Telnexus Account
|
// Taxnexus Account
|
||||||
TelnexusAccount string `json:"TelnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
|
|
||||||
// Tenant ID associated with this user
|
// Tenant ID associated with this user
|
||||||
TenantID string `json:"TenantID,omitempty"`
|
TenantID string `json:"TenantID,omitempty"`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import (
|
||||||
"github.com/go-openapi/swag"
|
"github.com/go-openapi/swag"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UserResponse An array Telnexus user objects
|
// UserResponse An array Taxnexus user objects
|
||||||
//
|
//
|
||||||
// swagger:model UserResponse
|
// swagger:model UserResponse
|
||||||
type UserResponse struct {
|
type UserResponse struct {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ type UserRole struct {
|
||||||
// Role Name
|
// Role Name
|
||||||
RoleName string `json:"RoleName,omitempty"`
|
RoleName string `json:"RoleName,omitempty"`
|
||||||
|
|
||||||
// Telnexus Account Number
|
// Taxnexus Account Number
|
||||||
TelnexusAccount string `json:"TelnexusAccount,omitempty"`
|
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||||
|
|
||||||
// User Email Address
|
// User Email Address
|
||||||
UserEmail string `json:"UserEmail,omitempty"`
|
UserEmail string `json:"UserEmail,omitempty"`
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
package menu
|
package auth
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
// This file was generated by the swagger tool.
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
@ -16,65 +16,59 @@ import (
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// New creates a new menu API client.
|
// New creates a new auth API client.
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for menu API
|
Client for auth API
|
||||||
*/
|
*/
|
||||||
type Client struct {
|
type Client struct {
|
||||||
transport runtime.ClientTransport
|
transport runtime.ClientTransport
|
||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption is the option for Client methods
|
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
GetAccountMenus(params *GetAccountMenusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountMenusOK, error)
|
PostCredentials(params *PostCredentialsParams) (*PostCredentialsOK, error)
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
SetTransport(transport runtime.ClientTransport)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetAccountMenus get account menus API
|
PostCredentials posts to oauth token
|
||||||
|
|
||||||
|
Get credential token
|
||||||
*/
|
*/
|
||||||
func (a *Client) GetAccountMenus(params *GetAccountMenusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountMenusOK, error) {
|
func (a *Client) PostCredentials(params *PostCredentialsParams) (*PostCredentialsOK, error) {
|
||||||
// TODO: Validate the params before sending
|
// TODO: Validate the params before sending
|
||||||
if params == nil {
|
if params == nil {
|
||||||
params = NewGetAccountMenusParams()
|
params = NewPostCredentialsParams()
|
||||||
}
|
}
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getAccountMenus",
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
Method: "GET",
|
ID: "postCredentials",
|
||||||
PathPattern: "/accounts/{accountId}/menus",
|
Method: "POST",
|
||||||
|
PathPattern: "/oauth/token",
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
Schemes: []string{"https"},
|
Schemes: []string{"https"},
|
||||||
Params: params,
|
Params: params,
|
||||||
Reader: &GetAccountMenusReader{formats: a.formats},
|
Reader: &PostCredentialsReader{formats: a.formats},
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
Context: params.Context,
|
||||||
Client: params.HTTPClient,
|
Client: params.HTTPClient,
|
||||||
}
|
})
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
success, ok := result.(*GetAccountMenusOK)
|
success, ok := result.(*PostCredentialsOK)
|
||||||
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 getAccountMenus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
msg := fmt.Sprintf("unexpected success response for postCredentials: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,142 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostCredentialsParams creates a new PostCredentialsParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewPostCredentialsParams() *PostCredentialsParams {
|
||||||
|
var ()
|
||||||
|
return &PostCredentialsParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsParamsWithTimeout creates a new PostCredentialsParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewPostCredentialsParamsWithTimeout(timeout time.Duration) *PostCredentialsParams {
|
||||||
|
var ()
|
||||||
|
return &PostCredentialsParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsParamsWithContext creates a new PostCredentialsParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewPostCredentialsParamsWithContext(ctx context.Context) *PostCredentialsParams {
|
||||||
|
var ()
|
||||||
|
return &PostCredentialsParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsParamsWithHTTPClient creates a new PostCredentialsParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewPostCredentialsParamsWithHTTPClient(client *http.Client) *PostCredentialsParams {
|
||||||
|
var ()
|
||||||
|
return &PostCredentialsParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsParams contains all the parameters to send to the API endpoint
|
||||||
|
for the post credentials operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type PostCredentialsParams struct {
|
||||||
|
|
||||||
|
/*CredentialsRequest
|
||||||
|
Get Authentation Token
|
||||||
|
|
||||||
|
*/
|
||||||
|
CredentialsRequest *auth0_models.CredentialsRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) WithTimeout(timeout time.Duration) *PostCredentialsParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) WithContext(ctx context.Context) *PostCredentialsParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) WithHTTPClient(client *http.Client) *PostCredentialsParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCredentialsRequest adds the credentialsRequest to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) WithCredentialsRequest(credentialsRequest *auth0_models.CredentialsRequest) *PostCredentialsParams {
|
||||||
|
o.SetCredentialsRequest(credentialsRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCredentialsRequest adds the credentialsRequest to the post credentials params
|
||||||
|
func (o *PostCredentialsParams) SetCredentialsRequest(credentialsRequest *auth0_models.CredentialsRequest) {
|
||||||
|
o.CredentialsRequest = credentialsRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostCredentialsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.CredentialsRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.CredentialsRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,268 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostCredentialsReader is a Reader for the PostCredentials structure.
|
||||||
|
type PostCredentialsReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPostCredentialsOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostCredentialsUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostCredentialsForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostCredentialsNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPostCredentialsUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostCredentialsInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsOK creates a PostCredentialsOK with default headers values
|
||||||
|
func NewPostCredentialsOK() *PostCredentialsOK {
|
||||||
|
return &PostCredentialsOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsOK handles this case with default header values.
|
||||||
|
|
||||||
|
Credentials response from Auth0
|
||||||
|
*/
|
||||||
|
type PostCredentialsOK struct {
|
||||||
|
Payload *auth0_models.CredentialsResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsOK) GetPayload() *auth0_models.CredentialsResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.CredentialsResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsUnauthorized creates a PostCredentialsUnauthorized with default headers values
|
||||||
|
func NewPostCredentialsUnauthorized() *PostCredentialsUnauthorized {
|
||||||
|
return &PostCredentialsUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostCredentialsUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsForbidden creates a PostCredentialsForbidden with default headers values
|
||||||
|
func NewPostCredentialsForbidden() *PostCredentialsForbidden {
|
||||||
|
return &PostCredentialsForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostCredentialsForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsNotFound creates a PostCredentialsNotFound with default headers values
|
||||||
|
func NewPostCredentialsNotFound() *PostCredentialsNotFound {
|
||||||
|
return &PostCredentialsNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostCredentialsNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsUnprocessableEntity creates a PostCredentialsUnprocessableEntity with default headers values
|
||||||
|
func NewPostCredentialsUnprocessableEntity() *PostCredentialsUnprocessableEntity {
|
||||||
|
return &PostCredentialsUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsUnprocessableEntity handles this case with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PostCredentialsUnprocessableEntity struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsUnprocessableEntity) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCredentialsInternalServerError creates a PostCredentialsInternalServerError with default headers values
|
||||||
|
func NewPostCredentialsInternalServerError() *PostCredentialsInternalServerError {
|
||||||
|
return &PostCredentialsInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostCredentialsInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostCredentialsInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCredentialsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
package cloud_client
|
package auth0_client
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
// This file was generated by the swagger tool.
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
@ -14,34 +14,34 @@ import (
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_client/cors"
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_client/auth"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_client/hub"
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_client/role"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_client/user"
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_client/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Default cloud HTTP client.
|
// Default auth0 HTTP client.
|
||||||
var Default = NewHTTPClient(nil)
|
var Default = NewHTTPClient(nil)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultHost is the default Host
|
// DefaultHost is the default Host
|
||||||
// found in Meta (info) section of spec file
|
// found in Meta (info) section of spec file
|
||||||
DefaultHost string = "cloud.infra.tnxs.net:8080"
|
DefaultHost string = "taxnexus.auth0.com"
|
||||||
// DefaultBasePath is the default BasePath
|
// DefaultBasePath is the default BasePath
|
||||||
// found in Meta (info) section of spec file
|
// found in Meta (info) section of spec file
|
||||||
DefaultBasePath string = "/v1"
|
DefaultBasePath string = "/"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
|
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
|
||||||
var DefaultSchemes = []string{"http"}
|
var DefaultSchemes = []string{"https"}
|
||||||
|
|
||||||
// NewHTTPClient creates a new cloud HTTP client.
|
// NewHTTPClient creates a new auth0 HTTP client.
|
||||||
func NewHTTPClient(formats strfmt.Registry) *Cloud {
|
func NewHTTPClient(formats strfmt.Registry) *Auth0 {
|
||||||
return NewHTTPClientWithConfig(formats, nil)
|
return NewHTTPClientWithConfig(formats, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewHTTPClientWithConfig creates a new cloud HTTP client,
|
// NewHTTPClientWithConfig creates a new auth0 HTTP client,
|
||||||
// using a customizable transport config.
|
// using a customizable transport config.
|
||||||
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Cloud {
|
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Auth0 {
|
||||||
// ensure nullable parameters have default
|
// ensure nullable parameters have default
|
||||||
if cfg == nil {
|
if cfg == nil {
|
||||||
cfg = DefaultTransportConfig()
|
cfg = DefaultTransportConfig()
|
||||||
|
@ -52,17 +52,17 @@ func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Clo
|
||||||
return New(transport, formats)
|
return New(transport, formats)
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new cloud client
|
// New creates a new auth0 client
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Cloud {
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Auth0 {
|
||||||
// ensure nullable parameters have default
|
// ensure nullable parameters have default
|
||||||
if formats == nil {
|
if formats == nil {
|
||||||
formats = strfmt.Default
|
formats = strfmt.Default
|
||||||
}
|
}
|
||||||
|
|
||||||
cli := new(Cloud)
|
cli := new(Auth0)
|
||||||
cli.Transport = transport
|
cli.Transport = transport
|
||||||
cli.Cors = cors.New(transport, formats)
|
cli.Auth = auth.New(transport, formats)
|
||||||
cli.Hub = hub.New(transport, formats)
|
cli.Role = role.New(transport, formats)
|
||||||
cli.User = user.New(transport, formats)
|
cli.User = user.New(transport, formats)
|
||||||
return cli
|
return cli
|
||||||
}
|
}
|
||||||
|
@ -106,11 +106,11 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cloud is a client for cloud
|
// Auth0 is a client for auth0
|
||||||
type Cloud struct {
|
type Auth0 struct {
|
||||||
Cors cors.ClientService
|
Auth auth.ClientService
|
||||||
|
|
||||||
Hub hub.ClientService
|
Role role.ClientService
|
||||||
|
|
||||||
User user.ClientService
|
User user.ClientService
|
||||||
|
|
||||||
|
@ -118,9 +118,9 @@ type Cloud struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetTransport changes the transport on the client and all its subresources
|
// SetTransport changes the transport on the client and all its subresources
|
||||||
func (c *Cloud) SetTransport(transport runtime.ClientTransport) {
|
func (c *Auth0) SetTransport(transport runtime.ClientTransport) {
|
||||||
c.Transport = transport
|
c.Transport = transport
|
||||||
c.Cors.SetTransport(transport)
|
c.Auth.SetTransport(transport)
|
||||||
c.Hub.SetTransport(transport)
|
c.Role.SetTransport(transport)
|
||||||
c.User.SetTransport(transport)
|
c.User.SetTransport(transport)
|
||||||
}
|
}
|
|
@ -0,0 +1,136 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package role
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetRolesParams creates a new GetRolesParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewGetRolesParams() *GetRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetRolesParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesParamsWithTimeout creates a new GetRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewGetRolesParamsWithTimeout(timeout time.Duration) *GetRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetRolesParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesParamsWithContext creates a new GetRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewGetRolesParamsWithContext(ctx context.Context) *GetRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetRolesParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesParamsWithHTTPClient creates a new GetRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewGetRolesParamsWithHTTPClient(client *http.Client) *GetRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetRolesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesParams contains all the parameters to send to the API endpoint
|
||||||
|
for the get roles operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type GetRolesParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get roles params
|
||||||
|
func (o *GetRolesParams) WithTimeout(timeout time.Duration) *GetRolesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get roles params
|
||||||
|
func (o *GetRolesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get roles params
|
||||||
|
func (o *GetRolesParams) WithContext(ctx context.Context) *GetRolesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get roles params
|
||||||
|
func (o *GetRolesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get roles params
|
||||||
|
func (o *GetRolesParams) WithHTTPClient(client *http.Client) *GetRolesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get roles params
|
||||||
|
func (o *GetRolesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the get roles params
|
||||||
|
func (o *GetRolesParams) WithAuthorization(authorization string) *GetRolesParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the get roles params
|
||||||
|
func (o *GetRolesParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,266 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package role
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetRolesReader is a Reader for the GetRoles structure.
|
||||||
|
type GetRolesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetRolesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetRolesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetRolesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetRolesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetRolesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetRolesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesOK creates a GetRolesOK with default headers values
|
||||||
|
func NewGetRolesOK() *GetRolesOK {
|
||||||
|
return &GetRolesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesOK handles this case with default header values.
|
||||||
|
|
||||||
|
Taxnexus Response with User objects
|
||||||
|
*/
|
||||||
|
type GetRolesOK struct {
|
||||||
|
Payload []*auth0_models.User
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesOK) GetPayload() []*auth0_models.User {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesUnauthorized creates a GetRolesUnauthorized with default headers values
|
||||||
|
func NewGetRolesUnauthorized() *GetRolesUnauthorized {
|
||||||
|
return &GetRolesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetRolesUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesForbidden creates a GetRolesForbidden with default headers values
|
||||||
|
func NewGetRolesForbidden() *GetRolesForbidden {
|
||||||
|
return &GetRolesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetRolesForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesNotFound creates a GetRolesNotFound with default headers values
|
||||||
|
func NewGetRolesNotFound() *GetRolesNotFound {
|
||||||
|
return &GetRolesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetRolesNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesUnprocessableEntity creates a GetRolesUnprocessableEntity with default headers values
|
||||||
|
func NewGetRolesUnprocessableEntity() *GetRolesUnprocessableEntity {
|
||||||
|
return &GetRolesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesUnprocessableEntity handles this case with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetRolesUnprocessableEntity struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesUnprocessableEntity) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetRolesInternalServerError creates a GetRolesInternalServerError with default headers values
|
||||||
|
func NewGetRolesInternalServerError() *GetRolesInternalServerError {
|
||||||
|
return &GetRolesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetRolesInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetRolesInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetRolesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,181 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package role
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostRoleUsersParams creates a new PostRoleUsersParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewPostRoleUsersParams() *PostRoleUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostRoleUsersParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersParamsWithTimeout creates a new PostRoleUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewPostRoleUsersParamsWithTimeout(timeout time.Duration) *PostRoleUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostRoleUsersParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersParamsWithContext creates a new PostRoleUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewPostRoleUsersParamsWithContext(ctx context.Context) *PostRoleUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostRoleUsersParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersParamsWithHTTPClient creates a new PostRoleUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewPostRoleUsersParamsWithHTTPClient(client *http.Client) *PostRoleUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostRoleUsersParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostRoleUsersParams contains all the parameters to send to the API endpoint
|
||||||
|
for the post role users operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type PostRoleUsersParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
/*RoleUsersRequest
|
||||||
|
An array of User IDs to add to a Role
|
||||||
|
|
||||||
|
*/
|
||||||
|
RoleUsersRequest *auth0_models.RoleUsersRequest
|
||||||
|
/*RoleID
|
||||||
|
An Auth0 Role ID
|
||||||
|
|
||||||
|
*/
|
||||||
|
RoleID string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) WithTimeout(timeout time.Duration) *PostRoleUsersParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) WithContext(ctx context.Context) *PostRoleUsersParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) WithHTTPClient(client *http.Client) *PostRoleUsersParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) WithAuthorization(authorization string) *PostRoleUsersParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithRoleUsersRequest adds the roleUsersRequest to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) WithRoleUsersRequest(roleUsersRequest *auth0_models.RoleUsersRequest) *PostRoleUsersParams {
|
||||||
|
o.SetRoleUsersRequest(roleUsersRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRoleUsersRequest adds the roleUsersRequest to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) SetRoleUsersRequest(roleUsersRequest *auth0_models.RoleUsersRequest) {
|
||||||
|
o.RoleUsersRequest = roleUsersRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithRoleID adds the roleID to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) WithRoleID(roleID string) *PostRoleUsersParams {
|
||||||
|
o.SetRoleID(roleID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRoleID adds the roleId to the post role users params
|
||||||
|
func (o *PostRoleUsersParams) SetRoleID(roleID string) {
|
||||||
|
o.RoleID = roleID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostRoleUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.RoleUsersRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.RoleUsersRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// path param roleId
|
||||||
|
if err := r.SetPathParam("roleId", o.RoleID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,217 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package role
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostRoleUsersReader is a Reader for the PostRoleUsers structure.
|
||||||
|
type PostRoleUsersReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostRoleUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPostRoleUsersOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostRoleUsersUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostRoleUsersForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostRoleUsersNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostRoleUsersInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersOK creates a PostRoleUsersOK with default headers values
|
||||||
|
func NewPostRoleUsersOK() *PostRoleUsersOK {
|
||||||
|
return &PostRoleUsersOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostRoleUsersOK handles this case with default header values.
|
||||||
|
|
||||||
|
Role users successfully updated
|
||||||
|
*/
|
||||||
|
type PostRoleUsersOK struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersOK ", 200)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersUnauthorized creates a PostRoleUsersUnauthorized with default headers values
|
||||||
|
func NewPostRoleUsersUnauthorized() *PostRoleUsersUnauthorized {
|
||||||
|
return &PostRoleUsersUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostRoleUsersUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostRoleUsersUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersForbidden creates a PostRoleUsersForbidden with default headers values
|
||||||
|
func NewPostRoleUsersForbidden() *PostRoleUsersForbidden {
|
||||||
|
return &PostRoleUsersForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostRoleUsersForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostRoleUsersForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersNotFound creates a PostRoleUsersNotFound with default headers values
|
||||||
|
func NewPostRoleUsersNotFound() *PostRoleUsersNotFound {
|
||||||
|
return &PostRoleUsersNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostRoleUsersNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostRoleUsersNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostRoleUsersInternalServerError creates a PostRoleUsersInternalServerError with default headers values
|
||||||
|
func NewPostRoleUsersInternalServerError() *PostRoleUsersInternalServerError {
|
||||||
|
return &PostRoleUsersInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostRoleUsersInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostRoleUsersInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostRoleUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
package user
|
package role
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
// This file was generated by the swagger tool.
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
@ -16,106 +16,97 @@ import (
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// New creates a new user API client.
|
// New creates a new role API client.
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for user API
|
Client for role API
|
||||||
*/
|
*/
|
||||||
type Client struct {
|
type Client struct {
|
||||||
transport runtime.ClientTransport
|
transport runtime.ClientTransport
|
||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption is the option for Client methods
|
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
GetAccountUsers(params *GetAccountUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountUsersOK, error)
|
GetRoles(params *GetRolesParams) (*GetRolesOK, error)
|
||||||
|
|
||||||
GetAccountVMBoxes(params *GetAccountVMBoxesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountVMBoxesOK, error)
|
PostRoleUsers(params *PostRoleUsersParams) (*PostRoleUsersOK, error)
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
SetTransport(transport runtime.ClientTransport)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetAccountUsers get account users API
|
GetRoles gets roles from auth0
|
||||||
|
|
||||||
|
Get Roles from Auth0
|
||||||
*/
|
*/
|
||||||
func (a *Client) GetAccountUsers(params *GetAccountUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountUsersOK, error) {
|
func (a *Client) GetRoles(params *GetRolesParams) (*GetRolesOK, error) {
|
||||||
// TODO: Validate the params before sending
|
// TODO: Validate the params before sending
|
||||||
if params == nil {
|
if params == nil {
|
||||||
params = NewGetAccountUsersParams()
|
params = NewGetRolesParams()
|
||||||
}
|
}
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getAccountUsers",
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
|
ID: "getRoles",
|
||||||
Method: "GET",
|
Method: "GET",
|
||||||
PathPattern: "/accounts/{accountId}/users",
|
PathPattern: "/api/v2/roles",
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
Schemes: []string{"https"},
|
Schemes: []string{"https"},
|
||||||
Params: params,
|
Params: params,
|
||||||
Reader: &GetAccountUsersReader{formats: a.formats},
|
Reader: &GetRolesReader{formats: a.formats},
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
Context: params.Context,
|
||||||
Client: params.HTTPClient,
|
Client: params.HTTPClient,
|
||||||
}
|
})
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
success, ok := result.(*GetAccountUsersOK)
|
success, ok := result.(*GetRolesOK)
|
||||||
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 getAccountUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
msg := fmt.Sprintf("unexpected success response for getRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetAccountVMBoxes get account Vm boxes API
|
PostRoleUsers adds users to role
|
||||||
|
|
||||||
|
Add users to role
|
||||||
*/
|
*/
|
||||||
func (a *Client) GetAccountVMBoxes(params *GetAccountVMBoxesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountVMBoxesOK, error) {
|
func (a *Client) PostRoleUsers(params *PostRoleUsersParams) (*PostRoleUsersOK, error) {
|
||||||
// TODO: Validate the params before sending
|
// TODO: Validate the params before sending
|
||||||
if params == nil {
|
if params == nil {
|
||||||
params = NewGetAccountVMBoxesParams()
|
params = NewPostRoleUsersParams()
|
||||||
}
|
}
|
||||||
op := &runtime.ClientOperation{
|
|
||||||
ID: "getAccountVmBoxes",
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
Method: "GET",
|
ID: "postRoleUsers",
|
||||||
PathPattern: "/accounts/{accountId}/vmboxes",
|
Method: "POST",
|
||||||
|
PathPattern: "/api/v2/roles/{roleId}/users",
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
Schemes: []string{"https"},
|
Schemes: []string{"https"},
|
||||||
Params: params,
|
Params: params,
|
||||||
Reader: &GetAccountVMBoxesReader{formats: a.formats},
|
Reader: &PostRoleUsersReader{formats: a.formats},
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
Context: params.Context,
|
||||||
Client: params.HTTPClient,
|
Client: params.HTTPClient,
|
||||||
}
|
})
|
||||||
for _, opt := range opts {
|
|
||||||
opt(op)
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(op)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
success, ok := result.(*GetAccountVMBoxesOK)
|
success, ok := result.(*PostRoleUsersOK)
|
||||||
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 getAccountVmBoxes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
msg := fmt.Sprintf("unexpected success response for postRoleUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,181 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesParams creates a new DeleteAPIV2UsersUserIDRolesParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesParams() *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
var ()
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout creates a new DeleteAPIV2UsersUserIDRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
var ()
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesParamsWithContext creates a new DeleteAPIV2UsersUserIDRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesParamsWithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
var ()
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient creates a new DeleteAPIV2UsersUserIDRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
var ()
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*DeleteAPIV2UsersUserIDRolesParams contains all the parameters to send to the API endpoint
|
||||||
|
for the delete API v2 users user ID roles operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type DeleteAPIV2UsersUserIDRolesParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
/*UserRolesRequest
|
||||||
|
An array of User IDs to add to a Role
|
||||||
|
|
||||||
|
*/
|
||||||
|
UserRolesRequest *auth0_models.UserRolesRequest
|
||||||
|
/*UserID
|
||||||
|
An Auth0 User ID
|
||||||
|
|
||||||
|
*/
|
||||||
|
UserID string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WithAuthorization(authorization string) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithUserRolesRequest adds the userRolesRequest to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WithUserRolesRequest(userRolesRequest *auth0_models.UserRolesRequest) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
o.SetUserRolesRequest(userRolesRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUserRolesRequest adds the userRolesRequest to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) SetUserRolesRequest(userRolesRequest *auth0_models.UserRolesRequest) {
|
||||||
|
o.UserRolesRequest = userRolesRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithUserID adds the userID to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WithUserID(userID string) *DeleteAPIV2UsersUserIDRolesParams {
|
||||||
|
o.SetUserID(userID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUserID adds the userId to the delete API v2 users user ID roles params
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) SetUserID(userID string) {
|
||||||
|
o.UserID = userID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.UserRolesRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.UserRolesRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// path param userId
|
||||||
|
if err := r.SetPathParam("userId", o.UserID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,217 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeleteAPIV2UsersUserIDRolesReader is a Reader for the DeleteAPIV2UsersUserIDRoles structure.
|
||||||
|
type DeleteAPIV2UsersUserIDRolesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 204:
|
||||||
|
result := NewDeleteAPIV2UsersUserIDRolesNoContent()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewDeleteAPIV2UsersUserIDRolesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewDeleteAPIV2UsersUserIDRolesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewDeleteAPIV2UsersUserIDRolesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewDeleteAPIV2UsersUserIDRolesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesNoContent creates a DeleteAPIV2UsersUserIDRolesNoContent with default headers values
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesNoContent() *DeleteAPIV2UsersUserIDRolesNoContent {
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesNoContent{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*DeleteAPIV2UsersUserIDRolesNoContent handles this case with default header values.
|
||||||
|
|
||||||
|
User roles successfully removed
|
||||||
|
*/
|
||||||
|
type DeleteAPIV2UsersUserIDRolesNoContent struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesNoContent) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNoContent ", 204)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesUnauthorized creates a DeleteAPIV2UsersUserIDRolesUnauthorized with default headers values
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesUnauthorized() *DeleteAPIV2UsersUserIDRolesUnauthorized {
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*DeleteAPIV2UsersUserIDRolesUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type DeleteAPIV2UsersUserIDRolesUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesForbidden creates a DeleteAPIV2UsersUserIDRolesForbidden with default headers values
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesForbidden() *DeleteAPIV2UsersUserIDRolesForbidden {
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*DeleteAPIV2UsersUserIDRolesForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type DeleteAPIV2UsersUserIDRolesForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesNotFound creates a DeleteAPIV2UsersUserIDRolesNotFound with default headers values
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesNotFound() *DeleteAPIV2UsersUserIDRolesNotFound {
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*DeleteAPIV2UsersUserIDRolesNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type DeleteAPIV2UsersUserIDRolesNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteAPIV2UsersUserIDRolesInternalServerError creates a DeleteAPIV2UsersUserIDRolesInternalServerError with default headers values
|
||||||
|
func NewDeleteAPIV2UsersUserIDRolesInternalServerError() *DeleteAPIV2UsersUserIDRolesInternalServerError {
|
||||||
|
return &DeleteAPIV2UsersUserIDRolesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*DeleteAPIV2UsersUserIDRolesInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type DeleteAPIV2UsersUserIDRolesInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,158 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetUserByEmailParams creates a new GetUserByEmailParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewGetUserByEmailParams() *GetUserByEmailParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserByEmailParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailParamsWithTimeout creates a new GetUserByEmailParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewGetUserByEmailParamsWithTimeout(timeout time.Duration) *GetUserByEmailParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserByEmailParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailParamsWithContext creates a new GetUserByEmailParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewGetUserByEmailParamsWithContext(ctx context.Context) *GetUserByEmailParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserByEmailParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailParamsWithHTTPClient creates a new GetUserByEmailParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewGetUserByEmailParamsWithHTTPClient(client *http.Client) *GetUserByEmailParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserByEmailParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserByEmailParams contains all the parameters to send to the API endpoint
|
||||||
|
for the get user by email operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type GetUserByEmailParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
/*Email*/
|
||||||
|
Email string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) WithTimeout(timeout time.Duration) *GetUserByEmailParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) WithContext(ctx context.Context) *GetUserByEmailParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) WithHTTPClient(client *http.Client) *GetUserByEmailParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) WithAuthorization(authorization string) *GetUserByEmailParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithEmail adds the email to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) WithEmail(email string) *GetUserByEmailParams {
|
||||||
|
o.SetEmail(email)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetEmail adds the email to the get user by email params
|
||||||
|
func (o *GetUserByEmailParams) SetEmail(email string) {
|
||||||
|
o.Email = email
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetUserByEmailParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// query param email
|
||||||
|
qrEmail := o.Email
|
||||||
|
qEmail := qrEmail
|
||||||
|
if qEmail != "" {
|
||||||
|
if err := r.SetQueryParam("email", qEmail); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,227 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetUserByEmailReader is a Reader for the GetUserByEmail structure.
|
||||||
|
type GetUserByEmailReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetUserByEmailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetUserByEmailOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetUserByEmailUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetUserByEmailForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetUserByEmailNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetUserByEmailInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailOK creates a GetUserByEmailOK with default headers values
|
||||||
|
func NewGetUserByEmailOK() *GetUserByEmailOK {
|
||||||
|
return &GetUserByEmailOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserByEmailOK handles this case with default header values.
|
||||||
|
|
||||||
|
Taxnexus Response with User objects
|
||||||
|
*/
|
||||||
|
type GetUserByEmailOK struct {
|
||||||
|
Payload []*auth0_models.User
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailOK) GetPayload() []*auth0_models.User {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailUnauthorized creates a GetUserByEmailUnauthorized with default headers values
|
||||||
|
func NewGetUserByEmailUnauthorized() *GetUserByEmailUnauthorized {
|
||||||
|
return &GetUserByEmailUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserByEmailUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetUserByEmailUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailForbidden creates a GetUserByEmailForbidden with default headers values
|
||||||
|
func NewGetUserByEmailForbidden() *GetUserByEmailForbidden {
|
||||||
|
return &GetUserByEmailForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserByEmailForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetUserByEmailForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailNotFound creates a GetUserByEmailNotFound with default headers values
|
||||||
|
func NewGetUserByEmailNotFound() *GetUserByEmailNotFound {
|
||||||
|
return &GetUserByEmailNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserByEmailNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetUserByEmailNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserByEmailInternalServerError creates a GetUserByEmailInternalServerError with default headers values
|
||||||
|
func NewGetUserByEmailInternalServerError() *GetUserByEmailInternalServerError {
|
||||||
|
return &GetUserByEmailInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserByEmailInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetUserByEmailInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserByEmailInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetUserRolesParams creates a new GetUserRolesParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewGetUserRolesParams() *GetUserRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserRolesParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesParamsWithTimeout creates a new GetUserRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewGetUserRolesParamsWithTimeout(timeout time.Duration) *GetUserRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserRolesParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesParamsWithContext creates a new GetUserRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewGetUserRolesParamsWithContext(ctx context.Context) *GetUserRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserRolesParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesParamsWithHTTPClient creates a new GetUserRolesParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewGetUserRolesParamsWithHTTPClient(client *http.Client) *GetUserRolesParams {
|
||||||
|
var ()
|
||||||
|
return &GetUserRolesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserRolesParams contains all the parameters to send to the API endpoint
|
||||||
|
for the get user roles operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type GetUserRolesParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
/*UserID
|
||||||
|
An Auth0 User ID
|
||||||
|
|
||||||
|
*/
|
||||||
|
UserID string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) WithTimeout(timeout time.Duration) *GetUserRolesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) WithContext(ctx context.Context) *GetUserRolesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) WithHTTPClient(client *http.Client) *GetUserRolesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) WithAuthorization(authorization string) *GetUserRolesParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithUserID adds the userID to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) WithUserID(userID string) *GetUserRolesParams {
|
||||||
|
o.SetUserID(userID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUserID adds the userId to the get user roles params
|
||||||
|
func (o *GetUserRolesParams) SetUserID(userID string) {
|
||||||
|
o.UserID = userID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetUserRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// path param userId
|
||||||
|
if err := r.SetPathParam("userId", o.UserID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,229 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetUserRolesReader is a Reader for the GetUserRoles structure.
|
||||||
|
type GetUserRolesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetUserRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetUserRolesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetUserRolesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetUserRolesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetUserRolesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetUserRolesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesOK creates a GetUserRolesOK with default headers values
|
||||||
|
func NewGetUserRolesOK() *GetUserRolesOK {
|
||||||
|
return &GetUserRolesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserRolesOK handles this case with default header values.
|
||||||
|
|
||||||
|
Taxnexus Response with User objects
|
||||||
|
*/
|
||||||
|
type GetUserRolesOK struct {
|
||||||
|
Payload *auth0_models.RoleResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesOK) GetPayload() *auth0_models.RoleResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.RoleResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesUnauthorized creates a GetUserRolesUnauthorized with default headers values
|
||||||
|
func NewGetUserRolesUnauthorized() *GetUserRolesUnauthorized {
|
||||||
|
return &GetUserRolesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserRolesUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetUserRolesUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesForbidden creates a GetUserRolesForbidden with default headers values
|
||||||
|
func NewGetUserRolesForbidden() *GetUserRolesForbidden {
|
||||||
|
return &GetUserRolesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserRolesForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetUserRolesForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesNotFound creates a GetUserRolesNotFound with default headers values
|
||||||
|
func NewGetUserRolesNotFound() *GetUserRolesNotFound {
|
||||||
|
return &GetUserRolesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserRolesNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetUserRolesNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUserRolesInternalServerError creates a GetUserRolesInternalServerError with default headers values
|
||||||
|
func NewGetUserRolesInternalServerError() *GetUserRolesInternalServerError {
|
||||||
|
return &GetUserRolesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUserRolesInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetUserRolesInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUserRolesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,136 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetUsersParams creates a new GetUsersParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewGetUsersParams() *GetUsersParams {
|
||||||
|
var ()
|
||||||
|
return &GetUsersParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersParamsWithTimeout creates a new GetUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams {
|
||||||
|
var ()
|
||||||
|
return &GetUsersParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersParamsWithContext creates a new GetUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams {
|
||||||
|
var ()
|
||||||
|
return &GetUsersParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams {
|
||||||
|
var ()
|
||||||
|
return &GetUsersParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUsersParams contains all the parameters to send to the API endpoint
|
||||||
|
for the get users operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type GetUsersParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get users params
|
||||||
|
func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get users params
|
||||||
|
func (o *GetUsersParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get users params
|
||||||
|
func (o *GetUsersParams) WithContext(ctx context.Context) *GetUsersParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get users params
|
||||||
|
func (o *GetUsersParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get users params
|
||||||
|
func (o *GetUsersParams) WithHTTPClient(client *http.Client) *GetUsersParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get users params
|
||||||
|
func (o *GetUsersParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the get users params
|
||||||
|
func (o *GetUsersParams) WithAuthorization(authorization string) *GetUsersParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the get users params
|
||||||
|
func (o *GetUsersParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,227 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetUsersReader is a Reader for the GetUsers structure.
|
||||||
|
type GetUsersReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetUsersOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetUsersUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetUsersForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetUsersNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetUsersInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersOK creates a GetUsersOK with default headers values
|
||||||
|
func NewGetUsersOK() *GetUsersOK {
|
||||||
|
return &GetUsersOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUsersOK handles this case with default header values.
|
||||||
|
|
||||||
|
Taxnexus Response with User objects
|
||||||
|
*/
|
||||||
|
type GetUsersOK struct {
|
||||||
|
Payload []*auth0_models.User
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersOK) GetPayload() []*auth0_models.User {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersUnauthorized creates a GetUsersUnauthorized with default headers values
|
||||||
|
func NewGetUsersUnauthorized() *GetUsersUnauthorized {
|
||||||
|
return &GetUsersUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUsersUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetUsersUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersForbidden creates a GetUsersForbidden with default headers values
|
||||||
|
func NewGetUsersForbidden() *GetUsersForbidden {
|
||||||
|
return &GetUsersForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUsersForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetUsersForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersNotFound creates a GetUsersNotFound with default headers values
|
||||||
|
func NewGetUsersNotFound() *GetUsersNotFound {
|
||||||
|
return &GetUsersNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUsersNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetUsersNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetUsersInternalServerError creates a GetUsersInternalServerError with default headers values
|
||||||
|
func NewGetUsersInternalServerError() *GetUsersInternalServerError {
|
||||||
|
return &GetUsersInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*GetUsersInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetUsersInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,160 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostUsersParams creates a new PostUsersParams object
|
||||||
|
// with the default values initialized.
|
||||||
|
func NewPostUsersParams() *PostUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostUsersParams{
|
||||||
|
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersParamsWithTimeout creates a new PostUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||||||
|
func NewPostUsersParamsWithTimeout(timeout time.Duration) *PostUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostUsersParams{
|
||||||
|
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersParamsWithContext creates a new PostUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a context for a request
|
||||||
|
func NewPostUsersParamsWithContext(ctx context.Context) *PostUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostUsersParams{
|
||||||
|
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersParamsWithHTTPClient creates a new PostUsersParams object
|
||||||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||||||
|
func NewPostUsersParamsWithHTTPClient(client *http.Client) *PostUsersParams {
|
||||||
|
var ()
|
||||||
|
return &PostUsersParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersParams contains all the parameters to send to the API endpoint
|
||||||
|
for the post users operation typically these are written to a http.Request
|
||||||
|
*/
|
||||||
|
type PostUsersParams struct {
|
||||||
|
|
||||||
|
/*Authorization*/
|
||||||
|
Authorization string
|
||||||
|
/*UserRequest
|
||||||
|
An array of User records
|
||||||
|
|
||||||
|
*/
|
||||||
|
UserRequest *auth0_models.UserRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post users params
|
||||||
|
func (o *PostUsersParams) WithTimeout(timeout time.Duration) *PostUsersParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post users params
|
||||||
|
func (o *PostUsersParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post users params
|
||||||
|
func (o *PostUsersParams) WithContext(ctx context.Context) *PostUsersParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post users params
|
||||||
|
func (o *PostUsersParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post users params
|
||||||
|
func (o *PostUsersParams) WithHTTPClient(client *http.Client) *PostUsersParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post users params
|
||||||
|
func (o *PostUsersParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithAuthorization adds the authorization to the post users params
|
||||||
|
func (o *PostUsersParams) WithAuthorization(authorization string) *PostUsersParams {
|
||||||
|
o.SetAuthorization(authorization)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAuthorization adds the authorization to the post users params
|
||||||
|
func (o *PostUsersParams) SetAuthorization(authorization string) {
|
||||||
|
o.Authorization = authorization
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithUserRequest adds the userRequest to the post users params
|
||||||
|
func (o *PostUsersParams) WithUserRequest(userRequest *auth0_models.UserRequest) *PostUsersParams {
|
||||||
|
o.SetUserRequest(userRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUserRequest adds the userRequest to the post users params
|
||||||
|
func (o *PostUsersParams) SetUserRequest(userRequest *auth0_models.UserRequest) {
|
||||||
|
o.UserRequest = userRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param Authorization
|
||||||
|
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.UserRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.UserRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,244 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/auth0/auth0_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostUsersReader is a Reader for the PostUsers structure.
|
||||||
|
type PostUsersReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 201:
|
||||||
|
result := NewPostUsersCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostUsersUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostUsersForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostUsersNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 409:
|
||||||
|
result := NewPostUsersConflict()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostUsersInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersCreated creates a PostUsersCreated with default headers values
|
||||||
|
func NewPostUsersCreated() *PostUsersCreated {
|
||||||
|
return &PostUsersCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersCreated handles this case with default header values.
|
||||||
|
|
||||||
|
New user created
|
||||||
|
*/
|
||||||
|
type PostUsersCreated struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersCreated ", 201)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersUnauthorized creates a PostUsersUnauthorized with default headers values
|
||||||
|
func NewPostUsersUnauthorized() *PostUsersUnauthorized {
|
||||||
|
return &PostUsersUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersUnauthorized handles this case with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostUsersUnauthorized struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersUnauthorized) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersForbidden creates a PostUsersForbidden with default headers values
|
||||||
|
func NewPostUsersForbidden() *PostUsersForbidden {
|
||||||
|
return &PostUsersForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersForbidden handles this case with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostUsersForbidden struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersForbidden) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersNotFound creates a PostUsersNotFound with default headers values
|
||||||
|
func NewPostUsersNotFound() *PostUsersNotFound {
|
||||||
|
return &PostUsersNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersNotFound handles this case with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostUsersNotFound struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersNotFound) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersConflict creates a PostUsersConflict with default headers values
|
||||||
|
func NewPostUsersConflict() *PostUsersConflict {
|
||||||
|
return &PostUsersConflict{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersConflict handles this case with default header values.
|
||||||
|
|
||||||
|
User already exists
|
||||||
|
*/
|
||||||
|
type PostUsersConflict struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersConflict) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersConflict ", 409)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostUsersInternalServerError creates a PostUsersInternalServerError with default headers values
|
||||||
|
func NewPostUsersInternalServerError() *PostUsersInternalServerError {
|
||||||
|
return &PostUsersInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*PostUsersInternalServerError handles this case with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostUsersInternalServerError struct {
|
||||||
|
Payload *auth0_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersInternalServerError) GetPayload() *auth0_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(auth0_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,228 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package user
|
||||||
|
|
||||||
|
// 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 user API client.
|
||||||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
|
return &Client{transport: transport, formats: formats}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Client for user API
|
||||||
|
*/
|
||||||
|
type Client struct {
|
||||||
|
transport runtime.ClientTransport
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClientService is the interface for Client methods
|
||||||
|
type ClientService interface {
|
||||||
|
DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams) (*DeleteAPIV2UsersUserIDRolesNoContent, error)
|
||||||
|
|
||||||
|
GetUserByEmail(params *GetUserByEmailParams) (*GetUserByEmailOK, error)
|
||||||
|
|
||||||
|
GetUserRoles(params *GetUserRolesParams) (*GetUserRolesOK, error)
|
||||||
|
|
||||||
|
GetUsers(params *GetUsersParams) (*GetUsersOK, error)
|
||||||
|
|
||||||
|
PostUsers(params *PostUsersParams) (*PostUsersCreated, error)
|
||||||
|
|
||||||
|
SetTransport(transport runtime.ClientTransport)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteAPIV2UsersUserIDRoles delete API v2 users user ID roles API
|
||||||
|
*/
|
||||||
|
func (a *Client) DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams) (*DeleteAPIV2UsersUserIDRolesNoContent, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewDeleteAPIV2UsersUserIDRolesParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
|
ID: "DeleteAPIV2UsersUserIDRoles",
|
||||||
|
Method: "DELETE",
|
||||||
|
PathPattern: "/api/v2/users/{userId}/roles",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"https"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &DeleteAPIV2UsersUserIDRolesReader{formats: a.formats},
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
success, ok := result.(*DeleteAPIV2UsersUserIDRolesNoContent)
|
||||||
|
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 DeleteAPIV2UsersUserIDRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetUserByEmail gets a single user from auth0 by email address
|
||||||
|
|
||||||
|
Get a single user from Auth0 by Email Address
|
||||||
|
*/
|
||||||
|
func (a *Client) GetUserByEmail(params *GetUserByEmailParams) (*GetUserByEmailOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetUserByEmailParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
|
ID: "getUserByEmail",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/api/v2/users-by-email",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"https"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetUserByEmailReader{formats: a.formats},
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
success, ok := result.(*GetUserByEmailOK)
|
||||||
|
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 getUserByEmail: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetUserRoles gets a user s roles
|
||||||
|
|
||||||
|
Get a User's Roles
|
||||||
|
*/
|
||||||
|
func (a *Client) GetUserRoles(params *GetUserRolesParams) (*GetUserRolesOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetUserRolesParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
|
ID: "getUserRoles",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/api/v2/users/{userId}/roles",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"https"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetUserRolesReader{formats: a.formats},
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
success, ok := result.(*GetUserRolesOK)
|
||||||
|
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 getUserRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetUsers gets all users from auth0
|
||||||
|
|
||||||
|
Get all users from Auth0
|
||||||
|
*/
|
||||||
|
func (a *Client) GetUsers(params *GetUsersParams) (*GetUsersOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetUsersParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
|
ID: "getUsers",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/api/v2/users",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"https"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetUsersReader{formats: a.formats},
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
success, ok := result.(*GetUsersOK)
|
||||||
|
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 getUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostUsers creates new auth0 user
|
||||||
|
|
||||||
|
create new Auth0 user
|
||||||
|
*/
|
||||||
|
func (a *Client) PostUsers(params *PostUsersParams) (*PostUsersCreated, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewPostUsersParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||||
|
ID: "postUsers",
|
||||||
|
Method: "POST",
|
||||||
|
PathPattern: "/api/v2/users-by-email",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"https"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &PostUsersReader{formats: a.formats},
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
success, ok := result.(*PostUsersCreated)
|
||||||
|
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 postUsers: 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
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CredentialsRequest credentials request
|
||||||
|
//
|
||||||
|
// swagger:model CredentialsRequest
|
||||||
|
type CredentialsRequest struct {
|
||||||
|
|
||||||
|
// audience
|
||||||
|
Audience string `json:"audience,omitempty"`
|
||||||
|
|
||||||
|
// client id
|
||||||
|
ClientID string `json:"client_id,omitempty"`
|
||||||
|
|
||||||
|
// client secret
|
||||||
|
ClientSecret string `json:"client_secret,omitempty"`
|
||||||
|
|
||||||
|
// grant type
|
||||||
|
GrantType string `json:"grant_type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this credentials request
|
||||||
|
func (m *CredentialsRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CredentialsRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CredentialsRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CredentialsRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CredentialsResponse credentials response
|
||||||
|
//
|
||||||
|
// swagger:model CredentialsResponse
|
||||||
|
type CredentialsResponse struct {
|
||||||
|
|
||||||
|
// access token
|
||||||
|
AccessToken string `json:"access_token,omitempty"`
|
||||||
|
|
||||||
|
// expires in
|
||||||
|
ExpiresIn int64 `json:"expires_in,omitempty"`
|
||||||
|
|
||||||
|
// scope
|
||||||
|
Scope string `json:"scope,omitempty"`
|
||||||
|
|
||||||
|
// token type
|
||||||
|
TokenType string `json:"token_type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this credentials response
|
||||||
|
func (m *CredentialsResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CredentialsResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CredentialsResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CredentialsResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -1,17 +1,15 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
package kazoo_models
|
package auth0_models
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
// This file was generated by the swagger tool.
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
"github.com/go-openapi/swag"
|
"github.com/go-openapi/swag"
|
||||||
)
|
)
|
||||||
|
@ -36,11 +34,6 @@ func (m *Error) Validate(formats strfmt.Registry) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContextValidate validates this error based on context it is used
|
|
||||||
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
// MarshalBinary interface implementation
|
||||||
func (m *Error) MarshalBinary() ([]byte, error) {
|
func (m *Error) MarshalBinary() ([]byte, error) {
|
||||||
if m == nil {
|
if m == nil {
|
|
@ -0,0 +1,89 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewUser new user
|
||||||
|
//
|
||||||
|
// swagger:model NewUser
|
||||||
|
type NewUser struct {
|
||||||
|
|
||||||
|
// blocked
|
||||||
|
Blocked bool `json:"blocked,omitempty"`
|
||||||
|
|
||||||
|
// connection
|
||||||
|
Connection string `json:"connection,omitempty"`
|
||||||
|
|
||||||
|
// email
|
||||||
|
Email string `json:"email,omitempty"`
|
||||||
|
|
||||||
|
// email verified
|
||||||
|
EmailVerified bool `json:"email_verified,omitempty"`
|
||||||
|
|
||||||
|
// family name
|
||||||
|
FamilyName string `json:"family_name,omitempty"`
|
||||||
|
|
||||||
|
// given name
|
||||||
|
GivenName string `json:"given_name,omitempty"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
// nickname
|
||||||
|
Nickname string `json:"nickname,omitempty"`
|
||||||
|
|
||||||
|
// password
|
||||||
|
Password string `json:"password,omitempty"`
|
||||||
|
|
||||||
|
// phone number
|
||||||
|
PhoneNumber string `json:"phone_number,omitempty"`
|
||||||
|
|
||||||
|
// phone verified
|
||||||
|
PhoneVerified bool `json:"phone_verified,omitempty"`
|
||||||
|
|
||||||
|
// picture
|
||||||
|
Picture string `json:"picture,omitempty"`
|
||||||
|
|
||||||
|
// user id
|
||||||
|
UserID string `json:"user_id,omitempty"`
|
||||||
|
|
||||||
|
// username
|
||||||
|
Username string `json:"username,omitempty"`
|
||||||
|
|
||||||
|
// verify email
|
||||||
|
VerifyEmail bool `json:"verify_email,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this new user
|
||||||
|
func (m *NewUser) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *NewUser) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *NewUser) UnmarshalBinary(b []byte) error {
|
||||||
|
var res NewUser
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Role role
|
||||||
|
//
|
||||||
|
// swagger:model Role
|
||||||
|
type Role struct {
|
||||||
|
|
||||||
|
// description
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
|
|
||||||
|
// id
|
||||||
|
ID string `json:"id,omitempty"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this role
|
||||||
|
func (m *Role) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *Role) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *Role) UnmarshalBinary(b []byte) error {
|
||||||
|
var res Role
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RoleResponse role response
|
||||||
|
//
|
||||||
|
// swagger:model RoleResponse
|
||||||
|
type RoleResponse struct {
|
||||||
|
|
||||||
|
// roles
|
||||||
|
Roles []*Role `json:"roles"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this role response
|
||||||
|
func (m *RoleResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateRoles(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *RoleResponse) validateRoles(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Roles) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Roles); i++ {
|
||||||
|
if swag.IsZero(m.Roles[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Roles[i] != nil {
|
||||||
|
if err := m.Roles[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("roles" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *RoleResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *RoleResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res RoleResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RoleUsersRequest role users request
|
||||||
|
//
|
||||||
|
// swagger:model RoleUsersRequest
|
||||||
|
type RoleUsersRequest struct {
|
||||||
|
|
||||||
|
// users
|
||||||
|
Users []string `json:"users"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this role users request
|
||||||
|
func (m *RoleUsersRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *RoleUsersRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *RoleUsersRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res RoleUsersRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,305 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// User user
|
||||||
|
//
|
||||||
|
// swagger:model User
|
||||||
|
type User struct {
|
||||||
|
|
||||||
|
// app metadata
|
||||||
|
AppMetadata *UserAppMetadata `json:"app_metadata,omitempty"`
|
||||||
|
|
||||||
|
// created at
|
||||||
|
CreatedAt string `json:"created_at,omitempty"`
|
||||||
|
|
||||||
|
// email
|
||||||
|
Email string `json:"email,omitempty"`
|
||||||
|
|
||||||
|
// email verified
|
||||||
|
EmailVerified bool `json:"email_verified,omitempty"`
|
||||||
|
|
||||||
|
// family name
|
||||||
|
FamilyName string `json:"family_name,omitempty"`
|
||||||
|
|
||||||
|
// given name
|
||||||
|
GivenName string `json:"given_name,omitempty"`
|
||||||
|
|
||||||
|
// identities
|
||||||
|
Identities []*UserIdentitiesItems0 `json:"identities"`
|
||||||
|
|
||||||
|
// last ip
|
||||||
|
LastIP string `json:"last_ip,omitempty"`
|
||||||
|
|
||||||
|
// last login
|
||||||
|
LastLogin string `json:"last_login,omitempty"`
|
||||||
|
|
||||||
|
// last password reset
|
||||||
|
LastPasswordReset string `json:"last_password_reset,omitempty"`
|
||||||
|
|
||||||
|
// logins count
|
||||||
|
LoginsCount int64 `json:"logins_count,omitempty"`
|
||||||
|
|
||||||
|
// multifactor last modified
|
||||||
|
MultifactorLastModified string `json:"multifactor_last_modified,omitempty"`
|
||||||
|
|
||||||
|
// name
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
// nickname
|
||||||
|
Nickname string `json:"nickname,omitempty"`
|
||||||
|
|
||||||
|
// picture
|
||||||
|
Picture string `json:"picture,omitempty"`
|
||||||
|
|
||||||
|
// updated at
|
||||||
|
UpdatedAt string `json:"updated_at,omitempty"`
|
||||||
|
|
||||||
|
// user id
|
||||||
|
UserID string `json:"user_id,omitempty"`
|
||||||
|
|
||||||
|
// user metadata
|
||||||
|
UserMetadata *UserUserMetadata `json:"user_metadata,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user
|
||||||
|
func (m *User) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateAppMetadata(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateIdentities(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateUserMetadata(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *User) validateAppMetadata(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.AppMetadata) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.AppMetadata != nil {
|
||||||
|
if err := m.AppMetadata.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("app_metadata")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *User) validateIdentities(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Identities) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Identities); i++ {
|
||||||
|
if swag.IsZero(m.Identities[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Identities[i] != nil {
|
||||||
|
if err := m.Identities[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("identities" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *User) validateUserMetadata(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.UserMetadata) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.UserMetadata != nil {
|
||||||
|
if err := m.UserMetadata.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("user_metadata")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *User) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *User) UnmarshalBinary(b []byte) error {
|
||||||
|
var res User
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UserAppMetadata user app metadata
|
||||||
|
//
|
||||||
|
// swagger:model UserAppMetadata
|
||||||
|
type UserAppMetadata struct {
|
||||||
|
|
||||||
|
// roles
|
||||||
|
Roles []string `json:"roles"`
|
||||||
|
|
||||||
|
// taxnexus account id
|
||||||
|
TaxnexusAccountID string `json:"taxnexus_account_id,omitempty"`
|
||||||
|
|
||||||
|
// taxnexus contact id
|
||||||
|
TaxnexusContactID string `json:"taxnexus_contact_id,omitempty"`
|
||||||
|
|
||||||
|
// taxnexus user id
|
||||||
|
TaxnexusUserID string `json:"taxnexus_user_id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user app metadata
|
||||||
|
func (m *UserAppMetadata) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *UserAppMetadata) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *UserAppMetadata) UnmarshalBinary(b []byte) error {
|
||||||
|
var res UserAppMetadata
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UserIdentitiesItems0 user identities items0
|
||||||
|
//
|
||||||
|
// swagger:model UserIdentitiesItems0
|
||||||
|
type UserIdentitiesItems0 struct {
|
||||||
|
|
||||||
|
// connection
|
||||||
|
Connection string `json:"connection,omitempty"`
|
||||||
|
|
||||||
|
// is social
|
||||||
|
IsSocial bool `json:"isSocial,omitempty"`
|
||||||
|
|
||||||
|
// provider
|
||||||
|
Provider string `json:"provider,omitempty"`
|
||||||
|
|
||||||
|
// user id
|
||||||
|
UserID string `json:"user_id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user identities items0
|
||||||
|
func (m *UserIdentitiesItems0) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *UserIdentitiesItems0) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *UserIdentitiesItems0) UnmarshalBinary(b []byte) error {
|
||||||
|
var res UserIdentitiesItems0
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UserUserMetadata user user metadata
|
||||||
|
//
|
||||||
|
// swagger:model UserUserMetadata
|
||||||
|
type UserUserMetadata struct {
|
||||||
|
|
||||||
|
// taxnexus email
|
||||||
|
TaxnexusEmail string `json:"taxnexus_email,omitempty"`
|
||||||
|
|
||||||
|
// taxnexus firstname
|
||||||
|
TaxnexusFirstname string `json:"taxnexus_firstname,omitempty"`
|
||||||
|
|
||||||
|
// taxnexus fullname
|
||||||
|
TaxnexusFullname string `json:"taxnexus_fullname,omitempty"`
|
||||||
|
|
||||||
|
// taxnexus lastname
|
||||||
|
TaxnexusLastname string `json:"taxnexus_lastname,omitempty"`
|
||||||
|
|
||||||
|
// taxnexus phone
|
||||||
|
TaxnexusPhone string `json:"taxnexus_phone,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user user metadata
|
||||||
|
func (m *UserUserMetadata) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *UserUserMetadata) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *UserUserMetadata) UnmarshalBinary(b []byte) error {
|
||||||
|
var res UserUserMetadata
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UserRequest An array Auth0 new user objects
|
||||||
|
//
|
||||||
|
// swagger:model UserRequest
|
||||||
|
type UserRequest struct {
|
||||||
|
|
||||||
|
// users
|
||||||
|
Users []*NewUser `json:"users"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user request
|
||||||
|
func (m *UserRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateUsers(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UserRequest) validateUsers(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if swag.IsZero(m.Users) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Users); i++ {
|
||||||
|
if swag.IsZero(m.Users[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Users[i] != nil {
|
||||||
|
if err := m.Users[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("users" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *UserRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *UserRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res UserRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
|
// All rights reserved worldwide.
|
||||||
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
package auth0_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UserRolesRequest user roles request
|
||||||
|
//
|
||||||
|
// swagger:model UserRolesRequest
|
||||||
|
type UserRolesRequest struct {
|
||||||
|
|
||||||
|
// roles
|
||||||
|
Roles []string `json:"roles"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this user roles request
|
||||||
|
func (m *UserRolesRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *UserRolesRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *UserRolesRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res UserRolesRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -1,130 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cors
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewAccountOptionsParams creates a new AccountOptionsParams 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 NewAccountOptionsParams() *AccountOptionsParams {
|
|
||||||
return &AccountOptionsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewAccountOptionsParamsWithTimeout creates a new AccountOptionsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewAccountOptionsParamsWithTimeout(timeout time.Duration) *AccountOptionsParams {
|
|
||||||
return &AccountOptionsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewAccountOptionsParamsWithContext creates a new AccountOptionsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewAccountOptionsParamsWithContext(ctx context.Context) *AccountOptionsParams {
|
|
||||||
return &AccountOptionsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewAccountOptionsParamsWithHTTPClient creates a new AccountOptionsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewAccountOptionsParamsWithHTTPClient(client *http.Client) *AccountOptionsParams {
|
|
||||||
return &AccountOptionsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* AccountOptionsParams contains all the parameters to send to the API endpoint
|
|
||||||
for the account options operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type AccountOptionsParams struct {
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the account options params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *AccountOptionsParams) WithDefaults() *AccountOptionsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the account options params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *AccountOptionsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the account options params
|
|
||||||
func (o *AccountOptionsParams) WithTimeout(timeout time.Duration) *AccountOptionsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the account options params
|
|
||||||
func (o *AccountOptionsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the account options params
|
|
||||||
func (o *AccountOptionsParams) WithContext(ctx context.Context) *AccountOptionsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the account options params
|
|
||||||
func (o *AccountOptionsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the account options params
|
|
||||||
func (o *AccountOptionsParams) WithHTTPClient(client *http.Client) *AccountOptionsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the account options params
|
|
||||||
func (o *AccountOptionsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *AccountOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,113 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cors
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AccountOptionsReader is a Reader for the AccountOptions structure.
|
|
||||||
type AccountOptionsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *AccountOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewAccountOptionsOK()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewAccountOptionsOK creates a AccountOptionsOK with default headers values
|
|
||||||
func NewAccountOptionsOK() *AccountOptionsOK {
|
|
||||||
return &AccountOptionsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* AccountOptionsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
CORS OPTIONS response
|
|
||||||
*/
|
|
||||||
type AccountOptionsOK struct {
|
|
||||||
AccessControlAllowCredentials string
|
|
||||||
AccessControlAllowHeaders string
|
|
||||||
AccessControlAllowMethods string
|
|
||||||
AccessControlAllowOrigin string
|
|
||||||
AccessControlExposeHeaders string
|
|
||||||
AccessControlMaxAge string
|
|
||||||
CacheControl string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *AccountOptionsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[OPTIONS /hubs][%d] accountOptionsOK ", 200)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *AccountOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Credentials
|
|
||||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowCredentials != "" {
|
|
||||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Headers
|
|
||||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowHeaders != "" {
|
|
||||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Methods
|
|
||||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowMethods != "" {
|
|
||||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Origin
|
|
||||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowOrigin != "" {
|
|
||||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Expose-Headers
|
|
||||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
|
||||||
|
|
||||||
if hdrAccessControlExposeHeaders != "" {
|
|
||||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Max-Age
|
|
||||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
|
||||||
|
|
||||||
if hdrAccessControlMaxAge != "" {
|
|
||||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Cache-Control
|
|
||||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
|
||||||
|
|
||||||
if hdrCacheControl != "" {
|
|
||||||
o.CacheControl = hdrCacheControl
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,165 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewDeleteHubParams creates a new DeleteHubParams 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 NewDeleteHubParams() *DeleteHubParams {
|
|
||||||
return &DeleteHubParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubParamsWithTimeout creates a new DeleteHubParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewDeleteHubParamsWithTimeout(timeout time.Duration) *DeleteHubParams {
|
|
||||||
return &DeleteHubParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubParamsWithContext creates a new DeleteHubParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewDeleteHubParamsWithContext(ctx context.Context) *DeleteHubParams {
|
|
||||||
return &DeleteHubParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubParamsWithHTTPClient creates a new DeleteHubParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewDeleteHubParamsWithHTTPClient(client *http.Client) *DeleteHubParams {
|
|
||||||
return &DeleteHubParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubParams contains all the parameters to send to the API endpoint
|
|
||||||
for the delete hub operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type DeleteHubParams struct {
|
|
||||||
|
|
||||||
/* AccountID.
|
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
*/
|
|
||||||
AccountID *string
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the delete hub params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *DeleteHubParams) WithDefaults() *DeleteHubParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the delete hub params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *DeleteHubParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the delete hub params
|
|
||||||
func (o *DeleteHubParams) WithTimeout(timeout time.Duration) *DeleteHubParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the delete hub params
|
|
||||||
func (o *DeleteHubParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the delete hub params
|
|
||||||
func (o *DeleteHubParams) WithContext(ctx context.Context) *DeleteHubParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the delete hub params
|
|
||||||
func (o *DeleteHubParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the delete hub params
|
|
||||||
func (o *DeleteHubParams) WithHTTPClient(client *http.Client) *DeleteHubParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the delete hub params
|
|
||||||
func (o *DeleteHubParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the delete hub params
|
|
||||||
func (o *DeleteHubParams) WithAccountID(accountID *string) *DeleteHubParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the delete hub params
|
|
||||||
func (o *DeleteHubParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *DeleteHubParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
qrAccountID = *o.AccountID
|
|
||||||
}
|
|
||||||
qAccountID := qrAccountID
|
|
||||||
if qAccountID != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,270 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeleteHubReader is a Reader for the DeleteHub structure.
|
|
||||||
type DeleteHubReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *DeleteHubReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewDeleteHubOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewDeleteHubUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewDeleteHubForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewDeleteHubNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewDeleteHubUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewDeleteHubInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubOK creates a DeleteHubOK with default headers values
|
|
||||||
func NewDeleteHubOK() *DeleteHubOK {
|
|
||||||
return &DeleteHubOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with Message Objects with Delete Status
|
|
||||||
*/
|
|
||||||
type DeleteHubOK struct {
|
|
||||||
AccessControlAllowOrigin string
|
|
||||||
|
|
||||||
Payload *cloud_models.DeleteResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubOK) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /hubs][%d] deleteHubOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *DeleteHubOK) GetPayload() *cloud_models.DeleteResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Origin
|
|
||||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowOrigin != "" {
|
|
||||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
||||||
}
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.DeleteResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubUnauthorized creates a DeleteHubUnauthorized with default headers values
|
|
||||||
func NewDeleteHubUnauthorized() *DeleteHubUnauthorized {
|
|
||||||
return &DeleteHubUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type DeleteHubUnauthorized struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /hubs][%d] deleteHubUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *DeleteHubUnauthorized) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubForbidden creates a DeleteHubForbidden with default headers values
|
|
||||||
func NewDeleteHubForbidden() *DeleteHubForbidden {
|
|
||||||
return &DeleteHubForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type DeleteHubForbidden struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /hubs][%d] deleteHubForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *DeleteHubForbidden) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubNotFound creates a DeleteHubNotFound with default headers values
|
|
||||||
func NewDeleteHubNotFound() *DeleteHubNotFound {
|
|
||||||
return &DeleteHubNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type DeleteHubNotFound struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /hubs][%d] deleteHubNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *DeleteHubNotFound) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubUnprocessableEntity creates a DeleteHubUnprocessableEntity with default headers values
|
|
||||||
func NewDeleteHubUnprocessableEntity() *DeleteHubUnprocessableEntity {
|
|
||||||
return &DeleteHubUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubUnprocessableEntity describes a response with status code 422, with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type DeleteHubUnprocessableEntity struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /hubs][%d] deleteHubUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *DeleteHubUnprocessableEntity) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeleteHubInternalServerError creates a DeleteHubInternalServerError with default headers values
|
|
||||||
func NewDeleteHubInternalServerError() *DeleteHubInternalServerError {
|
|
||||||
return &DeleteHubInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DeleteHubInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type DeleteHubInternalServerError struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[DELETE /hubs][%d] deleteHubInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *DeleteHubInternalServerError) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *DeleteHubInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,340 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetHubsParams creates a new GetHubsParams 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 NewGetHubsParams() *GetHubsParams {
|
|
||||||
return &GetHubsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsParamsWithTimeout creates a new GetHubsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewGetHubsParamsWithTimeout(timeout time.Duration) *GetHubsParams {
|
|
||||||
return &GetHubsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsParamsWithContext creates a new GetHubsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewGetHubsParamsWithContext(ctx context.Context) *GetHubsParams {
|
|
||||||
return &GetHubsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsParamsWithHTTPClient creates a new GetHubsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewGetHubsParamsWithHTTPClient(client *http.Client) *GetHubsParams {
|
|
||||||
return &GetHubsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsParams contains all the parameters to send to the API endpoint
|
|
||||||
for the get hubs operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type GetHubsParams struct {
|
|
||||||
|
|
||||||
/* AccountID.
|
|
||||||
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
*/
|
|
||||||
AccountID *string
|
|
||||||
|
|
||||||
/* Active.
|
|
||||||
|
|
||||||
Retrieve active records?
|
|
||||||
*/
|
|
||||||
Active *bool
|
|
||||||
|
|
||||||
/* Email.
|
|
||||||
|
|
||||||
Email address?
|
|
||||||
*/
|
|
||||||
Email *string
|
|
||||||
|
|
||||||
/* Limit.
|
|
||||||
|
|
||||||
How many objects to return at one time
|
|
||||||
|
|
||||||
Format: int64
|
|
||||||
*/
|
|
||||||
Limit *int64
|
|
||||||
|
|
||||||
/* Name.
|
|
||||||
|
|
||||||
The Name of this Object
|
|
||||||
*/
|
|
||||||
Name *string
|
|
||||||
|
|
||||||
/* Offset.
|
|
||||||
|
|
||||||
How many objects to skip? (default 0)
|
|
||||||
|
|
||||||
Format: int64
|
|
||||||
*/
|
|
||||||
Offset *int64
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the get hubs params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetHubsParams) WithDefaults() *GetHubsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the get hubs params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *GetHubsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithTimeout(timeout time.Duration) *GetHubsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithContext(ctx context.Context) *GetHubsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithHTTPClient(client *http.Client) *GetHubsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithAccountID(accountID *string) *GetHubsParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithActive adds the active to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithActive(active *bool) *GetHubsParams {
|
|
||||||
o.SetActive(active)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetActive adds the active to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetActive(active *bool) {
|
|
||||||
o.Active = active
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithEmail adds the email to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithEmail(email *string) *GetHubsParams {
|
|
||||||
o.SetEmail(email)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetEmail adds the email to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetEmail(email *string) {
|
|
||||||
o.Email = email
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLimit adds the limit to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithLimit(limit *int64) *GetHubsParams {
|
|
||||||
o.SetLimit(limit)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetLimit adds the limit to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetLimit(limit *int64) {
|
|
||||||
o.Limit = limit
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName adds the name to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithName(name *string) *GetHubsParams {
|
|
||||||
o.SetName(name)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetName adds the name to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetName(name *string) {
|
|
||||||
o.Name = name
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOffset adds the offset to the get hubs params
|
|
||||||
func (o *GetHubsParams) WithOffset(offset *int64) *GetHubsParams {
|
|
||||||
o.SetOffset(offset)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetOffset adds the offset to the get hubs params
|
|
||||||
func (o *GetHubsParams) SetOffset(offset *int64) {
|
|
||||||
o.Offset = offset
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetHubsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
qrAccountID = *o.AccountID
|
|
||||||
}
|
|
||||||
qAccountID := qrAccountID
|
|
||||||
if qAccountID != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Active != nil {
|
|
||||||
|
|
||||||
// query param active
|
|
||||||
var qrActive bool
|
|
||||||
|
|
||||||
if o.Active != nil {
|
|
||||||
qrActive = *o.Active
|
|
||||||
}
|
|
||||||
qActive := swag.FormatBool(qrActive)
|
|
||||||
if qActive != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("active", qActive); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Email != nil {
|
|
||||||
|
|
||||||
// query param email
|
|
||||||
var qrEmail string
|
|
||||||
|
|
||||||
if o.Email != nil {
|
|
||||||
qrEmail = *o.Email
|
|
||||||
}
|
|
||||||
qEmail := qrEmail
|
|
||||||
if qEmail != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("email", qEmail); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Limit != nil {
|
|
||||||
|
|
||||||
// query param limit
|
|
||||||
var qrLimit int64
|
|
||||||
|
|
||||||
if o.Limit != nil {
|
|
||||||
qrLimit = *o.Limit
|
|
||||||
}
|
|
||||||
qLimit := swag.FormatInt64(qrLimit)
|
|
||||||
if qLimit != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Name != nil {
|
|
||||||
|
|
||||||
// query param name
|
|
||||||
var qrName string
|
|
||||||
|
|
||||||
if o.Name != nil {
|
|
||||||
qrName = *o.Name
|
|
||||||
}
|
|
||||||
qName := qrName
|
|
||||||
if qName != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("name", qName); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Offset != nil {
|
|
||||||
|
|
||||||
// query param offset
|
|
||||||
var qrOffset int64
|
|
||||||
|
|
||||||
if o.Offset != nil {
|
|
||||||
qrOffset = *o.Offset
|
|
||||||
}
|
|
||||||
qOffset := swag.FormatInt64(qrOffset)
|
|
||||||
if qOffset != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,278 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetHubsReader is a Reader for the GetHubs structure.
|
|
||||||
type GetHubsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetHubsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetHubsOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetHubsUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetHubsForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetHubsNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewGetHubsUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetHubsInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsOK creates a GetHubsOK with default headers values
|
|
||||||
func NewGetHubsOK() *GetHubsOK {
|
|
||||||
return &GetHubsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Telnexus Response with Hub objects
|
|
||||||
*/
|
|
||||||
type GetHubsOK struct {
|
|
||||||
AccessControlAllowOrigin string
|
|
||||||
CacheControl string
|
|
||||||
|
|
||||||
Payload *cloud_models.HubResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /hubs][%d] getHubsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *GetHubsOK) GetPayload() *cloud_models.HubResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Origin
|
|
||||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowOrigin != "" {
|
|
||||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Cache-Control
|
|
||||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
|
||||||
|
|
||||||
if hdrCacheControl != "" {
|
|
||||||
o.CacheControl = hdrCacheControl
|
|
||||||
}
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.HubResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsUnauthorized creates a GetHubsUnauthorized with default headers values
|
|
||||||
func NewGetHubsUnauthorized() *GetHubsUnauthorized {
|
|
||||||
return &GetHubsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetHubsUnauthorized struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /hubs][%d] getHubsUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *GetHubsUnauthorized) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsForbidden creates a GetHubsForbidden with default headers values
|
|
||||||
func NewGetHubsForbidden() *GetHubsForbidden {
|
|
||||||
return &GetHubsForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetHubsForbidden struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /hubs][%d] getHubsForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *GetHubsForbidden) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsNotFound creates a GetHubsNotFound with default headers values
|
|
||||||
func NewGetHubsNotFound() *GetHubsNotFound {
|
|
||||||
return &GetHubsNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetHubsNotFound struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /hubs][%d] getHubsNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *GetHubsNotFound) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsUnprocessableEntity creates a GetHubsUnprocessableEntity with default headers values
|
|
||||||
func NewGetHubsUnprocessableEntity() *GetHubsUnprocessableEntity {
|
|
||||||
return &GetHubsUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsUnprocessableEntity describes a response with status code 422, with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type GetHubsUnprocessableEntity struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /hubs][%d] getHubsUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *GetHubsUnprocessableEntity) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetHubsInternalServerError creates a GetHubsInternalServerError with default headers values
|
|
||||||
func NewGetHubsInternalServerError() *GetHubsInternalServerError {
|
|
||||||
return &GetHubsInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GetHubsInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetHubsInternalServerError struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /hubs][%d] getHubsInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *GetHubsInternalServerError) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetHubsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,155 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewPostHubsParams creates a new PostHubsParams 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 NewPostHubsParams() *PostHubsParams {
|
|
||||||
return &PostHubsParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsParamsWithTimeout creates a new PostHubsParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewPostHubsParamsWithTimeout(timeout time.Duration) *PostHubsParams {
|
|
||||||
return &PostHubsParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsParamsWithContext creates a new PostHubsParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewPostHubsParamsWithContext(ctx context.Context) *PostHubsParams {
|
|
||||||
return &PostHubsParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsParamsWithHTTPClient creates a new PostHubsParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewPostHubsParamsWithHTTPClient(client *http.Client) *PostHubsParams {
|
|
||||||
return &PostHubsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsParams contains all the parameters to send to the API endpoint
|
|
||||||
for the post hubs operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type PostHubsParams struct {
|
|
||||||
|
|
||||||
/* HubRequest.
|
|
||||||
|
|
||||||
An array of new Hub records
|
|
||||||
*/
|
|
||||||
HubRequest *cloud_models.HubRequest
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the post hubs params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostHubsParams) WithDefaults() *PostHubsParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the post hubs params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PostHubsParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the post hubs params
|
|
||||||
func (o *PostHubsParams) WithTimeout(timeout time.Duration) *PostHubsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the post hubs params
|
|
||||||
func (o *PostHubsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the post hubs params
|
|
||||||
func (o *PostHubsParams) WithContext(ctx context.Context) *PostHubsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the post hubs params
|
|
||||||
func (o *PostHubsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the post hubs params
|
|
||||||
func (o *PostHubsParams) WithHTTPClient(client *http.Client) *PostHubsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the post hubs params
|
|
||||||
func (o *PostHubsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHubRequest adds the hubRequest to the post hubs params
|
|
||||||
func (o *PostHubsParams) WithHubRequest(hubRequest *cloud_models.HubRequest) *PostHubsParams {
|
|
||||||
o.SetHubRequest(hubRequest)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHubRequest adds the hubRequest to the post hubs params
|
|
||||||
func (o *PostHubsParams) SetHubRequest(hubRequest *cloud_models.HubRequest) {
|
|
||||||
o.HubRequest = hubRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *PostHubsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
if o.HubRequest != nil {
|
|
||||||
if err := r.SetBodyParam(o.HubRequest); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,278 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PostHubsReader is a Reader for the PostHubs structure.
|
|
||||||
type PostHubsReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *PostHubsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewPostHubsOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewPostHubsUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewPostHubsForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewPostHubsNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewPostHubsUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewPostHubsInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsOK creates a PostHubsOK with default headers values
|
|
||||||
func NewPostHubsOK() *PostHubsOK {
|
|
||||||
return &PostHubsOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Telnexus Response with Hub objects
|
|
||||||
*/
|
|
||||||
type PostHubsOK struct {
|
|
||||||
AccessControlAllowOrigin string
|
|
||||||
CacheControl string
|
|
||||||
|
|
||||||
Payload *cloud_models.HubResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsOK) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /hubs][%d] postHubsOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PostHubsOK) GetPayload() *cloud_models.HubResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Origin
|
|
||||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowOrigin != "" {
|
|
||||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Cache-Control
|
|
||||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
|
||||||
|
|
||||||
if hdrCacheControl != "" {
|
|
||||||
o.CacheControl = hdrCacheControl
|
|
||||||
}
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.HubResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsUnauthorized creates a PostHubsUnauthorized with default headers values
|
|
||||||
func NewPostHubsUnauthorized() *PostHubsUnauthorized {
|
|
||||||
return &PostHubsUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type PostHubsUnauthorized struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /hubs][%d] postHubsUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PostHubsUnauthorized) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsForbidden creates a PostHubsForbidden with default headers values
|
|
||||||
func NewPostHubsForbidden() *PostHubsForbidden {
|
|
||||||
return &PostHubsForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type PostHubsForbidden struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /hubs][%d] postHubsForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PostHubsForbidden) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsNotFound creates a PostHubsNotFound with default headers values
|
|
||||||
func NewPostHubsNotFound() *PostHubsNotFound {
|
|
||||||
return &PostHubsNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type PostHubsNotFound struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /hubs][%d] postHubsNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PostHubsNotFound) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsUnprocessableEntity creates a PostHubsUnprocessableEntity with default headers values
|
|
||||||
func NewPostHubsUnprocessableEntity() *PostHubsUnprocessableEntity {
|
|
||||||
return &PostHubsUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsUnprocessableEntity describes a response with status code 422, with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type PostHubsUnprocessableEntity struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /hubs][%d] postHubsUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PostHubsUnprocessableEntity) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPostHubsInternalServerError creates a PostHubsInternalServerError with default headers values
|
|
||||||
func NewPostHubsInternalServerError() *PostHubsInternalServerError {
|
|
||||||
return &PostHubsInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PostHubsInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type PostHubsInternalServerError struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[POST /hubs][%d] postHubsInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PostHubsInternalServerError) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PostHubsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,155 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewPutHubParams creates a new PutHubParams 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 NewPutHubParams() *PutHubParams {
|
|
||||||
return &PutHubParams{
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubParamsWithTimeout creates a new PutHubParams object
|
|
||||||
// with the ability to set a timeout on a request.
|
|
||||||
func NewPutHubParamsWithTimeout(timeout time.Duration) *PutHubParams {
|
|
||||||
return &PutHubParams{
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubParamsWithContext creates a new PutHubParams object
|
|
||||||
// with the ability to set a context for a request.
|
|
||||||
func NewPutHubParamsWithContext(ctx context.Context) *PutHubParams {
|
|
||||||
return &PutHubParams{
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubParamsWithHTTPClient creates a new PutHubParams object
|
|
||||||
// with the ability to set a custom HTTPClient for a request.
|
|
||||||
func NewPutHubParamsWithHTTPClient(client *http.Client) *PutHubParams {
|
|
||||||
return &PutHubParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubParams contains all the parameters to send to the API endpoint
|
|
||||||
for the put hub operation.
|
|
||||||
|
|
||||||
Typically these are written to a http.Request.
|
|
||||||
*/
|
|
||||||
type PutHubParams struct {
|
|
||||||
|
|
||||||
/* HubRequest.
|
|
||||||
|
|
||||||
An array of new Hub records
|
|
||||||
*/
|
|
||||||
HubRequest *cloud_models.HubRequest
|
|
||||||
|
|
||||||
timeout time.Duration
|
|
||||||
Context context.Context
|
|
||||||
HTTPClient *http.Client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaults hydrates default values in the put hub params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PutHubParams) WithDefaults() *PutHubParams {
|
|
||||||
o.SetDefaults()
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDefaults hydrates default values in the put hub params (not the query body).
|
|
||||||
//
|
|
||||||
// All values with no default are reset to their zero value.
|
|
||||||
func (o *PutHubParams) SetDefaults() {
|
|
||||||
// no default values defined for this parameter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithTimeout adds the timeout to the put hub params
|
|
||||||
func (o *PutHubParams) WithTimeout(timeout time.Duration) *PutHubParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the put hub params
|
|
||||||
func (o *PutHubParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the put hub params
|
|
||||||
func (o *PutHubParams) WithContext(ctx context.Context) *PutHubParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the put hub params
|
|
||||||
func (o *PutHubParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the put hub params
|
|
||||||
func (o *PutHubParams) WithHTTPClient(client *http.Client) *PutHubParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the put hub params
|
|
||||||
func (o *PutHubParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHubRequest adds the hubRequest to the put hub params
|
|
||||||
func (o *PutHubParams) WithHubRequest(hubRequest *cloud_models.HubRequest) *PutHubParams {
|
|
||||||
o.SetHubRequest(hubRequest)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHubRequest adds the hubRequest to the put hub params
|
|
||||||
func (o *PutHubParams) SetHubRequest(hubRequest *cloud_models.HubRequest) {
|
|
||||||
o.HubRequest = hubRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *PutHubParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
if o.HubRequest != nil {
|
|
||||||
if err := r.SetBodyParam(o.HubRequest); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,278 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package hub
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/cloud/cloud_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PutHubReader is a Reader for the PutHub structure.
|
|
||||||
type PutHubReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *PutHubReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewPutHubOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewPutHubUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewPutHubForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewPutHubNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewPutHubUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewPutHubInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubOK creates a PutHubOK with default headers values
|
|
||||||
func NewPutHubOK() *PutHubOK {
|
|
||||||
return &PutHubOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubOK describes a response with status code 200, with default header values.
|
|
||||||
|
|
||||||
Telnexus Response with Hub objects
|
|
||||||
*/
|
|
||||||
type PutHubOK struct {
|
|
||||||
AccessControlAllowOrigin string
|
|
||||||
CacheControl string
|
|
||||||
|
|
||||||
Payload *cloud_models.HubResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubOK) Error() string {
|
|
||||||
return fmt.Sprintf("[PUT /hubs][%d] putHubOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PutHubOK) GetPayload() *cloud_models.HubResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
// hydrates response header Access-Control-Allow-Origin
|
|
||||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
||||||
|
|
||||||
if hdrAccessControlAllowOrigin != "" {
|
|
||||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
||||||
}
|
|
||||||
|
|
||||||
// hydrates response header Cache-Control
|
|
||||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
|
||||||
|
|
||||||
if hdrCacheControl != "" {
|
|
||||||
o.CacheControl = hdrCacheControl
|
|
||||||
}
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.HubResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubUnauthorized creates a PutHubUnauthorized with default headers values
|
|
||||||
func NewPutHubUnauthorized() *PutHubUnauthorized {
|
|
||||||
return &PutHubUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubUnauthorized describes a response with status code 401, with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type PutHubUnauthorized struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[PUT /hubs][%d] putHubUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PutHubUnauthorized) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubForbidden creates a PutHubForbidden with default headers values
|
|
||||||
func NewPutHubForbidden() *PutHubForbidden {
|
|
||||||
return &PutHubForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubForbidden describes a response with status code 403, with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type PutHubForbidden struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[PUT /hubs][%d] putHubForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PutHubForbidden) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubNotFound creates a PutHubNotFound with default headers values
|
|
||||||
func NewPutHubNotFound() *PutHubNotFound {
|
|
||||||
return &PutHubNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubNotFound describes a response with status code 404, with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type PutHubNotFound struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[PUT /hubs][%d] putHubNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PutHubNotFound) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubUnprocessableEntity creates a PutHubUnprocessableEntity with default headers values
|
|
||||||
func NewPutHubUnprocessableEntity() *PutHubUnprocessableEntity {
|
|
||||||
return &PutHubUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubUnprocessableEntity describes a response with status code 422, with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type PutHubUnprocessableEntity struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[PUT /hubs][%d] putHubUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PutHubUnprocessableEntity) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPutHubInternalServerError creates a PutHubInternalServerError with default headers values
|
|
||||||
func NewPutHubInternalServerError() *PutHubInternalServerError {
|
|
||||||
return &PutHubInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PutHubInternalServerError describes a response with status code 500, with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type PutHubInternalServerError struct {
|
|
||||||
Payload *cloud_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[PUT /hubs][%d] putHubInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
func (o *PutHubInternalServerError) GetPayload() *cloud_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *PutHubInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(cloud_models.Error)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cloud_models
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Error error
|
|
||||||
//
|
|
||||||
// swagger:model Error
|
|
||||||
type Error struct {
|
|
||||||
|
|
||||||
// code
|
|
||||||
Code int32 `json:"Code,omitempty"`
|
|
||||||
|
|
||||||
// fields
|
|
||||||
Fields string `json:"Fields,omitempty"`
|
|
||||||
|
|
||||||
// message
|
|
||||||
Message string `json:"Message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this error
|
|
||||||
func (m *Error) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this error based on context it is used
|
|
||||||
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *Error) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *Error) UnmarshalBinary(b []byte) error {
|
|
||||||
var res Error
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,93 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cloud_models
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Hub hub
|
|
||||||
//
|
|
||||||
// swagger:model Hub
|
|
||||||
type Hub struct {
|
|
||||||
|
|
||||||
// Account
|
|
||||||
AccountID string `json:"AccountID,omitempty"`
|
|
||||||
|
|
||||||
// Billing Contact
|
|
||||||
BillingContactID string `json:"BillingContactID,omitempty"`
|
|
||||||
|
|
||||||
// Contact
|
|
||||||
ContactID string `json:"ContactID,omitempty"`
|
|
||||||
|
|
||||||
// Created By
|
|
||||||
CreatedByID string `json:"CreatedById,omitempty"`
|
|
||||||
|
|
||||||
// Created Date
|
|
||||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
|
||||||
|
|
||||||
// Current Users
|
|
||||||
CurrentUsers float64 `json:"CurrentUsers,omitempty"`
|
|
||||||
|
|
||||||
// Record Id
|
|
||||||
ID string `json:"ID,omitempty"`
|
|
||||||
|
|
||||||
// Last Modified By
|
|
||||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
|
||||||
|
|
||||||
// Last Modifed Date
|
|
||||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
|
||||||
|
|
||||||
// Max Users
|
|
||||||
MaxUsers float64 `json:"MaxUsers,omitempty"`
|
|
||||||
|
|
||||||
// Hub Name
|
|
||||||
Name string `json:"Name,omitempty"`
|
|
||||||
|
|
||||||
// Order Item
|
|
||||||
OrderItem string `json:"OrderItem,omitempty"`
|
|
||||||
|
|
||||||
// Vendor
|
|
||||||
VendorID string `json:"VendorID,omitempty"`
|
|
||||||
|
|
||||||
// Vendor Tenant ID
|
|
||||||
VendorTenantID string `json:"VendorTenantID,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this hub
|
|
||||||
func (m *Hub) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this hub based on context it is used
|
|
||||||
func (m *Hub) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *Hub) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *Hub) UnmarshalBinary(b []byte) error {
|
|
||||||
var res Hub
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,116 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cloud_models
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HubRequest An array of Hub objects
|
|
||||||
//
|
|
||||||
// swagger:model HubRequest
|
|
||||||
type HubRequest struct {
|
|
||||||
|
|
||||||
// data
|
|
||||||
Data []*Hub `json:"Data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this hub request
|
|
||||||
func (m *HubRequest) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateData(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *HubRequest) validateData(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.Data) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Data); i++ {
|
|
||||||
if swag.IsZero(m.Data[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Data[i] != nil {
|
|
||||||
if err := m.Data[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this hub request based on the context it is used
|
|
||||||
func (m *HubRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *HubRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(m.Data); i++ {
|
|
||||||
|
|
||||||
if m.Data[i] != nil {
|
|
||||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *HubRequest) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *HubRequest) UnmarshalBinary(b []byte) error {
|
|
||||||
var res HubRequest
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cloud_models
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResponseMeta response meta
|
|
||||||
//
|
|
||||||
// swagger:model ResponseMeta
|
|
||||||
type ResponseMeta struct {
|
|
||||||
|
|
||||||
// Microservice Contact Info
|
|
||||||
Contact string `json:"Contact,omitempty"`
|
|
||||||
|
|
||||||
// Copyright Info
|
|
||||||
Copyright string `json:"Copyright,omitempty"`
|
|
||||||
|
|
||||||
// License Information and Restrictions
|
|
||||||
License string `json:"License,omitempty"`
|
|
||||||
|
|
||||||
// Operation ID
|
|
||||||
OperationID string `json:"OperationID,omitempty"`
|
|
||||||
|
|
||||||
// Request IP Address
|
|
||||||
RequestIP string `json:"RequestIP,omitempty"`
|
|
||||||
|
|
||||||
// Request Type
|
|
||||||
RequestType string `json:"RequestType,omitempty"`
|
|
||||||
|
|
||||||
// Request URL
|
|
||||||
RequestURL string `json:"RequestURL,omitempty"`
|
|
||||||
|
|
||||||
// Data Server Info
|
|
||||||
ServerInfo string `json:"ServerInfo,omitempty"`
|
|
||||||
|
|
||||||
// Data Server Response Time (ms)
|
|
||||||
ServerResponseTime string `json:"ServerResponseTime,omitempty"`
|
|
||||||
|
|
||||||
// Backend Server Timestamp
|
|
||||||
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
|
|
||||||
|
|
||||||
// Taxnexus Account Number used for recording transactions
|
|
||||||
TelnexusAccount string `json:"TelnexusAccount,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this response meta
|
|
||||||
func (m *ResponseMeta) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this response meta based on context it is used
|
|
||||||
func (m *ResponseMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *ResponseMeta) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *ResponseMeta) UnmarshalBinary(b []byte) error {
|
|
||||||
var res ResponseMeta
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,376 +0,0 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
|
||||||
// All rights reserved worldwide.
|
|
||||||
// Proprietary product; unlicensed use is not allowed
|
|
||||||
|
|
||||||
package cloud_models
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// User user
|
|
||||||
//
|
|
||||||
// swagger:model User
|
|
||||||
type User struct {
|
|
||||||
|
|
||||||
// API Key
|
|
||||||
APIKey string `json:"APIKey,omitempty"`
|
|
||||||
|
|
||||||
// About Me
|
|
||||||
AboutMe string `json:"AboutMe,omitempty"`
|
|
||||||
|
|
||||||
// Account ID
|
|
||||||
AccountID string `json:"AccountID,omitempty"`
|
|
||||||
|
|
||||||
// address
|
|
||||||
Address *Address `json:"Address,omitempty"`
|
|
||||||
|
|
||||||
// Alias
|
|
||||||
Alias string `json:"Alias,omitempty"`
|
|
||||||
|
|
||||||
// Auth0 User Id
|
|
||||||
Auth0UserID string `json:"Auth0UserID,omitempty"`
|
|
||||||
|
|
||||||
// Nickname
|
|
||||||
CommunityNickname string `json:"CommunityNickname,omitempty"`
|
|
||||||
|
|
||||||
// Company Name
|
|
||||||
CompanyName string `json:"CompanyName,omitempty"`
|
|
||||||
|
|
||||||
// Contact
|
|
||||||
ContactID string `json:"ContactID,omitempty"`
|
|
||||||
|
|
||||||
// Created User ID
|
|
||||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
|
||||||
|
|
||||||
// Date Created
|
|
||||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
|
||||||
|
|
||||||
// Delegated Approver
|
|
||||||
DelegatedApproverID string `json:"DelegatedApproverID,omitempty"`
|
|
||||||
|
|
||||||
// Department
|
|
||||||
Department string `json:"Department,omitempty"`
|
|
||||||
|
|
||||||
// Division
|
|
||||||
Division string `json:"Division,omitempty"`
|
|
||||||
|
|
||||||
// Email address
|
|
||||||
Email string `json:"Email,omitempty"`
|
|
||||||
|
|
||||||
// Employee Number
|
|
||||||
EmployeeNumber string `json:"EmployeeNumber,omitempty"`
|
|
||||||
|
|
||||||
// Time day ends
|
|
||||||
EndOfDay string `json:"EndOfDay,omitempty"`
|
|
||||||
|
|
||||||
// Environment
|
|
||||||
Environment string `json:"Environment,omitempty"`
|
|
||||||
|
|
||||||
// Extension
|
|
||||||
Extension string `json:"Extension,omitempty"`
|
|
||||||
|
|
||||||
// Fabric API Key
|
|
||||||
FabricAPIKey string `json:"FabricAPIKey,omitempty"`
|
|
||||||
|
|
||||||
// Fax
|
|
||||||
Fax string `json:"Fax,omitempty"`
|
|
||||||
|
|
||||||
// The first name
|
|
||||||
FirstName string `json:"FirstName,omitempty"`
|
|
||||||
|
|
||||||
// Allow Forecasting
|
|
||||||
ForecastEnabled bool `json:"ForecastEnabled,omitempty"`
|
|
||||||
|
|
||||||
// Full Photo URL
|
|
||||||
FullPhotoURL string `json:"FullPhotoURL,omitempty"`
|
|
||||||
|
|
||||||
// Taxnexus ID
|
|
||||||
ID string `json:"ID,omitempty"`
|
|
||||||
|
|
||||||
// Active
|
|
||||||
IsActive bool `json:"IsActive,omitempty"`
|
|
||||||
|
|
||||||
// Is the user enabled for Communities?
|
|
||||||
IsPortalEnabled bool `json:"IsPortalEnabled,omitempty"`
|
|
||||||
|
|
||||||
// Has Profile Photo
|
|
||||||
IsProphilePhotoActive bool `json:"IsProphilePhotoActive,omitempty"`
|
|
||||||
|
|
||||||
// is system controlled
|
|
||||||
IsSystemControlled bool `json:"IsSystemControlled,omitempty"`
|
|
||||||
|
|
||||||
// IP address of last login
|
|
||||||
LastIP string `json:"LastIP,omitempty"`
|
|
||||||
|
|
||||||
// Last login time
|
|
||||||
LastLogin string `json:"LastLogin,omitempty"`
|
|
||||||
|
|
||||||
// Last Modified User ID
|
|
||||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
|
||||||
|
|
||||||
// Last Modified Date
|
|
||||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
|
||||||
|
|
||||||
// The Last Name
|
|
||||||
LastName string `json:"LastName,omitempty"`
|
|
||||||
|
|
||||||
// Number of times user has logged in
|
|
||||||
LoginCount int64 `json:"LoginCount,omitempty"`
|
|
||||||
|
|
||||||
// Manager
|
|
||||||
ManagerID string `json:"ManagerID,omitempty"`
|
|
||||||
|
|
||||||
// Mobile
|
|
||||||
MobilePhone string `json:"MobilePhone,omitempty"`
|
|
||||||
|
|
||||||
// Name
|
|
||||||
Name string `json:"Name,omitempty"`
|
|
||||||
|
|
||||||
// Out of office message
|
|
||||||
OutOfOfficeMessage string `json:"OutOfOfficeMessage,omitempty"`
|
|
||||||
|
|
||||||
// Phone
|
|
||||||
Phone string `json:"Phone,omitempty"`
|
|
||||||
|
|
||||||
// Portal Role Level
|
|
||||||
PortalRole string `json:"PortalRole,omitempty"`
|
|
||||||
|
|
||||||
// Profile
|
|
||||||
ProfileID string `json:"ProfileID,omitempty"`
|
|
||||||
|
|
||||||
// Info Emails
|
|
||||||
ReceivesAdminEmails bool `json:"ReceivesAdminEmails,omitempty"`
|
|
||||||
|
|
||||||
// Admin Info Emails
|
|
||||||
ReceivesAdminInfoEmails bool `json:"ReceivesAdminInfoEmails,omitempty"`
|
|
||||||
|
|
||||||
// Email Sender Address
|
|
||||||
SenderEmail string `json:"SenderEmail,omitempty"`
|
|
||||||
|
|
||||||
// Email Sender Name
|
|
||||||
SenderName string `json:"SenderName,omitempty"`
|
|
||||||
|
|
||||||
// Email Signature
|
|
||||||
Signature string `json:"Signature,omitempty"`
|
|
||||||
|
|
||||||
// Small Photo URL
|
|
||||||
SmallPhotoURL string `json:"SmallPhotoURL,omitempty"`
|
|
||||||
|
|
||||||
// The time day starts
|
|
||||||
StartOfDay string `json:"StartOfDay,omitempty"`
|
|
||||||
|
|
||||||
// Taxnexus Account
|
|
||||||
TelnexusAccount string `json:"TelnexusAccount,omitempty"`
|
|
||||||
|
|
||||||
// Tenant ID associated with this user
|
|
||||||
TenantID string `json:"TenantID,omitempty"`
|
|
||||||
|
|
||||||
// tenant users
|
|
||||||
TenantUsers []*TenantUser `json:"TenantUsers"`
|
|
||||||
|
|
||||||
// Time Zone
|
|
||||||
TimeZone string `json:"TimeZone,omitempty"`
|
|
||||||
|
|
||||||
// Title
|
|
||||||
Title string `json:"Title,omitempty"`
|
|
||||||
|
|
||||||
// Role
|
|
||||||
UserRoleID string `json:"UserRoleID,omitempty"`
|
|
||||||
|
|
||||||
// user roles
|
|
||||||
UserRoles []*UserRole `json:"UserRoles"`
|
|
||||||
|
|
||||||
// User Type
|
|
||||||
UserType string `json:"UserType,omitempty"`
|
|
||||||
|
|
||||||
// Username
|
|
||||||
Username string `json:"Username,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this user
|
|
||||||
func (m *User) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateAddress(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateTenantUsers(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateUserRoles(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) validateAddress(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.Address) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Address != nil {
|
|
||||||
if err := m.Address.Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("Address")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) validateTenantUsers(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.TenantUsers) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(m.TenantUsers); i++ {
|
|
||||||
if swag.IsZero(m.TenantUsers[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.TenantUsers[i] != nil {
|
|
||||||
if err := m.TenantUsers[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("TenantUsers" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) validateUserRoles(formats strfmt.Registry) error {
|
|
||||||
if swag.IsZero(m.UserRoles) { // not required
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < len(m.UserRoles); i++ {
|
|
||||||
if swag.IsZero(m.UserRoles[i]) { // not required
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.UserRoles[i] != nil {
|
|
||||||
if err := m.UserRoles[i].Validate(formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("UserRoles" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validate this user based on the context it is used
|
|
||||||
func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.contextValidateAddress(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.contextValidateTenantUsers(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.contextValidateUserRoles(ctx, formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if m.Address != nil {
|
|
||||||
if err := m.Address.ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("Address")
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) contextValidateTenantUsers(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(m.TenantUsers); i++ {
|
|
||||||
|
|
||||||
if m.TenantUsers[i] != nil {
|
|
||||||
if err := m.TenantUsers[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("TenantUsers" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *User) contextValidateUserRoles(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
for i := 0; i < len(m.UserRoles); i++ {
|
|
||||||
|
|
||||||
if m.UserRoles[i] != nil {
|
|
||||||
if err := m.UserRoles[i].ContextValidate(ctx, formats); err != nil {
|
|
||||||
if ve, ok := err.(*errors.Validation); ok {
|
|
||||||
return ve.ValidateName("UserRoles" + "." + strconv.Itoa(i))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *User) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *User) UnmarshalBinary(b []byte) error {
|
|
||||||
var res User
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ type ClientService interface {
|
||||||
/*
|
/*
|
||||||
DeleteAccount deletes an account
|
DeleteAccount deletes an account
|
||||||
|
|
||||||
Delete Telnexus Account record
|
Delete Taxnexus Account record
|
||||||
*/
|
*/
|
||||||
func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAccountOK, error) {
|
func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAccountOK, error) {
|
||||||
// TODO: Validate the params before sending
|
// TODO: Validate the params before sending
|
||||||
|
@ -130,7 +130,7 @@ func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientA
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetAccountsObservable gets telnexus accounts in an observable array
|
GetAccountsObservable gets taxnexus accounts in an observable array
|
||||||
|
|
||||||
A list of accounts in a simple JSON array
|
A list of accounts in a simple JSON array
|
||||||
*/
|
*/
|
||||||
|
@ -171,7 +171,7 @@ func (a *Client) GetAccountsObservable(params *GetAccountsObservableParams, auth
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PostAccounts adds a new account to telnexus
|
PostAccounts adds a new account to taxnexus
|
||||||
|
|
||||||
Account record to be added
|
Account record to be added
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ type DeleteAccountParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Telnexus Record Id of an Account
|
Taxnexus Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewDeleteAccountOK() *DeleteAccountOK {
|
||||||
|
|
||||||
/* DeleteAccountOK describes a response with status code 200, with default header values.
|
/* DeleteAccountOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Message Objects with Delete Status
|
Taxnexus Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteAccountOK struct {
|
type DeleteAccountOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ type GetAccountsObservableParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Telnexus Record Id of an Account
|
Taxnexus Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetAccountsObservableOK() *GetAccountsObservableOK {
|
||||||
|
|
||||||
/* GetAccountsObservableOK describes a response with status code 200, with default header values.
|
/* GetAccountsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with an array of Account objects
|
Taxnexus Response with an array of Account objects
|
||||||
*/
|
*/
|
||||||
type GetAccountsObservableOK struct {
|
type GetAccountsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ type GetAccountsParams struct {
|
||||||
|
|
||||||
/* AccountID.
|
/* AccountID.
|
||||||
|
|
||||||
Telnexus Record Id of an Account
|
Taxnexus Record Id of an Account
|
||||||
*/
|
*/
|
||||||
AccountID *string
|
AccountID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetAccountsOK() *GetAccountsOK {
|
||||||
|
|
||||||
/* GetAccountsOK describes a response with status code 200, with default header values.
|
/* GetAccountsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Account objects with Contacts
|
Taxnexus Response with Account objects with Contacts
|
||||||
*/
|
*/
|
||||||
type GetAccountsOK struct {
|
type GetAccountsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewPostAccountsOK() *PostAccountsOK {
|
||||||
|
|
||||||
/* PostAccountsOK describes a response with status code 200, with default header values.
|
/* PostAccountsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Account objects with Contacts
|
Taxnexus Response with Account objects with Contacts
|
||||||
*/
|
*/
|
||||||
type PostAccountsOK struct {
|
type PostAccountsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewPutAccountOK() *PutAccountOK {
|
||||||
|
|
||||||
/* PutAccountOK describes a response with status code 200, with default header values.
|
/* PutAccountOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Account objects with Contacts
|
Taxnexus Response with Account objects with Contacts
|
||||||
*/
|
*/
|
||||||
type PutAccountOK struct {
|
type PutAccountOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.Clien
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetCompaniesObservable gets telnexus companies in an observable array
|
GetCompaniesObservable gets taxnexus companies in an observable array
|
||||||
|
|
||||||
A list of companies in a simple JSON array
|
A list of companies in a simple JSON array
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ type GetCompaniesObservableParams struct {
|
||||||
|
|
||||||
/* CompanyID.
|
/* CompanyID.
|
||||||
|
|
||||||
Telnexus Company record ID
|
Taxnexus Company record ID
|
||||||
*/
|
*/
|
||||||
CompanyID *string
|
CompanyID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetCompaniesObservableOK() *GetCompaniesObservableOK {
|
||||||
|
|
||||||
/* GetCompaniesObservableOK describes a response with status code 200, with default header values.
|
/* GetCompaniesObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with an array of Company objects
|
Taxnexus Response with an array of Company objects
|
||||||
*/
|
*/
|
||||||
type GetCompaniesObservableOK struct {
|
type GetCompaniesObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ type GetCompaniesParams struct {
|
||||||
|
|
||||||
/* CompanyID.
|
/* CompanyID.
|
||||||
|
|
||||||
Telnexus Company record ID
|
Taxnexus Company record ID
|
||||||
*/
|
*/
|
||||||
CompanyID *string
|
CompanyID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetCompaniesOK() *GetCompaniesOK {
|
||||||
|
|
||||||
/* GetCompaniesOK describes a response with status code 200, with default header values.
|
/* GetCompaniesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Company objects
|
Taxnexus Response with Company objects
|
||||||
*/
|
*/
|
||||||
type GetCompaniesOK struct {
|
type GetCompaniesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewPostCompaniesOK() *PostCompaniesOK {
|
||||||
|
|
||||||
/* PostCompaniesOK describes a response with status code 200, with default header values.
|
/* PostCompaniesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Company objects
|
Taxnexus Response with Company objects
|
||||||
*/
|
*/
|
||||||
type PostCompaniesOK struct {
|
type PostCompaniesOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ type ClientService interface {
|
||||||
/*
|
/*
|
||||||
DeleteContact deletes a contact
|
DeleteContact deletes a contact
|
||||||
|
|
||||||
Delete Telnexus Contact record
|
Delete Taxnexus Contact record
|
||||||
*/
|
*/
|
||||||
func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteContactOK, error) {
|
func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteContactOK, error) {
|
||||||
// TODO: Validate the params before sending
|
// TODO: Validate the params before sending
|
||||||
|
@ -130,7 +130,7 @@ func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientA
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetContactsObservable gets telnexus contacts in an observable array
|
GetContactsObservable gets taxnexus contacts in an observable array
|
||||||
|
|
||||||
A list of contacts in a simple JSON array
|
A list of contacts in a simple JSON array
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ type DeleteContactParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Telnexus Contact record ID
|
Taxnexus Contact record ID
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewDeleteContactOK() *DeleteContactOK {
|
||||||
|
|
||||||
/* DeleteContactOK describes a response with status code 200, with default header values.
|
/* DeleteContactOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with Message Objects with Delete Status
|
Taxnexus Response with Message Objects with Delete Status
|
||||||
*/
|
*/
|
||||||
type DeleteContactOK struct {
|
type DeleteContactOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ type GetContactsObservableParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Telnexus Contact record ID
|
Taxnexus Contact record ID
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetContactsObservableOK() *GetContactsObservableOK {
|
||||||
|
|
||||||
/* GetContactsObservableOK describes a response with status code 200, with default header values.
|
/* GetContactsObservableOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with an array of Contact objects
|
Taxnexus Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type GetContactsObservableOK struct {
|
type GetContactsObservableOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ type GetContactsParams struct {
|
||||||
|
|
||||||
/* ContactID.
|
/* ContactID.
|
||||||
|
|
||||||
Telnexus Contact record ID
|
Taxnexus Contact record ID
|
||||||
*/
|
*/
|
||||||
ContactID *string
|
ContactID *string
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewGetContactsOK() *GetContactsOK {
|
||||||
|
|
||||||
/* GetContactsOK describes a response with status code 200, with default header values.
|
/* GetContactsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with an array of Contact objects
|
Taxnexus Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type GetContactsOK struct {
|
type GetContactsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewPostContactsOK() *PostContactsOK {
|
||||||
|
|
||||||
/* PostContactsOK describes a response with status code 200, with default header values.
|
/* PostContactsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with an array of Contact objects
|
Taxnexus Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type PostContactsOK struct {
|
type PostContactsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ func NewPutContactsOK() *PutContactsOK {
|
||||||
|
|
||||||
/* PutContactsOK describes a response with status code 200, with default header values.
|
/* PutContactsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Telnexus Response with an array of Contact objects
|
Taxnexus Response with an array of Contact objects
|
||||||
*/
|
*/
|
||||||
type PutContactsOK struct {
|
type PutContactsOK struct {
|
||||||
AccessControlAllowOrigin string
|
AccessControlAllowOrigin string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go-swagger; DO NOT EDIT.
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
// (c) 2012-2020 by Telnexus LLC
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||||||
// All rights reserved worldwide.
|
// All rights reserved worldwide.
|
||||||
// Proprietary product; unlicensed use is not allowed
|
// Proprietary product; unlicensed use is not allowed
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue