Merge pull request #1298 from openziti/use.edge-api

Use.edge api
This commit is contained in:
Andrew
2023-01-25 10:05:02 -05:00
committed by GitHub
1863 changed files with 158 additions and 346917 deletions
+4 -4
View File
@@ -30,6 +30,10 @@ import (
"github.com/lucsky/cuid"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/channel/v2"
clientServer "github.com/openziti/edge-api/rest_client_api_server"
clientOperations "github.com/openziti/edge-api/rest_client_api_server/operations"
managementServer "github.com/openziti/edge-api/rest_management_api_server"
managementOperations "github.com/openziti/edge-api/rest_management_api_server/operations"
edgeConfig "github.com/openziti/edge/controller/config"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
@@ -39,10 +43,6 @@ import (
"github.com/openziti/edge/events"
"github.com/openziti/edge/internal/cert"
"github.com/openziti/edge/internal/jwtsigner"
clientServer "github.com/openziti/edge/rest_client_api_server"
clientOperations "github.com/openziti/edge/rest_client_api_server/operations"
managementServer "github.com/openziti/edge/rest_management_api_server"
managementOperations "github.com/openziti/edge/rest_management_api_server/operations"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/fabric/controller/network"
"github.com/openziti/fabric/controller/xctrl"
@@ -20,10 +20,10 @@ import (
"fmt"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
"net/http"
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/api_session"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/api_session"
)
func init() {
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/auth_policy"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/auth_policy"
"github.com/openziti/fabric/controller/fields"
)
@@ -21,14 +21,14 @@ import (
"github.com/google/uuid"
"github.com/michaelquigley/pfxlog"
"github.com/mitchellh/mapstructure"
clientApiAuthentication "github.com/openziti/edge-api/rest_client_api_server/operations/authentication"
managementApiAuthentication "github.com/openziti/edge-api/rest_management_api_server/operations/authentication"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
clientApiAuthentication "github.com/openziti/edge/rest_client_api_server/operations/authentication"
managementApiAuthentication "github.com/openziti/edge/rest_management_api_server/operations/authentication"
"github.com/openziti/edge/rest_model"
"github.com/openziti/foundation/v2/errorz"
"github.com/openziti/metrics"
"github.com/openziti/sdk-golang/ziti/constants"
@@ -19,11 +19,11 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/errorz"
"github.com/openziti/foundation/v2/stringz"
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/authenticator"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/authenticator"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/foundation/v2/errorz"
"github.com/pkg/errors"
@@ -18,7 +18,7 @@ package routes
import (
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/fabric/controller/models"
"path"
)
@@ -36,7 +36,7 @@ func BaseEntityToRestModel(entity models.Entity, linkFactory LinksFactory) rest_
CreatedAt: &createdAt,
UpdatedAt: &updatedAt,
Links: linkFactory.Links(entity),
Tags: &tags,
Tags: &tags,
}
if ret.Tags.SubTags == nil {
+1 -1
View File
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
edgeApiError "github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/fabric/controller/apierror"
"github.com/openziti/fabric/controller/fields"
+1 -1
View File
@@ -21,10 +21,10 @@ import (
"github.com/go-openapi/strfmt"
"github.com/google/uuid"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
+1 -1
View File
@@ -23,11 +23,11 @@ import (
"github.com/go-openapi/runtime/middleware"
"github.com/golang-jwt/jwt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_management_api_server/operations/certificate_authority"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/certificate_authority"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/sdk-golang/ziti/config"
"github.com/openziti/storage/boltz"
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/errorz"
"github.com/openziti/foundation/v2/stringz"
+1 -1
View File
@@ -19,10 +19,10 @@ package routes
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/config"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/config"
"github.com/openziti/fabric/controller/fields"
)
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -19,10 +19,10 @@ package routes
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/config"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/config"
"github.com/openziti/fabric/controller/fields"
)
@@ -20,10 +20,10 @@ import (
"fmt"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"time"
)
@@ -19,12 +19,12 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
clientCurrentApiSession "github.com/openziti/edge-api/rest_client_api_server/operations/current_api_session"
managementCurrentApiSession "github.com/openziti/edge-api/rest_management_api_server/operations/current_api_session"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
clientCurrentApiSession "github.com/openziti/edge/rest_client_api_server/operations/current_api_session"
managementCurrentApiSession "github.com/openziti/edge/rest_management_api_server/operations/current_api_session"
"github.com/openziti/edge/rest_model"
"github.com/openziti/foundation/v2/stringz"
"net/http"
"time"
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"path"
)
@@ -17,8 +17,8 @@
package routes
import (
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"path"
)
@@ -20,13 +20,13 @@ import (
"crypto/x509"
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
clientCurrentApiSession "github.com/openziti/edge-api/rest_client_api_server/operations/current_api_session"
managementCurrentApiSession "github.com/openziti/edge-api/rest_management_api_server/operations/current_api_session"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
clientCurrentApiSession "github.com/openziti/edge/rest_client_api_server/operations/current_api_session"
managementCurrentApiSession "github.com/openziti/edge/rest_management_api_server/operations/current_api_session"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/errorz"
@@ -19,14 +19,14 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
clientCurrentIdentity "github.com/openziti/edge-api/rest_client_api_server/operations/current_identity"
managementCurrentIdentity "github.com/openziti/edge-api/rest_management_api_server/operations/current_identity"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
clientCurrentIdentity "github.com/openziti/edge/rest_client_api_server/operations/current_identity"
managementCurrentIdentity "github.com/openziti/edge/rest_management_api_server/operations/current_identity"
"github.com/openziti/edge/rest_model"
"github.com/openziti/foundation/v2/errorz"
"github.com/openziti/storage/boltz"
"github.com/pkg/errors"
@@ -21,12 +21,12 @@ import (
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_management_api_server/operations/database"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/database"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/network"
"net/http"
"sync"
@@ -24,10 +24,10 @@ import (
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/edge_router_policy"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/edge_router_policy"
"github.com/openziti/fabric/controller/fields"
)
@@ -18,12 +18,12 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/edge_router"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/edge_router"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/storage/ast"
+3 -3
View File
@@ -24,15 +24,15 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_client_api_server/operations/enroll"
"github.com/openziti/edge-api/rest_client_api_server/operations/well_known"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
cert2 "github.com/openziti/edge/internal/cert"
"github.com/openziti/edge/rest_client_api_server/operations/enroll"
"github.com/openziti/edge/rest_client_api_server/operations/well_known"
"github.com/openziti/edge/rest_model"
"github.com/openziti/foundation/v2/errorz"
"net/http"
"strings"
@@ -20,10 +20,10 @@ import (
"fmt"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -18,12 +18,12 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/enrollment"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/enrollment"
"github.com/openziti/edge/rest_model"
"github.com/openziti/foundation/v2/errorz"
"time"
)
@@ -20,10 +20,10 @@ import (
"fmt"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -19,11 +19,11 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_management_api_server/operations/external_jwt_signer"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/external_jwt_signer"
"github.com/openziti/fabric/controller/fields"
)
@@ -21,11 +21,11 @@ import (
"github.com/go-openapi/strfmt"
"github.com/google/uuid"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
"github.com/openziti/sdk-golang/ziti"
@@ -22,13 +22,13 @@ import (
"github.com/go-openapi/strfmt"
"github.com/google/uuid"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_management_api_server/operations/identity"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/identity"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/fabric/logcontext"
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
)
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/identity"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/identity"
)
func init() {
@@ -20,10 +20,10 @@ import (
"fmt"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
"strings"
@@ -18,11 +18,11 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/posture_checks"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/posture_checks"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/fabric/controller/models"
)
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
)
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/posture_checks"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/posture_checks"
)
func init() {
@@ -19,9 +19,9 @@ package routes
import (
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/rest_model"
"time"
)
@@ -17,9 +17,9 @@
package routes
import (
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"net/http"
)
@@ -18,12 +18,12 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_client_api_server/operations/posture_checks"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_client_api_server/operations/posture_checks"
"github.com/openziti/edge/rest_model"
"time"
)
@@ -18,11 +18,11 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_client_api_server/operations/informational"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_client_api_server/operations/informational"
"github.com/openziti/edge/rest_model"
)
func init() {
@@ -18,11 +18,11 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/role_attributes"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/role_attributes"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
)
@@ -5,10 +5,10 @@ import (
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
+2 -2
View File
@@ -18,11 +18,11 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/router"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/router"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/fields"
)
+1 -1
View File
@@ -18,9 +18,9 @@ package routes
import (
"github.com/go-openapi/strfmt"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/errorz"
"net/http"
@@ -19,11 +19,11 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
"strings"
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/service_edge_router_policy"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/service_edge_router_policy"
"github.com/openziti/fabric/controller/fields"
)
@@ -19,10 +19,10 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/foundation/v2/stringz"
)
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/service_policy"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/service_policy"
"github.com/openziti/fabric/controller/fields"
)
+2 -2
View File
@@ -20,8 +20,8 @@ import (
"fmt"
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
clientService "github.com/openziti/edge/rest_client_api_server/operations/service"
managementService "github.com/openziti/edge/rest_management_api_server/operations/service"
clientService "github.com/openziti/edge-api/rest_client_api_server/operations/service"
managementService "github.com/openziti/edge-api/rest_management_api_server/operations/service"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/metrics"
@@ -21,10 +21,10 @@ import (
"github.com/google/uuid"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/model"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
)
@@ -17,9 +17,9 @@
package routes
import (
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"net/http"
)
+4 -4
View File
@@ -18,13 +18,13 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_client_api_server/operations/session"
clientSession "github.com/openziti/edge-api/rest_client_api_server/operations/session"
managementSession "github.com/openziti/edge-api/rest_management_api_server/operations/session"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_client_api_server/operations/session"
clientSession "github.com/openziti/edge/rest_client_api_server/operations/session"
managementSession "github.com/openziti/edge/rest_management_api_server/operations/session"
"github.com/openziti/edge/rest_model"
"github.com/openziti/metrics"
"time"
)
+5 -5
View File
@@ -21,14 +21,14 @@ import (
"fmt"
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_client_api_server"
clientInformational "github.com/openziti/edge-api/rest_client_api_server/operations/informational"
"github.com/openziti/edge-api/rest_management_api_server"
managementInformational "github.com/openziti/edge-api/rest_management_api_server/operations/informational"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_client_api_server"
clientInformational "github.com/openziti/edge/rest_client_api_server/operations/informational"
"github.com/openziti/edge/rest_management_api_server"
managementInformational "github.com/openziti/edge/rest_management_api_server/operations/informational"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/build"
"github.com/openziti/fabric/controller/models"
"time"
+2 -2
View File
@@ -18,11 +18,11 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/informational"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/informational"
"github.com/openziti/edge/rest_model"
)
func init() {
@@ -19,9 +19,9 @@ package routes
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/fabric/controller/models"
"github.com/openziti/fabric/controller/network"
@@ -18,10 +18,10 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
"github.com/openziti/edge-api/rest_management_api_server/operations/terminator"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server/operations/terminator"
"github.com/openziti/fabric/controller/api_impl"
"github.com/openziti/fabric/controller/fields"
"github.com/openziti/fabric/controller/network"
+3 -3
View File
@@ -19,13 +19,13 @@ package routes
import (
"github.com/go-openapi/runtime/middleware"
clientInformational "github.com/openziti/edge-api/rest_client_api_server/operations/informational"
managementInformational "github.com/openziti/edge-api/rest_management_api_server/operations/informational"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
clientInformational "github.com/openziti/edge/rest_client_api_server/operations/informational"
managementInformational "github.com/openziti/edge/rest_management_api_server/operations/informational"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/build"
"github.com/openziti/xweb/v2"
"runtime"
+1 -1
View File
@@ -18,9 +18,9 @@ package model
import (
"fmt"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/internal/cert"
"github.com/openziti/edge/rest_model"
"github.com/openziti/foundation/v2/errorz"
"github.com/pkg/errors"
"time"
+1 -1
View File
@@ -18,11 +18,11 @@ package model
import (
"encoding/pem"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/persistence"
"github.com/openziti/edge/eid"
"github.com/openziti/edge/internal/cert"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/models"
)
+1 -1
View File
@@ -18,9 +18,9 @@ package model
import (
"fmt"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/internal/cert"
"github.com/openziti/edge/rest_model"
"time"
)
+2 -2
View File
@@ -19,15 +19,15 @@ package response
import (
"fmt"
"github.com/go-openapi/errors"
"github.com/openziti/edge-api/rest_model"
"github.com/openziti/edge/internal/version"
"github.com/openziti/edge/rest_model"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/fabric/controller/apierror"
"github.com/openziti/foundation/v2/errorz"
"net/http"
)
//todo: rename to Responder, remove old Responder and RequestResponder
// todo: rename to Responder, remove old Responder and RequestResponder
type Responder interface {
api.Responder
RespondWithOk(data interface{}, meta *rest_model.Meta)
+3 -3
View File
@@ -18,13 +18,13 @@ package server
import (
"fmt"
"github.com/openziti/edge-api/rest_client_api_client"
"github.com/openziti/edge-api/rest_client_api_server"
"github.com/openziti/edge-api/rest_management_api_server"
"github.com/openziti/edge/controller"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_client_api_client"
"github.com/openziti/edge/rest_client_api_server"
"github.com/openziti/edge/rest_management_api_server"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/xweb/v2"
"github.com/pkg/errors"
+1 -1
View File
@@ -4,10 +4,10 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/edge-api/rest_management_api_server"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/internal/permissions"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_server"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/fabric/controller/api_impl"
"github.com/openziti/fabric/controller/apierror"
+2 -2
View File
@@ -18,12 +18,12 @@ package server
import (
"fmt"
"github.com/openziti/edge-api/rest_management_api_client"
"github.com/openziti/edge-api/rest_management_api_server"
"github.com/openziti/edge/controller"
"github.com/openziti/edge/controller/apierror"
"github.com/openziti/edge/controller/env"
"github.com/openziti/edge/controller/response"
"github.com/openziti/edge/rest_management_api_client"
"github.com/openziti/edge/rest_management_api_server"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/xweb/v2"
"net/http"
+12 -11
View File
@@ -14,16 +14,12 @@ require (
github.com/go-openapi/errors v0.20.3
github.com/go-openapi/loads v0.21.2
github.com/go-openapi/runtime v0.25.0
github.com/go-openapi/spec v0.20.8
github.com/go-openapi/strfmt v0.21.3
github.com/go-openapi/swag v0.22.3
github.com/go-openapi/validate v0.22.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/go-cmp v0.5.9
github.com/google/gopacket v1.1.19
github.com/google/uuid v1.3.0
github.com/hashicorp/golang-lru/v2 v2.0.1
github.com/jessevdk/go-flags v1.5.0
github.com/jinzhu/copier v0.3.5
github.com/kataras/go-events v0.0.3-0.20201007151548-c411dc70c0a6
github.com/lucsky/cuid v1.2.1
@@ -55,7 +51,6 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0
go.etcd.io/bbolt v1.3.6
golang.org/x/crypto v0.5.0
golang.org/x/net v0.5.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.4.0
google.golang.org/protobuf v1.28.1
@@ -73,7 +68,7 @@ require (
github.com/boltdb/bolt v1.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.13.0 // indirect
@@ -83,8 +78,11 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
@@ -95,6 +93,7 @@ require (
github.com/hashicorp/raft v1.3.11 // indirect
github.com/hashicorp/raft-boltdb v0.0.0-20220329195025-15018e9b97e0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jessevdk/go-flags v1.5.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/josharian/native v1.0.0 // indirect
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
@@ -108,6 +107,7 @@ require (
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openziti/edge-api v0.25.6-0.20230124204917-87f8ac9c70cf // indirect
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
@@ -118,12 +118,13 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.mongodb.org/mongo-driver v1.10.0 // indirect
go.mongodb.org/mongo-driver v1.11.1 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
go.opentelemetry.io/otel v1.11.1 // indirect
go.opentelemetry.io/otel/trace v1.11.1 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15 // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/term v0.4.0 // indirect
golang.org/x/tools v0.2.0 // indirect
)
+21 -10
View File
@@ -107,8 +107,8 @@ github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 h1:AqeKSZIG/NIC7
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3/go.mod h1:hEfFauPHz7+NnjR/yHJGhrKo1Za+zStgwUETx3yzqgY=
github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663 h1:fctNkSsavbXpt8geFWZb8n+noCqS8MrOXRJ/YfdZ2dQ=
github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663/go.mod h1:Kad2hux31v/IyD4Rf4wAwIyK48995rs3qAl9IUAhc2k=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/ef-ds/deque v1.0.4 h1:iFAZNmveMT9WERAkqLJ+oaABF9AcVQ5AjXem/hroniI=
github.com/ef-ds/deque v1.0.4/go.mod h1:gXDnTC3yqvBcHbq2lcExjtAcVrOnJCbMcZXmuj8Z4tg=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
@@ -157,11 +157,13 @@ github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX
github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc=
github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g=
github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro=
github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw=
@@ -363,8 +365,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -451,6 +454,12 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/openziti/channel/v2 v2.0.26 h1:IIEnno26FuywcyCwCie1U7OHoB8HzuG95EzEnvtKmio=
github.com/openziti/channel/v2 v2.0.26/go.mod h1:zZO0bgVYY9FCDs2EMRakDl6wIfyOWuzgPzPL8EvQ5Ks=
github.com/openziti/edge-api v0.0.0-20230123214913-31bffcdbab62 h1:RKnWfDRb7gcCPhfCM+SaiPQvAYvGOSR/9yXwTYnWUHY=
github.com/openziti/edge-api v0.0.0-20230123214913-31bffcdbab62/go.mod h1:XFiADoiVmGHNzowt6paH5BsyYZW+5KIYNuxwevpzVVo=
github.com/openziti/edge-api v0.25.5 h1:zBBbALZvEPl1PsQ/xKIwkpNMtl/YfPx93zBKsHh94kE=
github.com/openziti/edge-api v0.25.5/go.mod h1:XFiADoiVmGHNzowt6paH5BsyYZW+5KIYNuxwevpzVVo=
github.com/openziti/edge-api v0.25.6-0.20230124204917-87f8ac9c70cf h1:ev+hLgINDVwK8p3LBZMCnEBPAVK9jcfar6M/n1SF5WA=
github.com/openziti/edge-api v0.25.6-0.20230124204917-87f8ac9c70cf/go.mod h1:Ohmiq2Fdz1UXiXIyxGUIPI1gXY3ZVNMiT7urvp8u6xw=
github.com/openziti/fabric v0.22.16 h1:hdNJ4v95BOYJnIkEyECwSBccqUtIK6w3B3rvewbWXDo=
github.com/openziti/fabric v0.22.16/go.mod h1:0O6wPDXd90rT3QUsVTOPY28GhqnDLFDuJTOAaGJTYOA=
github.com/openziti/foundation/v2 v2.0.10 h1:IeOkcPbgBpBTw4JrWz8s9Z76vO/m+i2uIE0cMZ0C2DM=
@@ -596,8 +605,9 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3
go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg=
go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng=
go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg=
go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8=
go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8=
go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 h1:CCriYyAfq1Br1aIYettdHZTy8mBTIPo7We18TuO/bak=
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
@@ -607,11 +617,11 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4=
go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs=
go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ=
go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
@@ -1003,6 +1013,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
@@ -1,175 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package authentication
// 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/openziti/edge/rest_model"
)
// NewAuthenticateMfaParams creates a new AuthenticateMfaParams 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 NewAuthenticateMfaParams() *AuthenticateMfaParams {
return &AuthenticateMfaParams{
timeout: cr.DefaultTimeout,
}
}
// NewAuthenticateMfaParamsWithTimeout creates a new AuthenticateMfaParams object
// with the ability to set a timeout on a request.
func NewAuthenticateMfaParamsWithTimeout(timeout time.Duration) *AuthenticateMfaParams {
return &AuthenticateMfaParams{
timeout: timeout,
}
}
// NewAuthenticateMfaParamsWithContext creates a new AuthenticateMfaParams object
// with the ability to set a context for a request.
func NewAuthenticateMfaParamsWithContext(ctx context.Context) *AuthenticateMfaParams {
return &AuthenticateMfaParams{
Context: ctx,
}
}
// NewAuthenticateMfaParamsWithHTTPClient creates a new AuthenticateMfaParams object
// with the ability to set a custom HTTPClient for a request.
func NewAuthenticateMfaParamsWithHTTPClient(client *http.Client) *AuthenticateMfaParams {
return &AuthenticateMfaParams{
HTTPClient: client,
}
}
/* AuthenticateMfaParams contains all the parameters to send to the API endpoint
for the authenticate mfa operation.
Typically these are written to a http.Request.
*/
type AuthenticateMfaParams struct {
/* MfaAuth.
An MFA validation request
*/
MfaAuth *rest_model.MfaCode
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the authenticate mfa params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AuthenticateMfaParams) WithDefaults() *AuthenticateMfaParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the authenticate mfa params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AuthenticateMfaParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the authenticate mfa params
func (o *AuthenticateMfaParams) WithTimeout(timeout time.Duration) *AuthenticateMfaParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the authenticate mfa params
func (o *AuthenticateMfaParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the authenticate mfa params
func (o *AuthenticateMfaParams) WithContext(ctx context.Context) *AuthenticateMfaParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the authenticate mfa params
func (o *AuthenticateMfaParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the authenticate mfa params
func (o *AuthenticateMfaParams) WithHTTPClient(client *http.Client) *AuthenticateMfaParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the authenticate mfa params
func (o *AuthenticateMfaParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithMfaAuth adds the mfaAuth to the authenticate mfa params
func (o *AuthenticateMfaParams) WithMfaAuth(mfaAuth *rest_model.MfaCode) *AuthenticateMfaParams {
o.SetMfaAuth(mfaAuth)
return o
}
// SetMfaAuth adds the mfaAuth to the authenticate mfa params
func (o *AuthenticateMfaParams) SetMfaAuth(mfaAuth *rest_model.MfaCode) {
o.MfaAuth = mfaAuth
}
// WriteToRequest writes these params to a swagger request
func (o *AuthenticateMfaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.MfaAuth != nil {
if err := r.SetBodyParam(o.MfaAuth); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,129 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package authentication
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// AuthenticateMfaReader is a Reader for the AuthenticateMfa structure.
type AuthenticateMfaReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AuthenticateMfaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAuthenticateMfaOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewAuthenticateMfaUnauthorized()
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())
}
}
// NewAuthenticateMfaOK creates a AuthenticateMfaOK with default headers values
func NewAuthenticateMfaOK() *AuthenticateMfaOK {
return &AuthenticateMfaOK{}
}
/* AuthenticateMfaOK describes a response with status code 200, with default header values.
Base empty response
*/
type AuthenticateMfaOK struct {
Payload *rest_model.Empty
}
func (o *AuthenticateMfaOK) Error() string {
return fmt.Sprintf("[POST /authenticate/mfa][%d] authenticateMfaOK %+v", 200, o.Payload)
}
func (o *AuthenticateMfaOK) GetPayload() *rest_model.Empty {
return o.Payload
}
func (o *AuthenticateMfaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.Empty)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAuthenticateMfaUnauthorized creates a AuthenticateMfaUnauthorized with default headers values
func NewAuthenticateMfaUnauthorized() *AuthenticateMfaUnauthorized {
return &AuthenticateMfaUnauthorized{}
}
/* AuthenticateMfaUnauthorized describes a response with status code 401, with default header values.
Base empty response
*/
type AuthenticateMfaUnauthorized struct {
Payload *rest_model.Empty
}
func (o *AuthenticateMfaUnauthorized) Error() string {
return fmt.Sprintf("[POST /authenticate/mfa][%d] authenticateMfaUnauthorized %+v", 401, o.Payload)
}
func (o *AuthenticateMfaUnauthorized) GetPayload() *rest_model.Empty {
return o.Payload
}
func (o *AuthenticateMfaUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.Empty)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,196 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package authentication
// 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/openziti/edge/rest_model"
)
// NewAuthenticateParams creates a new AuthenticateParams 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 NewAuthenticateParams() *AuthenticateParams {
return &AuthenticateParams{
timeout: cr.DefaultTimeout,
}
}
// NewAuthenticateParamsWithTimeout creates a new AuthenticateParams object
// with the ability to set a timeout on a request.
func NewAuthenticateParamsWithTimeout(timeout time.Duration) *AuthenticateParams {
return &AuthenticateParams{
timeout: timeout,
}
}
// NewAuthenticateParamsWithContext creates a new AuthenticateParams object
// with the ability to set a context for a request.
func NewAuthenticateParamsWithContext(ctx context.Context) *AuthenticateParams {
return &AuthenticateParams{
Context: ctx,
}
}
// NewAuthenticateParamsWithHTTPClient creates a new AuthenticateParams object
// with the ability to set a custom HTTPClient for a request.
func NewAuthenticateParamsWithHTTPClient(client *http.Client) *AuthenticateParams {
return &AuthenticateParams{
HTTPClient: client,
}
}
/* AuthenticateParams contains all the parameters to send to the API endpoint
for the authenticate operation.
Typically these are written to a http.Request.
*/
type AuthenticateParams struct {
// Auth.
Auth *rest_model.Authenticate
// Method.
Method string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the authenticate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AuthenticateParams) WithDefaults() *AuthenticateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the authenticate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AuthenticateParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the authenticate params
func (o *AuthenticateParams) WithTimeout(timeout time.Duration) *AuthenticateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the authenticate params
func (o *AuthenticateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the authenticate params
func (o *AuthenticateParams) WithContext(ctx context.Context) *AuthenticateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the authenticate params
func (o *AuthenticateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the authenticate params
func (o *AuthenticateParams) WithHTTPClient(client *http.Client) *AuthenticateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the authenticate params
func (o *AuthenticateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAuth adds the auth to the authenticate params
func (o *AuthenticateParams) WithAuth(auth *rest_model.Authenticate) *AuthenticateParams {
o.SetAuth(auth)
return o
}
// SetAuth adds the auth to the authenticate params
func (o *AuthenticateParams) SetAuth(auth *rest_model.Authenticate) {
o.Auth = auth
}
// WithMethod adds the method to the authenticate params
func (o *AuthenticateParams) WithMethod(method string) *AuthenticateParams {
o.SetMethod(method)
return o
}
// SetMethod adds the method to the authenticate params
func (o *AuthenticateParams) SetMethod(method string) {
o.Method = method
}
// WriteToRequest writes these params to a swagger request
func (o *AuthenticateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Auth != nil {
if err := r.SetBodyParam(o.Auth); err != nil {
return err
}
}
// query param method
qrMethod := o.Method
qMethod := qrMethod
if qMethod != "" {
if err := r.SetQueryParam("method", qMethod); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package authentication
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// AuthenticateReader is a Reader for the Authenticate structure.
type AuthenticateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AuthenticateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAuthenticateOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAuthenticateBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewAuthenticateForbidden()
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())
}
}
// NewAuthenticateOK creates a AuthenticateOK with default headers values
func NewAuthenticateOK() *AuthenticateOK {
return &AuthenticateOK{}
}
/* AuthenticateOK describes a response with status code 200, with default header values.
The API session associated with the session used to issue the request
*/
type AuthenticateOK struct {
Payload *rest_model.CurrentAPISessionDetailEnvelope
}
func (o *AuthenticateOK) Error() string {
return fmt.Sprintf("[POST /authenticate][%d] authenticateOK %+v", 200, o.Payload)
}
func (o *AuthenticateOK) GetPayload() *rest_model.CurrentAPISessionDetailEnvelope {
return o.Payload
}
func (o *AuthenticateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.CurrentAPISessionDetailEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAuthenticateBadRequest creates a AuthenticateBadRequest with default headers values
func NewAuthenticateBadRequest() *AuthenticateBadRequest {
return &AuthenticateBadRequest{}
}
/* AuthenticateBadRequest describes a response with status code 400, with default header values.
The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
*/
type AuthenticateBadRequest struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *AuthenticateBadRequest) Error() string {
return fmt.Sprintf("[POST /authenticate][%d] authenticateBadRequest %+v", 400, o.Payload)
}
func (o *AuthenticateBadRequest) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *AuthenticateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAuthenticateForbidden creates a AuthenticateForbidden with default headers values
func NewAuthenticateForbidden() *AuthenticateForbidden {
return &AuthenticateForbidden{}
}
/* AuthenticateForbidden describes a response with status code 403, with default header values.
The authentication request could not be processed as the credentials are invalid
*/
type AuthenticateForbidden struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *AuthenticateForbidden) Error() string {
return fmt.Sprintf("[POST /authenticate][%d] authenticateForbidden %+v", 403, o.Payload)
}
func (o *AuthenticateForbidden) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *AuthenticateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,149 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package authentication
// 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 authentication API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for authentication API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
Authenticate(params *AuthenticateParams, opts ...ClientOption) (*AuthenticateOK, error)
AuthenticateMfa(params *AuthenticateMfaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AuthenticateMfaOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
Authenticate authenticates via a method supplied via a query string parameter
Allows authentication Methods include "password" and "cert"
*/
func (a *Client) Authenticate(params *AuthenticateParams, opts ...ClientOption) (*AuthenticateOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewAuthenticateParams()
}
op := &runtime.ClientOperation{
ID: "authenticate",
Method: "POST",
PathPattern: "/authenticate",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &AuthenticateReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*AuthenticateOK)
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 authenticate: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
AuthenticateMfa completes m f a authentication
Completes MFA authentication by submitting a MFA time based one time token or backup code.
*/
func (a *Client) AuthenticateMfa(params *AuthenticateMfaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AuthenticateMfaOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewAuthenticateMfaParams()
}
op := &runtime.ClientOperation{
ID: "authenticateMfa",
Method: "POST",
PathPattern: "/authenticate/mfa",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &AuthenticateMfaReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*AuthenticateMfaOK)
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 authenticateMfa: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}
@@ -1,175 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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/openziti/edge/rest_model"
)
// NewCreateCurrentAPISessionCertificateParams creates a new CreateCurrentAPISessionCertificateParams 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 NewCreateCurrentAPISessionCertificateParams() *CreateCurrentAPISessionCertificateParams {
return &CreateCurrentAPISessionCertificateParams{
timeout: cr.DefaultTimeout,
}
}
// NewCreateCurrentAPISessionCertificateParamsWithTimeout creates a new CreateCurrentAPISessionCertificateParams object
// with the ability to set a timeout on a request.
func NewCreateCurrentAPISessionCertificateParamsWithTimeout(timeout time.Duration) *CreateCurrentAPISessionCertificateParams {
return &CreateCurrentAPISessionCertificateParams{
timeout: timeout,
}
}
// NewCreateCurrentAPISessionCertificateParamsWithContext creates a new CreateCurrentAPISessionCertificateParams object
// with the ability to set a context for a request.
func NewCreateCurrentAPISessionCertificateParamsWithContext(ctx context.Context) *CreateCurrentAPISessionCertificateParams {
return &CreateCurrentAPISessionCertificateParams{
Context: ctx,
}
}
// NewCreateCurrentAPISessionCertificateParamsWithHTTPClient creates a new CreateCurrentAPISessionCertificateParams object
// with the ability to set a custom HTTPClient for a request.
func NewCreateCurrentAPISessionCertificateParamsWithHTTPClient(client *http.Client) *CreateCurrentAPISessionCertificateParams {
return &CreateCurrentAPISessionCertificateParams{
HTTPClient: client,
}
}
/* CreateCurrentAPISessionCertificateParams contains all the parameters to send to the API endpoint
for the create current Api session certificate operation.
Typically these are written to a http.Request.
*/
type CreateCurrentAPISessionCertificateParams struct {
/* SessionCertificate.
The payload describing the CSR used to create a session certificate
*/
SessionCertificate *rest_model.CurrentAPISessionCertificateCreate
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the create current Api session certificate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateCurrentAPISessionCertificateParams) WithDefaults() *CreateCurrentAPISessionCertificateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the create current Api session certificate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateCurrentAPISessionCertificateParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) WithTimeout(timeout time.Duration) *CreateCurrentAPISessionCertificateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) WithContext(ctx context.Context) *CreateCurrentAPISessionCertificateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) WithHTTPClient(client *http.Client) *CreateCurrentAPISessionCertificateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithSessionCertificate adds the sessionCertificate to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) WithSessionCertificate(sessionCertificate *rest_model.CurrentAPISessionCertificateCreate) *CreateCurrentAPISessionCertificateParams {
o.SetSessionCertificate(sessionCertificate)
return o
}
// SetSessionCertificate adds the sessionCertificate to the create current Api session certificate params
func (o *CreateCurrentAPISessionCertificateParams) SetSessionCertificate(sessionCertificate *rest_model.CurrentAPISessionCertificateCreate) {
o.SessionCertificate = sessionCertificate
}
// WriteToRequest writes these params to a swagger request
func (o *CreateCurrentAPISessionCertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.SessionCertificate != nil {
if err := r.SetBodyParam(o.SessionCertificate); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// CreateCurrentAPISessionCertificateReader is a Reader for the CreateCurrentAPISessionCertificate structure.
type CreateCurrentAPISessionCertificateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *CreateCurrentAPISessionCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewCreateCurrentAPISessionCertificateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewCreateCurrentAPISessionCertificateBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewCreateCurrentAPISessionCertificateUnauthorized()
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())
}
}
// NewCreateCurrentAPISessionCertificateCreated creates a CreateCurrentAPISessionCertificateCreated with default headers values
func NewCreateCurrentAPISessionCertificateCreated() *CreateCurrentAPISessionCertificateCreated {
return &CreateCurrentAPISessionCertificateCreated{}
}
/* CreateCurrentAPISessionCertificateCreated describes a response with status code 201, with default header values.
A response of a create API Session certificate
*/
type CreateCurrentAPISessionCertificateCreated struct {
Payload *rest_model.CreateCurrentAPISessionCertificateEnvelope
}
func (o *CreateCurrentAPISessionCertificateCreated) Error() string {
return fmt.Sprintf("[POST /current-api-session/certificates][%d] createCurrentApiSessionCertificateCreated %+v", 201, o.Payload)
}
func (o *CreateCurrentAPISessionCertificateCreated) GetPayload() *rest_model.CreateCurrentAPISessionCertificateEnvelope {
return o.Payload
}
func (o *CreateCurrentAPISessionCertificateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.CreateCurrentAPISessionCertificateEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewCreateCurrentAPISessionCertificateBadRequest creates a CreateCurrentAPISessionCertificateBadRequest with default headers values
func NewCreateCurrentAPISessionCertificateBadRequest() *CreateCurrentAPISessionCertificateBadRequest {
return &CreateCurrentAPISessionCertificateBadRequest{}
}
/* CreateCurrentAPISessionCertificateBadRequest describes a response with status code 400, with default header values.
The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
*/
type CreateCurrentAPISessionCertificateBadRequest struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *CreateCurrentAPISessionCertificateBadRequest) Error() string {
return fmt.Sprintf("[POST /current-api-session/certificates][%d] createCurrentApiSessionCertificateBadRequest %+v", 400, o.Payload)
}
func (o *CreateCurrentAPISessionCertificateBadRequest) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *CreateCurrentAPISessionCertificateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewCreateCurrentAPISessionCertificateUnauthorized creates a CreateCurrentAPISessionCertificateUnauthorized with default headers values
func NewCreateCurrentAPISessionCertificateUnauthorized() *CreateCurrentAPISessionCertificateUnauthorized {
return &CreateCurrentAPISessionCertificateUnauthorized{}
}
/* CreateCurrentAPISessionCertificateUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type CreateCurrentAPISessionCertificateUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *CreateCurrentAPISessionCertificateUnauthorized) Error() string {
return fmt.Sprintf("[POST /current-api-session/certificates][%d] createCurrentApiSessionCertificateUnauthorized %+v", 401, o.Payload)
}
func (o *CreateCurrentAPISessionCertificateUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *CreateCurrentAPISessionCertificateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,633 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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 current api session API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for current api session API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
DeleteCurrentAPISession(params *DeleteCurrentAPISessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCurrentAPISessionOK, error)
CreateCurrentAPISessionCertificate(params *CreateCurrentAPISessionCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCurrentAPISessionCertificateCreated, error)
DeleteCurrentAPISessionCertificate(params *DeleteCurrentAPISessionCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCurrentAPISessionCertificateOK, error)
DetailCurrentAPISessionCertificate(params *DetailCurrentAPISessionCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DetailCurrentAPISessionCertificateOK, error)
DetailCurrentIdentityAuthenticator(params *DetailCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DetailCurrentIdentityAuthenticatorOK, error)
ExtendCurrentIdentityAuthenticator(params *ExtendCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtendCurrentIdentityAuthenticatorOK, error)
ExtendVerifyCurrentIdentityAuthenticator(params *ExtendVerifyCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtendVerifyCurrentIdentityAuthenticatorOK, error)
GetCurrentAPISession(params *GetCurrentAPISessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCurrentAPISessionOK, error)
ListCurrentAPISessionCertificates(params *ListCurrentAPISessionCertificatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCurrentAPISessionCertificatesOK, error)
ListCurrentIdentityAuthenticators(params *ListCurrentIdentityAuthenticatorsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCurrentIdentityAuthenticatorsOK, error)
ListServiceUpdates(params *ListServiceUpdatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServiceUpdatesOK, error)
PatchCurrentIdentityAuthenticator(params *PatchCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchCurrentIdentityAuthenticatorOK, error)
UpdateCurrentIdentityAuthenticator(params *UpdateCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCurrentIdentityAuthenticatorOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
DeleteCurrentAPISession logouts
Terminates the current API session
*/
func (a *Client) DeleteCurrentAPISession(params *DeleteCurrentAPISessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCurrentAPISessionOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteCurrentAPISessionParams()
}
op := &runtime.ClientOperation{
ID: "DeleteCurrentAPISession",
Method: "DELETE",
PathPattern: "/current-api-session",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &DeleteCurrentAPISessionReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*DeleteCurrentAPISessionOK)
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 DeleteCurrentAPISession: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
CreateCurrentAPISessionCertificate creates an ephemeral certificate for the current API session
Creates an ephemeral certificate for the current API Session. This endpoint expects a PEM encoded CSRs to be provided for fulfillment as a property of a JSON payload. It is up to the client to manage the private key backing the CSR request.
*/
func (a *Client) CreateCurrentAPISessionCertificate(params *CreateCurrentAPISessionCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCurrentAPISessionCertificateCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateCurrentAPISessionCertificateParams()
}
op := &runtime.ClientOperation{
ID: "createCurrentApiSessionCertificate",
Method: "POST",
PathPattern: "/current-api-session/certificates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &CreateCurrentAPISessionCertificateReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*CreateCurrentAPISessionCertificateCreated)
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 createCurrentApiSessionCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DeleteCurrentAPISessionCertificate deletes an ephemeral certificate
Delete an ephemeral certificateby id
*/
func (a *Client) DeleteCurrentAPISessionCertificate(params *DeleteCurrentAPISessionCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCurrentAPISessionCertificateOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteCurrentAPISessionCertificateParams()
}
op := &runtime.ClientOperation{
ID: "deleteCurrentApiSessionCertificate",
Method: "DELETE",
PathPattern: "/current-api-session/certificates/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &DeleteCurrentAPISessionCertificateReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*DeleteCurrentAPISessionCertificateOK)
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 deleteCurrentApiSessionCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DetailCurrentAPISessionCertificate retrieves an ephemeral certificate
Retrieves a single ephemeral certificate by id
*/
func (a *Client) DetailCurrentAPISessionCertificate(params *DetailCurrentAPISessionCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DetailCurrentAPISessionCertificateOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDetailCurrentAPISessionCertificateParams()
}
op := &runtime.ClientOperation{
ID: "detailCurrentApiSessionCertificate",
Method: "GET",
PathPattern: "/current-api-session/certificates/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &DetailCurrentAPISessionCertificateReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*DetailCurrentAPISessionCertificateOK)
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 detailCurrentApiSessionCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DetailCurrentIdentityAuthenticator retrieves an authenticator for the current identity
Retrieves a single authenticator by id. Will only show authenticators assigned to the API session's identity.
*/
func (a *Client) DetailCurrentIdentityAuthenticator(params *DetailCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DetailCurrentIdentityAuthenticatorOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDetailCurrentIdentityAuthenticatorParams()
}
op := &runtime.ClientOperation{
ID: "detailCurrentIdentityAuthenticator",
Method: "GET",
PathPattern: "/current-identity/authenticators/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &DetailCurrentIdentityAuthenticatorReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*DetailCurrentIdentityAuthenticatorOK)
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 detailCurrentIdentityAuthenticator: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ExtendCurrentIdentityAuthenticator allows the current identity to recieve a new certificate associated with a certificate based authenticator
This endpoint only functions for certificates issued by the controller. 3rd party certificates are not handled.
Allows an identity to extend its certificate's expiration date by using its current and valid client certificate to submit a CSR. This CSR may be passed in using a new private key, thus allowing private key rotation.
The response from this endpoint is a new client certificate which the client must be verified via the /authenticators/{id}/extend-verify endpoint.
After verification is completion any new connections must be made with new certificate. Prior to verification the old client certificate remains active.
*/
func (a *Client) ExtendCurrentIdentityAuthenticator(params *ExtendCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtendCurrentIdentityAuthenticatorOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewExtendCurrentIdentityAuthenticatorParams()
}
op := &runtime.ClientOperation{
ID: "extendCurrentIdentityAuthenticator",
Method: "POST",
PathPattern: "/current-identity/authenticators/{id}/extend",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &ExtendCurrentIdentityAuthenticatorReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*ExtendCurrentIdentityAuthenticatorOK)
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 extendCurrentIdentityAuthenticator: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ExtendVerifyCurrentIdentityAuthenticator allows the current identity to validate reciept of a new client certificate
After submitting a CSR for a new client certificate the resulting public certificate must be re-submitted to this endpoint to verify receipt.
After receipt, the new client certificate must be used for new authentication requests.
*/
func (a *Client) ExtendVerifyCurrentIdentityAuthenticator(params *ExtendVerifyCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExtendVerifyCurrentIdentityAuthenticatorOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewExtendVerifyCurrentIdentityAuthenticatorParams()
}
op := &runtime.ClientOperation{
ID: "extendVerifyCurrentIdentityAuthenticator",
Method: "POST",
PathPattern: "/current-identity/authenticators/{id}/extend-verify",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &ExtendVerifyCurrentIdentityAuthenticatorReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*ExtendVerifyCurrentIdentityAuthenticatorOK)
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 extendVerifyCurrentIdentityAuthenticator: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetCurrentAPISession returns the current API session
Retrieves the API session that was used to issue the current request
*/
func (a *Client) GetCurrentAPISession(params *GetCurrentAPISessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCurrentAPISessionOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCurrentAPISessionParams()
}
op := &runtime.ClientOperation{
ID: "getCurrentAPISession",
Method: "GET",
PathPattern: "/current-api-session",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &GetCurrentAPISessionReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*GetCurrentAPISessionOK)
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 getCurrentAPISession: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ListCurrentAPISessionCertificates lists the ephemeral certificates available for the current API session
Retrieves a list of certificate resources for the current API session; supports filtering, sorting, and pagination
*/
func (a *Client) ListCurrentAPISessionCertificates(params *ListCurrentAPISessionCertificatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCurrentAPISessionCertificatesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewListCurrentAPISessionCertificatesParams()
}
op := &runtime.ClientOperation{
ID: "listCurrentApiSessionCertificates",
Method: "GET",
PathPattern: "/current-api-session/certificates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &ListCurrentAPISessionCertificatesReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*ListCurrentAPISessionCertificatesOK)
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 listCurrentApiSessionCertificates: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ListCurrentIdentityAuthenticators lists authenticators for the current identity
Retrieves a list of authenticators assigned to the current API session's identity; supports filtering, sorting, and pagination.
*/
func (a *Client) ListCurrentIdentityAuthenticators(params *ListCurrentIdentityAuthenticatorsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCurrentIdentityAuthenticatorsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewListCurrentIdentityAuthenticatorsParams()
}
op := &runtime.ClientOperation{
ID: "listCurrentIdentityAuthenticators",
Method: "GET",
PathPattern: "/current-identity/authenticators",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &ListCurrentIdentityAuthenticatorsReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*ListCurrentIdentityAuthenticatorsOK)
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 listCurrentIdentityAuthenticators: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ListServiceUpdates returns data indicating whether a client should updates it service list
Retrieves data indicating the last time data relevant to this API Session was altered that would necessitate
service refreshes.
*/
func (a *Client) ListServiceUpdates(params *ListServiceUpdatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServiceUpdatesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewListServiceUpdatesParams()
}
op := &runtime.ClientOperation{
ID: "listServiceUpdates",
Method: "GET",
PathPattern: "/current-api-session/service-updates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &ListServiceUpdatesReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*ListServiceUpdatesOK)
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 listServiceUpdates: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
PatchCurrentIdentityAuthenticator updates the supplied fields on an authenticator of this identity
Update the supplied fields on an authenticator by id. Will only update authenticators assigned to the API
session's identity.
*/
func (a *Client) PatchCurrentIdentityAuthenticator(params *PatchCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchCurrentIdentityAuthenticatorOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPatchCurrentIdentityAuthenticatorParams()
}
op := &runtime.ClientOperation{
ID: "patchCurrentIdentityAuthenticator",
Method: "PATCH",
PathPattern: "/current-identity/authenticators/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &PatchCurrentIdentityAuthenticatorReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*PatchCurrentIdentityAuthenticatorOK)
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 patchCurrentIdentityAuthenticator: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UpdateCurrentIdentityAuthenticator updates all fields on an authenticator of this identity
Update all fields on an authenticator by id. Will only update authenticators assigned to the API session's
identity.
*/
func (a *Client) UpdateCurrentIdentityAuthenticator(params *UpdateCurrentIdentityAuthenticatorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCurrentIdentityAuthenticatorOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateCurrentIdentityAuthenticatorParams()
}
op := &runtime.ClientOperation{
ID: "updateCurrentIdentityAuthenticator",
Method: "PUT",
PathPattern: "/current-identity/authenticators/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &UpdateCurrentIdentityAuthenticatorReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*UpdateCurrentIdentityAuthenticatorOK)
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 updateCurrentIdentityAuthenticator: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}
@@ -1,173 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewDeleteCurrentAPISessionCertificateParams creates a new DeleteCurrentAPISessionCertificateParams 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 NewDeleteCurrentAPISessionCertificateParams() *DeleteCurrentAPISessionCertificateParams {
return &DeleteCurrentAPISessionCertificateParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteCurrentAPISessionCertificateParamsWithTimeout creates a new DeleteCurrentAPISessionCertificateParams object
// with the ability to set a timeout on a request.
func NewDeleteCurrentAPISessionCertificateParamsWithTimeout(timeout time.Duration) *DeleteCurrentAPISessionCertificateParams {
return &DeleteCurrentAPISessionCertificateParams{
timeout: timeout,
}
}
// NewDeleteCurrentAPISessionCertificateParamsWithContext creates a new DeleteCurrentAPISessionCertificateParams object
// with the ability to set a context for a request.
func NewDeleteCurrentAPISessionCertificateParamsWithContext(ctx context.Context) *DeleteCurrentAPISessionCertificateParams {
return &DeleteCurrentAPISessionCertificateParams{
Context: ctx,
}
}
// NewDeleteCurrentAPISessionCertificateParamsWithHTTPClient creates a new DeleteCurrentAPISessionCertificateParams object
// with the ability to set a custom HTTPClient for a request.
func NewDeleteCurrentAPISessionCertificateParamsWithHTTPClient(client *http.Client) *DeleteCurrentAPISessionCertificateParams {
return &DeleteCurrentAPISessionCertificateParams{
HTTPClient: client,
}
}
/* DeleteCurrentAPISessionCertificateParams contains all the parameters to send to the API endpoint
for the delete current Api session certificate operation.
Typically these are written to a http.Request.
*/
type DeleteCurrentAPISessionCertificateParams struct {
/* ID.
The id of the requested resource
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the delete current Api session certificate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteCurrentAPISessionCertificateParams) WithDefaults() *DeleteCurrentAPISessionCertificateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete current Api session certificate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteCurrentAPISessionCertificateParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) WithTimeout(timeout time.Duration) *DeleteCurrentAPISessionCertificateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) WithContext(ctx context.Context) *DeleteCurrentAPISessionCertificateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) WithHTTPClient(client *http.Client) *DeleteCurrentAPISessionCertificateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) WithID(id string) *DeleteCurrentAPISessionCertificateParams {
o.SetID(id)
return o
}
// SetID adds the id to the delete current Api session certificate params
func (o *DeleteCurrentAPISessionCertificateParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *DeleteCurrentAPISessionCertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// DeleteCurrentAPISessionCertificateReader is a Reader for the DeleteCurrentAPISessionCertificate structure.
type DeleteCurrentAPISessionCertificateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteCurrentAPISessionCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteCurrentAPISessionCertificateOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewDeleteCurrentAPISessionCertificateBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewDeleteCurrentAPISessionCertificateUnauthorized()
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())
}
}
// NewDeleteCurrentAPISessionCertificateOK creates a DeleteCurrentAPISessionCertificateOK with default headers values
func NewDeleteCurrentAPISessionCertificateOK() *DeleteCurrentAPISessionCertificateOK {
return &DeleteCurrentAPISessionCertificateOK{}
}
/* DeleteCurrentAPISessionCertificateOK describes a response with status code 200, with default header values.
The delete request was successful and the resource has been removed
*/
type DeleteCurrentAPISessionCertificateOK struct {
Payload *rest_model.Empty
}
func (o *DeleteCurrentAPISessionCertificateOK) Error() string {
return fmt.Sprintf("[DELETE /current-api-session/certificates/{id}][%d] deleteCurrentApiSessionCertificateOK %+v", 200, o.Payload)
}
func (o *DeleteCurrentAPISessionCertificateOK) GetPayload() *rest_model.Empty {
return o.Payload
}
func (o *DeleteCurrentAPISessionCertificateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.Empty)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteCurrentAPISessionCertificateBadRequest creates a DeleteCurrentAPISessionCertificateBadRequest with default headers values
func NewDeleteCurrentAPISessionCertificateBadRequest() *DeleteCurrentAPISessionCertificateBadRequest {
return &DeleteCurrentAPISessionCertificateBadRequest{}
}
/* DeleteCurrentAPISessionCertificateBadRequest describes a response with status code 400, with default header values.
The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
*/
type DeleteCurrentAPISessionCertificateBadRequest struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DeleteCurrentAPISessionCertificateBadRequest) Error() string {
return fmt.Sprintf("[DELETE /current-api-session/certificates/{id}][%d] deleteCurrentApiSessionCertificateBadRequest %+v", 400, o.Payload)
}
func (o *DeleteCurrentAPISessionCertificateBadRequest) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DeleteCurrentAPISessionCertificateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteCurrentAPISessionCertificateUnauthorized creates a DeleteCurrentAPISessionCertificateUnauthorized with default headers values
func NewDeleteCurrentAPISessionCertificateUnauthorized() *DeleteCurrentAPISessionCertificateUnauthorized {
return &DeleteCurrentAPISessionCertificateUnauthorized{}
}
/* DeleteCurrentAPISessionCertificateUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type DeleteCurrentAPISessionCertificateUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DeleteCurrentAPISessionCertificateUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /current-api-session/certificates/{id}][%d] deleteCurrentApiSessionCertificateUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteCurrentAPISessionCertificateUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DeleteCurrentAPISessionCertificateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,150 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewDeleteCurrentAPISessionParams creates a new DeleteCurrentAPISessionParams 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 NewDeleteCurrentAPISessionParams() *DeleteCurrentAPISessionParams {
return &DeleteCurrentAPISessionParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteCurrentAPISessionParamsWithTimeout creates a new DeleteCurrentAPISessionParams object
// with the ability to set a timeout on a request.
func NewDeleteCurrentAPISessionParamsWithTimeout(timeout time.Duration) *DeleteCurrentAPISessionParams {
return &DeleteCurrentAPISessionParams{
timeout: timeout,
}
}
// NewDeleteCurrentAPISessionParamsWithContext creates a new DeleteCurrentAPISessionParams object
// with the ability to set a context for a request.
func NewDeleteCurrentAPISessionParamsWithContext(ctx context.Context) *DeleteCurrentAPISessionParams {
return &DeleteCurrentAPISessionParams{
Context: ctx,
}
}
// NewDeleteCurrentAPISessionParamsWithHTTPClient creates a new DeleteCurrentAPISessionParams object
// with the ability to set a custom HTTPClient for a request.
func NewDeleteCurrentAPISessionParamsWithHTTPClient(client *http.Client) *DeleteCurrentAPISessionParams {
return &DeleteCurrentAPISessionParams{
HTTPClient: client,
}
}
/* DeleteCurrentAPISessionParams contains all the parameters to send to the API endpoint
for the delete current API session operation.
Typically these are written to a http.Request.
*/
type DeleteCurrentAPISessionParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the delete current API session params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteCurrentAPISessionParams) WithDefaults() *DeleteCurrentAPISessionParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete current API session params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteCurrentAPISessionParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the delete current API session params
func (o *DeleteCurrentAPISessionParams) WithTimeout(timeout time.Duration) *DeleteCurrentAPISessionParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the delete current API session params
func (o *DeleteCurrentAPISessionParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the delete current API session params
func (o *DeleteCurrentAPISessionParams) WithContext(ctx context.Context) *DeleteCurrentAPISessionParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the delete current API session params
func (o *DeleteCurrentAPISessionParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the delete current API session params
func (o *DeleteCurrentAPISessionParams) WithHTTPClient(client *http.Client) *DeleteCurrentAPISessionParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the delete current API session params
func (o *DeleteCurrentAPISessionParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *DeleteCurrentAPISessionParams) 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,129 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// DeleteCurrentAPISessionReader is a Reader for the DeleteCurrentAPISession structure.
type DeleteCurrentAPISessionReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteCurrentAPISessionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteCurrentAPISessionOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewDeleteCurrentAPISessionUnauthorized()
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())
}
}
// NewDeleteCurrentAPISessionOK creates a DeleteCurrentAPISessionOK with default headers values
func NewDeleteCurrentAPISessionOK() *DeleteCurrentAPISessionOK {
return &DeleteCurrentAPISessionOK{}
}
/* DeleteCurrentAPISessionOK describes a response with status code 200, with default header values.
Base empty response
*/
type DeleteCurrentAPISessionOK struct {
Payload *rest_model.Empty
}
func (o *DeleteCurrentAPISessionOK) Error() string {
return fmt.Sprintf("[DELETE /current-api-session][%d] deleteCurrentApiSessionOK %+v", 200, o.Payload)
}
func (o *DeleteCurrentAPISessionOK) GetPayload() *rest_model.Empty {
return o.Payload
}
func (o *DeleteCurrentAPISessionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.Empty)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteCurrentAPISessionUnauthorized creates a DeleteCurrentAPISessionUnauthorized with default headers values
func NewDeleteCurrentAPISessionUnauthorized() *DeleteCurrentAPISessionUnauthorized {
return &DeleteCurrentAPISessionUnauthorized{}
}
/* DeleteCurrentAPISessionUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type DeleteCurrentAPISessionUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DeleteCurrentAPISessionUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /current-api-session][%d] deleteCurrentApiSessionUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteCurrentAPISessionUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DeleteCurrentAPISessionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,173 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewDetailCurrentAPISessionCertificateParams creates a new DetailCurrentAPISessionCertificateParams 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 NewDetailCurrentAPISessionCertificateParams() *DetailCurrentAPISessionCertificateParams {
return &DetailCurrentAPISessionCertificateParams{
timeout: cr.DefaultTimeout,
}
}
// NewDetailCurrentAPISessionCertificateParamsWithTimeout creates a new DetailCurrentAPISessionCertificateParams object
// with the ability to set a timeout on a request.
func NewDetailCurrentAPISessionCertificateParamsWithTimeout(timeout time.Duration) *DetailCurrentAPISessionCertificateParams {
return &DetailCurrentAPISessionCertificateParams{
timeout: timeout,
}
}
// NewDetailCurrentAPISessionCertificateParamsWithContext creates a new DetailCurrentAPISessionCertificateParams object
// with the ability to set a context for a request.
func NewDetailCurrentAPISessionCertificateParamsWithContext(ctx context.Context) *DetailCurrentAPISessionCertificateParams {
return &DetailCurrentAPISessionCertificateParams{
Context: ctx,
}
}
// NewDetailCurrentAPISessionCertificateParamsWithHTTPClient creates a new DetailCurrentAPISessionCertificateParams object
// with the ability to set a custom HTTPClient for a request.
func NewDetailCurrentAPISessionCertificateParamsWithHTTPClient(client *http.Client) *DetailCurrentAPISessionCertificateParams {
return &DetailCurrentAPISessionCertificateParams{
HTTPClient: client,
}
}
/* DetailCurrentAPISessionCertificateParams contains all the parameters to send to the API endpoint
for the detail current Api session certificate operation.
Typically these are written to a http.Request.
*/
type DetailCurrentAPISessionCertificateParams struct {
/* ID.
The id of the requested resource
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the detail current Api session certificate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DetailCurrentAPISessionCertificateParams) WithDefaults() *DetailCurrentAPISessionCertificateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the detail current Api session certificate params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DetailCurrentAPISessionCertificateParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) WithTimeout(timeout time.Duration) *DetailCurrentAPISessionCertificateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) WithContext(ctx context.Context) *DetailCurrentAPISessionCertificateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) WithHTTPClient(client *http.Client) *DetailCurrentAPISessionCertificateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) WithID(id string) *DetailCurrentAPISessionCertificateParams {
o.SetID(id)
return o
}
// SetID adds the id to the detail current Api session certificate params
func (o *DetailCurrentAPISessionCertificateParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *DetailCurrentAPISessionCertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// DetailCurrentAPISessionCertificateReader is a Reader for the DetailCurrentAPISessionCertificate structure.
type DetailCurrentAPISessionCertificateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DetailCurrentAPISessionCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDetailCurrentAPISessionCertificateOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewDetailCurrentAPISessionCertificateUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDetailCurrentAPISessionCertificateNotFound()
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())
}
}
// NewDetailCurrentAPISessionCertificateOK creates a DetailCurrentAPISessionCertificateOK with default headers values
func NewDetailCurrentAPISessionCertificateOK() *DetailCurrentAPISessionCertificateOK {
return &DetailCurrentAPISessionCertificateOK{}
}
/* DetailCurrentAPISessionCertificateOK describes a response with status code 200, with default header values.
A response containing a single API Session certificate
*/
type DetailCurrentAPISessionCertificateOK struct {
Payload *rest_model.DetailCurrentAPISessionCertificateEnvelope
}
func (o *DetailCurrentAPISessionCertificateOK) Error() string {
return fmt.Sprintf("[GET /current-api-session/certificates/{id}][%d] detailCurrentApiSessionCertificateOK %+v", 200, o.Payload)
}
func (o *DetailCurrentAPISessionCertificateOK) GetPayload() *rest_model.DetailCurrentAPISessionCertificateEnvelope {
return o.Payload
}
func (o *DetailCurrentAPISessionCertificateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.DetailCurrentAPISessionCertificateEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDetailCurrentAPISessionCertificateUnauthorized creates a DetailCurrentAPISessionCertificateUnauthorized with default headers values
func NewDetailCurrentAPISessionCertificateUnauthorized() *DetailCurrentAPISessionCertificateUnauthorized {
return &DetailCurrentAPISessionCertificateUnauthorized{}
}
/* DetailCurrentAPISessionCertificateUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type DetailCurrentAPISessionCertificateUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DetailCurrentAPISessionCertificateUnauthorized) Error() string {
return fmt.Sprintf("[GET /current-api-session/certificates/{id}][%d] detailCurrentApiSessionCertificateUnauthorized %+v", 401, o.Payload)
}
func (o *DetailCurrentAPISessionCertificateUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DetailCurrentAPISessionCertificateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDetailCurrentAPISessionCertificateNotFound creates a DetailCurrentAPISessionCertificateNotFound with default headers values
func NewDetailCurrentAPISessionCertificateNotFound() *DetailCurrentAPISessionCertificateNotFound {
return &DetailCurrentAPISessionCertificateNotFound{}
}
/* DetailCurrentAPISessionCertificateNotFound describes a response with status code 404, with default header values.
The requested resource does not exist
*/
type DetailCurrentAPISessionCertificateNotFound struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DetailCurrentAPISessionCertificateNotFound) Error() string {
return fmt.Sprintf("[GET /current-api-session/certificates/{id}][%d] detailCurrentApiSessionCertificateNotFound %+v", 404, o.Payload)
}
func (o *DetailCurrentAPISessionCertificateNotFound) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DetailCurrentAPISessionCertificateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,173 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewDetailCurrentIdentityAuthenticatorParams creates a new DetailCurrentIdentityAuthenticatorParams 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 NewDetailCurrentIdentityAuthenticatorParams() *DetailCurrentIdentityAuthenticatorParams {
return &DetailCurrentIdentityAuthenticatorParams{
timeout: cr.DefaultTimeout,
}
}
// NewDetailCurrentIdentityAuthenticatorParamsWithTimeout creates a new DetailCurrentIdentityAuthenticatorParams object
// with the ability to set a timeout on a request.
func NewDetailCurrentIdentityAuthenticatorParamsWithTimeout(timeout time.Duration) *DetailCurrentIdentityAuthenticatorParams {
return &DetailCurrentIdentityAuthenticatorParams{
timeout: timeout,
}
}
// NewDetailCurrentIdentityAuthenticatorParamsWithContext creates a new DetailCurrentIdentityAuthenticatorParams object
// with the ability to set a context for a request.
func NewDetailCurrentIdentityAuthenticatorParamsWithContext(ctx context.Context) *DetailCurrentIdentityAuthenticatorParams {
return &DetailCurrentIdentityAuthenticatorParams{
Context: ctx,
}
}
// NewDetailCurrentIdentityAuthenticatorParamsWithHTTPClient creates a new DetailCurrentIdentityAuthenticatorParams object
// with the ability to set a custom HTTPClient for a request.
func NewDetailCurrentIdentityAuthenticatorParamsWithHTTPClient(client *http.Client) *DetailCurrentIdentityAuthenticatorParams {
return &DetailCurrentIdentityAuthenticatorParams{
HTTPClient: client,
}
}
/* DetailCurrentIdentityAuthenticatorParams contains all the parameters to send to the API endpoint
for the detail current identity authenticator operation.
Typically these are written to a http.Request.
*/
type DetailCurrentIdentityAuthenticatorParams struct {
/* ID.
The id of the requested resource
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the detail current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DetailCurrentIdentityAuthenticatorParams) WithDefaults() *DetailCurrentIdentityAuthenticatorParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the detail current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DetailCurrentIdentityAuthenticatorParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) WithTimeout(timeout time.Duration) *DetailCurrentIdentityAuthenticatorParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) WithContext(ctx context.Context) *DetailCurrentIdentityAuthenticatorParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) WithHTTPClient(client *http.Client) *DetailCurrentIdentityAuthenticatorParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) WithID(id string) *DetailCurrentIdentityAuthenticatorParams {
o.SetID(id)
return o
}
// SetID adds the id to the detail current identity authenticator params
func (o *DetailCurrentIdentityAuthenticatorParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *DetailCurrentIdentityAuthenticatorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// DetailCurrentIdentityAuthenticatorReader is a Reader for the DetailCurrentIdentityAuthenticator structure.
type DetailCurrentIdentityAuthenticatorReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DetailCurrentIdentityAuthenticatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDetailCurrentIdentityAuthenticatorOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewDetailCurrentIdentityAuthenticatorUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDetailCurrentIdentityAuthenticatorNotFound()
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())
}
}
// NewDetailCurrentIdentityAuthenticatorOK creates a DetailCurrentIdentityAuthenticatorOK with default headers values
func NewDetailCurrentIdentityAuthenticatorOK() *DetailCurrentIdentityAuthenticatorOK {
return &DetailCurrentIdentityAuthenticatorOK{}
}
/* DetailCurrentIdentityAuthenticatorOK describes a response with status code 200, with default header values.
A singular authenticator resource
*/
type DetailCurrentIdentityAuthenticatorOK struct {
Payload *rest_model.DetailAuthenticatorEnvelope
}
func (o *DetailCurrentIdentityAuthenticatorOK) Error() string {
return fmt.Sprintf("[GET /current-identity/authenticators/{id}][%d] detailCurrentIdentityAuthenticatorOK %+v", 200, o.Payload)
}
func (o *DetailCurrentIdentityAuthenticatorOK) GetPayload() *rest_model.DetailAuthenticatorEnvelope {
return o.Payload
}
func (o *DetailCurrentIdentityAuthenticatorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.DetailAuthenticatorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDetailCurrentIdentityAuthenticatorUnauthorized creates a DetailCurrentIdentityAuthenticatorUnauthorized with default headers values
func NewDetailCurrentIdentityAuthenticatorUnauthorized() *DetailCurrentIdentityAuthenticatorUnauthorized {
return &DetailCurrentIdentityAuthenticatorUnauthorized{}
}
/* DetailCurrentIdentityAuthenticatorUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type DetailCurrentIdentityAuthenticatorUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DetailCurrentIdentityAuthenticatorUnauthorized) Error() string {
return fmt.Sprintf("[GET /current-identity/authenticators/{id}][%d] detailCurrentIdentityAuthenticatorUnauthorized %+v", 401, o.Payload)
}
func (o *DetailCurrentIdentityAuthenticatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DetailCurrentIdentityAuthenticatorUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDetailCurrentIdentityAuthenticatorNotFound creates a DetailCurrentIdentityAuthenticatorNotFound with default headers values
func NewDetailCurrentIdentityAuthenticatorNotFound() *DetailCurrentIdentityAuthenticatorNotFound {
return &DetailCurrentIdentityAuthenticatorNotFound{}
}
/* DetailCurrentIdentityAuthenticatorNotFound describes a response with status code 404, with default header values.
The requested resource does not exist
*/
type DetailCurrentIdentityAuthenticatorNotFound struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *DetailCurrentIdentityAuthenticatorNotFound) Error() string {
return fmt.Sprintf("[GET /current-identity/authenticators/{id}][%d] detailCurrentIdentityAuthenticatorNotFound %+v", 404, o.Payload)
}
func (o *DetailCurrentIdentityAuthenticatorNotFound) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *DetailCurrentIdentityAuthenticatorNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,194 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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/openziti/edge/rest_model"
)
// NewExtendCurrentIdentityAuthenticatorParams creates a new ExtendCurrentIdentityAuthenticatorParams 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 NewExtendCurrentIdentityAuthenticatorParams() *ExtendCurrentIdentityAuthenticatorParams {
return &ExtendCurrentIdentityAuthenticatorParams{
timeout: cr.DefaultTimeout,
}
}
// NewExtendCurrentIdentityAuthenticatorParamsWithTimeout creates a new ExtendCurrentIdentityAuthenticatorParams object
// with the ability to set a timeout on a request.
func NewExtendCurrentIdentityAuthenticatorParamsWithTimeout(timeout time.Duration) *ExtendCurrentIdentityAuthenticatorParams {
return &ExtendCurrentIdentityAuthenticatorParams{
timeout: timeout,
}
}
// NewExtendCurrentIdentityAuthenticatorParamsWithContext creates a new ExtendCurrentIdentityAuthenticatorParams object
// with the ability to set a context for a request.
func NewExtendCurrentIdentityAuthenticatorParamsWithContext(ctx context.Context) *ExtendCurrentIdentityAuthenticatorParams {
return &ExtendCurrentIdentityAuthenticatorParams{
Context: ctx,
}
}
// NewExtendCurrentIdentityAuthenticatorParamsWithHTTPClient creates a new ExtendCurrentIdentityAuthenticatorParams object
// with the ability to set a custom HTTPClient for a request.
func NewExtendCurrentIdentityAuthenticatorParamsWithHTTPClient(client *http.Client) *ExtendCurrentIdentityAuthenticatorParams {
return &ExtendCurrentIdentityAuthenticatorParams{
HTTPClient: client,
}
}
/* ExtendCurrentIdentityAuthenticatorParams contains all the parameters to send to the API endpoint
for the extend current identity authenticator operation.
Typically these are written to a http.Request.
*/
type ExtendCurrentIdentityAuthenticatorParams struct {
// Extend.
Extend *rest_model.IdentityExtendEnrollmentRequest
/* ID.
The id of the requested resource
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the extend current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ExtendCurrentIdentityAuthenticatorParams) WithDefaults() *ExtendCurrentIdentityAuthenticatorParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the extend current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ExtendCurrentIdentityAuthenticatorParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) WithTimeout(timeout time.Duration) *ExtendCurrentIdentityAuthenticatorParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) WithContext(ctx context.Context) *ExtendCurrentIdentityAuthenticatorParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) WithHTTPClient(client *http.Client) *ExtendCurrentIdentityAuthenticatorParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithExtend adds the extend to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) WithExtend(extend *rest_model.IdentityExtendEnrollmentRequest) *ExtendCurrentIdentityAuthenticatorParams {
o.SetExtend(extend)
return o
}
// SetExtend adds the extend to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) SetExtend(extend *rest_model.IdentityExtendEnrollmentRequest) {
o.Extend = extend
}
// WithID adds the id to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) WithID(id string) *ExtendCurrentIdentityAuthenticatorParams {
o.SetID(id)
return o
}
// SetID adds the id to the extend current identity authenticator params
func (o *ExtendCurrentIdentityAuthenticatorParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *ExtendCurrentIdentityAuthenticatorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Extend != nil {
if err := r.SetBodyParam(o.Extend); err != nil {
return err
}
}
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,129 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// ExtendCurrentIdentityAuthenticatorReader is a Reader for the ExtendCurrentIdentityAuthenticator structure.
type ExtendCurrentIdentityAuthenticatorReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ExtendCurrentIdentityAuthenticatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewExtendCurrentIdentityAuthenticatorOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewExtendCurrentIdentityAuthenticatorUnauthorized()
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())
}
}
// NewExtendCurrentIdentityAuthenticatorOK creates a ExtendCurrentIdentityAuthenticatorOK with default headers values
func NewExtendCurrentIdentityAuthenticatorOK() *ExtendCurrentIdentityAuthenticatorOK {
return &ExtendCurrentIdentityAuthenticatorOK{}
}
/* ExtendCurrentIdentityAuthenticatorOK describes a response with status code 200, with default header values.
A response containg the identity's new certificate
*/
type ExtendCurrentIdentityAuthenticatorOK struct {
Payload *rest_model.IdentityExtendEnrollmentEnvelope
}
func (o *ExtendCurrentIdentityAuthenticatorOK) Error() string {
return fmt.Sprintf("[POST /current-identity/authenticators/{id}/extend][%d] extendCurrentIdentityAuthenticatorOK %+v", 200, o.Payload)
}
func (o *ExtendCurrentIdentityAuthenticatorOK) GetPayload() *rest_model.IdentityExtendEnrollmentEnvelope {
return o.Payload
}
func (o *ExtendCurrentIdentityAuthenticatorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.IdentityExtendEnrollmentEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewExtendCurrentIdentityAuthenticatorUnauthorized creates a ExtendCurrentIdentityAuthenticatorUnauthorized with default headers values
func NewExtendCurrentIdentityAuthenticatorUnauthorized() *ExtendCurrentIdentityAuthenticatorUnauthorized {
return &ExtendCurrentIdentityAuthenticatorUnauthorized{}
}
/* ExtendCurrentIdentityAuthenticatorUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type ExtendCurrentIdentityAuthenticatorUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ExtendCurrentIdentityAuthenticatorUnauthorized) Error() string {
return fmt.Sprintf("[POST /current-identity/authenticators/{id}/extend][%d] extendCurrentIdentityAuthenticatorUnauthorized %+v", 401, o.Payload)
}
func (o *ExtendCurrentIdentityAuthenticatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ExtendCurrentIdentityAuthenticatorUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,194 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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/openziti/edge/rest_model"
)
// NewExtendVerifyCurrentIdentityAuthenticatorParams creates a new ExtendVerifyCurrentIdentityAuthenticatorParams 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 NewExtendVerifyCurrentIdentityAuthenticatorParams() *ExtendVerifyCurrentIdentityAuthenticatorParams {
return &ExtendVerifyCurrentIdentityAuthenticatorParams{
timeout: cr.DefaultTimeout,
}
}
// NewExtendVerifyCurrentIdentityAuthenticatorParamsWithTimeout creates a new ExtendVerifyCurrentIdentityAuthenticatorParams object
// with the ability to set a timeout on a request.
func NewExtendVerifyCurrentIdentityAuthenticatorParamsWithTimeout(timeout time.Duration) *ExtendVerifyCurrentIdentityAuthenticatorParams {
return &ExtendVerifyCurrentIdentityAuthenticatorParams{
timeout: timeout,
}
}
// NewExtendVerifyCurrentIdentityAuthenticatorParamsWithContext creates a new ExtendVerifyCurrentIdentityAuthenticatorParams object
// with the ability to set a context for a request.
func NewExtendVerifyCurrentIdentityAuthenticatorParamsWithContext(ctx context.Context) *ExtendVerifyCurrentIdentityAuthenticatorParams {
return &ExtendVerifyCurrentIdentityAuthenticatorParams{
Context: ctx,
}
}
// NewExtendVerifyCurrentIdentityAuthenticatorParamsWithHTTPClient creates a new ExtendVerifyCurrentIdentityAuthenticatorParams object
// with the ability to set a custom HTTPClient for a request.
func NewExtendVerifyCurrentIdentityAuthenticatorParamsWithHTTPClient(client *http.Client) *ExtendVerifyCurrentIdentityAuthenticatorParams {
return &ExtendVerifyCurrentIdentityAuthenticatorParams{
HTTPClient: client,
}
}
/* ExtendVerifyCurrentIdentityAuthenticatorParams contains all the parameters to send to the API endpoint
for the extend verify current identity authenticator operation.
Typically these are written to a http.Request.
*/
type ExtendVerifyCurrentIdentityAuthenticatorParams struct {
// Extend.
Extend *rest_model.IdentityExtendValidateEnrollmentRequest
/* ID.
The id of the requested resource
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the extend verify current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WithDefaults() *ExtendVerifyCurrentIdentityAuthenticatorParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the extend verify current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WithTimeout(timeout time.Duration) *ExtendVerifyCurrentIdentityAuthenticatorParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WithContext(ctx context.Context) *ExtendVerifyCurrentIdentityAuthenticatorParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WithHTTPClient(client *http.Client) *ExtendVerifyCurrentIdentityAuthenticatorParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithExtend adds the extend to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WithExtend(extend *rest_model.IdentityExtendValidateEnrollmentRequest) *ExtendVerifyCurrentIdentityAuthenticatorParams {
o.SetExtend(extend)
return o
}
// SetExtend adds the extend to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) SetExtend(extend *rest_model.IdentityExtendValidateEnrollmentRequest) {
o.Extend = extend
}
// WithID adds the id to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WithID(id string) *ExtendVerifyCurrentIdentityAuthenticatorParams {
o.SetID(id)
return o
}
// SetID adds the id to the extend verify current identity authenticator params
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *ExtendVerifyCurrentIdentityAuthenticatorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Extend != nil {
if err := r.SetBodyParam(o.Extend); err != nil {
return err
}
}
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
@@ -1,129 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// ExtendVerifyCurrentIdentityAuthenticatorReader is a Reader for the ExtendVerifyCurrentIdentityAuthenticator structure.
type ExtendVerifyCurrentIdentityAuthenticatorReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ExtendVerifyCurrentIdentityAuthenticatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewExtendVerifyCurrentIdentityAuthenticatorOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewExtendVerifyCurrentIdentityAuthenticatorUnauthorized()
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())
}
}
// NewExtendVerifyCurrentIdentityAuthenticatorOK creates a ExtendVerifyCurrentIdentityAuthenticatorOK with default headers values
func NewExtendVerifyCurrentIdentityAuthenticatorOK() *ExtendVerifyCurrentIdentityAuthenticatorOK {
return &ExtendVerifyCurrentIdentityAuthenticatorOK{}
}
/* ExtendVerifyCurrentIdentityAuthenticatorOK describes a response with status code 200, with default header values.
Base empty response
*/
type ExtendVerifyCurrentIdentityAuthenticatorOK struct {
Payload *rest_model.Empty
}
func (o *ExtendVerifyCurrentIdentityAuthenticatorOK) Error() string {
return fmt.Sprintf("[POST /current-identity/authenticators/{id}/extend-verify][%d] extendVerifyCurrentIdentityAuthenticatorOK %+v", 200, o.Payload)
}
func (o *ExtendVerifyCurrentIdentityAuthenticatorOK) GetPayload() *rest_model.Empty {
return o.Payload
}
func (o *ExtendVerifyCurrentIdentityAuthenticatorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.Empty)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewExtendVerifyCurrentIdentityAuthenticatorUnauthorized creates a ExtendVerifyCurrentIdentityAuthenticatorUnauthorized with default headers values
func NewExtendVerifyCurrentIdentityAuthenticatorUnauthorized() *ExtendVerifyCurrentIdentityAuthenticatorUnauthorized {
return &ExtendVerifyCurrentIdentityAuthenticatorUnauthorized{}
}
/* ExtendVerifyCurrentIdentityAuthenticatorUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type ExtendVerifyCurrentIdentityAuthenticatorUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ExtendVerifyCurrentIdentityAuthenticatorUnauthorized) Error() string {
return fmt.Sprintf("[POST /current-identity/authenticators/{id}/extend-verify][%d] extendVerifyCurrentIdentityAuthenticatorUnauthorized %+v", 401, o.Payload)
}
func (o *ExtendVerifyCurrentIdentityAuthenticatorUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ExtendVerifyCurrentIdentityAuthenticatorUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,150 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewGetCurrentAPISessionParams creates a new GetCurrentAPISessionParams 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 NewGetCurrentAPISessionParams() *GetCurrentAPISessionParams {
return &GetCurrentAPISessionParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetCurrentAPISessionParamsWithTimeout creates a new GetCurrentAPISessionParams object
// with the ability to set a timeout on a request.
func NewGetCurrentAPISessionParamsWithTimeout(timeout time.Duration) *GetCurrentAPISessionParams {
return &GetCurrentAPISessionParams{
timeout: timeout,
}
}
// NewGetCurrentAPISessionParamsWithContext creates a new GetCurrentAPISessionParams object
// with the ability to set a context for a request.
func NewGetCurrentAPISessionParamsWithContext(ctx context.Context) *GetCurrentAPISessionParams {
return &GetCurrentAPISessionParams{
Context: ctx,
}
}
// NewGetCurrentAPISessionParamsWithHTTPClient creates a new GetCurrentAPISessionParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetCurrentAPISessionParamsWithHTTPClient(client *http.Client) *GetCurrentAPISessionParams {
return &GetCurrentAPISessionParams{
HTTPClient: client,
}
}
/* GetCurrentAPISessionParams contains all the parameters to send to the API endpoint
for the get current API session operation.
Typically these are written to a http.Request.
*/
type GetCurrentAPISessionParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get current API session params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCurrentAPISessionParams) WithDefaults() *GetCurrentAPISessionParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get current API session params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCurrentAPISessionParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get current API session params
func (o *GetCurrentAPISessionParams) WithTimeout(timeout time.Duration) *GetCurrentAPISessionParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get current API session params
func (o *GetCurrentAPISessionParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get current API session params
func (o *GetCurrentAPISessionParams) WithContext(ctx context.Context) *GetCurrentAPISessionParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get current API session params
func (o *GetCurrentAPISessionParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get current API session params
func (o *GetCurrentAPISessionParams) WithHTTPClient(client *http.Client) *GetCurrentAPISessionParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get current API session params
func (o *GetCurrentAPISessionParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *GetCurrentAPISessionParams) 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,129 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// GetCurrentAPISessionReader is a Reader for the GetCurrentAPISession structure.
type GetCurrentAPISessionReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetCurrentAPISessionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetCurrentAPISessionOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetCurrentAPISessionUnauthorized()
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())
}
}
// NewGetCurrentAPISessionOK creates a GetCurrentAPISessionOK with default headers values
func NewGetCurrentAPISessionOK() *GetCurrentAPISessionOK {
return &GetCurrentAPISessionOK{}
}
/* GetCurrentAPISessionOK describes a response with status code 200, with default header values.
The API session associated with the session used to issue the request
*/
type GetCurrentAPISessionOK struct {
Payload *rest_model.CurrentAPISessionDetailEnvelope
}
func (o *GetCurrentAPISessionOK) Error() string {
return fmt.Sprintf("[GET /current-api-session][%d] getCurrentApiSessionOK %+v", 200, o.Payload)
}
func (o *GetCurrentAPISessionOK) GetPayload() *rest_model.CurrentAPISessionDetailEnvelope {
return o.Payload
}
func (o *GetCurrentAPISessionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.CurrentAPISessionDetailEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetCurrentAPISessionUnauthorized creates a GetCurrentAPISessionUnauthorized with default headers values
func NewGetCurrentAPISessionUnauthorized() *GetCurrentAPISessionUnauthorized {
return &GetCurrentAPISessionUnauthorized{}
}
/* GetCurrentAPISessionUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type GetCurrentAPISessionUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *GetCurrentAPISessionUnauthorized) Error() string {
return fmt.Sprintf("[GET /current-api-session][%d] getCurrentApiSessionUnauthorized %+v", 401, o.Payload)
}
func (o *GetCurrentAPISessionUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *GetCurrentAPISessionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,245 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewListCurrentAPISessionCertificatesParams creates a new ListCurrentAPISessionCertificatesParams 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 NewListCurrentAPISessionCertificatesParams() *ListCurrentAPISessionCertificatesParams {
return &ListCurrentAPISessionCertificatesParams{
timeout: cr.DefaultTimeout,
}
}
// NewListCurrentAPISessionCertificatesParamsWithTimeout creates a new ListCurrentAPISessionCertificatesParams object
// with the ability to set a timeout on a request.
func NewListCurrentAPISessionCertificatesParamsWithTimeout(timeout time.Duration) *ListCurrentAPISessionCertificatesParams {
return &ListCurrentAPISessionCertificatesParams{
timeout: timeout,
}
}
// NewListCurrentAPISessionCertificatesParamsWithContext creates a new ListCurrentAPISessionCertificatesParams object
// with the ability to set a context for a request.
func NewListCurrentAPISessionCertificatesParamsWithContext(ctx context.Context) *ListCurrentAPISessionCertificatesParams {
return &ListCurrentAPISessionCertificatesParams{
Context: ctx,
}
}
// NewListCurrentAPISessionCertificatesParamsWithHTTPClient creates a new ListCurrentAPISessionCertificatesParams object
// with the ability to set a custom HTTPClient for a request.
func NewListCurrentAPISessionCertificatesParamsWithHTTPClient(client *http.Client) *ListCurrentAPISessionCertificatesParams {
return &ListCurrentAPISessionCertificatesParams{
HTTPClient: client,
}
}
/* ListCurrentAPISessionCertificatesParams contains all the parameters to send to the API endpoint
for the list current Api session certificates operation.
Typically these are written to a http.Request.
*/
type ListCurrentAPISessionCertificatesParams struct {
// Filter.
Filter *string
// Limit.
Limit *int64
// Offset.
Offset *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the list current Api session certificates params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListCurrentAPISessionCertificatesParams) WithDefaults() *ListCurrentAPISessionCertificatesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the list current Api session certificates params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListCurrentAPISessionCertificatesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) WithTimeout(timeout time.Duration) *ListCurrentAPISessionCertificatesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) WithContext(ctx context.Context) *ListCurrentAPISessionCertificatesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) WithHTTPClient(client *http.Client) *ListCurrentAPISessionCertificatesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFilter adds the filter to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) WithFilter(filter *string) *ListCurrentAPISessionCertificatesParams {
o.SetFilter(filter)
return o
}
// SetFilter adds the filter to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) SetFilter(filter *string) {
o.Filter = filter
}
// WithLimit adds the limit to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) WithLimit(limit *int64) *ListCurrentAPISessionCertificatesParams {
o.SetLimit(limit)
return o
}
// SetLimit adds the limit to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithOffset adds the offset to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) WithOffset(offset *int64) *ListCurrentAPISessionCertificatesParams {
o.SetOffset(offset)
return o
}
// SetOffset adds the offset to the list current Api session certificates params
func (o *ListCurrentAPISessionCertificatesParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WriteToRequest writes these params to a swagger request
func (o *ListCurrentAPISessionCertificatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Filter != nil {
// query param filter
var qrFilter string
if o.Filter != nil {
qrFilter = *o.Filter
}
qFilter := qrFilter
if qFilter != "" {
if err := r.SetQueryParam("filter", qFilter); 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.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,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// ListCurrentAPISessionCertificatesReader is a Reader for the ListCurrentAPISessionCertificates structure.
type ListCurrentAPISessionCertificatesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ListCurrentAPISessionCertificatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListCurrentAPISessionCertificatesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewListCurrentAPISessionCertificatesBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewListCurrentAPISessionCertificatesUnauthorized()
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())
}
}
// NewListCurrentAPISessionCertificatesOK creates a ListCurrentAPISessionCertificatesOK with default headers values
func NewListCurrentAPISessionCertificatesOK() *ListCurrentAPISessionCertificatesOK {
return &ListCurrentAPISessionCertificatesOK{}
}
/* ListCurrentAPISessionCertificatesOK describes a response with status code 200, with default header values.
A list of the current API Session's certificate
*/
type ListCurrentAPISessionCertificatesOK struct {
Payload *rest_model.ListCurrentAPISessionCertificatesEnvelope
}
func (o *ListCurrentAPISessionCertificatesOK) Error() string {
return fmt.Sprintf("[GET /current-api-session/certificates][%d] listCurrentApiSessionCertificatesOK %+v", 200, o.Payload)
}
func (o *ListCurrentAPISessionCertificatesOK) GetPayload() *rest_model.ListCurrentAPISessionCertificatesEnvelope {
return o.Payload
}
func (o *ListCurrentAPISessionCertificatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.ListCurrentAPISessionCertificatesEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewListCurrentAPISessionCertificatesBadRequest creates a ListCurrentAPISessionCertificatesBadRequest with default headers values
func NewListCurrentAPISessionCertificatesBadRequest() *ListCurrentAPISessionCertificatesBadRequest {
return &ListCurrentAPISessionCertificatesBadRequest{}
}
/* ListCurrentAPISessionCertificatesBadRequest describes a response with status code 400, with default header values.
The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
*/
type ListCurrentAPISessionCertificatesBadRequest struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ListCurrentAPISessionCertificatesBadRequest) Error() string {
return fmt.Sprintf("[GET /current-api-session/certificates][%d] listCurrentApiSessionCertificatesBadRequest %+v", 400, o.Payload)
}
func (o *ListCurrentAPISessionCertificatesBadRequest) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ListCurrentAPISessionCertificatesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewListCurrentAPISessionCertificatesUnauthorized creates a ListCurrentAPISessionCertificatesUnauthorized with default headers values
func NewListCurrentAPISessionCertificatesUnauthorized() *ListCurrentAPISessionCertificatesUnauthorized {
return &ListCurrentAPISessionCertificatesUnauthorized{}
}
/* ListCurrentAPISessionCertificatesUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type ListCurrentAPISessionCertificatesUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ListCurrentAPISessionCertificatesUnauthorized) Error() string {
return fmt.Sprintf("[GET /current-api-session/certificates][%d] listCurrentApiSessionCertificatesUnauthorized %+v", 401, o.Payload)
}
func (o *ListCurrentAPISessionCertificatesUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ListCurrentAPISessionCertificatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,245 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewListCurrentIdentityAuthenticatorsParams creates a new ListCurrentIdentityAuthenticatorsParams 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 NewListCurrentIdentityAuthenticatorsParams() *ListCurrentIdentityAuthenticatorsParams {
return &ListCurrentIdentityAuthenticatorsParams{
timeout: cr.DefaultTimeout,
}
}
// NewListCurrentIdentityAuthenticatorsParamsWithTimeout creates a new ListCurrentIdentityAuthenticatorsParams object
// with the ability to set a timeout on a request.
func NewListCurrentIdentityAuthenticatorsParamsWithTimeout(timeout time.Duration) *ListCurrentIdentityAuthenticatorsParams {
return &ListCurrentIdentityAuthenticatorsParams{
timeout: timeout,
}
}
// NewListCurrentIdentityAuthenticatorsParamsWithContext creates a new ListCurrentIdentityAuthenticatorsParams object
// with the ability to set a context for a request.
func NewListCurrentIdentityAuthenticatorsParamsWithContext(ctx context.Context) *ListCurrentIdentityAuthenticatorsParams {
return &ListCurrentIdentityAuthenticatorsParams{
Context: ctx,
}
}
// NewListCurrentIdentityAuthenticatorsParamsWithHTTPClient creates a new ListCurrentIdentityAuthenticatorsParams object
// with the ability to set a custom HTTPClient for a request.
func NewListCurrentIdentityAuthenticatorsParamsWithHTTPClient(client *http.Client) *ListCurrentIdentityAuthenticatorsParams {
return &ListCurrentIdentityAuthenticatorsParams{
HTTPClient: client,
}
}
/* ListCurrentIdentityAuthenticatorsParams contains all the parameters to send to the API endpoint
for the list current identity authenticators operation.
Typically these are written to a http.Request.
*/
type ListCurrentIdentityAuthenticatorsParams struct {
// Filter.
Filter *string
// Limit.
Limit *int64
// Offset.
Offset *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the list current identity authenticators params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListCurrentIdentityAuthenticatorsParams) WithDefaults() *ListCurrentIdentityAuthenticatorsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the list current identity authenticators params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListCurrentIdentityAuthenticatorsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) WithTimeout(timeout time.Duration) *ListCurrentIdentityAuthenticatorsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) WithContext(ctx context.Context) *ListCurrentIdentityAuthenticatorsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) WithHTTPClient(client *http.Client) *ListCurrentIdentityAuthenticatorsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFilter adds the filter to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) WithFilter(filter *string) *ListCurrentIdentityAuthenticatorsParams {
o.SetFilter(filter)
return o
}
// SetFilter adds the filter to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) SetFilter(filter *string) {
o.Filter = filter
}
// WithLimit adds the limit to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) WithLimit(limit *int64) *ListCurrentIdentityAuthenticatorsParams {
o.SetLimit(limit)
return o
}
// SetLimit adds the limit to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithOffset adds the offset to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) WithOffset(offset *int64) *ListCurrentIdentityAuthenticatorsParams {
o.SetOffset(offset)
return o
}
// SetOffset adds the offset to the list current identity authenticators params
func (o *ListCurrentIdentityAuthenticatorsParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WriteToRequest writes these params to a swagger request
func (o *ListCurrentIdentityAuthenticatorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Filter != nil {
// query param filter
var qrFilter string
if o.Filter != nil {
qrFilter = *o.Filter
}
qFilter := qrFilter
if qFilter != "" {
if err := r.SetQueryParam("filter", qFilter); 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.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,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// ListCurrentIdentityAuthenticatorsReader is a Reader for the ListCurrentIdentityAuthenticators structure.
type ListCurrentIdentityAuthenticatorsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ListCurrentIdentityAuthenticatorsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListCurrentIdentityAuthenticatorsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewListCurrentIdentityAuthenticatorsBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewListCurrentIdentityAuthenticatorsUnauthorized()
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())
}
}
// NewListCurrentIdentityAuthenticatorsOK creates a ListCurrentIdentityAuthenticatorsOK with default headers values
func NewListCurrentIdentityAuthenticatorsOK() *ListCurrentIdentityAuthenticatorsOK {
return &ListCurrentIdentityAuthenticatorsOK{}
}
/* ListCurrentIdentityAuthenticatorsOK describes a response with status code 200, with default header values.
A list of authenticators
*/
type ListCurrentIdentityAuthenticatorsOK struct {
Payload *rest_model.ListAuthenticatorsEnvelope
}
func (o *ListCurrentIdentityAuthenticatorsOK) Error() string {
return fmt.Sprintf("[GET /current-identity/authenticators][%d] listCurrentIdentityAuthenticatorsOK %+v", 200, o.Payload)
}
func (o *ListCurrentIdentityAuthenticatorsOK) GetPayload() *rest_model.ListAuthenticatorsEnvelope {
return o.Payload
}
func (o *ListCurrentIdentityAuthenticatorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.ListAuthenticatorsEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewListCurrentIdentityAuthenticatorsBadRequest creates a ListCurrentIdentityAuthenticatorsBadRequest with default headers values
func NewListCurrentIdentityAuthenticatorsBadRequest() *ListCurrentIdentityAuthenticatorsBadRequest {
return &ListCurrentIdentityAuthenticatorsBadRequest{}
}
/* ListCurrentIdentityAuthenticatorsBadRequest describes a response with status code 400, with default header values.
The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
*/
type ListCurrentIdentityAuthenticatorsBadRequest struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ListCurrentIdentityAuthenticatorsBadRequest) Error() string {
return fmt.Sprintf("[GET /current-identity/authenticators][%d] listCurrentIdentityAuthenticatorsBadRequest %+v", 400, o.Payload)
}
func (o *ListCurrentIdentityAuthenticatorsBadRequest) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ListCurrentIdentityAuthenticatorsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewListCurrentIdentityAuthenticatorsUnauthorized creates a ListCurrentIdentityAuthenticatorsUnauthorized with default headers values
func NewListCurrentIdentityAuthenticatorsUnauthorized() *ListCurrentIdentityAuthenticatorsUnauthorized {
return &ListCurrentIdentityAuthenticatorsUnauthorized{}
}
/* ListCurrentIdentityAuthenticatorsUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type ListCurrentIdentityAuthenticatorsUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ListCurrentIdentityAuthenticatorsUnauthorized) Error() string {
return fmt.Sprintf("[GET /current-identity/authenticators][%d] listCurrentIdentityAuthenticatorsUnauthorized %+v", 401, o.Payload)
}
func (o *ListCurrentIdentityAuthenticatorsUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ListCurrentIdentityAuthenticatorsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,150 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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"
)
// NewListServiceUpdatesParams creates a new ListServiceUpdatesParams 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 NewListServiceUpdatesParams() *ListServiceUpdatesParams {
return &ListServiceUpdatesParams{
timeout: cr.DefaultTimeout,
}
}
// NewListServiceUpdatesParamsWithTimeout creates a new ListServiceUpdatesParams object
// with the ability to set a timeout on a request.
func NewListServiceUpdatesParamsWithTimeout(timeout time.Duration) *ListServiceUpdatesParams {
return &ListServiceUpdatesParams{
timeout: timeout,
}
}
// NewListServiceUpdatesParamsWithContext creates a new ListServiceUpdatesParams object
// with the ability to set a context for a request.
func NewListServiceUpdatesParamsWithContext(ctx context.Context) *ListServiceUpdatesParams {
return &ListServiceUpdatesParams{
Context: ctx,
}
}
// NewListServiceUpdatesParamsWithHTTPClient creates a new ListServiceUpdatesParams object
// with the ability to set a custom HTTPClient for a request.
func NewListServiceUpdatesParamsWithHTTPClient(client *http.Client) *ListServiceUpdatesParams {
return &ListServiceUpdatesParams{
HTTPClient: client,
}
}
/* ListServiceUpdatesParams contains all the parameters to send to the API endpoint
for the list service updates operation.
Typically these are written to a http.Request.
*/
type ListServiceUpdatesParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the list service updates params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListServiceUpdatesParams) WithDefaults() *ListServiceUpdatesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the list service updates params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListServiceUpdatesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the list service updates params
func (o *ListServiceUpdatesParams) WithTimeout(timeout time.Duration) *ListServiceUpdatesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the list service updates params
func (o *ListServiceUpdatesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the list service updates params
func (o *ListServiceUpdatesParams) WithContext(ctx context.Context) *ListServiceUpdatesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the list service updates params
func (o *ListServiceUpdatesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the list service updates params
func (o *ListServiceUpdatesParams) WithHTTPClient(client *http.Client) *ListServiceUpdatesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the list service updates params
func (o *ListServiceUpdatesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *ListServiceUpdatesParams) 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,129 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/openziti/edge/rest_model"
)
// ListServiceUpdatesReader is a Reader for the ListServiceUpdates structure.
type ListServiceUpdatesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ListServiceUpdatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListServiceUpdatesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewListServiceUpdatesUnauthorized()
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())
}
}
// NewListServiceUpdatesOK creates a ListServiceUpdatesOK with default headers values
func NewListServiceUpdatesOK() *ListServiceUpdatesOK {
return &ListServiceUpdatesOK{}
}
/* ListServiceUpdatesOK describes a response with status code 200, with default header values.
Data indicating necessary service updates
*/
type ListServiceUpdatesOK struct {
Payload *rest_model.ListCurrentAPISessionServiceUpdatesEnvelope
}
func (o *ListServiceUpdatesOK) Error() string {
return fmt.Sprintf("[GET /current-api-session/service-updates][%d] listServiceUpdatesOK %+v", 200, o.Payload)
}
func (o *ListServiceUpdatesOK) GetPayload() *rest_model.ListCurrentAPISessionServiceUpdatesEnvelope {
return o.Payload
}
func (o *ListServiceUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.ListCurrentAPISessionServiceUpdatesEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewListServiceUpdatesUnauthorized creates a ListServiceUpdatesUnauthorized with default headers values
func NewListServiceUpdatesUnauthorized() *ListServiceUpdatesUnauthorized {
return &ListServiceUpdatesUnauthorized{}
}
/* ListServiceUpdatesUnauthorized describes a response with status code 401, with default header values.
The currently supplied session does not have the correct access rights to request this resource
*/
type ListServiceUpdatesUnauthorized struct {
Payload *rest_model.APIErrorEnvelope
}
func (o *ListServiceUpdatesUnauthorized) Error() string {
return fmt.Sprintf("[GET /current-api-session/service-updates][%d] listServiceUpdatesUnauthorized %+v", 401, o.Payload)
}
func (o *ListServiceUpdatesUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
return o.Payload
}
func (o *ListServiceUpdatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model.APIErrorEnvelope)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
@@ -1,197 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
//
// Copyright NetFoundry Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// __ __ _
// \ \ / / (_)
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
// __/ |
// |___/
package current_api_session
// 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/openziti/edge/rest_model"
)
// NewPatchCurrentIdentityAuthenticatorParams creates a new PatchCurrentIdentityAuthenticatorParams 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 NewPatchCurrentIdentityAuthenticatorParams() *PatchCurrentIdentityAuthenticatorParams {
return &PatchCurrentIdentityAuthenticatorParams{
timeout: cr.DefaultTimeout,
}
}
// NewPatchCurrentIdentityAuthenticatorParamsWithTimeout creates a new PatchCurrentIdentityAuthenticatorParams object
// with the ability to set a timeout on a request.
func NewPatchCurrentIdentityAuthenticatorParamsWithTimeout(timeout time.Duration) *PatchCurrentIdentityAuthenticatorParams {
return &PatchCurrentIdentityAuthenticatorParams{
timeout: timeout,
}
}
// NewPatchCurrentIdentityAuthenticatorParamsWithContext creates a new PatchCurrentIdentityAuthenticatorParams object
// with the ability to set a context for a request.
func NewPatchCurrentIdentityAuthenticatorParamsWithContext(ctx context.Context) *PatchCurrentIdentityAuthenticatorParams {
return &PatchCurrentIdentityAuthenticatorParams{
Context: ctx,
}
}
// NewPatchCurrentIdentityAuthenticatorParamsWithHTTPClient creates a new PatchCurrentIdentityAuthenticatorParams object
// with the ability to set a custom HTTPClient for a request.
func NewPatchCurrentIdentityAuthenticatorParamsWithHTTPClient(client *http.Client) *PatchCurrentIdentityAuthenticatorParams {
return &PatchCurrentIdentityAuthenticatorParams{
HTTPClient: client,
}
}
/* PatchCurrentIdentityAuthenticatorParams contains all the parameters to send to the API endpoint
for the patch current identity authenticator operation.
Typically these are written to a http.Request.
*/
type PatchCurrentIdentityAuthenticatorParams struct {
/* Authenticator.
An authenticator patch object
*/
Authenticator *rest_model.AuthenticatorPatchWithCurrent
/* ID.
The id of the requested resource
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the patch current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PatchCurrentIdentityAuthenticatorParams) WithDefaults() *PatchCurrentIdentityAuthenticatorParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the patch current identity authenticator params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PatchCurrentIdentityAuthenticatorParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) WithTimeout(timeout time.Duration) *PatchCurrentIdentityAuthenticatorParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) WithContext(ctx context.Context) *PatchCurrentIdentityAuthenticatorParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) WithHTTPClient(client *http.Client) *PatchCurrentIdentityAuthenticatorParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAuthenticator adds the authenticator to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) WithAuthenticator(authenticator *rest_model.AuthenticatorPatchWithCurrent) *PatchCurrentIdentityAuthenticatorParams {
o.SetAuthenticator(authenticator)
return o
}
// SetAuthenticator adds the authenticator to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) SetAuthenticator(authenticator *rest_model.AuthenticatorPatchWithCurrent) {
o.Authenticator = authenticator
}
// WithID adds the id to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) WithID(id string) *PatchCurrentIdentityAuthenticatorParams {
o.SetID(id)
return o
}
// SetID adds the id to the patch current identity authenticator params
func (o *PatchCurrentIdentityAuthenticatorParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *PatchCurrentIdentityAuthenticatorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Authenticator != nil {
if err := r.SetBodyParam(o.Authenticator); err != nil {
return err
}
}
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

Some files were not shown because too many files have changed in this diff Show More