From d805c85190fa50ed8a108526e53dd8ae6e5a3762 Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Thu, 26 Jan 2023 19:09:11 +0100 Subject: [PATCH 1/2] feat(fctl): Add billing command --- components/fctl/.golangci.yml | 3 - components/fctl/cmd/cloud/billing/portal.go | 47 ++ components/fctl/cmd/cloud/billing/root.go | 17 + components/fctl/cmd/cloud/billing/setup.go | 45 ++ components/fctl/cmd/cloud/root.go | 2 + components/fctl/cmd/login.go | 23 +- components/fctl/membership-swagger.yaml | 390 ++++++----- .../membershipclient/.openapi-generator/FILES | 9 + components/fctl/membershipclient/README.md | 6 + .../fctl/membershipclient/api/openapi.yaml | 74 ++ .../fctl/membershipclient/api_default.go | 631 ++++++++++++------ components/fctl/membershipclient/client.go | 144 ++-- .../fctl/membershipclient/configuration.go | 17 +- .../membershipclient/docs/BillingPortal.md | 49 ++ .../docs/BillingPortalResponse.md | 54 ++ .../membershipclient/docs/BillingSetup.md | 49 ++ .../docs/BillingSetupResponse.md | 54 ++ .../fctl/membershipclient/docs/DefaultApi.md | 138 ++++ components/fctl/membershipclient/go.mod | 5 +- components/fctl/membershipclient/go.sum | 61 +- .../membershipclient/model_billing_portal.go | 116 ++++ .../model_billing_portal_response.go | 124 ++++ .../membershipclient/model_billing_setup.go | 116 ++++ .../model_billing_setup_response.go | 124 ++++ .../model_create_invitation_response.go | 2 +- .../model_create_organization_response.go | 2 +- .../model_create_stack_response.go | 2 +- .../fctl/membershipclient/model_error.go | 4 +- .../fctl/membershipclient/model_invitation.go | 14 +- .../model_list_invitations_response.go | 2 +- ...del_list_organization_expanded_response.go | 2 +- ...ganization_expanded_response_data_inner.go | 6 +- ...ion_expanded_response_data_inner_all_of.go | 4 +- .../model_list_organization_response.go | 2 +- .../model_list_regions_response.go | 2 +- .../model_list_stacks_response.go | 2 +- .../model_list_users_response.go | 2 +- .../membershipclient/model_organization.go | 2 +- .../model_organization_all_of.go | 2 +- .../model_organization_data.go | 2 +- .../model_read_user_response.go | 2 +- .../fctl/membershipclient/model_region.go | 8 +- .../membershipclient/model_server_info.go | 2 +- .../fctl/membershipclient/model_stack.go | 12 +- .../membershipclient/model_stack_all_of.go | 4 +- .../fctl/membershipclient/model_stack_data.go | 10 +- .../fctl/membershipclient/model_user.go | 2 +- .../membershipclient/model_user_all_of.go | 2 +- .../fctl/membershipclient/model_user_data.go | 2 +- components/fctl/pkg/utils.go | 24 + 50 files changed, 1828 insertions(+), 590 deletions(-) create mode 100644 components/fctl/cmd/cloud/billing/portal.go create mode 100644 components/fctl/cmd/cloud/billing/root.go create mode 100644 components/fctl/cmd/cloud/billing/setup.go create mode 100644 components/fctl/membershipclient/docs/BillingPortal.md create mode 100644 components/fctl/membershipclient/docs/BillingPortalResponse.md create mode 100644 components/fctl/membershipclient/docs/BillingSetup.md create mode 100644 components/fctl/membershipclient/docs/BillingSetupResponse.md create mode 100644 components/fctl/membershipclient/model_billing_portal.go create mode 100644 components/fctl/membershipclient/model_billing_portal_response.go create mode 100644 components/fctl/membershipclient/model_billing_setup.go create mode 100644 components/fctl/membershipclient/model_billing_setup_response.go diff --git a/components/fctl/.golangci.yml b/components/fctl/.golangci.yml index 21d82bd184..a8b393a21b 100644 --- a/components/fctl/.golangci.yml +++ b/components/fctl/.golangci.yml @@ -13,16 +13,13 @@ linters-settings: linters: disable-all: true enable: - - deadcode #Default linter - errcheck #Default linter - gosimple #Default linter - govet #Default linter - ineffassign #Default linter - staticcheck #Default linter - - structcheck #Default linter - typecheck #Default linter - unused #Default linter - - varcheck #Default linter - gofmt - gci - goimports diff --git a/components/fctl/cmd/cloud/billing/portal.go b/components/fctl/cmd/cloud/billing/portal.go new file mode 100644 index 0000000000..8b51a9b0d8 --- /dev/null +++ b/components/fctl/cmd/cloud/billing/portal.go @@ -0,0 +1,47 @@ +package billing + +import ( + fctl "github.com/formancehq/fctl/pkg" + "github.com/spf13/cobra" +) + +func NewPortalCommand() *cobra.Command { + return fctl.NewCommand("portal", + fctl.WithAliases("p"), + fctl.WithShortDescription("Access to Billing Portal"), + fctl.WithArgs(cobra.ExactArgs(0)), + fctl.WithRunE(func(cmd *cobra.Command, args []string) error { + cfg, err := fctl.GetConfig(cmd) + if err != nil { + return err + } + + apiClient, err := fctl.NewMembershipClient(cmd, cfg) + if err != nil { + return err + } + + organizationID, err := fctl.ResolveOrganizationID(cmd, cfg) + if err != nil { + return err + } + + billing, _, err := apiClient.DefaultApi.BillingPortal(cmd.Context(), organizationID).Execute() + if err != nil { + return err + } + + if billing == nil { + fctl.Error(cmd.OutOrStdout(), "Please subscribe to a plan to access Billing Portal") + return nil + } + + if err := fctl.Open(billing.Data.Url); err != nil { + return err + } + + fctl.Success(cmd.OutOrStdout(), "Billing Portal opened in your browser") + return nil + }), + ) +} diff --git a/components/fctl/cmd/cloud/billing/root.go b/components/fctl/cmd/cloud/billing/root.go new file mode 100644 index 0000000000..14c5d08ca4 --- /dev/null +++ b/components/fctl/cmd/cloud/billing/root.go @@ -0,0 +1,17 @@ +package billing + +import ( + fctl "github.com/formancehq/fctl/pkg" + "github.com/spf13/cobra" +) + +func NewCommand() *cobra.Command { + return fctl.NewStackCommand("billing", + fctl.WithAliases("bil", "b"), + fctl.WithShortDescription("Billing management"), + fctl.WithChildCommands( + NewPortalCommand(), + NewSetupCommand(), + ), + ) +} diff --git a/components/fctl/cmd/cloud/billing/setup.go b/components/fctl/cmd/cloud/billing/setup.go new file mode 100644 index 0000000000..6308d43a69 --- /dev/null +++ b/components/fctl/cmd/cloud/billing/setup.go @@ -0,0 +1,45 @@ +package billing + +import ( + "fmt" + + fctl "github.com/formancehq/fctl/pkg" + "github.com/spf13/cobra" +) + +func NewSetupCommand() *cobra.Command { + return fctl.NewCommand("setup", + fctl.WithAliases("s"), + fctl.WithShortDescription("Create a new billing account"), + fctl.WithArgs(cobra.ExactArgs(0)), + fctl.WithRunE(func(cmd *cobra.Command, args []string) error { + cfg, err := fctl.GetConfig(cmd) + if err != nil { + return err + } + + apiClient, err := fctl.NewMembershipClient(cmd, cfg) + if err != nil { + return err + } + + organizationID, err := fctl.ResolveOrganizationID(cmd, cfg) + if err != nil { + return err + } + + billing, _, err := apiClient.DefaultApi.BillingSetup(cmd.Context(), organizationID).Execute() + if err != nil { + return err + } + _ = fmt.Sprintf("Billing Portal: %s", billing.Data.Url) + + if err := fctl.Open(billing.Data.Url); err != nil { + return err + } + + fctl.Success(cmd.OutOrStdout(), "Billing Setup opened in your browser") + return nil + }), + ) +} diff --git a/components/fctl/cmd/cloud/root.go b/components/fctl/cmd/cloud/root.go index f7e16cbf14..762634e647 100644 --- a/components/fctl/cmd/cloud/root.go +++ b/components/fctl/cmd/cloud/root.go @@ -1,6 +1,7 @@ package cloud import ( + "github.com/formancehq/fctl/cmd/cloud/billing" "github.com/formancehq/fctl/cmd/cloud/me" "github.com/formancehq/fctl/cmd/cloud/organizations" "github.com/formancehq/fctl/cmd/cloud/regions" @@ -19,6 +20,7 @@ func NewCommand() *cobra.Command { users.NewCommand(), regions.NewCommand(), NewGeneratePersonalTokenCommand(), + billing.NewCommand(), ), ) } diff --git a/components/fctl/cmd/login.go b/components/fctl/cmd/login.go index bfd8991da6..37b2b66054 100644 --- a/components/fctl/cmd/login.go +++ b/components/fctl/cmd/login.go @@ -4,8 +4,6 @@ import ( "context" "fmt" "net/url" - "os/exec" - "runtime" fctl "github.com/formancehq/fctl/pkg" "github.com/spf13/cobra" @@ -13,25 +11,6 @@ import ( "github.com/zitadel/oidc/pkg/oidc" ) -func open(url string) error { - var ( - cmd string - args []string - ) - - switch runtime.GOOS { - case "windows": - cmd = "cmd" - args = []string{"/c", "start"} - case "darwin": - cmd = "open" - default: // "linux", "freebsd", "openbsd", "netbsd" - cmd = "xdg-open" - } - args = append(args, url) - return exec.Command(cmd, args...).Start() -} - type Dialog interface { DisplayURIAndCode(uri, code string) } @@ -57,7 +36,7 @@ func LogIn(ctx context.Context, dialog Dialog, relyingParty rp.RelyingParty) (*o dialog.DisplayURIAndCode(deviceCode.GetVerificationUri(), deviceCode.GetUserCode()) - if err := open(uri.String()); err != nil { + if err := fctl.Open(uri.String()); err != nil { return nil, err } diff --git a/components/fctl/membership-swagger.yaml b/components/fctl/membership-swagger.yaml index 5e0dc99e1a..9b2c114fda 100644 --- a/components/fctl/membership-swagger.yaml +++ b/components/fctl/membership-swagger.yaml @@ -5,8 +5,8 @@ info: version: "0.1.0" servers: -- url: http://localhost:8080 - description: Local server + - url: http://localhost:8080 + description: Local server paths: /_info: @@ -62,11 +62,11 @@ paths: summary: Read organization operationId: readOrganization parameters: - - name: organizationId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true responses: 200: description: OK @@ -78,11 +78,11 @@ paths: summary: Delete organization operationId: deleteOrganization parameters: - - name: organizationId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true responses: 204: description: Organization deleted @@ -91,11 +91,11 @@ paths: summary: List users operationId: listUsers parameters: - - name: organizationId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true responses: 200: description: List of users @@ -108,16 +108,16 @@ paths: summary: Read user operationId: readUser parameters: - - name: organizationId - in: path - schema: - type: string - required: true - - name: userId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true + - name: userId + in: path + schema: + type: string + required: true responses: 200: description: Read a user @@ -125,16 +125,50 @@ paths: application/json: schema: $ref: '#/components/schemas/ReadUserResponse' + /organizations/{organizationId}/billing/portal: + get: + summary: Access to the billing portal + operationId: billingPortal + parameters: + - name: organizationId + in: path + schema: + type: string + required: true + responses: + 200: + description: Access to the billing portal + content: + application/json: + schema: + $ref: '#/components/schemas/BillingPortalResponse' + /organizations/{organizationId}/billing/setup: + get: + summary: Create a billing setup + operationId: billingSetup + parameters: + - name: organizationId + in: path + schema: + type: string + required: true + responses: + 200: + description: Create a billing setup + content: + application/json: + schema: + $ref: '#/components/schemas/BillingSetupResponse' /organizations/{organizationId}/stacks: get: summary: List stacks operationId: listStacks parameters: - - name: organizationId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true responses: 200: description: List of stacks @@ -146,11 +180,11 @@ paths: summary: Create stack operationId: createStack parameters: - - name: organizationId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true requestBody: content: application/json: @@ -174,16 +208,16 @@ paths: summary: Read stack operationId: readStack parameters: - - name: organizationId - in: path - schema: - type: string - required: true - - name: stackId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true + - name: stackId + in: path + schema: + type: string + required: true responses: 200: description: OK @@ -195,16 +229,16 @@ paths: summary: Delete stack operationId: deleteStack parameters: - - name: organizationId - in: path - schema: - type: string - required: true - - name: stackId - in: path - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true + - name: stackId + in: path + schema: + type: string + required: true responses: 204: description: Stack deleted @@ -213,18 +247,18 @@ paths: summary: List invitations of the user operationId: listInvitations parameters: - - in: query - name: status - required: false - description: Status of organizations - schema: - type: string - - in: query - name: organization - required: false - description: Status of organizations - schema: - type: string + - in: query + name: status + required: false + description: Status of organizations + schema: + type: string + - in: query + name: organization + required: false + description: Status of organizations + schema: + type: string responses: 200: description: List of the invitations for the connected user @@ -237,11 +271,11 @@ paths: summary: Accept invitation operationId: acceptInvitation parameters: - - name: invitationId - in: path - schema: - type: string - required: true + - name: invitationId + in: path + schema: + type: string + required: true responses: 204: description: Invitation accepted @@ -250,11 +284,11 @@ paths: summary: Decline invitation operationId: declineInvitation parameters: - - name: invitationId - in: path - schema: - type: string - required: true + - name: invitationId + in: path + schema: + type: string + required: true responses: 204: description: Invitation declined @@ -263,17 +297,17 @@ paths: summary: List invitations of the organization operationId: listOrganizationInvitations parameters: - - name: organizationId - in: path - schema: - type: string - required: true - - in: query - name: status - required: false - description: Status of organizations - schema: - type: string + - name: organizationId + in: path + schema: + type: string + required: true + - in: query + name: status + required: false + description: Status of organizations + schema: + type: string responses: 200: description: List of the invitations for the organization @@ -285,16 +319,16 @@ paths: summary: Create invitation operationId: createInvitation parameters: - - name: organizationId - in: path - schema: - type: string - required: true - - name: email - in: query - schema: - type: string - required: true + - name: organizationId + in: path + schema: + type: string + required: true + - name: email + in: query + schema: + type: string + required: true responses: 201: description: Invitation created @@ -315,7 +349,7 @@ paths: $ref: '#/components/schemas/ListRegionsResponse' security: -- oauth2: [] + - oauth2: [] components: securitySchemes: @@ -332,32 +366,32 @@ components: OrganizationData: type: object required: - - name + - name properties: name: type: string description: Organization name Organization: allOf: - - $ref: '#/components/schemas/OrganizationData' - - type: object - required: - - id - - ownerId - properties: - id: - type: string - description: Organization ID - ownerId: - type: string - description: Owner ID + - $ref: '#/components/schemas/OrganizationData' + - type: object + required: + - id + - ownerId + properties: + id: + type: string + description: Organization ID + ownerId: + type: string + description: Owner ID StackData: type: object required: - - name - - tags - - production - - metadata + - name + - tags + - production + - metadata properties: name: type: string @@ -372,43 +406,59 @@ components: type: object additionalProperties: type: string + BillingPortal: + type: object + required: + - url + properties: + url: + type: string + description: Billing portal URL + BillingSetup: + type: object + required: + - url + properties: + url: + type: string + description: Billing portal URL Stack: allOf: - - $ref: '#/components/schemas/StackData' - - type: object - required: - - id - - organizationId - - uri - properties: - id: - type: string - description: Stack ID - organizationId: - type: string - description: Organization ID - uri: - type: string - description: Base stack uri - boundRegion: - $ref: '#/components/schemas/Region' + - $ref: '#/components/schemas/StackData' + - type: object + required: + - id + - organizationId + - uri + properties: + id: + type: string + description: Stack ID + organizationId: + type: string + description: Organization ID + uri: + type: string + description: Base stack uri + boundRegion: + $ref: '#/components/schemas/Region' UserData: type: object properties: email: type: string required: - - email + - email User: allOf: - - $ref: '#/components/schemas/UserData' - - type: object - required: - - id - properties: - id: - type: string - description: User ID + - $ref: '#/components/schemas/UserData' + - type: object + required: + - id + properties: + id: + type: string + description: User ID OrganizationArray: type: array items: @@ -440,6 +490,16 @@ components: properties: data: $ref: '#/components/schemas/StackArray' + BillingPortalResponse: + type: object + properties: + data: + $ref: '#/components/schemas/BillingPortal' + BillingSetupResponse: + type: object + properties: + data: + $ref: '#/components/schemas/BillingSetup' ListUsersResponse: type: object properties: @@ -479,7 +539,7 @@ components: error_message: type: string required: - - error_code + - error_code Invitation: type: object properties: @@ -492,9 +552,9 @@ components: status: type: string enum: - - pending - - accepted - - rejected + - pending + - accepted + - rejected creationDate: type: string format: date-time @@ -502,17 +562,17 @@ components: type: string format: date-time required: - - creationDate - - status - - userEmail - - organizationId - - id + - creationDate + - status + - userEmail + - organizationId + - id Region: type: object required: - - id - - baseUrl - - tags + - id + - baseUrl + - tags properties: id: type: string @@ -529,13 +589,13 @@ components: type: array items: allOf: - - $ref: '#/components/schemas/Organization' - - type: object - properties: - totalStacks: - type: integer - totalUsers: - type: integer + - $ref: '#/components/schemas/Organization' + - type: object + properties: + totalStacks: + type: integer + totalUsers: + type: integer ListRegionsResponse: type: object properties: @@ -546,7 +606,7 @@ components: ServerInfo: type: object required: - - version + - version properties: version: type: string diff --git a/components/fctl/membershipclient/.openapi-generator/FILES b/components/fctl/membershipclient/.openapi-generator/FILES index 10ebd7f927..ef655aab19 100644 --- a/components/fctl/membershipclient/.openapi-generator/FILES +++ b/components/fctl/membershipclient/.openapi-generator/FILES @@ -5,6 +5,10 @@ api/openapi.yaml api_default.go client.go configuration.go +docs/BillingPortal.md +docs/BillingPortalResponse.md +docs/BillingSetup.md +docs/BillingSetupResponse.md docs/CreateInvitationResponse.md docs/CreateOrganizationResponse.md docs/CreateStackResponse.md @@ -34,6 +38,10 @@ docs/UserData.md git_push.sh go.mod go.sum +model_billing_portal.go +model_billing_portal_response.go +model_billing_setup.go +model_billing_setup_response.go model_create_invitation_response.go model_create_organization_response.go model_create_stack_response.go @@ -60,4 +68,5 @@ model_user.go model_user_all_of.go model_user_data.go response.go +test/api_default_test.go utils.go diff --git a/components/fctl/membershipclient/README.md b/components/fctl/membershipclient/README.md index c989883727..76b5254723 100644 --- a/components/fctl/membershipclient/README.md +++ b/components/fctl/membershipclient/README.md @@ -79,6 +79,8 @@ All URIs are relative to *http://localhost:8080* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DefaultApi* | [**AcceptInvitation**](docs/DefaultApi.md#acceptinvitation) | **Post** /me/invitations/{invitationId}/accept | Accept invitation +*DefaultApi* | [**BillingPortal**](docs/DefaultApi.md#billingportal) | **Get** /organizations/{organizationId}/billing/portal | Access to the billing portal +*DefaultApi* | [**BillingSetup**](docs/DefaultApi.md#billingsetup) | **Get** /organizations/{organizationId}/billing/setup | Create a billing setup *DefaultApi* | [**CreateInvitation**](docs/DefaultApi.md#createinvitation) | **Post** /organizations/{organizationId}/invitations | Create invitation *DefaultApi* | [**CreateOrganization**](docs/DefaultApi.md#createorganization) | **Post** /organizations | Create organization *DefaultApi* | [**CreateStack**](docs/DefaultApi.md#createstack) | **Post** /organizations/{organizationId}/stacks | Create stack @@ -100,6 +102,10 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [BillingPortal](docs/BillingPortal.md) + - [BillingPortalResponse](docs/BillingPortalResponse.md) + - [BillingSetup](docs/BillingSetup.md) + - [BillingSetupResponse](docs/BillingSetupResponse.md) - [CreateInvitationResponse](docs/CreateInvitationResponse.md) - [CreateOrganizationResponse](docs/CreateOrganizationResponse.md) - [CreateStackResponse](docs/CreateStackResponse.md) diff --git a/components/fctl/membershipclient/api/openapi.yaml b/components/fctl/membershipclient/api/openapi.yaml index 875c783492..72d5431445 100644 --- a/components/fctl/membershipclient/api/openapi.yaml +++ b/components/fctl/membershipclient/api/openapi.yaml @@ -135,6 +135,44 @@ paths: $ref: '#/components/schemas/ReadUserResponse' description: Read a user summary: Read user + /organizations/{organizationId}/billing/portal: + get: + operationId: billingPortal + parameters: + - explode: false + in: path + name: organizationId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BillingPortalResponse' + description: Access to the billing portal + summary: Access to the billing portal + /organizations/{organizationId}/billing/setup: + get: + operationId: billingSetup + parameters: + - explode: false + in: path + name: organizationId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BillingSetupResponse' + description: Create a billing setup + summary: Create a billing setup /organizations/{organizationId}/stacks: get: operationId: listStacks @@ -395,6 +433,26 @@ components: - production - tags type: object + BillingPortal: + example: + url: url + properties: + url: + description: Billing portal URL + type: string + required: + - url + type: object + BillingSetup: + example: + url: url + properties: + url: + description: Billing portal URL + type: string + required: + - url + type: object Stack: allOf: - $ref: '#/components/schemas/StackData' @@ -455,6 +513,22 @@ components: $ref: '#/components/schemas/Stack' type: array type: object + BillingPortalResponse: + example: + data: + url: url + properties: + data: + $ref: '#/components/schemas/BillingPortal' + type: object + BillingSetupResponse: + example: + data: + url: url + properties: + data: + $ref: '#/components/schemas/BillingSetup' + type: object ListUsersResponse: example: data: diff --git a/components/fctl/membershipclient/api_default.go b/components/fctl/membershipclient/api_default.go index d63dbd6110..efca5b13c7 100644 --- a/components/fctl/membershipclient/api_default.go +++ b/components/fctl/membershipclient/api_default.go @@ -19,12 +19,13 @@ import ( "strings" ) + // DefaultApiService DefaultApi service type DefaultApiService service type ApiAcceptInvitationRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService invitationId string } @@ -35,14 +36,14 @@ func (r ApiAcceptInvitationRequest) Execute() (*http.Response, error) { /* AcceptInvitation Accept invitation - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param invitationId - @return ApiAcceptInvitationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param invitationId + @return ApiAcceptInvitationRequest */ func (a *DefaultApiService) AcceptInvitation(ctx context.Context, invitationId string) ApiAcceptInvitationRequest { return ApiAcceptInvitationRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, invitationId: invitationId, } } @@ -50,9 +51,9 @@ func (a *DefaultApiService) AcceptInvitation(ctx context.Context, invitationId s // Execute executes the request func (a *DefaultApiService) AcceptInvitationExecute(r ApiAcceptInvitationRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AcceptInvitation") @@ -112,11 +113,213 @@ func (a *DefaultApiService) AcceptInvitationExecute(r ApiAcceptInvitationRequest return localVarHTTPResponse, nil } +type ApiBillingPortalRequest struct { + ctx context.Context + ApiService *DefaultApiService + organizationId string +} + +func (r ApiBillingPortalRequest) Execute() (*BillingPortalResponse, *http.Response, error) { + return r.ApiService.BillingPortalExecute(r) +} + +/* +BillingPortal Access to the billing portal + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiBillingPortalRequest +*/ +func (a *DefaultApiService) BillingPortal(ctx context.Context, organizationId string) ApiBillingPortalRequest { + return ApiBillingPortalRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// Execute executes the request +// @return BillingPortalResponse +func (a *DefaultApiService) BillingPortalExecute(r ApiBillingPortalRequest) (*BillingPortalResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BillingPortalResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BillingPortal") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{organizationId}/billing/portal" + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiBillingSetupRequest struct { + ctx context.Context + ApiService *DefaultApiService + organizationId string +} + +func (r ApiBillingSetupRequest) Execute() (*BillingSetupResponse, *http.Response, error) { + return r.ApiService.BillingSetupExecute(r) +} + +/* +BillingSetup Create a billing setup + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiBillingSetupRequest +*/ +func (a *DefaultApiService) BillingSetup(ctx context.Context, organizationId string) ApiBillingSetupRequest { + return ApiBillingSetupRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// Execute executes the request +// @return BillingSetupResponse +func (a *DefaultApiService) BillingSetupExecute(r ApiBillingSetupRequest) (*BillingSetupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BillingSetupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BillingSetup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{organizationId}/billing/setup" + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiCreateInvitationRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string - email *string + email *string } func (r ApiCreateInvitationRequest) Email(email string) ApiCreateInvitationRequest { @@ -131,27 +334,26 @@ func (r ApiCreateInvitationRequest) Execute() (*CreateInvitationResponse, *http. /* CreateInvitation Create invitation - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiCreateInvitationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiCreateInvitationRequest */ func (a *DefaultApiService) CreateInvitation(ctx context.Context, organizationId string) ApiCreateInvitationRequest { return ApiCreateInvitationRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } // Execute executes the request -// -// @return CreateInvitationResponse +// @return CreateInvitationResponse func (a *DefaultApiService) CreateInvitationExecute(r ApiCreateInvitationRequest) (*CreateInvitationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateInvitationResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateInvitationResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateInvitation") @@ -225,9 +427,9 @@ func (a *DefaultApiService) CreateInvitationExecute(r ApiCreateInvitationRequest } type ApiCreateOrganizationRequest struct { - ctx context.Context + ctx context.Context ApiService *DefaultApiService - body *OrganizationData + body *OrganizationData } func (r ApiCreateOrganizationRequest) Body(body OrganizationData) ApiCreateOrganizationRequest { @@ -242,25 +444,24 @@ func (r ApiCreateOrganizationRequest) Execute() (*CreateOrganizationResponse, *h /* CreateOrganization Create organization - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateOrganizationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateOrganizationRequest */ func (a *DefaultApiService) CreateOrganization(ctx context.Context) ApiCreateOrganizationRequest { return ApiCreateOrganizationRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return CreateOrganizationResponse +// @return CreateOrganizationResponse func (a *DefaultApiService) CreateOrganizationExecute(r ApiCreateOrganizationRequest) (*CreateOrganizationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateOrganizationResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateOrganizationResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateOrganization") @@ -331,10 +532,10 @@ func (a *DefaultApiService) CreateOrganizationExecute(r ApiCreateOrganizationReq } type ApiCreateStackRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string - body *StackData + body *StackData } func (r ApiCreateStackRequest) Body(body StackData) ApiCreateStackRequest { @@ -349,27 +550,26 @@ func (r ApiCreateStackRequest) Execute() (*CreateStackResponse, *http.Response, /* CreateStack Create stack - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiCreateStackRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiCreateStackRequest */ func (a *DefaultApiService) CreateStack(ctx context.Context, organizationId string) ApiCreateStackRequest { return ApiCreateStackRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } // Execute executes the request -// -// @return CreateStackResponse +// @return CreateStackResponse func (a *DefaultApiService) CreateStackExecute(r ApiCreateStackRequest) (*CreateStackResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateStackResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateStackResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateStack") @@ -432,8 +632,8 @@ func (a *DefaultApiService) CreateStackExecute(r ApiCreateStackRequest) (*Create newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -451,8 +651,8 @@ func (a *DefaultApiService) CreateStackExecute(r ApiCreateStackRequest) (*Create } type ApiDeclineInvitationRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService invitationId string } @@ -463,14 +663,14 @@ func (r ApiDeclineInvitationRequest) Execute() (*http.Response, error) { /* DeclineInvitation Decline invitation - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param invitationId - @return ApiDeclineInvitationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param invitationId + @return ApiDeclineInvitationRequest */ func (a *DefaultApiService) DeclineInvitation(ctx context.Context, invitationId string) ApiDeclineInvitationRequest { return ApiDeclineInvitationRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, invitationId: invitationId, } } @@ -478,9 +678,9 @@ func (a *DefaultApiService) DeclineInvitation(ctx context.Context, invitationId // Execute executes the request func (a *DefaultApiService) DeclineInvitationExecute(r ApiDeclineInvitationRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeclineInvitation") @@ -541,8 +741,8 @@ func (a *DefaultApiService) DeclineInvitationExecute(r ApiDeclineInvitationReque } type ApiDeleteOrganizationRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string } @@ -553,14 +753,14 @@ func (r ApiDeleteOrganizationRequest) Execute() (*http.Response, error) { /* DeleteOrganization Delete organization - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiDeleteOrganizationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiDeleteOrganizationRequest */ func (a *DefaultApiService) DeleteOrganization(ctx context.Context, organizationId string) ApiDeleteOrganizationRequest { return ApiDeleteOrganizationRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } @@ -568,9 +768,9 @@ func (a *DefaultApiService) DeleteOrganization(ctx context.Context, organization // Execute executes the request func (a *DefaultApiService) DeleteOrganizationExecute(r ApiDeleteOrganizationRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteOrganization") @@ -631,10 +831,10 @@ func (a *DefaultApiService) DeleteOrganizationExecute(r ApiDeleteOrganizationReq } type ApiDeleteStackRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string - stackId string + stackId string } func (r ApiDeleteStackRequest) Execute() (*http.Response, error) { @@ -644,26 +844,26 @@ func (r ApiDeleteStackRequest) Execute() (*http.Response, error) { /* DeleteStack Delete stack - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @param stackId - @return ApiDeleteStackRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @param stackId + @return ApiDeleteStackRequest */ func (a *DefaultApiService) DeleteStack(ctx context.Context, organizationId string, stackId string) ApiDeleteStackRequest { return ApiDeleteStackRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, - stackId: stackId, + stackId: stackId, } } // Execute executes the request func (a *DefaultApiService) DeleteStackExecute(r ApiDeleteStackRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteStack") @@ -725,7 +925,7 @@ func (a *DefaultApiService) DeleteStackExecute(r ApiDeleteStackRequest) (*http.R } type ApiGetServerInfoRequest struct { - ctx context.Context + ctx context.Context ApiService *DefaultApiService } @@ -736,25 +936,24 @@ func (r ApiGetServerInfoRequest) Execute() (*ServerInfo, *http.Response, error) /* GetServerInfo Get server info - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetServerInfoRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetServerInfoRequest */ func (a *DefaultApiService) GetServerInfo(ctx context.Context) ApiGetServerInfoRequest { return ApiGetServerInfoRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ServerInfo +// @return ServerInfo func (a *DefaultApiService) GetServerInfoExecute(r ApiGetServerInfoRequest) (*ServerInfo, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ServerInfo + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServerInfo ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetServerInfo") @@ -823,9 +1022,9 @@ func (a *DefaultApiService) GetServerInfoExecute(r ApiGetServerInfoRequest) (*Se } type ApiListInvitationsRequest struct { - ctx context.Context - ApiService *DefaultApiService - status *string + ctx context.Context + ApiService *DefaultApiService + status *string organization *string } @@ -848,25 +1047,24 @@ func (r ApiListInvitationsRequest) Execute() (*ListInvitationsResponse, *http.Re /* ListInvitations List invitations of the user - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListInvitationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListInvitationsRequest */ func (a *DefaultApiService) ListInvitations(ctx context.Context) ApiListInvitationsRequest { return ApiListInvitationsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ListInvitationsResponse +// @return ListInvitationsResponse func (a *DefaultApiService) ListInvitationsExecute(r ApiListInvitationsRequest) (*ListInvitationsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListInvitationsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListInvitationsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListInvitations") @@ -941,10 +1139,10 @@ func (a *DefaultApiService) ListInvitationsExecute(r ApiListInvitationsRequest) } type ApiListOrganizationInvitationsRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string - status *string + status *string } // Status of organizations @@ -960,27 +1158,26 @@ func (r ApiListOrganizationInvitationsRequest) Execute() (*ListInvitationsRespon /* ListOrganizationInvitations List invitations of the organization - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiListOrganizationInvitationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiListOrganizationInvitationsRequest */ func (a *DefaultApiService) ListOrganizationInvitations(ctx context.Context, organizationId string) ApiListOrganizationInvitationsRequest { return ApiListOrganizationInvitationsRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } // Execute executes the request -// -// @return ListInvitationsResponse +// @return ListInvitationsResponse func (a *DefaultApiService) ListOrganizationInvitationsExecute(r ApiListOrganizationInvitationsRequest) (*ListInvitationsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListInvitationsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListInvitationsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListOrganizationInvitations") @@ -1053,7 +1250,7 @@ func (a *DefaultApiService) ListOrganizationInvitationsExecute(r ApiListOrganiza } type ApiListOrganizationsRequest struct { - ctx context.Context + ctx context.Context ApiService *DefaultApiService } @@ -1064,25 +1261,24 @@ func (r ApiListOrganizationsRequest) Execute() (*ListOrganizationResponse, *http /* ListOrganizations List organizations of the connected user - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListOrganizationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListOrganizationsRequest */ func (a *DefaultApiService) ListOrganizations(ctx context.Context) ApiListOrganizationsRequest { return ApiListOrganizationsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ListOrganizationResponse +// @return ListOrganizationResponse func (a *DefaultApiService) ListOrganizationsExecute(r ApiListOrganizationsRequest) (*ListOrganizationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListOrganizationResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListOrganizationResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListOrganizations") @@ -1151,7 +1347,7 @@ func (a *DefaultApiService) ListOrganizationsExecute(r ApiListOrganizationsReque } type ApiListOrganizationsExpandedRequest struct { - ctx context.Context + ctx context.Context ApiService *DefaultApiService } @@ -1162,25 +1358,24 @@ func (r ApiListOrganizationsExpandedRequest) Execute() (*ListOrganizationExpande /* ListOrganizationsExpanded List organizations of the connected user with expanded data - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListOrganizationsExpandedRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListOrganizationsExpandedRequest */ func (a *DefaultApiService) ListOrganizationsExpanded(ctx context.Context) ApiListOrganizationsExpandedRequest { return ApiListOrganizationsExpandedRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ListOrganizationExpandedResponse +// @return ListOrganizationExpandedResponse func (a *DefaultApiService) ListOrganizationsExpandedExecute(r ApiListOrganizationsExpandedRequest) (*ListOrganizationExpandedResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListOrganizationExpandedResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListOrganizationExpandedResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListOrganizationsExpanded") @@ -1249,7 +1444,7 @@ func (a *DefaultApiService) ListOrganizationsExpandedExecute(r ApiListOrganizati } type ApiListRegionsRequest struct { - ctx context.Context + ctx context.Context ApiService *DefaultApiService } @@ -1260,25 +1455,24 @@ func (r ApiListRegionsRequest) Execute() (*ListRegionsResponse, *http.Response, /* ListRegions List regions - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListRegionsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRegionsRequest */ func (a *DefaultApiService) ListRegions(ctx context.Context) ApiListRegionsRequest { return ApiListRegionsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ListRegionsResponse +// @return ListRegionsResponse func (a *DefaultApiService) ListRegionsExecute(r ApiListRegionsRequest) (*ListRegionsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListRegionsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListRegionsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRegions") @@ -1347,8 +1541,8 @@ func (a *DefaultApiService) ListRegionsExecute(r ApiListRegionsRequest) (*ListRe } type ApiListStacksRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string } @@ -1359,27 +1553,26 @@ func (r ApiListStacksRequest) Execute() (*ListStacksResponse, *http.Response, er /* ListStacks List stacks - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiListStacksRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiListStacksRequest */ func (a *DefaultApiService) ListStacks(ctx context.Context, organizationId string) ApiListStacksRequest { return ApiListStacksRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } // Execute executes the request -// -// @return ListStacksResponse +// @return ListStacksResponse func (a *DefaultApiService) ListStacksExecute(r ApiListStacksRequest) (*ListStacksResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListStacksResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListStacksResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListStacks") @@ -1449,8 +1642,8 @@ func (a *DefaultApiService) ListStacksExecute(r ApiListStacksRequest) (*ListStac } type ApiListUsersRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string } @@ -1461,27 +1654,26 @@ func (r ApiListUsersRequest) Execute() (*ListUsersResponse, *http.Response, erro /* ListUsers List users - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiListUsersRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiListUsersRequest */ func (a *DefaultApiService) ListUsers(ctx context.Context, organizationId string) ApiListUsersRequest { return ApiListUsersRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } // Execute executes the request -// -// @return ListUsersResponse +// @return ListUsersResponse func (a *DefaultApiService) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListUsersResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListUsersResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListUsers") @@ -1551,8 +1743,8 @@ func (a *DefaultApiService) ListUsersExecute(r ApiListUsersRequest) (*ListUsersR } type ApiReadOrganizationRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string } @@ -1563,27 +1755,26 @@ func (r ApiReadOrganizationRequest) Execute() (*CreateOrganizationResponse, *htt /* ReadOrganization Read organization - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @return ApiReadOrganizationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiReadOrganizationRequest */ func (a *DefaultApiService) ReadOrganization(ctx context.Context, organizationId string) ApiReadOrganizationRequest { return ApiReadOrganizationRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, } } // Execute executes the request -// -// @return CreateOrganizationResponse +// @return CreateOrganizationResponse func (a *DefaultApiService) ReadOrganizationExecute(r ApiReadOrganizationRequest) (*CreateOrganizationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateOrganizationResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateOrganizationResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ReadOrganization") @@ -1653,10 +1844,10 @@ func (a *DefaultApiService) ReadOrganizationExecute(r ApiReadOrganizationRequest } type ApiReadStackRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string - stackId string + stackId string } func (r ApiReadStackRequest) Execute() (*CreateStackResponse, *http.Response, error) { @@ -1666,29 +1857,28 @@ func (r ApiReadStackRequest) Execute() (*CreateStackResponse, *http.Response, er /* ReadStack Read stack - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @param stackId - @return ApiReadStackRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @param stackId + @return ApiReadStackRequest */ func (a *DefaultApiService) ReadStack(ctx context.Context, organizationId string, stackId string) ApiReadStackRequest { return ApiReadStackRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, - stackId: stackId, + stackId: stackId, } } // Execute executes the request -// -// @return CreateStackResponse +// @return CreateStackResponse func (a *DefaultApiService) ReadStackExecute(r ApiReadStackRequest) (*CreateStackResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateStackResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateStackResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ReadStack") @@ -1759,10 +1949,10 @@ func (a *DefaultApiService) ReadStackExecute(r ApiReadStackRequest) (*CreateStac } type ApiReadUserRequest struct { - ctx context.Context - ApiService *DefaultApiService + ctx context.Context + ApiService *DefaultApiService organizationId string - userId string + userId string } func (r ApiReadUserRequest) Execute() (*ReadUserResponse, *http.Response, error) { @@ -1772,29 +1962,28 @@ func (r ApiReadUserRequest) Execute() (*ReadUserResponse, *http.Response, error) /* ReadUser Read user - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId - @param userId - @return ApiReadUserRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @param userId + @return ApiReadUserRequest */ func (a *DefaultApiService) ReadUser(ctx context.Context, organizationId string, userId string) ApiReadUserRequest { return ApiReadUserRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, organizationId: organizationId, - userId: userId, + userId: userId, } } // Execute executes the request -// -// @return ReadUserResponse +// @return ReadUserResponse func (a *DefaultApiService) ReadUserExecute(r ApiReadUserRequest) (*ReadUserResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ReadUserResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ReadUserResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ReadUser") diff --git a/components/fctl/membershipclient/client.go b/components/fctl/membershipclient/client.go index 854142a41b..ae500689a6 100644 --- a/components/fctl/membershipclient/client.go +++ b/components/fctl/membershipclient/client.go @@ -37,10 +37,10 @@ import ( ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the Membership API API v0.1.0 @@ -127,15 +127,15 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -func parameterValueToString(obj interface{}, key string) string { +func parameterValueToString( obj interface{}, key string ) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) } - var param, ok = obj.(MappedNullable) + var param,ok = obj.(MappedNullable) if !ok { return "" } - dataMap, err := param.ToMap() + dataMap,err := param.ToMap() if err != nil { return "" } @@ -150,77 +150,81 @@ func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interfac value = "null" } else { switch v.Kind() { - case reflect.Invalid: - value = "invalid" + case reflect.Invalid: + value = "invalid" - case reflect.Struct: - if t, ok := obj.(MappedNullable); ok { - dataMap, err := t.ToMap() - if err != nil { + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) return } - parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { + if t, ok := obj.(time.Time); ok { + parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i BillingPortalResponse BillingPortal(ctx, organizationId).Execute() + +Access to the billing portal + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + organizationId := "organizationId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.BillingPortal(context.Background(), organizationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BillingPortal``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BillingPortal`: BillingPortalResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.BillingPortal`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**organizationId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBillingPortalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**BillingPortalResponse**](BillingPortalResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## BillingSetup + +> BillingSetupResponse BillingSetup(ctx, organizationId).Execute() + +Create a billing setup + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + organizationId := "organizationId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.BillingSetup(context.Background(), organizationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BillingSetup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BillingSetup`: BillingSetupResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.BillingSetup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**organizationId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBillingSetupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**BillingSetupResponse**](BillingSetupResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## CreateInvitation > CreateInvitationResponse CreateInvitation(ctx, organizationId).Email(email).Execute() diff --git a/components/fctl/membershipclient/go.mod b/components/fctl/membershipclient/go.mod index 482a83f030..7bedae0a58 100644 --- a/components/fctl/membershipclient/go.mod +++ b/components/fctl/membershipclient/go.mod @@ -3,8 +3,5 @@ module github.com/formancehq/fctl/membershipclient go 1.13 require ( - github.com/google/go-cmp v0.5.9 // indirect - golang.org/x/net v0.4.0 // indirect - golang.org/x/oauth2 v0.3.0 - google.golang.org/protobuf v1.28.1 // indirect + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 ) diff --git a/components/fctl/membershipclient/go.sum b/components/fctl/membershipclient/go.sum index 9c969bd031..734252e681 100644 --- a/components/fctl/membershipclient/go.sum +++ b/components/fctl/membershipclient/go.sum @@ -1,50 +1,13 @@ -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8= -golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/components/fctl/membershipclient/model_billing_portal.go b/components/fctl/membershipclient/model_billing_portal.go new file mode 100644 index 0000000000..6f6a3a4041 --- /dev/null +++ b/components/fctl/membershipclient/model_billing_portal.go @@ -0,0 +1,116 @@ +/* +Membership API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package membershipclient + +import ( + "encoding/json" +) + +// checks if the BillingPortal type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BillingPortal{} + +// BillingPortal struct for BillingPortal +type BillingPortal struct { + // Billing portal URL + Url string `json:"url"` +} + +// NewBillingPortal instantiates a new BillingPortal object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBillingPortal(url string) *BillingPortal { + this := BillingPortal{} + this.Url = url + return &this +} + +// NewBillingPortalWithDefaults instantiates a new BillingPortal object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBillingPortalWithDefaults() *BillingPortal { + this := BillingPortal{} + return &this +} + +// GetUrl returns the Url field value +func (o *BillingPortal) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *BillingPortal) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *BillingPortal) SetUrl(v string) { + o.Url = v +} + +func (o BillingPortal) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BillingPortal) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + return toSerialize, nil +} + +type NullableBillingPortal struct { + value *BillingPortal + isSet bool +} + +func (v NullableBillingPortal) Get() *BillingPortal { + return v.value +} + +func (v *NullableBillingPortal) Set(val *BillingPortal) { + v.value = val + v.isSet = true +} + +func (v NullableBillingPortal) IsSet() bool { + return v.isSet +} + +func (v *NullableBillingPortal) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBillingPortal(val *BillingPortal) *NullableBillingPortal { + return &NullableBillingPortal{value: val, isSet: true} +} + +func (v NullableBillingPortal) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBillingPortal) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/components/fctl/membershipclient/model_billing_portal_response.go b/components/fctl/membershipclient/model_billing_portal_response.go new file mode 100644 index 0000000000..df198a3794 --- /dev/null +++ b/components/fctl/membershipclient/model_billing_portal_response.go @@ -0,0 +1,124 @@ +/* +Membership API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package membershipclient + +import ( + "encoding/json" +) + +// checks if the BillingPortalResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BillingPortalResponse{} + +// BillingPortalResponse struct for BillingPortalResponse +type BillingPortalResponse struct { + Data *BillingPortal `json:"data,omitempty"` +} + +// NewBillingPortalResponse instantiates a new BillingPortalResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBillingPortalResponse() *BillingPortalResponse { + this := BillingPortalResponse{} + return &this +} + +// NewBillingPortalResponseWithDefaults instantiates a new BillingPortalResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBillingPortalResponseWithDefaults() *BillingPortalResponse { + this := BillingPortalResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *BillingPortalResponse) GetData() BillingPortal { + if o == nil || isNil(o.Data) { + var ret BillingPortal + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BillingPortalResponse) GetDataOk() (*BillingPortal, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *BillingPortalResponse) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given BillingPortal and assigns it to the Data field. +func (o *BillingPortalResponse) SetData(v BillingPortal) { + o.Data = &v +} + +func (o BillingPortalResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BillingPortalResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableBillingPortalResponse struct { + value *BillingPortalResponse + isSet bool +} + +func (v NullableBillingPortalResponse) Get() *BillingPortalResponse { + return v.value +} + +func (v *NullableBillingPortalResponse) Set(val *BillingPortalResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBillingPortalResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBillingPortalResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBillingPortalResponse(val *BillingPortalResponse) *NullableBillingPortalResponse { + return &NullableBillingPortalResponse{value: val, isSet: true} +} + +func (v NullableBillingPortalResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBillingPortalResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/components/fctl/membershipclient/model_billing_setup.go b/components/fctl/membershipclient/model_billing_setup.go new file mode 100644 index 0000000000..d10aba4120 --- /dev/null +++ b/components/fctl/membershipclient/model_billing_setup.go @@ -0,0 +1,116 @@ +/* +Membership API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package membershipclient + +import ( + "encoding/json" +) + +// checks if the BillingSetup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BillingSetup{} + +// BillingSetup struct for BillingSetup +type BillingSetup struct { + // Billing portal URL + Url string `json:"url"` +} + +// NewBillingSetup instantiates a new BillingSetup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBillingSetup(url string) *BillingSetup { + this := BillingSetup{} + this.Url = url + return &this +} + +// NewBillingSetupWithDefaults instantiates a new BillingSetup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBillingSetupWithDefaults() *BillingSetup { + this := BillingSetup{} + return &this +} + +// GetUrl returns the Url field value +func (o *BillingSetup) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *BillingSetup) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *BillingSetup) SetUrl(v string) { + o.Url = v +} + +func (o BillingSetup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BillingSetup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + return toSerialize, nil +} + +type NullableBillingSetup struct { + value *BillingSetup + isSet bool +} + +func (v NullableBillingSetup) Get() *BillingSetup { + return v.value +} + +func (v *NullableBillingSetup) Set(val *BillingSetup) { + v.value = val + v.isSet = true +} + +func (v NullableBillingSetup) IsSet() bool { + return v.isSet +} + +func (v *NullableBillingSetup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBillingSetup(val *BillingSetup) *NullableBillingSetup { + return &NullableBillingSetup{value: val, isSet: true} +} + +func (v NullableBillingSetup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBillingSetup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/components/fctl/membershipclient/model_billing_setup_response.go b/components/fctl/membershipclient/model_billing_setup_response.go new file mode 100644 index 0000000000..69b3d74c96 --- /dev/null +++ b/components/fctl/membershipclient/model_billing_setup_response.go @@ -0,0 +1,124 @@ +/* +Membership API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 0.1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package membershipclient + +import ( + "encoding/json" +) + +// checks if the BillingSetupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BillingSetupResponse{} + +// BillingSetupResponse struct for BillingSetupResponse +type BillingSetupResponse struct { + Data *BillingSetup `json:"data,omitempty"` +} + +// NewBillingSetupResponse instantiates a new BillingSetupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBillingSetupResponse() *BillingSetupResponse { + this := BillingSetupResponse{} + return &this +} + +// NewBillingSetupResponseWithDefaults instantiates a new BillingSetupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBillingSetupResponseWithDefaults() *BillingSetupResponse { + this := BillingSetupResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *BillingSetupResponse) GetData() BillingSetup { + if o == nil || isNil(o.Data) { + var ret BillingSetup + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BillingSetupResponse) GetDataOk() (*BillingSetup, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *BillingSetupResponse) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given BillingSetup and assigns it to the Data field. +func (o *BillingSetupResponse) SetData(v BillingSetup) { + o.Data = &v +} + +func (o BillingSetupResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BillingSetupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableBillingSetupResponse struct { + value *BillingSetupResponse + isSet bool +} + +func (v NullableBillingSetupResponse) Get() *BillingSetupResponse { + return v.value +} + +func (v *NullableBillingSetupResponse) Set(val *BillingSetupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBillingSetupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBillingSetupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBillingSetupResponse(val *BillingSetupResponse) *NullableBillingSetupResponse { + return &NullableBillingSetupResponse{value: val, isSet: true} +} + +func (v NullableBillingSetupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBillingSetupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/components/fctl/membershipclient/model_create_invitation_response.go b/components/fctl/membershipclient/model_create_invitation_response.go index 78864ae3a7..3da7e52a88 100644 --- a/components/fctl/membershipclient/model_create_invitation_response.go +++ b/components/fctl/membershipclient/model_create_invitation_response.go @@ -72,7 +72,7 @@ func (o *CreateInvitationResponse) SetData(v Invitation) { } func (o CreateInvitationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_create_organization_response.go b/components/fctl/membershipclient/model_create_organization_response.go index 2f76e6d09a..60c6700ef4 100644 --- a/components/fctl/membershipclient/model_create_organization_response.go +++ b/components/fctl/membershipclient/model_create_organization_response.go @@ -72,7 +72,7 @@ func (o *CreateOrganizationResponse) SetData(v Organization) { } func (o CreateOrganizationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_create_stack_response.go b/components/fctl/membershipclient/model_create_stack_response.go index d345b0d87d..9a4635e8eb 100644 --- a/components/fctl/membershipclient/model_create_stack_response.go +++ b/components/fctl/membershipclient/model_create_stack_response.go @@ -72,7 +72,7 @@ func (o *CreateStackResponse) SetData(v Stack) { } func (o CreateStackResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_error.go b/components/fctl/membershipclient/model_error.go index af03e95aee..f3b184311e 100644 --- a/components/fctl/membershipclient/model_error.go +++ b/components/fctl/membershipclient/model_error.go @@ -19,7 +19,7 @@ var _ MappedNullable = &Error{} // Error struct for Error type Error struct { - ErrorCode string `json:"error_code"` + ErrorCode string `json:"error_code"` ErrorMessage *string `json:"error_message,omitempty"` } @@ -98,7 +98,7 @@ func (o *Error) SetErrorMessage(v string) { } func (o Error) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_invitation.go b/components/fctl/membershipclient/model_invitation.go index 61fd1a1757..482feebd71 100644 --- a/components/fctl/membershipclient/model_invitation.go +++ b/components/fctl/membershipclient/model_invitation.go @@ -20,12 +20,12 @@ var _ MappedNullable = &Invitation{} // Invitation struct for Invitation type Invitation struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - UserEmail string `json:"userEmail"` - Status string `json:"status"` - CreationDate time.Time `json:"creationDate"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Id string `json:"id"` + OrganizationId string `json:"organizationId"` + UserEmail string `json:"userEmail"` + Status string `json:"status"` + CreationDate time.Time `json:"creationDate"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` } // NewInvitation instantiates a new Invitation object @@ -203,7 +203,7 @@ func (o *Invitation) SetUpdatedAt(v time.Time) { } func (o Invitation) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_invitations_response.go b/components/fctl/membershipclient/model_list_invitations_response.go index f128344be9..3a1c10567a 100644 --- a/components/fctl/membershipclient/model_list_invitations_response.go +++ b/components/fctl/membershipclient/model_list_invitations_response.go @@ -72,7 +72,7 @@ func (o *ListInvitationsResponse) SetData(v []Invitation) { } func (o ListInvitationsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_organization_expanded_response.go b/components/fctl/membershipclient/model_list_organization_expanded_response.go index 86ee829eb0..2815279c4c 100644 --- a/components/fctl/membershipclient/model_list_organization_expanded_response.go +++ b/components/fctl/membershipclient/model_list_organization_expanded_response.go @@ -72,7 +72,7 @@ func (o *ListOrganizationExpandedResponse) SetData(v []ListOrganizationExpandedR } func (o ListOrganizationExpandedResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner.go b/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner.go index 6876c18e22..7958b9a17d 100644 --- a/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner.go +++ b/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner.go @@ -24,9 +24,9 @@ type ListOrganizationExpandedResponseDataInner struct { // Organization ID Id string `json:"id"` // Owner ID - OwnerId string `json:"ownerId"` + OwnerId string `json:"ownerId"` TotalStacks *int32 `json:"totalStacks,omitempty"` - TotalUsers *int32 `json:"totalUsers,omitempty"` + TotalUsers *int32 `json:"totalUsers,omitempty"` } // NewListOrganizationExpandedResponseDataInner instantiates a new ListOrganizationExpandedResponseDataInner object @@ -186,7 +186,7 @@ func (o *ListOrganizationExpandedResponseDataInner) SetTotalUsers(v int32) { } func (o ListOrganizationExpandedResponseDataInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner_all_of.go b/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner_all_of.go index 6a08a300ff..7fc50a0d7e 100644 --- a/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner_all_of.go +++ b/components/fctl/membershipclient/model_list_organization_expanded_response_data_inner_all_of.go @@ -20,7 +20,7 @@ var _ MappedNullable = &ListOrganizationExpandedResponseDataInnerAllOf{} // ListOrganizationExpandedResponseDataInnerAllOf struct for ListOrganizationExpandedResponseDataInnerAllOf type ListOrganizationExpandedResponseDataInnerAllOf struct { TotalStacks *int32 `json:"totalStacks,omitempty"` - TotalUsers *int32 `json:"totalUsers,omitempty"` + TotalUsers *int32 `json:"totalUsers,omitempty"` } // NewListOrganizationExpandedResponseDataInnerAllOf instantiates a new ListOrganizationExpandedResponseDataInnerAllOf object @@ -105,7 +105,7 @@ func (o *ListOrganizationExpandedResponseDataInnerAllOf) SetTotalUsers(v int32) } func (o ListOrganizationExpandedResponseDataInnerAllOf) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_organization_response.go b/components/fctl/membershipclient/model_list_organization_response.go index 8303bf89f4..f736fe6760 100644 --- a/components/fctl/membershipclient/model_list_organization_response.go +++ b/components/fctl/membershipclient/model_list_organization_response.go @@ -72,7 +72,7 @@ func (o *ListOrganizationResponse) SetData(v []Organization) { } func (o ListOrganizationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_regions_response.go b/components/fctl/membershipclient/model_list_regions_response.go index f74ce2ae0b..cfb5d4f590 100644 --- a/components/fctl/membershipclient/model_list_regions_response.go +++ b/components/fctl/membershipclient/model_list_regions_response.go @@ -72,7 +72,7 @@ func (o *ListRegionsResponse) SetData(v []Region) { } func (o ListRegionsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_stacks_response.go b/components/fctl/membershipclient/model_list_stacks_response.go index b74d3f78da..a261a98d6b 100644 --- a/components/fctl/membershipclient/model_list_stacks_response.go +++ b/components/fctl/membershipclient/model_list_stacks_response.go @@ -72,7 +72,7 @@ func (o *ListStacksResponse) SetData(v []Stack) { } func (o ListStacksResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_list_users_response.go b/components/fctl/membershipclient/model_list_users_response.go index c7cb9bf606..9dc77a2b52 100644 --- a/components/fctl/membershipclient/model_list_users_response.go +++ b/components/fctl/membershipclient/model_list_users_response.go @@ -72,7 +72,7 @@ func (o *ListUsersResponse) SetData(v []User) { } func (o ListUsersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_organization.go b/components/fctl/membershipclient/model_organization.go index f0dd00a3cc..1de6ecb596 100644 --- a/components/fctl/membershipclient/model_organization.go +++ b/components/fctl/membershipclient/model_organization.go @@ -120,7 +120,7 @@ func (o *Organization) SetOwnerId(v string) { } func (o Organization) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_organization_all_of.go b/components/fctl/membershipclient/model_organization_all_of.go index 22ed439f78..cabc9da9e4 100644 --- a/components/fctl/membershipclient/model_organization_all_of.go +++ b/components/fctl/membershipclient/model_organization_all_of.go @@ -93,7 +93,7 @@ func (o *OrganizationAllOf) SetOwnerId(v string) { } func (o OrganizationAllOf) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_organization_data.go b/components/fctl/membershipclient/model_organization_data.go index 476e1921f0..012a026b19 100644 --- a/components/fctl/membershipclient/model_organization_data.go +++ b/components/fctl/membershipclient/model_organization_data.go @@ -66,7 +66,7 @@ func (o *OrganizationData) SetName(v string) { } func (o OrganizationData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_read_user_response.go b/components/fctl/membershipclient/model_read_user_response.go index 8049464639..5f840edfea 100644 --- a/components/fctl/membershipclient/model_read_user_response.go +++ b/components/fctl/membershipclient/model_read_user_response.go @@ -72,7 +72,7 @@ func (o *ReadUserResponse) SetData(v User) { } func (o ReadUserResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_region.go b/components/fctl/membershipclient/model_region.go index 39bc4a5d3a..ffed2b3932 100644 --- a/components/fctl/membershipclient/model_region.go +++ b/components/fctl/membershipclient/model_region.go @@ -19,9 +19,9 @@ var _ MappedNullable = &Region{} // Region struct for Region type Region struct { - Id string `json:"id"` - Tags map[string]string `json:"tags"` - BaseUrl string `json:"baseUrl"` + Id string `json:"id"` + Tags map[string]string `json:"tags"` + BaseUrl string `json:"baseUrl"` } // NewRegion instantiates a new Region object @@ -117,7 +117,7 @@ func (o *Region) SetBaseUrl(v string) { } func (o Region) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_server_info.go b/components/fctl/membershipclient/model_server_info.go index c53a45af8c..42ad6cc963 100644 --- a/components/fctl/membershipclient/model_server_info.go +++ b/components/fctl/membershipclient/model_server_info.go @@ -65,7 +65,7 @@ func (o *ServerInfo) SetVersion(v string) { } func (o ServerInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_stack.go b/components/fctl/membershipclient/model_stack.go index 7d7ff55b1c..cd0ccb343a 100644 --- a/components/fctl/membershipclient/model_stack.go +++ b/components/fctl/membershipclient/model_stack.go @@ -20,16 +20,16 @@ var _ MappedNullable = &Stack{} // Stack struct for Stack type Stack struct { // Stack name - Name string `json:"name"` - Tags map[string]string `json:"tags"` - Production bool `json:"production"` - Metadata map[string]string `json:"metadata"` + Name string `json:"name"` + Tags map[string]string `json:"tags"` + Production bool `json:"production"` + Metadata map[string]string `json:"metadata"` // Stack ID Id string `json:"id"` // Organization ID OrganizationId string `json:"organizationId"` // Base stack uri - Uri string `json:"uri"` + Uri string `json:"uri"` BoundRegion *Region `json:"boundRegion,omitempty"` } @@ -258,7 +258,7 @@ func (o *Stack) SetBoundRegion(v Region) { } func (o Stack) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_stack_all_of.go b/components/fctl/membershipclient/model_stack_all_of.go index 79ced6e066..253add50ba 100644 --- a/components/fctl/membershipclient/model_stack_all_of.go +++ b/components/fctl/membershipclient/model_stack_all_of.go @@ -24,7 +24,7 @@ type StackAllOf struct { // Organization ID OrganizationId string `json:"organizationId"` // Base stack uri - Uri string `json:"uri"` + Uri string `json:"uri"` BoundRegion *Region `json:"boundRegion,omitempty"` } @@ -153,7 +153,7 @@ func (o *StackAllOf) SetBoundRegion(v Region) { } func (o StackAllOf) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_stack_data.go b/components/fctl/membershipclient/model_stack_data.go index 2cab65530a..9f41f47012 100644 --- a/components/fctl/membershipclient/model_stack_data.go +++ b/components/fctl/membershipclient/model_stack_data.go @@ -20,10 +20,10 @@ var _ MappedNullable = &StackData{} // StackData struct for StackData type StackData struct { // Stack name - Name string `json:"name"` - Tags map[string]string `json:"tags"` - Production bool `json:"production"` - Metadata map[string]string `json:"metadata"` + Name string `json:"name"` + Tags map[string]string `json:"tags"` + Production bool `json:"production"` + Metadata map[string]string `json:"metadata"` } // NewStackData instantiates a new StackData object @@ -144,7 +144,7 @@ func (o *StackData) SetMetadata(v map[string]string) { } func (o StackData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_user.go b/components/fctl/membershipclient/model_user.go index ca8de805dc..2956812346 100644 --- a/components/fctl/membershipclient/model_user.go +++ b/components/fctl/membershipclient/model_user.go @@ -92,7 +92,7 @@ func (o *User) SetId(v string) { } func (o User) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_user_all_of.go b/components/fctl/membershipclient/model_user_all_of.go index e5bb5a613e..e95b0fa7fa 100644 --- a/components/fctl/membershipclient/model_user_all_of.go +++ b/components/fctl/membershipclient/model_user_all_of.go @@ -66,7 +66,7 @@ func (o *UserAllOf) SetId(v string) { } func (o UserAllOf) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/membershipclient/model_user_data.go b/components/fctl/membershipclient/model_user_data.go index d629d564d5..d1a1a4b0ab 100644 --- a/components/fctl/membershipclient/model_user_data.go +++ b/components/fctl/membershipclient/model_user_data.go @@ -65,7 +65,7 @@ func (o *UserData) SetEmail(v string) { } func (o UserData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } diff --git a/components/fctl/pkg/utils.go b/components/fctl/pkg/utils.go index 501614fde9..c3807cd6c1 100644 --- a/components/fctl/pkg/utils.go +++ b/components/fctl/pkg/utils.go @@ -1,5 +1,10 @@ package fctl +import ( + "os/exec" + "runtime" +) + func Map[SRC any, DST any](srcs []SRC, mapper func(SRC) DST) []DST { ret := make([]DST, 0) for _, src := range srcs { @@ -19,3 +24,22 @@ func MapKeys[K comparable, V any](m map[K]V) []K { func Prepend[V any](array []V, items ...V) []V { return append(items, array...) } + +func Open(url string) error { + var ( + cmd string + args []string + ) + + switch runtime.GOOS { + case "windows": + cmd = "cmd" + args = []string{"/c", "start"} + case "darwin": + cmd = "open" + default: // "linux", "freebsd", "openbsd", "netbsd" + cmd = "xdg-open" + } + args = append(args, url) + return exec.Command(cmd, args...).Start() +} From c5d238403ab5665ccb3ce5384678520289475f99 Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Mon, 30 Jan 2023 15:06:21 +0100 Subject: [PATCH 2/2] feat(fctl): Update --- components/fctl/cmd/cloud/billing/setup.go | 3 ++- components/fctl/go.sum | 13 +------------ go.work.sum | 2 ++ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/components/fctl/cmd/cloud/billing/setup.go b/components/fctl/cmd/cloud/billing/setup.go index 6308d43a69..a403e88ff7 100644 --- a/components/fctl/cmd/cloud/billing/setup.go +++ b/components/fctl/cmd/cloud/billing/setup.go @@ -30,7 +30,8 @@ func NewSetupCommand() *cobra.Command { billing, _, err := apiClient.DefaultApi.BillingSetup(cmd.Context(), organizationID).Execute() if err != nil { - return err + fctl.Error(cmd.OutOrStdout(), "You already have an active subscription") + return nil } _ = fmt.Sprintf("Billing Portal: %s", billing.Data.Url) diff --git a/components/fctl/go.sum b/components/fctl/go.sum index 83d3db0e1a..e385aeb0e0 100644 --- a/components/fctl/go.sum +++ b/components/fctl/go.sum @@ -24,7 +24,6 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -117,9 +116,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-github/v31 v31.0.0/go.mod h1:NQPZol8/1sMoWYGN2yaALIBytu17gAWfhbweiEed3pM= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -239,7 +236,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zitadel/logging v0.3.4/go.mod h1:aPpLQhE+v6ocNK0TWrBrd363hZ95KcI17Q1ixAQwZF0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -316,8 +312,6 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -338,7 +332,6 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -381,9 +374,7 @@ golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -447,7 +438,6 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -529,7 +519,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go.work.sum b/go.work.sum index 970905dab8..b544145712 100644 --- a/go.work.sum +++ b/go.work.sum @@ -22,6 +22,7 @@ cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2c cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= @@ -114,6 +115,7 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=