mirror of
https://github.com/openziti/zrok.git
synced 2025-06-26 12:42:18 +02:00
add new 'remoteAgent' boolean to '/overview' environment output (#977)
This commit is contained in:
parent
f7d78a7bd9
commit
d01a793129
@ -1,5 +1,9 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.6
|
||||||
|
|
||||||
|
CHANGE: The `/overview` endpoint has been adjusted to include a new `remoteAgent` `boolean` on the `environment` instances, indicating whether or not the environment has an enrolled remote agent (https://github.com/openziti/zrok/issues/977)
|
||||||
|
|
||||||
## v1.0.5
|
## v1.0.5
|
||||||
|
|
||||||
FEATURE: Initial support for zrok Agent remoting; new `zrok agent enroll` and `zrok agent unenroll` commands that establish opt-in remote Agent management facilities on a per-environment basis. The central API has been augmented to allow for remote control (creating shares and private access instances) of these agents; see the [remoting guide](https://docs.zrok.io/docs/guides/agent/remoting) for details (https://github.com/openziti/zrok/issues/967)
|
FEATURE: Initial support for zrok Agent remoting; new `zrok agent enroll` and `zrok agent unenroll` commands that establish opt-in remote Agent management facilities on a per-environment basis. The central API has been augmented to allow for remote control (creating shares and private access instances) of these agents; see the [remoting guide](https://docs.zrok.io/docs/guides/agent/remoting) for details (https://github.com/openziti/zrok/issues/967)
|
||||||
|
@ -36,12 +36,19 @@ func (h *overviewHandler) Handle(_ metadata.OverviewParams, principal *rest_mode
|
|||||||
|
|
||||||
ovr := &rest_model_zrok.Overview{AccountLimited: accountLimited}
|
ovr := &rest_model_zrok.Overview{AccountLimited: accountLimited}
|
||||||
for _, env := range envs {
|
for _, env := range envs {
|
||||||
|
remoteAgent, err := str.IsAgentEnrolledForEnvironment(env.Id, trx)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("error checking agent enrollment for environment '%v' (%v): %v", env.ZId, principal.Email, err)
|
||||||
|
return metadata.NewOverviewInternalServerError()
|
||||||
|
}
|
||||||
|
|
||||||
ear := &rest_model_zrok.EnvironmentAndResources{
|
ear := &rest_model_zrok.EnvironmentAndResources{
|
||||||
Environment: &rest_model_zrok.Environment{
|
Environment: &rest_model_zrok.Environment{
|
||||||
Address: env.Address,
|
Address: env.Address,
|
||||||
Description: env.Description,
|
Description: env.Description,
|
||||||
Host: env.Host,
|
Host: env.Host,
|
||||||
ZID: env.ZId,
|
ZID: env.ZId,
|
||||||
|
RemoteAgent: remoteAgent,
|
||||||
Limited: accountLimited,
|
Limited: accountLimited,
|
||||||
CreatedAt: env.CreatedAt.UnixMilli(),
|
CreatedAt: env.CreatedAt.UnixMilli(),
|
||||||
UpdatedAt: env.UpdatedAt.UnixMilli(),
|
UpdatedAt: env.UpdatedAt.UnixMilli(),
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,31 +17,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
|
|||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new account API client with basic auth credentials.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - user: user for basic authentication header.
|
|
||||||
// - password: password for basic authentication header.
|
|
||||||
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new account API client with a bearer token for authentication.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - bearerToken: bearer token for Bearer authentication header.
|
|
||||||
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for account API
|
Client for account API
|
||||||
*/
|
*/
|
||||||
@ -51,53 +25,9 @@ type Client struct {
|
|||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption may be used to customize the behavior of Client methods.
|
// ClientOption is the option for Client methods
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
type ClientOption func(*runtime.ClientOperation)
|
||||||
|
|
||||||
// This client is generated with a few options you might find useful for your swagger spec.
|
|
||||||
//
|
|
||||||
// Feel free to add you own set of options.
|
|
||||||
|
|
||||||
// WithContentType allows the client to force the Content-Type header
|
|
||||||
// to negotiate a specific Consumer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithContentType(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
|
||||||
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationZrokV1JSON sets the Content-Type header to "application/zrok.v1+json".
|
|
||||||
func WithContentTypeApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccept allows the client to force the Accept header
|
|
||||||
// to negotiate a specific Producer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithAccept(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
|
||||||
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationZrokV1JSON sets the Accept header to "application/zrok.v1+json".
|
|
||||||
func WithAcceptApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
ChangePassword(params *ChangePasswordParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChangePasswordOK, error)
|
ChangePassword(params *ChangePasswordParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChangePasswordOK, error)
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -274,13 +273,11 @@ func (o *ChangePasswordUnprocessableEntity) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ChangePasswordUnprocessableEntity) Error() string {
|
func (o *ChangePasswordUnprocessableEntity) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /changePassword][%d] changePasswordUnprocessableEntity %+v", 422, o.Payload)
|
||||||
return fmt.Sprintf("[POST /changePassword][%d] changePasswordUnprocessableEntity %s", 422, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ChangePasswordUnprocessableEntity) String() string {
|
func (o *ChangePasswordUnprocessableEntity) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /changePassword][%d] changePasswordUnprocessableEntity %+v", 422, o.Payload)
|
||||||
return fmt.Sprintf("[POST /changePassword][%d] changePasswordUnprocessableEntity %s", 422, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ChangePasswordUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *ChangePasswordUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -156,13 +155,11 @@ func (o *InviteBadRequest) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *InviteBadRequest) Error() string {
|
func (o *InviteBadRequest) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /invite][%d] inviteBadRequest %+v", 400, o.Payload)
|
||||||
return fmt.Sprintf("[POST /invite][%d] inviteBadRequest %s", 400, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *InviteBadRequest) String() string {
|
func (o *InviteBadRequest) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /invite][%d] inviteBadRequest %+v", 400, o.Payload)
|
||||||
return fmt.Sprintf("[POST /invite][%d] inviteBadRequest %s", 400, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *InviteBadRequest) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *InviteBadRequest) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -86,13 +85,11 @@ func (o *LoginOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *LoginOK) Error() string {
|
func (o *LoginOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /login][%d] loginOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /login][%d] loginOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *LoginOK) String() string {
|
func (o *LoginOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /login][%d] loginOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /login][%d] loginOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *LoginOK) GetPayload() string {
|
func (o *LoginOK) GetPayload() string {
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *RegenerateAccountTokenOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegenerateAccountTokenOK) Error() string {
|
func (o *RegenerateAccountTokenOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegenerateAccountTokenOK) String() string {
|
func (o *RegenerateAccountTokenOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /regenerateAccountToken][%d] regenerateAccountTokenOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegenerateAccountTokenOK) GetPayload() *RegenerateAccountTokenOKBody {
|
func (o *RegenerateAccountTokenOK) GetPayload() *RegenerateAccountTokenOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -100,13 +99,11 @@ func (o *RegisterOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegisterOK) Error() string {
|
func (o *RegisterOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /register][%d] registerOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /register][%d] registerOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegisterOK) String() string {
|
func (o *RegisterOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /register][%d] registerOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /register][%d] registerOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegisterOK) GetPayload() *RegisterOKBody {
|
func (o *RegisterOK) GetPayload() *RegisterOKBody {
|
||||||
@ -226,13 +223,11 @@ func (o *RegisterUnprocessableEntity) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegisterUnprocessableEntity) Error() string {
|
func (o *RegisterUnprocessableEntity) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /register][%d] registerUnprocessableEntity %+v", 422, o.Payload)
|
||||||
return fmt.Sprintf("[POST /register][%d] registerUnprocessableEntity %s", 422, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegisterUnprocessableEntity) String() string {
|
func (o *RegisterUnprocessableEntity) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /register][%d] registerUnprocessableEntity %+v", 422, o.Payload)
|
||||||
return fmt.Sprintf("[POST /register][%d] registerUnprocessableEntity %s", 422, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RegisterUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *RegisterUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -212,13 +211,11 @@ func (o *ResetPasswordUnprocessableEntity) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ResetPasswordUnprocessableEntity) Error() string {
|
func (o *ResetPasswordUnprocessableEntity) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordUnprocessableEntity %+v", 422, o.Payload)
|
||||||
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordUnprocessableEntity %s", 422, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ResetPasswordUnprocessableEntity) String() string {
|
func (o *ResetPasswordUnprocessableEntity) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordUnprocessableEntity %+v", 422, o.Payload)
|
||||||
return fmt.Sprintf("[POST /resetPassword][%d] resetPasswordUnprocessableEntity %s", 422, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ResetPasswordUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *ResetPasswordUnprocessableEntity) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -7,7 +7,6 @@ package account
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *VerifyOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *VerifyOK) Error() string {
|
func (o *VerifyOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /verify][%d] verifyOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *VerifyOK) String() string {
|
func (o *VerifyOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /verify][%d] verifyOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *VerifyOK) GetPayload() *VerifyOKBody {
|
func (o *VerifyOK) GetPayload() *VerifyOKBody {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,31 +17,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
|
|||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new admin API client with basic auth credentials.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - user: user for basic authentication header.
|
|
||||||
// - password: password for basic authentication header.
|
|
||||||
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new admin API client with a bearer token for authentication.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - bearerToken: bearer token for Bearer authentication header.
|
|
||||||
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for admin API
|
Client for admin API
|
||||||
*/
|
*/
|
||||||
@ -51,53 +25,9 @@ type Client struct {
|
|||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption may be used to customize the behavior of Client methods.
|
// ClientOption is the option for Client methods
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
type ClientOption func(*runtime.ClientOperation)
|
||||||
|
|
||||||
// This client is generated with a few options you might find useful for your swagger spec.
|
|
||||||
//
|
|
||||||
// Feel free to add you own set of options.
|
|
||||||
|
|
||||||
// WithContentType allows the client to force the Content-Type header
|
|
||||||
// to negotiate a specific Consumer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithContentType(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
|
||||||
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationZrokV1JSON sets the Content-Type header to "application/zrok.v1+json".
|
|
||||||
func WithContentTypeApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccept allows the client to force the Accept header
|
|
||||||
// to negotiate a specific Producer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithAccept(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
|
||||||
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationZrokV1JSON sets the Accept header to "application/zrok.v1+json".
|
|
||||||
func WithAcceptApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
AddOrganizationMember(params *AddOrganizationMemberParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddOrganizationMemberCreated, error)
|
AddOrganizationMember(params *AddOrganizationMemberParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddOrganizationMemberCreated, error)
|
||||||
|
@ -7,7 +7,6 @@ package admin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *CreateAccountCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateAccountCreated) Error() string {
|
func (o *CreateAccountCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /account][%d] createAccountCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /account][%d] createAccountCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateAccountCreated) String() string {
|
func (o *CreateAccountCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /account][%d] createAccountCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /account][%d] createAccountCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateAccountCreated) GetPayload() *CreateAccountCreatedBody {
|
func (o *CreateAccountCreated) GetPayload() *CreateAccountCreatedBody {
|
||||||
|
@ -106,13 +106,11 @@ func (o *CreateFrontendCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateFrontendCreated) Error() string {
|
func (o *CreateFrontendCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /frontend][%d] createFrontendCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /frontend][%d] createFrontendCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateFrontendCreated) String() string {
|
func (o *CreateFrontendCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /frontend][%d] createFrontendCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /frontend][%d] createFrontendCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateFrontendCreated) GetPayload() *CreateFrontendCreatedBody {
|
func (o *CreateFrontendCreated) GetPayload() *CreateFrontendCreatedBody {
|
||||||
@ -362,7 +360,7 @@ swagger:model CreateFrontendBody
|
|||||||
type CreateFrontendBody struct {
|
type CreateFrontendBody struct {
|
||||||
|
|
||||||
// permission mode
|
// permission mode
|
||||||
// Enum: ["open","closed"]
|
// Enum: [open closed]
|
||||||
PermissionMode string `json:"permissionMode,omitempty"`
|
PermissionMode string `json:"permissionMode,omitempty"`
|
||||||
|
|
||||||
// public name
|
// public name
|
||||||
|
@ -7,7 +7,6 @@ package admin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *CreateIdentityCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateIdentityCreated) Error() string {
|
func (o *CreateIdentityCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /identity][%d] createIdentityCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /identity][%d] createIdentityCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateIdentityCreated) String() string {
|
func (o *CreateIdentityCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /identity][%d] createIdentityCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /identity][%d] createIdentityCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateIdentityCreated) GetPayload() *CreateIdentityCreatedBody {
|
func (o *CreateIdentityCreated) GetPayload() *CreateIdentityCreatedBody {
|
||||||
|
@ -7,7 +7,6 @@ package admin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *CreateOrganizationCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateOrganizationCreated) Error() string {
|
func (o *CreateOrganizationCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /organization][%d] createOrganizationCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /organization][%d] createOrganizationCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateOrganizationCreated) String() string {
|
func (o *CreateOrganizationCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /organization][%d] createOrganizationCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /organization][%d] createOrganizationCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CreateOrganizationCreated) GetPayload() *CreateOrganizationCreatedBody {
|
func (o *CreateOrganizationCreated) GetPayload() *CreateOrganizationCreatedBody {
|
||||||
|
@ -7,7 +7,6 @@ package admin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *ListFrontendsOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListFrontendsOK) Error() string {
|
func (o *ListFrontendsOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListFrontendsOK) String() string {
|
func (o *ListFrontendsOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListFrontendsOK) GetPayload() []*ListFrontendsOKBodyItems0 {
|
func (o *ListFrontendsOK) GetPayload() []*ListFrontendsOKBodyItems0 {
|
||||||
|
@ -7,7 +7,6 @@ package admin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -100,13 +99,11 @@ func (o *ListOrganizationMembersOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrganizationMembersOK) Error() string {
|
func (o *ListOrganizationMembersOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /organization/list][%d] listOrganizationMembersOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /organization/list][%d] listOrganizationMembersOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrganizationMembersOK) String() string {
|
func (o *ListOrganizationMembersOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /organization/list][%d] listOrganizationMembersOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /organization/list][%d] listOrganizationMembersOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrganizationMembersOK) GetPayload() *ListOrganizationMembersOKBody {
|
func (o *ListOrganizationMembersOK) GetPayload() *ListOrganizationMembersOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package admin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -94,13 +93,11 @@ func (o *ListOrganizationsOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrganizationsOK) Error() string {
|
func (o *ListOrganizationsOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /organizations][%d] listOrganizationsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /organizations][%d] listOrganizationsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrganizationsOK) String() string {
|
func (o *ListOrganizationsOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /organizations][%d] listOrganizationsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /organizations][%d] listOrganizationsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrganizationsOK) GetPayload() *ListOrganizationsOKBody {
|
func (o *ListOrganizationsOK) GetPayload() *ListOrganizationsOKBody {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,31 +17,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
|
|||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new agent API client with basic auth credentials.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - user: user for basic authentication header.
|
|
||||||
// - password: password for basic authentication header.
|
|
||||||
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new agent API client with a bearer token for authentication.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - bearerToken: bearer token for Bearer authentication header.
|
|
||||||
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for agent API
|
Client for agent API
|
||||||
*/
|
*/
|
||||||
@ -51,53 +25,9 @@ type Client struct {
|
|||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption may be used to customize the behavior of Client methods.
|
// ClientOption is the option for Client methods
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
type ClientOption func(*runtime.ClientOperation)
|
||||||
|
|
||||||
// This client is generated with a few options you might find useful for your swagger spec.
|
|
||||||
//
|
|
||||||
// Feel free to add you own set of options.
|
|
||||||
|
|
||||||
// WithContentType allows the client to force the Content-Type header
|
|
||||||
// to negotiate a specific Consumer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithContentType(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
|
||||||
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationZrokV1JSON sets the Content-Type header to "application/zrok.v1+json".
|
|
||||||
func WithContentTypeApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccept allows the client to force the Accept header
|
|
||||||
// to negotiate a specific Producer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithAccept(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
|
||||||
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationZrokV1JSON sets the Accept header to "application/zrok.v1+json".
|
|
||||||
func WithAcceptApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
Enroll(params *EnrollParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*EnrollOK, error)
|
Enroll(params *EnrollParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*EnrollOK, error)
|
||||||
|
@ -7,7 +7,6 @@ package agent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *EnrollOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *EnrollOK) Error() string {
|
func (o *EnrollOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/enroll][%d] enrollOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/enroll][%d] enrollOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *EnrollOK) String() string {
|
func (o *EnrollOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/enroll][%d] enrollOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/enroll][%d] enrollOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *EnrollOK) GetPayload() *EnrollOKBody {
|
func (o *EnrollOK) GetPayload() *EnrollOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package agent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *PingOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *PingOK) Error() string {
|
func (o *PingOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/ping][%d] pingOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/ping][%d] pingOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *PingOK) String() string {
|
func (o *PingOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/ping][%d] pingOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/ping][%d] pingOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *PingOK) GetPayload() *PingOKBody {
|
func (o *PingOK) GetPayload() *PingOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package agent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -100,13 +99,11 @@ func (o *RemoteAccessOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteAccessOK) Error() string {
|
func (o *RemoteAccessOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/access][%d] remoteAccessOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/access][%d] remoteAccessOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteAccessOK) String() string {
|
func (o *RemoteAccessOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/access][%d] remoteAccessOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/access][%d] remoteAccessOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteAccessOK) GetPayload() *RemoteAccessOKBody {
|
func (o *RemoteAccessOK) GetPayload() *RemoteAccessOKBody {
|
||||||
|
@ -100,13 +100,11 @@ func (o *RemoteShareOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteShareOK) Error() string {
|
func (o *RemoteShareOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/share][%d] remoteShareOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/share][%d] remoteShareOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteShareOK) String() string {
|
func (o *RemoteShareOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/share][%d] remoteShareOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/share][%d] remoteShareOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteShareOK) GetPayload() *RemoteShareOKBody {
|
func (o *RemoteShareOK) GetPayload() *RemoteShareOKBody {
|
||||||
@ -303,7 +301,7 @@ type RemoteShareBody struct {
|
|||||||
AccessGrants []string `json:"accessGrants"`
|
AccessGrants []string `json:"accessGrants"`
|
||||||
|
|
||||||
// backend mode
|
// backend mode
|
||||||
// Enum: ["proxy","web","tcpTunnel","udpTunnel","caddy","drive","socks","vpn"]
|
// Enum: [proxy web tcpTunnel udpTunnel caddy drive socks vpn]
|
||||||
BackendMode string `json:"backendMode,omitempty"`
|
BackendMode string `json:"backendMode,omitempty"`
|
||||||
|
|
||||||
// basic auth
|
// basic auth
|
||||||
@ -331,7 +329,7 @@ type RemoteShareBody struct {
|
|||||||
Open bool `json:"open,omitempty"`
|
Open bool `json:"open,omitempty"`
|
||||||
|
|
||||||
// share mode
|
// share mode
|
||||||
// Enum: ["public","private","reserved"]
|
// Enum: [public private reserved]
|
||||||
ShareMode string `json:"shareMode,omitempty"`
|
ShareMode string `json:"shareMode,omitempty"`
|
||||||
|
|
||||||
// target
|
// target
|
||||||
|
@ -7,7 +7,6 @@ package agent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -100,13 +99,11 @@ func (o *RemoteStatusOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteStatusOK) Error() string {
|
func (o *RemoteStatusOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/status][%d] remoteStatusOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/status][%d] remoteStatusOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteStatusOK) String() string {
|
func (o *RemoteStatusOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /agent/status][%d] remoteStatusOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /agent/status][%d] remoteStatusOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *RemoteStatusOK) GetPayload() *RemoteStatusOKBody {
|
func (o *RemoteStatusOK) GetPayload() *RemoteStatusOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package environment
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *EnableCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *EnableCreated) Error() string {
|
func (o *EnableCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /enable][%d] enableCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /enable][%d] enableCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *EnableCreated) String() string {
|
func (o *EnableCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /enable][%d] enableCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /enable][%d] enableCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *EnableCreated) GetPayload() *EnableCreatedBody {
|
func (o *EnableCreated) GetPayload() *EnableCreatedBody {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,31 +17,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
|
|||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new environment API client with basic auth credentials.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - user: user for basic authentication header.
|
|
||||||
// - password: password for basic authentication header.
|
|
||||||
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new environment API client with a bearer token for authentication.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - bearerToken: bearer token for Bearer authentication header.
|
|
||||||
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for environment API
|
Client for environment API
|
||||||
*/
|
*/
|
||||||
@ -51,53 +25,9 @@ type Client struct {
|
|||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption may be used to customize the behavior of Client methods.
|
// ClientOption is the option for Client methods
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
type ClientOption func(*runtime.ClientOperation)
|
||||||
|
|
||||||
// This client is generated with a few options you might find useful for your swagger spec.
|
|
||||||
//
|
|
||||||
// Feel free to add you own set of options.
|
|
||||||
|
|
||||||
// WithContentType allows the client to force the Content-Type header
|
|
||||||
// to negotiate a specific Consumer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithContentType(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
|
||||||
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationZrokV1JSON sets the Content-Type header to "application/zrok.v1+json".
|
|
||||||
func WithContentTypeApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccept allows the client to force the Accept header
|
|
||||||
// to negotiate a specific Producer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithAccept(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
|
||||||
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationZrokV1JSON sets the Accept header to "application/zrok.v1+json".
|
|
||||||
func WithAcceptApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
Disable(params *DisableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DisableOK, error)
|
Disable(params *DisableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DisableOK, error)
|
||||||
|
@ -7,7 +7,6 @@ package metadata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -142,13 +141,11 @@ func (o *ClientVersionCheckBadRequest) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ClientVersionCheckBadRequest) Error() string {
|
func (o *ClientVersionCheckBadRequest) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckBadRequest %+v", 400, o.Payload)
|
||||||
return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckBadRequest %s", 400, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ClientVersionCheckBadRequest) String() string {
|
func (o *ClientVersionCheckBadRequest) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckBadRequest %+v", 400, o.Payload)
|
||||||
return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckBadRequest %s", 400, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ClientVersionCheckBadRequest) GetPayload() string {
|
func (o *ClientVersionCheckBadRequest) GetPayload() string {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -80,13 +79,11 @@ func (o *ConfigurationOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ConfigurationOK) Error() string {
|
func (o *ConfigurationOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /configuration][%d] configurationOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /configuration][%d] configurationOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ConfigurationOK) String() string {
|
func (o *ConfigurationOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /configuration][%d] configurationOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /configuration][%d] configurationOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ConfigurationOK) GetPayload() *rest_model_zrok.Configuration {
|
func (o *ConfigurationOK) GetPayload() *rest_model_zrok.Configuration {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -86,13 +85,11 @@ func (o *GetAccountDetailOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAccountDetailOK) Error() string {
|
func (o *GetAccountDetailOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/account][%d] getAccountDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/account][%d] getAccountDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAccountDetailOK) String() string {
|
func (o *GetAccountDetailOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/account][%d] getAccountDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/account][%d] getAccountDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAccountDetailOK) GetPayload() rest_model_zrok.Environments {
|
func (o *GetAccountDetailOK) GetPayload() rest_model_zrok.Environments {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *GetAccountMetricsOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) Error() string {
|
func (o *GetAccountMetricsOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /metrics/account][%d] getAccountMetricsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /metrics/account][%d] getAccountMetricsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) String() string {
|
func (o *GetAccountMetricsOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /metrics/account][%d] getAccountMetricsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /metrics/account][%d] getAccountMetricsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetAccountMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
func (o *GetAccountMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *GetEnvironmentDetailOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetEnvironmentDetailOK) Error() string {
|
func (o *GetEnvironmentDetailOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetEnvironmentDetailOK) String() string {
|
func (o *GetEnvironmentDetailOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/environment/{envZId}][%d] getEnvironmentDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetEnvironmentDetailOK) GetPayload() *rest_model_zrok.EnvironmentAndResources {
|
func (o *GetEnvironmentDetailOK) GetPayload() *rest_model_zrok.EnvironmentAndResources {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *GetEnvironmentMetricsOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) Error() string {
|
func (o *GetEnvironmentMetricsOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) String() string {
|
func (o *GetEnvironmentMetricsOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /metrics/environment/{envId}][%d] getEnvironmentMetricsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetEnvironmentMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
func (o *GetEnvironmentMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *GetFrontendDetailOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetFrontendDetailOK) Error() string {
|
func (o *GetFrontendDetailOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/frontend/{frontendId}][%d] getFrontendDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/frontend/{frontendId}][%d] getFrontendDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetFrontendDetailOK) String() string {
|
func (o *GetFrontendDetailOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/frontend/{frontendId}][%d] getFrontendDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/frontend/{frontendId}][%d] getFrontendDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetFrontendDetailOK) GetPayload() *rest_model_zrok.Frontend {
|
func (o *GetFrontendDetailOK) GetPayload() *rest_model_zrok.Frontend {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *GetShareDetailOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetShareDetailOK) Error() string {
|
func (o *GetShareDetailOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/share/{shareToken}][%d] getShareDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/share/{shareToken}][%d] getShareDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetShareDetailOK) String() string {
|
func (o *GetShareDetailOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /detail/share/{shareToken}][%d] getShareDetailOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /detail/share/{shareToken}][%d] getShareDetailOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetShareDetailOK) GetPayload() *rest_model_zrok.Share {
|
func (o *GetShareDetailOK) GetPayload() *rest_model_zrok.Share {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *GetShareMetricsOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) Error() string {
|
func (o *GetShareMetricsOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /metrics/share/{shareToken}][%d] getShareMetricsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /metrics/share/{shareToken}][%d] getShareMetricsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) String() string {
|
func (o *GetShareMetricsOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /metrics/share/{shareToken}][%d] getShareMetricsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /metrics/share/{shareToken}][%d] getShareMetricsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetShareMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
func (o *GetShareMetricsOK) GetPayload() *rest_model_zrok.Metrics {
|
||||||
|
@ -7,7 +7,6 @@ package metadata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -96,13 +95,11 @@ func (o *GetSparklinesOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetSparklinesOK) Error() string {
|
func (o *GetSparklinesOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /sparklines][%d] getSparklinesOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /sparklines][%d] getSparklinesOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetSparklinesOK) String() string {
|
func (o *GetSparklinesOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /sparklines][%d] getSparklinesOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[POST /sparklines][%d] getSparklinesOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetSparklinesOK) GetPayload() *GetSparklinesOKBody {
|
func (o *GetSparklinesOK) GetPayload() *GetSparklinesOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package metadata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -88,13 +87,11 @@ func (o *ListMembershipsOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListMembershipsOK) Error() string {
|
func (o *ListMembershipsOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /memberships][%d] listMembershipsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /memberships][%d] listMembershipsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListMembershipsOK) String() string {
|
func (o *ListMembershipsOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /memberships][%d] listMembershipsOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /memberships][%d] listMembershipsOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListMembershipsOK) GetPayload() *ListMembershipsOKBody {
|
func (o *ListMembershipsOK) GetPayload() *ListMembershipsOKBody {
|
||||||
|
@ -7,7 +7,6 @@ package metadata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -94,13 +93,11 @@ func (o *ListOrgMembersOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrgMembersOK) Error() string {
|
func (o *ListOrgMembersOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listOrgMembersOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listOrgMembersOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrgMembersOK) String() string {
|
func (o *ListOrgMembersOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listOrgMembersOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /members/{organizationToken}][%d] listOrgMembersOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ListOrgMembersOK) GetPayload() *ListOrgMembersOKBody {
|
func (o *ListOrgMembersOK) GetPayload() *ListOrgMembersOKBody {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,31 +17,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
|
|||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new metadata API client with basic auth credentials.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - user: user for basic authentication header.
|
|
||||||
// - password: password for basic authentication header.
|
|
||||||
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new metadata API client with a bearer token for authentication.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - bearerToken: bearer token for Bearer authentication header.
|
|
||||||
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for metadata API
|
Client for metadata API
|
||||||
*/
|
*/
|
||||||
@ -51,53 +25,9 @@ type Client struct {
|
|||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption may be used to customize the behavior of Client methods.
|
// ClientOption is the option for Client methods
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
type ClientOption func(*runtime.ClientOperation)
|
||||||
|
|
||||||
// This client is generated with a few options you might find useful for your swagger spec.
|
|
||||||
//
|
|
||||||
// Feel free to add you own set of options.
|
|
||||||
|
|
||||||
// WithContentType allows the client to force the Content-Type header
|
|
||||||
// to negotiate a specific Consumer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithContentType(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
|
||||||
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationZrokV1JSON sets the Content-Type header to "application/zrok.v1+json".
|
|
||||||
func WithContentTypeApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccept allows the client to force the Accept header
|
|
||||||
// to negotiate a specific Producer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithAccept(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
|
||||||
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationZrokV1JSON sets the Accept header to "application/zrok.v1+json".
|
|
||||||
func WithAcceptApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
ClientVersionCheck(params *ClientVersionCheckParams, opts ...ClientOption) (*ClientVersionCheckOK, error)
|
ClientVersionCheck(params *ClientVersionCheckParams, opts ...ClientOption) (*ClientVersionCheckOK, error)
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -92,13 +91,11 @@ func (o *OrgAccountOverviewOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *OrgAccountOverviewOK) Error() string {
|
func (o *OrgAccountOverviewOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /overview/{organizationToken}/{accountEmail}][%d] orgAccountOverviewOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /overview/{organizationToken}/{accountEmail}][%d] orgAccountOverviewOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OrgAccountOverviewOK) String() string {
|
func (o *OrgAccountOverviewOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /overview/{organizationToken}/{accountEmail}][%d] orgAccountOverviewOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /overview/{organizationToken}/{accountEmail}][%d] orgAccountOverviewOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OrgAccountOverviewOK) GetPayload() *rest_model_zrok.Overview {
|
func (o *OrgAccountOverviewOK) GetPayload() *rest_model_zrok.Overview {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -86,13 +85,11 @@ func (o *OverviewOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *OverviewOK) Error() string {
|
func (o *OverviewOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /overview][%d] overviewOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /overview][%d] overviewOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OverviewOK) String() string {
|
func (o *OverviewOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /overview][%d] overviewOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /overview][%d] overviewOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OverviewOK) GetPayload() *rest_model_zrok.Overview {
|
func (o *OverviewOK) GetPayload() *rest_model_zrok.Overview {
|
||||||
@ -156,13 +153,11 @@ func (o *OverviewInternalServerError) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *OverviewInternalServerError) Error() string {
|
func (o *OverviewInternalServerError) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /overview][%d] overviewInternalServerError %+v", 500, o.Payload)
|
||||||
return fmt.Sprintf("[GET /overview][%d] overviewInternalServerError %s", 500, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OverviewInternalServerError) String() string {
|
func (o *OverviewInternalServerError) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /overview][%d] overviewInternalServerError %+v", 500, o.Payload)
|
||||||
return fmt.Sprintf("[GET /overview][%d] overviewInternalServerError %s", 500, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OverviewInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *OverviewInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -7,7 +7,6 @@ package metadata
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -80,13 +79,11 @@ func (o *VersionInventoryOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *VersionInventoryOK) Error() string {
|
func (o *VersionInventoryOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /versions][%d] versionInventoryOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /versions][%d] versionInventoryOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *VersionInventoryOK) String() string {
|
func (o *VersionInventoryOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /versions][%d] versionInventoryOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /versions][%d] versionInventoryOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *VersionInventoryOK) GetPayload() *VersionInventoryOKBody {
|
func (o *VersionInventoryOK) GetPayload() *VersionInventoryOKBody {
|
||||||
|
@ -6,7 +6,6 @@ package metadata
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -80,13 +79,11 @@ func (o *VersionOK) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *VersionOK) Error() string {
|
func (o *VersionOK) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /version][%d] versionOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /version][%d] versionOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *VersionOK) String() string {
|
func (o *VersionOK) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[GET /version][%d] versionOK %+v", 200, o.Payload)
|
||||||
return fmt.Sprintf("[GET /version][%d] versionOK %s", 200, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *VersionOK) GetPayload() rest_model_zrok.Version {
|
func (o *VersionOK) GetPayload() rest_model_zrok.Version {
|
||||||
|
@ -7,7 +7,6 @@ package share
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -98,13 +97,11 @@ func (o *AccessCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *AccessCreated) Error() string {
|
func (o *AccessCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /access][%d] accessCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /access][%d] accessCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *AccessCreated) String() string {
|
func (o *AccessCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /access][%d] accessCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /access][%d] accessCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *AccessCreated) GetPayload() *AccessCreatedBody {
|
func (o *AccessCreated) GetPayload() *AccessCreatedBody {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,31 +17,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
|
|||||||
return &Client{transport: transport, formats: formats}
|
return &Client{transport: transport, formats: formats}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new share API client with basic auth credentials.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - user: user for basic authentication header.
|
|
||||||
// - password: password for basic authentication header.
|
|
||||||
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new share API client with a bearer token for authentication.
|
|
||||||
// It takes the following parameters:
|
|
||||||
// - host: http host (github.com).
|
|
||||||
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
||||||
// - scheme: http scheme ("http", "https").
|
|
||||||
// - bearerToken: bearer token for Bearer authentication header.
|
|
||||||
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
||||||
transport := httptransport.New(host, basePath, []string{scheme})
|
|
||||||
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
||||||
return &Client{transport: transport, formats: strfmt.Default}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Client for share API
|
Client for share API
|
||||||
*/
|
*/
|
||||||
@ -51,53 +25,9 @@ type Client struct {
|
|||||||
formats strfmt.Registry
|
formats strfmt.Registry
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientOption may be used to customize the behavior of Client methods.
|
// ClientOption is the option for Client methods
|
||||||
type ClientOption func(*runtime.ClientOperation)
|
type ClientOption func(*runtime.ClientOperation)
|
||||||
|
|
||||||
// This client is generated with a few options you might find useful for your swagger spec.
|
|
||||||
//
|
|
||||||
// Feel free to add you own set of options.
|
|
||||||
|
|
||||||
// WithContentType allows the client to force the Content-Type header
|
|
||||||
// to negotiate a specific Consumer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithContentType(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
|
||||||
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContentTypeApplicationZrokV1JSON sets the Content-Type header to "application/zrok.v1+json".
|
|
||||||
func WithContentTypeApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ConsumesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccept allows the client to force the Accept header
|
|
||||||
// to negotiate a specific Producer from the server.
|
|
||||||
//
|
|
||||||
// You may use this option to set arbitrary extensions to your MIME media type.
|
|
||||||
func WithAccept(mime string) ClientOption {
|
|
||||||
return func(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{mime}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
|
||||||
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAcceptApplicationZrokV1JSON sets the Accept header to "application/zrok.v1+json".
|
|
||||||
func WithAcceptApplicationZrokV1JSON(r *runtime.ClientOperation) {
|
|
||||||
r.ProducesMediaTypes = []string{"application/zrok.v1+json"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
Access(params *AccessParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AccessCreated, error)
|
Access(params *AccessParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AccessCreated, error)
|
||||||
|
@ -6,7 +6,6 @@ package share
|
|||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -110,13 +109,11 @@ func (o *ShareCreated) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShareCreated) Error() string {
|
func (o *ShareCreated) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /share][%d] shareCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /share][%d] shareCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShareCreated) String() string {
|
func (o *ShareCreated) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /share][%d] shareCreated %+v", 201, o.Payload)
|
||||||
return fmt.Sprintf("[POST /share][%d] shareCreated %s", 201, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShareCreated) GetPayload() *rest_model_zrok.ShareResponse {
|
func (o *ShareCreated) GetPayload() *rest_model_zrok.ShareResponse {
|
||||||
@ -404,13 +401,11 @@ func (o *ShareInternalServerError) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShareInternalServerError) Error() string {
|
func (o *ShareInternalServerError) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /share][%d] shareInternalServerError %+v", 500, o.Payload)
|
||||||
return fmt.Sprintf("[POST /share][%d] shareInternalServerError %s", 500, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShareInternalServerError) String() string {
|
func (o *ShareInternalServerError) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[POST /share][%d] shareInternalServerError %+v", 500, o.Payload)
|
||||||
return fmt.Sprintf("[POST /share][%d] shareInternalServerError %s", 500, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShareInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *ShareInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -7,7 +7,6 @@ package share
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
@ -268,13 +267,11 @@ func (o *UnshareInternalServerError) Code() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *UnshareInternalServerError) Error() string {
|
func (o *UnshareInternalServerError) Error() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[DELETE /unshare][%d] unshareInternalServerError %+v", 500, o.Payload)
|
||||||
return fmt.Sprintf("[DELETE /unshare][%d] unshareInternalServerError %s", 500, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *UnshareInternalServerError) String() string {
|
func (o *UnshareInternalServerError) String() string {
|
||||||
payload, _ := json.Marshal(o.Payload)
|
return fmt.Sprintf("[DELETE /unshare][%d] unshareInternalServerError %+v", 500, o.Payload)
|
||||||
return fmt.Sprintf("[DELETE /unshare][%d] unshareInternalServerError %s", 500, payload)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *UnshareInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
func (o *UnshareInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
||||||
|
@ -36,6 +36,9 @@ type Environment struct {
|
|||||||
// limited
|
// limited
|
||||||
Limited bool `json:"limited,omitempty"`
|
Limited bool `json:"limited,omitempty"`
|
||||||
|
|
||||||
|
// remote agent
|
||||||
|
RemoteAgent bool `json:"remoteAgent,omitempty"`
|
||||||
|
|
||||||
// updated at
|
// updated at
|
||||||
UpdatedAt int64 `json:"updatedAt,omitempty"`
|
UpdatedAt int64 `json:"updatedAt,omitempty"`
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ type ShareRequest struct {
|
|||||||
AuthUsers []*AuthUser `json:"authUsers"`
|
AuthUsers []*AuthUser `json:"authUsers"`
|
||||||
|
|
||||||
// backend mode
|
// backend mode
|
||||||
// Enum: ["proxy","web","tcpTunnel","udpTunnel","caddy","drive","socks","vpn"]
|
// Enum: [proxy web tcpTunnel udpTunnel caddy drive socks vpn]
|
||||||
BackendMode string `json:"backendMode,omitempty"`
|
BackendMode string `json:"backendMode,omitempty"`
|
||||||
|
|
||||||
// backend proxy endpoint
|
// backend proxy endpoint
|
||||||
@ -50,18 +50,18 @@ type ShareRequest struct {
|
|||||||
OauthEmailDomains []string `json:"oauthEmailDomains"`
|
OauthEmailDomains []string `json:"oauthEmailDomains"`
|
||||||
|
|
||||||
// oauth provider
|
// oauth provider
|
||||||
// Enum: ["github","google"]
|
// Enum: [github google]
|
||||||
OauthProvider string `json:"oauthProvider,omitempty"`
|
OauthProvider string `json:"oauthProvider,omitempty"`
|
||||||
|
|
||||||
// permission mode
|
// permission mode
|
||||||
// Enum: ["open","closed"]
|
// Enum: [open closed]
|
||||||
PermissionMode string `json:"permissionMode,omitempty"`
|
PermissionMode string `json:"permissionMode,omitempty"`
|
||||||
|
|
||||||
// reserved
|
// reserved
|
||||||
Reserved bool `json:"reserved,omitempty"`
|
Reserved bool `json:"reserved,omitempty"`
|
||||||
|
|
||||||
// share mode
|
// share mode
|
||||||
// Enum: ["public","private"]
|
// Enum: [public private]
|
||||||
ShareMode string `json:"shareMode,omitempty"`
|
ShareMode string `json:"shareMode,omitempty"`
|
||||||
|
|
||||||
// unique name
|
// unique name
|
||||||
|
@ -2533,6 +2533,9 @@ func init() {
|
|||||||
"limited": {
|
"limited": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"remoteAgent": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"updatedAt": {
|
"updatedAt": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -5368,6 +5371,9 @@ func init() {
|
|||||||
"limited": {
|
"limited": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"remoteAgent": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"updatedAt": {
|
"updatedAt": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
@ -82,7 +82,7 @@ func (o *CreateFrontend) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|||||||
type CreateFrontendBody struct {
|
type CreateFrontendBody struct {
|
||||||
|
|
||||||
// permission mode
|
// permission mode
|
||||||
// Enum: ["open","closed"]
|
// Enum: [open closed]
|
||||||
PermissionMode string `json:"permissionMode,omitempty"`
|
PermissionMode string `json:"permissionMode,omitempty"`
|
||||||
|
|
||||||
// public name
|
// public name
|
||||||
|
@ -85,7 +85,7 @@ type RemoteShareBody struct {
|
|||||||
AccessGrants []string `json:"accessGrants"`
|
AccessGrants []string `json:"accessGrants"`
|
||||||
|
|
||||||
// backend mode
|
// backend mode
|
||||||
// Enum: ["proxy","web","tcpTunnel","udpTunnel","caddy","drive","socks","vpn"]
|
// Enum: [proxy web tcpTunnel udpTunnel caddy drive socks vpn]
|
||||||
BackendMode string `json:"backendMode,omitempty"`
|
BackendMode string `json:"backendMode,omitempty"`
|
||||||
|
|
||||||
// basic auth
|
// basic auth
|
||||||
@ -113,7 +113,7 @@ type RemoteShareBody struct {
|
|||||||
Open bool `json:"open,omitempty"`
|
Open bool `json:"open,omitempty"`
|
||||||
|
|
||||||
// share mode
|
// share mode
|
||||||
// Enum: ["public","private","reserved"]
|
// Enum: [public private reserved]
|
||||||
ShareMode string `json:"shareMode,omitempty"`
|
ShareMode string `json:"shareMode,omitempty"`
|
||||||
|
|
||||||
// target
|
// target
|
||||||
|
@ -80,7 +80,7 @@ type Server struct {
|
|||||||
ListenLimit int `long:"listen-limit" description:"limit the number of outstanding requests"`
|
ListenLimit int `long:"listen-limit" description:"limit the number of outstanding requests"`
|
||||||
KeepAlive time.Duration `long:"keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)" default:"3m"`
|
KeepAlive time.Duration `long:"keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)" default:"3m"`
|
||||||
ReadTimeout time.Duration `long:"read-timeout" description:"maximum duration before timing out read of the request" default:"30s"`
|
ReadTimeout time.Duration `long:"read-timeout" description:"maximum duration before timing out read of the request" default:"30s"`
|
||||||
WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"30s"`
|
WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"60s"`
|
||||||
httpServerL net.Listener
|
httpServerL net.Listener
|
||||||
|
|
||||||
TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"`
|
TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"`
|
||||||
|
@ -51,6 +51,12 @@ export interface Environment {
|
|||||||
* @memberof Environment
|
* @memberof Environment
|
||||||
*/
|
*/
|
||||||
zId?: string;
|
zId?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof Environment
|
||||||
|
*/
|
||||||
|
remoteAgent?: boolean;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<SparkDataSample>}
|
* @type {Array<SparkDataSample>}
|
||||||
@ -98,6 +104,7 @@ export function EnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|||||||
'host': json['host'] == null ? undefined : json['host'],
|
'host': json['host'] == null ? undefined : json['host'],
|
||||||
'address': json['address'] == null ? undefined : json['address'],
|
'address': json['address'] == null ? undefined : json['address'],
|
||||||
'zId': json['zId'] == null ? undefined : json['zId'],
|
'zId': json['zId'] == null ? undefined : json['zId'],
|
||||||
|
'remoteAgent': json['remoteAgent'] == null ? undefined : json['remoteAgent'],
|
||||||
'activity': json['activity'] == null ? undefined : ((json['activity'] as Array<any>).map(SparkDataSampleFromJSON)),
|
'activity': json['activity'] == null ? undefined : ((json['activity'] as Array<any>).map(SparkDataSampleFromJSON)),
|
||||||
'limited': json['limited'] == null ? undefined : json['limited'],
|
'limited': json['limited'] == null ? undefined : json['limited'],
|
||||||
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
||||||
@ -120,6 +127,7 @@ export function EnvironmentToJSONTyped(value?: Environment | null, ignoreDiscrim
|
|||||||
'host': value['host'],
|
'host': value['host'],
|
||||||
'address': value['address'],
|
'address': value['address'],
|
||||||
'zId': value['zId'],
|
'zId': value['zId'],
|
||||||
|
'remoteAgent': value['remoteAgent'],
|
||||||
'activity': value['activity'] == null ? undefined : ((value['activity'] as Array<any>).map(SparkDataSampleToJSON)),
|
'activity': value['activity'] == null ? undefined : ((value['activity'] as Array<any>).map(SparkDataSampleToJSON)),
|
||||||
'limited': value['limited'],
|
'limited': value['limited'],
|
||||||
'createdAt': value['createdAt'],
|
'createdAt': value['createdAt'],
|
||||||
|
@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|||||||
**host** | **str** | | [optional]
|
**host** | **str** | | [optional]
|
||||||
**address** | **str** | | [optional]
|
**address** | **str** | | [optional]
|
||||||
**z_id** | **str** | | [optional]
|
**z_id** | **str** | | [optional]
|
||||||
|
**remote_agent** | **bool** | | [optional]
|
||||||
**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional]
|
**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional]
|
||||||
**limited** | **bool** | | [optional]
|
**limited** | **bool** | | [optional]
|
||||||
**created_at** | **int** | | [optional]
|
**created_at** | **int** | | [optional]
|
||||||
|
@ -39,6 +39,7 @@ class TestEnvironment(unittest.TestCase):
|
|||||||
host = '',
|
host = '',
|
||||||
address = '',
|
address = '',
|
||||||
z_id = '',
|
z_id = '',
|
||||||
|
remote_agent = True,
|
||||||
activity = [
|
activity = [
|
||||||
zrok_api.models.spark_data_sample.sparkDataSample(
|
zrok_api.models.spark_data_sample.sparkDataSample(
|
||||||
rx = 1.337,
|
rx = 1.337,
|
||||||
|
@ -40,6 +40,7 @@ class TestEnvironmentAndResources(unittest.TestCase):
|
|||||||
host = '',
|
host = '',
|
||||||
address = '',
|
address = '',
|
||||||
z_id = '',
|
z_id = '',
|
||||||
|
remote_agent = True,
|
||||||
activity = [
|
activity = [
|
||||||
zrok_api.models.spark_data_sample.sparkDataSample(
|
zrok_api.models.spark_data_sample.sparkDataSample(
|
||||||
rx = 1.337,
|
rx = 1.337,
|
||||||
|
@ -43,6 +43,7 @@ class TestOverview(unittest.TestCase):
|
|||||||
host = '',
|
host = '',
|
||||||
address = '',
|
address = '',
|
||||||
z_id = '',
|
z_id = '',
|
||||||
|
remote_agent = True,
|
||||||
activity = [
|
activity = [
|
||||||
zrok_api.models.spark_data_sample.sparkDataSample(
|
zrok_api.models.spark_data_sample.sparkDataSample(
|
||||||
rx = 1.337,
|
rx = 1.337,
|
||||||
|
@ -31,11 +31,12 @@ class Environment(BaseModel):
|
|||||||
host: Optional[StrictStr] = None
|
host: Optional[StrictStr] = None
|
||||||
address: Optional[StrictStr] = None
|
address: Optional[StrictStr] = None
|
||||||
z_id: Optional[StrictStr] = Field(default=None, alias="zId")
|
z_id: Optional[StrictStr] = Field(default=None, alias="zId")
|
||||||
|
remote_agent: Optional[StrictBool] = Field(default=None, alias="remoteAgent")
|
||||||
activity: Optional[List[SparkDataSample]] = None
|
activity: Optional[List[SparkDataSample]] = None
|
||||||
limited: Optional[StrictBool] = None
|
limited: Optional[StrictBool] = None
|
||||||
created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
|
created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
|
||||||
updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
|
updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
|
||||||
__properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"]
|
__properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "remoteAgent", "activity", "limited", "createdAt", "updatedAt"]
|
||||||
|
|
||||||
model_config = ConfigDict(
|
model_config = ConfigDict(
|
||||||
populate_by_name=True,
|
populate_by_name=True,
|
||||||
@ -99,6 +100,7 @@ class Environment(BaseModel):
|
|||||||
"host": obj.get("host"),
|
"host": obj.get("host"),
|
||||||
"address": obj.get("address"),
|
"address": obj.get("address"),
|
||||||
"zId": obj.get("zId"),
|
"zId": obj.get("zId"),
|
||||||
|
"remoteAgent": obj.get("remoteAgent"),
|
||||||
"activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None,
|
"activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None,
|
||||||
"limited": obj.get("limited"),
|
"limited": obj.get("limited"),
|
||||||
"createdAt": obj.get("createdAt"),
|
"createdAt": obj.get("createdAt"),
|
||||||
|
@ -1562,6 +1562,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
zId:
|
zId:
|
||||||
type: string
|
type: string
|
||||||
|
remoteAgent:
|
||||||
|
type: boolean
|
||||||
activity:
|
activity:
|
||||||
$ref: "#/definitions/sparkData"
|
$ref: "#/definitions/sparkData"
|
||||||
limited:
|
limited:
|
||||||
|
@ -51,6 +51,12 @@ export interface Environment {
|
|||||||
* @memberof Environment
|
* @memberof Environment
|
||||||
*/
|
*/
|
||||||
zId?: string;
|
zId?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof Environment
|
||||||
|
*/
|
||||||
|
remoteAgent?: boolean;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {Array<SparkDataSample>}
|
* @type {Array<SparkDataSample>}
|
||||||
@ -98,6 +104,7 @@ export function EnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|||||||
'host': json['host'] == null ? undefined : json['host'],
|
'host': json['host'] == null ? undefined : json['host'],
|
||||||
'address': json['address'] == null ? undefined : json['address'],
|
'address': json['address'] == null ? undefined : json['address'],
|
||||||
'zId': json['zId'] == null ? undefined : json['zId'],
|
'zId': json['zId'] == null ? undefined : json['zId'],
|
||||||
|
'remoteAgent': json['remoteAgent'] == null ? undefined : json['remoteAgent'],
|
||||||
'activity': json['activity'] == null ? undefined : ((json['activity'] as Array<any>).map(SparkDataSampleFromJSON)),
|
'activity': json['activity'] == null ? undefined : ((json['activity'] as Array<any>).map(SparkDataSampleFromJSON)),
|
||||||
'limited': json['limited'] == null ? undefined : json['limited'],
|
'limited': json['limited'] == null ? undefined : json['limited'],
|
||||||
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
||||||
@ -120,6 +127,7 @@ export function EnvironmentToJSONTyped(value?: Environment | null, ignoreDiscrim
|
|||||||
'host': value['host'],
|
'host': value['host'],
|
||||||
'address': value['address'],
|
'address': value['address'],
|
||||||
'zId': value['zId'],
|
'zId': value['zId'],
|
||||||
|
'remoteAgent': value['remoteAgent'],
|
||||||
'activity': value['activity'] == null ? undefined : ((value['activity'] as Array<any>).map(SparkDataSampleToJSON)),
|
'activity': value['activity'] == null ? undefined : ((value['activity'] as Array<any>).map(SparkDataSampleToJSON)),
|
||||||
'limited': value['limited'],
|
'limited': value['limited'],
|
||||||
'createdAt': value['createdAt'],
|
'createdAt': value['createdAt'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user