From 9ac76eb9a02644c8da42c4d5ba198d3aba2229f3 Mon Sep 17 00:00:00 2001 From: dexhorthy Date: Mon, 30 Mar 2020 09:54:21 -0500 Subject: [PATCH] fmt, fix errors --- cli/cmd/channel_adoption.go | 2 +- cli/cmd/channel_counts.go | 2 +- cli/cmd/channel_create.go | 2 +- cli/cmd/channel_inspect.go | 2 +- cli/cmd/channel_releases.go | 2 +- cli/cmd/channel_rm.go | 2 +- cli/cmd/collector_create.go | 2 +- cli/cmd/collector_inspect.go | 2 +- cli/cmd/collector_ls.go | 2 +- cli/cmd/collector_promote.go | 2 +- cli/cmd/collector_update.go | 2 +- cli/cmd/collectors.go | 2 +- cli/cmd/customer_ls.go | 2 +- cli/cmd/entitlements.go | 2 +- cli/cmd/entitlements_definefields.go | 2 +- cli/cmd/entitlements_getcustomerrelease.go | 2 +- cli/cmd/entitlements_setvalue.go | 2 +- cli/cmd/release_inspect.go | 2 +- cli/cmd/release_lint.go | 11 ++-- client/installer.go | 4 +- gen/go/v1/model_app_release.go | 8 +-- gen/go/v1/model_body_10.go | 8 +-- gen/go/v1/model_body_11.go | 4 +- gen/go/v1/model_body_12.go | 8 +-- gen/go/v1/model_body_14.go | 8 +-- gen/go/v1/model_body_15.go | 8 +-- gen/go/v1/model_body_3.go | 6 +- gen/go/v1/model_body_4.go | 8 +-- gen/go/v1/model_body_5.go | 4 +- gen/go/v1/model_body_6.go | 10 +-- gen/go/v1/model_branding.go | 8 +-- gen/go/v1/model_channel_adoption.go | 10 +-- gen/go/v1/model_channel_release.go | 20 +++--- gen/go/v1/model_inline_response_200.go | 2 +- gen/go/v1/model_inline_response_200_2.go | 2 +- gen/go/v1/model_installed_app_version.go | 8 +-- gen/go/v1/model_license.go | 66 +++++++++---------- gen/go/v1/model_license_billing.go | 8 +-- gen/go/v1/model_license_billing_event.go | 12 ++-- gen/go/v1/model_license_counts.go | 6 +- gen/go/v1/model_license_field.go | 10 +-- gen/go/v1/model_license_field_name_value.go | 2 +- gen/go/v1/model_license_instance.go | 30 ++++----- gen/go/v1/model_license_instance_untracked.go | 20 +++--- .../model_license_instance_version_history.go | 12 ++-- gen/go/v1/model_license_versions.go | 2 +- gen/go/v1/model_preflight_check.go | 10 +-- gen/go/v2/body.go | 3 +- gen/go/v2/body_1.go | 2 +- gen/go/v2/body_2.go | 2 +- gen/go/v2/inline_response_200.go | 3 +- gen/go/v2/inline_response_200_1.go | 3 +- gen/go/v2/inline_response_200_2.go | 3 +- gen/go/v2/inline_response_200_3.go | 3 +- gen/go/v2/inline_response_201.go | 3 +- gen/go/v2/license_channel.go | 3 +- gen/go/v2/license_channels.go | 2 +- gen/go/v2/license_field_value.go | 3 +- gen/go/v2/license_field_values.go | 2 +- gen/go/v2/license_v2.go | 3 +- gen/go/v2/licenses_v2.go | 2 +- pkg/graphql/client.go | 1 - pkg/kotsclient/customer_list.go | 1 - pkg/kotsclient/installer.go | 9 ++- pkg/shipclient/release.go | 1 - pkg/types/customer.go | 1 - 66 files changed, 193 insertions(+), 208 deletions(-) diff --git a/cli/cmd/channel_adoption.go b/cli/cmd/channel_adoption.go index 3595e39d6..6cab34418 100644 --- a/cli/cmd/channel_adoption.go +++ b/cli/cmd/channel_adoption.go @@ -13,7 +13,7 @@ func (r *runners) InitChannelAdoption(parent *cobra.Command) { Short: "Print channel adoption statistics by license type", Long: "Print channel adoption statistics by license type", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.channelAdoption } diff --git a/cli/cmd/channel_counts.go b/cli/cmd/channel_counts.go index 6ea8af741..93f515ac4 100644 --- a/cli/cmd/channel_counts.go +++ b/cli/cmd/channel_counts.go @@ -13,7 +13,7 @@ func (r *runners) InitChannelCounts(parent *cobra.Command) { Short: "Print channel license counts", Long: "Print channel license counts", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.channelCounts } diff --git a/cli/cmd/channel_create.go b/cli/cmd/channel_create.go index f2aadcd71..a07b2b8b3 100644 --- a/cli/cmd/channel_create.go +++ b/cli/cmd/channel_create.go @@ -14,7 +14,7 @@ func (r *runners) InitChannelCreate(parent *cobra.Command) { Example: replicated channel create --name Beta --description 'New features subject to change'`, } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.Flags().StringVar(&r.args.channelCreateName, "name", "", "The name of this channel") diff --git a/cli/cmd/channel_inspect.go b/cli/cmd/channel_inspect.go index 56faa0f0a..f5730b172 100644 --- a/cli/cmd/channel_inspect.go +++ b/cli/cmd/channel_inspect.go @@ -14,7 +14,7 @@ func (r *runners) InitChannelInspect(parent *cobra.Command) { Short: "Show full details for a channel", Long: "Show full details for a channel", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.channelInspect } diff --git a/cli/cmd/channel_releases.go b/cli/cmd/channel_releases.go index 188d8a502..f8a9d1d72 100644 --- a/cli/cmd/channel_releases.go +++ b/cli/cmd/channel_releases.go @@ -13,7 +13,7 @@ func (r *runners) InitChannelReleases(parent *cobra.Command) { Short: "List all releases in a channel", Long: "List all releases in a channel", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.channelReleases } diff --git a/cli/cmd/channel_rm.go b/cli/cmd/channel_rm.go index 12f046215..2a7773529 100644 --- a/cli/cmd/channel_rm.go +++ b/cli/cmd/channel_rm.go @@ -13,7 +13,7 @@ func (r *runners) InitChannelRemove(parent *cobra.Command) { Short: "Remove (archive) a channel", Long: "Remove (archive) a channel", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.channelRemove } diff --git a/cli/cmd/collector_create.go b/cli/cmd/collector_create.go index 65375513d..beba7206b 100644 --- a/cli/cmd/collector_create.go +++ b/cli/cmd/collector_create.go @@ -13,7 +13,7 @@ func (r *runners) InitCollectorCreate(parent *cobra.Command) { Short: "Create a new collector", Long: "Create a new collector by providing a name and YAML configuration", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.Flags().StringVar(&r.args.createCollectorYaml, "yaml", "", "The YAML config for this collector. Use '-' to read from stdin. Cannot be used with the `yaml-file` falg.") diff --git a/cli/cmd/collector_inspect.go b/cli/cmd/collector_inspect.go index 966fe4a96..745bad9dd 100644 --- a/cli/cmd/collector_inspect.go +++ b/cli/cmd/collector_inspect.go @@ -15,7 +15,7 @@ func (r *runners) InitCollectorInspect(parent *cobra.Command) { Short: "Print the YAML config for a collector", Long: "Print the YAML config for a collector", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.collectorInspect } diff --git a/cli/cmd/collector_ls.go b/cli/cmd/collector_ls.go index d298d4e71..3f02a2861 100644 --- a/cli/cmd/collector_ls.go +++ b/cli/cmd/collector_ls.go @@ -11,7 +11,7 @@ func (r *runners) InitCollectorList(parent *cobra.Command) { Short: "List all of an app's collectors", Long: "List all of an app's collectors", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.collectorList } diff --git a/cli/cmd/collector_promote.go b/cli/cmd/collector_promote.go index c1677ea11..ec148c1f1 100644 --- a/cli/cmd/collector_promote.go +++ b/cli/cmd/collector_promote.go @@ -15,7 +15,7 @@ func (r *runners) InitCollectorPromote(parent *cobra.Command) { Example: replicated collectors promote skd204095829040 fe4901690971757689f022f7a460f9b2`, } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.collectorPromote diff --git a/cli/cmd/collector_update.go b/cli/cmd/collector_update.go index f6cbe9e04..86fe3d2c4 100644 --- a/cli/cmd/collector_update.go +++ b/cli/cmd/collector_update.go @@ -14,7 +14,7 @@ func (r *runners) InitCollectorUpdate(parent *cobra.Command) { Short: "Update a collector's name or yaml config", Long: "Update a collector's name or yaml config", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.Flags().StringVar(&r.args.updateCollectorYaml, "yaml", "", "The new YAML config for this collector. Use '-' to read from stdin. Cannot be used with the `yaml-file` flag.") diff --git a/cli/cmd/collectors.go b/cli/cmd/collectors.go index 28d2d67ef..d29d97d36 100644 --- a/cli/cmd/collectors.go +++ b/cli/cmd/collectors.go @@ -10,7 +10,7 @@ func (r *runners) InitCollectorsCommand(parent *cobra.Command) *cobra.Command { Short: "Manage customer collectors", Long: `The collector command allows vendors to create, display, modify entitlement values for end customer licensing.`, } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) var tmp bool diff --git a/cli/cmd/customer_ls.go b/cli/cmd/customer_ls.go index e92d6d0e9..ceeec3083 100644 --- a/cli/cmd/customer_ls.go +++ b/cli/cmd/customer_ls.go @@ -11,7 +11,7 @@ func (r *runners) InitCustomersLSCommand(parent *cobra.Command) *cobra.Command { Use: "ls", Short: "list customers", Long: `list customers`, - RunE: r.listCustomers, + RunE: r.listCustomers, } parent.AddCommand(customersCmd) diff --git a/cli/cmd/entitlements.go b/cli/cmd/entitlements.go index 73f307034..a82ada9cf 100644 --- a/cli/cmd/entitlements.go +++ b/cli/cmd/entitlements.go @@ -10,7 +10,7 @@ func (r *runners) InitEntitlementsCommand(parent *cobra.Command) *cobra.Command Short: "Manage customer entitlements", Long: `The entitlements command allows vendors to create, display, modify entitlement values for end customer licensing.`, } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.PersistentFlags().StringVar(&r.args.entitlementsAPIServer, "replicated-api-server", "https://g.replicated.com/graphql", "upstream g. address") diff --git a/cli/cmd/entitlements_definefields.go b/cli/cmd/entitlements_definefields.go index 6912a8292..f3da3ca6e 100644 --- a/cli/cmd/entitlements_definefields.go +++ b/cli/cmd/entitlements_definefields.go @@ -21,7 +21,7 @@ basis and delivered securely to your on-prem application`, cmd.Flags().StringVar(&r.args.entitlementsDefineFieldsFile, "file", "entitlements.yaml", "definitions file to promote") cmd.Flags().StringVar(&r.args.entitlementsDefineFieldsName, "name", "", "name for this definition") - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) } diff --git a/cli/cmd/entitlements_getcustomerrelease.go b/cli/cmd/entitlements_getcustomerrelease.go index 2e9a9d011..be9f229f9 100644 --- a/cli/cmd/entitlements_getcustomerrelease.go +++ b/cli/cmd/entitlements_getcustomerrelease.go @@ -25,7 +25,7 @@ func (r *runners) InitEntitlementsGetCustomerReleaseCommand(parent *cobra.Comman cmd.Flags().StringVar(&r.args.entitlementsGetReleaseInstallationID, "installation-id", "", "installation id") // change the default from g.replicated.com to pg.replicated.com cmd.Flags().StringVar(&r.args.entitlementsGetReleaseAPIServer, "replicated-api-server", "https://pg.replicated.com/graphql", "Upstream api server") - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) } diff --git a/cli/cmd/entitlements_setvalue.go b/cli/cmd/entitlements_setvalue.go index a9d93f661..337a9e33a 100644 --- a/cli/cmd/entitlements_setvalue.go +++ b/cli/cmd/entitlements_setvalue.go @@ -14,7 +14,7 @@ func (r *runners) InitEntitlementsSetValueCommand(parent *cobra.Command) { Long: `Set a customer value for an entitlement field defined via 'replicated entitlements define-fields'`, RunE: r.entitlementsSetValue, } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.Flags().StringVar(&r.args.entitlementsSetValueDefinitionsID, "definitions-id", "", "definitions id created with define-fields command") diff --git a/cli/cmd/release_inspect.go b/cli/cmd/release_inspect.go index 1c8d96e12..6cc9bbcbc 100644 --- a/cli/cmd/release_inspect.go +++ b/cli/cmd/release_inspect.go @@ -16,7 +16,7 @@ func (r *runners) InitReleaseInspect(parent *cobra.Command) { Short: "Print the YAML config for a release", Long: "Print the YAML config for a release", } - cmd.Hidden=true; // Not supported in KOTS + cmd.Hidden = true // Not supported in KOTS parent.AddCommand(cmd) cmd.RunE = r.releaseInspect } diff --git a/cli/cmd/release_lint.go b/cli/cmd/release_lint.go index 7319c4311..18072d558 100644 --- a/cli/cmd/release_lint.go +++ b/cli/cmd/release_lint.go @@ -7,14 +7,13 @@ import ( "github.com/spf13/cobra" ) - var ( validFailOnValues = map[string]interface{}{ "error": nil, - "warn": nil, - "info": nil, - "none": nil, - "": nil, + "warn": nil, + "info": nil, + "none": nil, + "": nil, } ) @@ -38,7 +37,7 @@ func (r *runners) releaseLint(cmd *cobra.Command, args []string) error { return errors.Errorf("yaml is required") } - if _, ok := validFailOnValues[r.args.lintReleaseFailOn]; !ok { + if _, ok := validFailOnValues[r.args.lintReleaseFailOn]; !ok { return errors.Errorf("fail-on value %q not supported, supported values are [info, warn, error, none]", r.args.lintReleaseFailOn) } diff --git a/client/installer.go b/client/installer.go index 693456048..94820bc4f 100644 --- a/client/installer.go +++ b/client/installer.go @@ -9,7 +9,7 @@ func (c *Client) CreateInstaller(appId string, appType string, yaml string) (*ty if appType == "platform" { return nil, errors.Errorf("Kubernetes Installers are not supported for platform applications") } else if appType == "ship" { - return nil, errors.Errorf("Kubernetes Installers are not supported for platfrom applications") + return nil, errors.Errorf("Kubernetes Installers are not supported for ship applications") } else if appType == "kots" { return c.KotsClient.CreateInstaller(appId, yaml) } @@ -22,7 +22,7 @@ func (c *Client) ListInstallers(appId string, appType string) ([]types.Installer if appType == "platform" { return nil, errors.Errorf("Kubernetes Installers are not supported for platform applications") } else if appType == "ship" { - return nil, errors.Errorf("Kubernetes Installers are not supported for platform applications") + return nil, errors.Errorf("Kubernetes Installers are not supported for ship applications") } else if appType == "kots" { return c.KotsClient.ListInstallers(appId) } diff --git a/gen/go/v1/model_app_release.go b/gen/go/v1/model_app_release.go index 808a6f281..43b0899fd 100644 --- a/gen/go/v1/model_app_release.go +++ b/gen/go/v1/model_app_release.go @@ -15,9 +15,9 @@ import ( ) type AppRelease struct { - Config string `json:"Config,omitempty"` + Config string `json:"Config,omitempty"` CreatedAt time.Time `json:"CreatedAt,omitempty"` - Editable bool `json:"Editable,omitempty"` - EditedAt time.Time `json:"EditedAt,omitempty"` - Sequence int64 `json:"Sequence,omitempty"` + Editable bool `json:"Editable,omitempty"` + EditedAt time.Time `json:"EditedAt,omitempty"` + Sequence int64 `json:"Sequence,omitempty"` } diff --git a/gen/go/v1/model_body_10.go b/gen/go/v1/model_body_10.go index 9f8fa8891..6847049cc 100644 --- a/gen/go/v1/model_body_10.go +++ b/gen/go/v1/model_body_10.go @@ -11,8 +11,8 @@ package swagger type BodyPromoteRelease struct { - Channels []string `json:"channels"` - Label string `json:"label"` - ReleaseNotes string `json:"release_notes"` - Required bool `json:"required"` + Channels []string `json:"channels"` + Label string `json:"label"` + ReleaseNotes string `json:"release_notes"` + Required bool `json:"required"` } diff --git a/gen/go/v1/model_body_11.go b/gen/go/v1/model_body_11.go index 50ffe636c..8ce54afd7 100644 --- a/gen/go/v1/model_body_11.go +++ b/gen/go/v1/model_body_11.go @@ -12,8 +12,8 @@ package swagger type Body11 struct { // If activation is required this is the email the code will be sent to. - ActivationEmail string `json:"activation_email"` - AirgapDownloadEnabled bool `json:"airgap_download_enabled"` + ActivationEmail string `json:"activation_email"` + AirgapDownloadEnabled bool `json:"airgap_download_enabled"` // App Id that this license will be associated with. AppId string `json:"app_id"` // License Label name, ie name of customer who is using license. diff --git a/gen/go/v1/model_body_12.go b/gen/go/v1/model_body_12.go index 3ce10cf86..1eab71ff0 100644 --- a/gen/go/v1/model_body_12.go +++ b/gen/go/v1/model_body_12.go @@ -12,11 +12,11 @@ package swagger type Body12 struct { // If activation is required this is the email the code will be sent to. - ActivationEmail string `json:"activation_email"` - AirgapDownloadEnabled bool `json:"airgap_download_enabled"` + ActivationEmail string `json:"activation_email"` + AirgapDownloadEnabled bool `json:"airgap_download_enabled"` // License Label name, ie name of customer who is using license. - Assignee string `json:"assignee"` - AssistedSetupEnabled bool `json:"assisted_setup_enabled"` + Assignee string `json:"assignee"` + AssistedSetupEnabled bool `json:"assisted_setup_enabled"` // Channel id that the license will be associated with. ChannelId string `json:"channel_id"` // Date that the license will expire, can be null for no expiration or formated by year-month-day ex. 2016-02-02. diff --git a/gen/go/v1/model_body_14.go b/gen/go/v1/model_body_14.go index c6c43ee7e..e523ddc5e 100644 --- a/gen/go/v1/model_body_14.go +++ b/gen/go/v1/model_body_14.go @@ -11,9 +11,9 @@ package swagger type Body14 struct { - Amount int64 `json:"amount"` - Description string `json:"description"` - VendorDueFromCustomerDate string `json:"vendor_due_from_customer_date"` + Amount int64 `json:"amount"` + Description string `json:"description"` + VendorDueFromCustomerDate string `json:"vendor_due_from_customer_date"` VendorInvoiceToCustomerDate string `json:"vendor_invoice_to_customer_date"` - VendorPaidByCustomerDate string `json:"vendor_paid_by_customer_date"` + VendorPaidByCustomerDate string `json:"vendor_paid_by_customer_date"` } diff --git a/gen/go/v1/model_body_15.go b/gen/go/v1/model_body_15.go index f23aea371..afa2c3418 100644 --- a/gen/go/v1/model_body_15.go +++ b/gen/go/v1/model_body_15.go @@ -11,9 +11,9 @@ package swagger type Body15 struct { - Amount int64 `json:"amount"` - Description string `json:"description"` - VendorDueFromCustomerDate string `json:"vendor_due_from_customer_date"` + Amount int64 `json:"amount"` + Description string `json:"description"` + VendorDueFromCustomerDate string `json:"vendor_due_from_customer_date"` VendorInvoiceToCustomerDate string `json:"vendor_invoice_to_customer_date"` - VendorPaidByCustomerDate string `json:"vendor_paid_by_customer_date"` + VendorPaidByCustomerDate string `json:"vendor_paid_by_customer_date"` } diff --git a/gen/go/v1/model_body_3.go b/gen/go/v1/model_body_3.go index dde512fd6..a82e67314 100644 --- a/gen/go/v1/model_body_3.go +++ b/gen/go/v1/model_body_3.go @@ -11,7 +11,7 @@ package swagger type BodyCreateChannel struct { - AirgapEnabled bool `json:"airgap_enabled,omitempty"` - Description string `json:"description,omitempty"` - Name string `json:"name"` + AirgapEnabled bool `json:"airgap_enabled,omitempty"` + Description string `json:"description,omitempty"` + Name string `json:"name"` } diff --git a/gen/go/v1/model_body_4.go b/gen/go/v1/model_body_4.go index 98a7fd07a..2c1fef565 100644 --- a/gen/go/v1/model_body_4.go +++ b/gen/go/v1/model_body_4.go @@ -11,8 +11,8 @@ package swagger type Body4 struct { - AirgapEnabled bool `json:"airgap_enabled,omitempty"` - Description string `json:"description,omitempty"` - IsDefault bool `json:"is_default,omitempty"` - Name string `json:"name"` + AirgapEnabled bool `json:"airgap_enabled,omitempty"` + Description string `json:"description,omitempty"` + IsDefault bool `json:"is_default,omitempty"` + Name string `json:"name"` } diff --git a/gen/go/v1/model_body_5.go b/gen/go/v1/model_body_5.go index 12959375b..55f87aeb8 100644 --- a/gen/go/v1/model_body_5.go +++ b/gen/go/v1/model_body_5.go @@ -12,6 +12,6 @@ package swagger type Body5 struct { ReleaseNotes string `json:"release_notes"` - Required bool `json:"required"` - Version string `json:"version"` + Required bool `json:"required"` + Version string `json:"version"` } diff --git a/gen/go/v1/model_body_6.go b/gen/go/v1/model_body_6.go index d77e49f72..2dd0e567f 100644 --- a/gen/go/v1/model_body_6.go +++ b/gen/go/v1/model_body_6.go @@ -12,9 +12,9 @@ package swagger type Body6 struct { Default_ string `json:"default"` - Hidden bool `json:"hidden"` - Name string `json:"name"` - Required bool `json:"required"` - Title string `json:"title"` - Type_ string `json:"type"` + Hidden bool `json:"hidden"` + Name string `json:"name"` + Required bool `json:"required"` + Title string `json:"title"` + Type_ string `json:"type"` } diff --git a/gen/go/v1/model_branding.go b/gen/go/v1/model_branding.go index fb4bc7473..809faa47d 100644 --- a/gen/go/v1/model_branding.go +++ b/gen/go/v1/model_branding.go @@ -15,8 +15,8 @@ import ( ) type Branding struct { - Created time.Time `json:"created,omitempty"` - Css string `json:"css,omitempty"` - Default_ bool `json:"default,omitempty"` - Updated time.Time `json:"updated,omitempty"` + Created time.Time `json:"created,omitempty"` + Css string `json:"css,omitempty"` + Default_ bool `json:"default,omitempty"` + Updated time.Time `json:"updated,omitempty"` } diff --git a/gen/go/v1/model_channel_adoption.go b/gen/go/v1/model_channel_adoption.go index f39404c6d..3a56eb6c4 100644 --- a/gen/go/v1/model_channel_adoption.go +++ b/gen/go/v1/model_channel_adoption.go @@ -12,10 +12,10 @@ package swagger // ChannelAdoption represents the versions that licenses are on in the channel type ChannelAdoption struct { - CurrentVersionCountActive map[string]int64 `json:"current_version_count_active,omitempty"` - CurrentVersionCountAll map[string]int64 `json:"current_version_count_all,omitempty"` - OtherVersionCountActive map[string]int64 `json:"other_version_count_active,omitempty"` - OtherVersionCountAll map[string]int64 `json:"other_version_count_all,omitempty"` + CurrentVersionCountActive map[string]int64 `json:"current_version_count_active,omitempty"` + CurrentVersionCountAll map[string]int64 `json:"current_version_count_all,omitempty"` + OtherVersionCountActive map[string]int64 `json:"other_version_count_active,omitempty"` + OtherVersionCountAll map[string]int64 `json:"other_version_count_all,omitempty"` PreviousVersionCountActive map[string]int64 `json:"previous_version_count_active,omitempty"` - PreviousVersionCountAll map[string]int64 `json:"previous_version_count_all,omitempty"` + PreviousVersionCountAll map[string]int64 `json:"previous_version_count_all,omitempty"` } diff --git a/gen/go/v1/model_channel_release.go b/gen/go/v1/model_channel_release.go index 16cb857eb..e6ecc1ffd 100644 --- a/gen/go/v1/model_channel_release.go +++ b/gen/go/v1/model_channel_release.go @@ -15,14 +15,14 @@ import ( ) type ChannelRelease struct { - AirgapBuildError string `json:"airgap_build_error,omitempty"` - AirgapBuildStatus string `json:"airgap_build_status,omitempty"` - ChannelId string `json:"channel_id,omitempty"` - ChannelSequence int64 `json:"channel_sequence,omitempty"` - Created time.Time `json:"created,omitempty"` - ReleaseNotes string `json:"release_notes,omitempty"` - ReleaseSequence int64 `json:"release_sequence,omitempty"` - Required bool `json:"required,omitempty"` - Updated time.Time `json:"updated,omitempty"` - Version string `json:"version,omitempty"` + AirgapBuildError string `json:"airgap_build_error,omitempty"` + AirgapBuildStatus string `json:"airgap_build_status,omitempty"` + ChannelId string `json:"channel_id,omitempty"` + ChannelSequence int64 `json:"channel_sequence,omitempty"` + Created time.Time `json:"created,omitempty"` + ReleaseNotes string `json:"release_notes,omitempty"` + ReleaseSequence int64 `json:"release_sequence,omitempty"` + Required bool `json:"required,omitempty"` + Updated time.Time `json:"updated,omitempty"` + Version string `json:"version,omitempty"` } diff --git a/gen/go/v1/model_inline_response_200.go b/gen/go/v1/model_inline_response_200.go index fa3d9448a..ff7bb4eab 100644 --- a/gen/go/v1/model_inline_response_200.go +++ b/gen/go/v1/model_inline_response_200.go @@ -12,5 +12,5 @@ package swagger type InlineResponse200 struct { Branding map[string]Branding `json:"branding,omitempty"` - Channels []AppChannel `json:"channels,omitempty"` + Channels []AppChannel `json:"channels,omitempty"` } diff --git a/gen/go/v1/model_inline_response_200_2.go b/gen/go/v1/model_inline_response_200_2.go index 0a4c3a368..b5a8a3577 100644 --- a/gen/go/v1/model_inline_response_200_2.go +++ b/gen/go/v1/model_inline_response_200_2.go @@ -11,6 +11,6 @@ package swagger type GetChannelInlineResponse200 struct { - Channel *AppChannel `json:"channel"` + Channel *AppChannel `json:"channel"` Releases []ChannelRelease `json:"releases"` } diff --git a/gen/go/v1/model_installed_app_version.go b/gen/go/v1/model_installed_app_version.go index 99b897d13..86f213fb3 100644 --- a/gen/go/v1/model_installed_app_version.go +++ b/gen/go/v1/model_installed_app_version.go @@ -15,8 +15,8 @@ import ( ) type InstalledAppVersion struct { - Label string `json:"Label,omitempty"` - LastCheck time.Time `json:"LastCheck,omitempty"` - Sequence int64 `json:"Sequence,omitempty"` - UpdateAvailable bool `json:"UpdateAvailable,omitempty"` + Label string `json:"Label,omitempty"` + LastCheck time.Time `json:"LastCheck,omitempty"` + Sequence int64 `json:"Sequence,omitempty"` + UpdateAvailable bool `json:"UpdateAvailable,omitempty"` } diff --git a/gen/go/v1/model_license.go b/gen/go/v1/model_license.go index 67728565b..d8ab40ab9 100644 --- a/gen/go/v1/model_license.go +++ b/gen/go/v1/model_license.go @@ -15,37 +15,37 @@ import ( ) type License struct { - ActivationEmail string `json:"ActivationEmail,omitempty"` - ActiveInstanceCount int64 `json:"ActiveInstanceCount,omitempty"` - AirgapDownloadEnabled bool `json:"AirgapDownloadEnabled,omitempty"` - AirgapDownloadPassword []int32 `json:"AirgapDownloadPassword,omitempty"` - Anonymous bool `json:"Anonymous,omitempty"` - AppId string `json:"AppId,omitempty"` - AppStatus string `json:"AppStatus,omitempty"` - Archived bool `json:"Archived,omitempty"` - Assignee string `json:"Assignee,omitempty"` - AssistedSetupEnabled bool `json:"AssistedSetupEnabled,omitempty"` - Billing *LicenseBilling `json:"Billing,omitempty"` - BillingEvents []LicenseBillingEvent `json:"BillingEvents,omitempty"` - ChannelId string `json:"ChannelId,omitempty"` - ChannelName string `json:"ChannelName,omitempty"` - Clouds string `json:"Clouds,omitempty"` - ExpirationPolicy string `json:"ExpirationPolicy,omitempty"` - ExpireDate time.Time `json:"ExpireDate,omitempty"` - ExternalSupportBundle bool `json:"ExternalSupportBundle,omitempty"` - FieldValues []LicenseFieldValue `json:"FieldValues,omitempty"` - GrantDate time.Time `json:"GrantDate,omitempty"` - Id string `json:"Id,omitempty"` - InactiveInstanceCount int64 `json:"InactiveInstanceCount,omitempty"` - IsAppVersionLocked bool `json:"IsAppVersionLocked,omitempty"` - IsInstanceTracked bool `json:"IsInstanceTracked,omitempty"` - LastSync time.Time `json:"LastSync,omitempty"` - LicenseType string `json:"LicenseType,omitempty"` - LicenseVersions *LicenseVersions `json:"LicenseVersions,omitempty"` - LockedAppVersion int64 `json:"LockedAppVersion,omitempty"` - RequireActivation bool `json:"RequireActivation,omitempty"` - RevokationDate time.Time `json:"RevokationDate,omitempty"` - UntrackedInstanceCount int64 `json:"UntrackedInstanceCount,omitempty"` - UpdatePolicy string `json:"UpdatePolicy,omitempty"` - UseConsoleSupportSpec bool `json:"UseConsoleSupportSpec,omitempty"` + ActivationEmail string `json:"ActivationEmail,omitempty"` + ActiveInstanceCount int64 `json:"ActiveInstanceCount,omitempty"` + AirgapDownloadEnabled bool `json:"AirgapDownloadEnabled,omitempty"` + AirgapDownloadPassword []int32 `json:"AirgapDownloadPassword,omitempty"` + Anonymous bool `json:"Anonymous,omitempty"` + AppId string `json:"AppId,omitempty"` + AppStatus string `json:"AppStatus,omitempty"` + Archived bool `json:"Archived,omitempty"` + Assignee string `json:"Assignee,omitempty"` + AssistedSetupEnabled bool `json:"AssistedSetupEnabled,omitempty"` + Billing *LicenseBilling `json:"Billing,omitempty"` + BillingEvents []LicenseBillingEvent `json:"BillingEvents,omitempty"` + ChannelId string `json:"ChannelId,omitempty"` + ChannelName string `json:"ChannelName,omitempty"` + Clouds string `json:"Clouds,omitempty"` + ExpirationPolicy string `json:"ExpirationPolicy,omitempty"` + ExpireDate time.Time `json:"ExpireDate,omitempty"` + ExternalSupportBundle bool `json:"ExternalSupportBundle,omitempty"` + FieldValues []LicenseFieldValue `json:"FieldValues,omitempty"` + GrantDate time.Time `json:"GrantDate,omitempty"` + Id string `json:"Id,omitempty"` + InactiveInstanceCount int64 `json:"InactiveInstanceCount,omitempty"` + IsAppVersionLocked bool `json:"IsAppVersionLocked,omitempty"` + IsInstanceTracked bool `json:"IsInstanceTracked,omitempty"` + LastSync time.Time `json:"LastSync,omitempty"` + LicenseType string `json:"LicenseType,omitempty"` + LicenseVersions *LicenseVersions `json:"LicenseVersions,omitempty"` + LockedAppVersion int64 `json:"LockedAppVersion,omitempty"` + RequireActivation bool `json:"RequireActivation,omitempty"` + RevokationDate time.Time `json:"RevokationDate,omitempty"` + UntrackedInstanceCount int64 `json:"UntrackedInstanceCount,omitempty"` + UpdatePolicy string `json:"UpdatePolicy,omitempty"` + UseConsoleSupportSpec bool `json:"UseConsoleSupportSpec,omitempty"` } diff --git a/gen/go/v1/model_license_billing.go b/gen/go/v1/model_license_billing.go index a754c4e82..d6a11f1e4 100644 --- a/gen/go/v1/model_license_billing.go +++ b/gen/go/v1/model_license_billing.go @@ -15,8 +15,8 @@ import ( ) type LicenseBilling struct { - Begin time.Time `json:"begin,omitempty"` - End time.Time `json:"end,omitempty"` - Frequency string `json:"frequency,omitempty"` - Revenue string `json:"revenue,omitempty"` + Begin time.Time `json:"begin,omitempty"` + End time.Time `json:"end,omitempty"` + Frequency string `json:"frequency,omitempty"` + Revenue string `json:"revenue,omitempty"` } diff --git a/gen/go/v1/model_license_billing_event.go b/gen/go/v1/model_license_billing_event.go index b33c2df96..0ae684730 100644 --- a/gen/go/v1/model_license_billing_event.go +++ b/gen/go/v1/model_license_billing_event.go @@ -15,11 +15,11 @@ import ( ) type LicenseBillingEvent struct { - Amount int64 `json:"amount,omitempty"` - Description string `json:"description,omitempty"` - EventDate time.Time `json:"event_date,omitempty"` - Id string `json:"id,omitempty"` - VendorDueFromCustomerDate time.Time `json:"vendor_due_from_customer_date,omitempty"` + Amount int64 `json:"amount,omitempty"` + Description string `json:"description,omitempty"` + EventDate time.Time `json:"event_date,omitempty"` + Id string `json:"id,omitempty"` + VendorDueFromCustomerDate time.Time `json:"vendor_due_from_customer_date,omitempty"` VendorInvoiceToCustomerDate time.Time `json:"vendor_invoice_to_customer_date,omitempty"` - VendorPaidByCustomerDate time.Time `json:"vendor_paid_by_customer_date,omitempty"` + VendorPaidByCustomerDate time.Time `json:"vendor_paid_by_customer_date,omitempty"` } diff --git a/gen/go/v1/model_license_counts.go b/gen/go/v1/model_license_counts.go index 6c626778c..55a718cb0 100644 --- a/gen/go/v1/model_license_counts.go +++ b/gen/go/v1/model_license_counts.go @@ -12,8 +12,8 @@ package swagger // LicenseCounts is a struct to hold license count information type LicenseCounts struct { - Active map[string]int64 `json:"active,omitempty"` - Airgap map[string]int64 `json:"airgap,omitempty"` + Active map[string]int64 `json:"active,omitempty"` + Airgap map[string]int64 `json:"airgap,omitempty"` Inactive map[string]int64 `json:"inactive,omitempty"` - Total map[string]int64 `json:"total,omitempty"` + Total map[string]int64 `json:"total,omitempty"` } diff --git a/gen/go/v1/model_license_field.go b/gen/go/v1/model_license_field.go index 1ac15fbca..9eaacd9cd 100644 --- a/gen/go/v1/model_license_field.go +++ b/gen/go/v1/model_license_field.go @@ -12,9 +12,9 @@ package swagger type LicenseField struct { Default_ string `json:"default,omitempty"` - Hidden bool `json:"hidden,omitempty"` - Name string `json:"name,omitempty"` - Required bool `json:"required,omitempty"` - Title string `json:"title,omitempty"` - Type_ string `json:"type,omitempty"` + Hidden bool `json:"hidden,omitempty"` + Name string `json:"name,omitempty"` + Required bool `json:"required,omitempty"` + Title string `json:"title,omitempty"` + Type_ string `json:"type,omitempty"` } diff --git a/gen/go/v1/model_license_field_name_value.go b/gen/go/v1/model_license_field_name_value.go index 750ca31a5..75d7d6de5 100644 --- a/gen/go/v1/model_license_field_name_value.go +++ b/gen/go/v1/model_license_field_name_value.go @@ -11,6 +11,6 @@ package swagger type LicenseFieldNameValue struct { - Field string `json:"field,omitempty"` + Field string `json:"field,omitempty"` Value *interface{} `json:"value,omitempty"` } diff --git a/gen/go/v1/model_license_instance.go b/gen/go/v1/model_license_instance.go index 4a7c503b9..86f2a5560 100644 --- a/gen/go/v1/model_license_instance.go +++ b/gen/go/v1/model_license_instance.go @@ -15,19 +15,19 @@ import ( ) type LicenseInstance struct { - Active bool `json:"Active,omitempty"` - AppStatus string `json:"AppStatus,omitempty"` - AssistSessionId string `json:"AssistSessionId,omitempty"` - Cloud string `json:"Cloud,omitempty"` - Created time.Time `json:"Created,omitempty"` - InstanceId string `json:"InstanceId,omitempty"` - LastActive time.Time `json:"LastActive,omitempty"` - LicenseId string `json:"LicenseId,omitempty"` - ReplicatedAgentVersion string `json:"ReplicatedAgentVersion,omitempty"` - ReplicatedOperatorVersion string `json:"ReplicatedOperatorVersion,omitempty"` - ReplicatedSyncTime time.Time `json:"ReplicatedSyncTime,omitempty"` - ReplicatedUiVersion string `json:"ReplicatedUiVersion,omitempty"` - ReplicatedUpdaterVersion string `json:"ReplicatedUpdaterVersion,omitempty"` - ReplicatedVersion string `json:"ReplicatedVersion,omitempty"` - VersionHistory []LicenseInstanceVersionHistory `json:"VersionHistory,omitempty"` + Active bool `json:"Active,omitempty"` + AppStatus string `json:"AppStatus,omitempty"` + AssistSessionId string `json:"AssistSessionId,omitempty"` + Cloud string `json:"Cloud,omitempty"` + Created time.Time `json:"Created,omitempty"` + InstanceId string `json:"InstanceId,omitempty"` + LastActive time.Time `json:"LastActive,omitempty"` + LicenseId string `json:"LicenseId,omitempty"` + ReplicatedAgentVersion string `json:"ReplicatedAgentVersion,omitempty"` + ReplicatedOperatorVersion string `json:"ReplicatedOperatorVersion,omitempty"` + ReplicatedSyncTime time.Time `json:"ReplicatedSyncTime,omitempty"` + ReplicatedUiVersion string `json:"ReplicatedUiVersion,omitempty"` + ReplicatedUpdaterVersion string `json:"ReplicatedUpdaterVersion,omitempty"` + ReplicatedVersion string `json:"ReplicatedVersion,omitempty"` + VersionHistory []LicenseInstanceVersionHistory `json:"VersionHistory,omitempty"` } diff --git a/gen/go/v1/model_license_instance_untracked.go b/gen/go/v1/model_license_instance_untracked.go index 1a2c9e843..28c8287ac 100644 --- a/gen/go/v1/model_license_instance_untracked.go +++ b/gen/go/v1/model_license_instance_untracked.go @@ -15,14 +15,14 @@ import ( ) type LicenseInstanceUntracked struct { - CurrentSequence int64 `json:"CurrentSequence,omitempty"` - CurrentVersion string `json:"CurrentVersion,omitempty"` - LicenseId string `json:"LicenseId,omitempty"` - ReplicatedAgentVersion string `json:"ReplicatedAgentVersion,omitempty"` - ReplicatedOperatorVersion string `json:"ReplicatedOperatorVersion,omitempty"` - ReplicatedSyncTime time.Time `json:"ReplicatedSyncTime,omitempty"` - ReplicatedUiVersion string `json:"ReplicatedUiVersion,omitempty"` - ReplicatedUpdaterVersion string `json:"ReplicatedUpdaterVersion,omitempty"` - ReplicatedVersion string `json:"ReplicatedVersion,omitempty"` - SyncTime time.Time `json:"SyncTime,omitempty"` + CurrentSequence int64 `json:"CurrentSequence,omitempty"` + CurrentVersion string `json:"CurrentVersion,omitempty"` + LicenseId string `json:"LicenseId,omitempty"` + ReplicatedAgentVersion string `json:"ReplicatedAgentVersion,omitempty"` + ReplicatedOperatorVersion string `json:"ReplicatedOperatorVersion,omitempty"` + ReplicatedSyncTime time.Time `json:"ReplicatedSyncTime,omitempty"` + ReplicatedUiVersion string `json:"ReplicatedUiVersion,omitempty"` + ReplicatedUpdaterVersion string `json:"ReplicatedUpdaterVersion,omitempty"` + ReplicatedVersion string `json:"ReplicatedVersion,omitempty"` + SyncTime time.Time `json:"SyncTime,omitempty"` } diff --git a/gen/go/v1/model_license_instance_version_history.go b/gen/go/v1/model_license_instance_version_history.go index 1c0b65472..188f558f4 100644 --- a/gen/go/v1/model_license_instance_version_history.go +++ b/gen/go/v1/model_license_instance_version_history.go @@ -15,10 +15,10 @@ import ( ) type LicenseInstanceVersionHistory struct { - InstanceId string `json:"InstanceId,omitempty"` - Start time.Time `json:"Start,omitempty"` - Stop time.Time `json:"Stop,omitempty"` - VersionChannel string `json:"VersionChannel,omitempty"` - VersionLabel string `json:"VersionLabel,omitempty"` - VersionSequence int64 `json:"VersionSequence,omitempty"` + InstanceId string `json:"InstanceId,omitempty"` + Start time.Time `json:"Start,omitempty"` + Stop time.Time `json:"Stop,omitempty"` + VersionChannel string `json:"VersionChannel,omitempty"` + VersionLabel string `json:"VersionLabel,omitempty"` + VersionSequence int64 `json:"VersionSequence,omitempty"` } diff --git a/gen/go/v1/model_license_versions.go b/gen/go/v1/model_license_versions.go index 84b7d171a..008fac85d 100644 --- a/gen/go/v1/model_license_versions.go +++ b/gen/go/v1/model_license_versions.go @@ -12,5 +12,5 @@ package swagger type LicenseVersions struct { InstalledAppVersion *InstalledAppVersion `json:"InstalledAppVersion,omitempty"` - ReplicatedVersions map[string][]string `json:"ReplicatedVersions,omitempty"` + ReplicatedVersions map[string][]string `json:"ReplicatedVersions,omitempty"` } diff --git a/gen/go/v1/model_preflight_check.go b/gen/go/v1/model_preflight_check.go index 31ecb680f..4e04f17b7 100644 --- a/gen/go/v1/model_preflight_check.go +++ b/gen/go/v1/model_preflight_check.go @@ -11,10 +11,10 @@ package swagger type PreflightCheck struct { - Category string `json:"Category,omitempty"` - CheckName string `json:"CheckName,omitempty"` + Category string `json:"Category,omitempty"` + CheckName string `json:"CheckName,omitempty"` CheckValue string `json:"CheckValue,omitempty"` - IsRequired bool `json:"IsRequired,omitempty"` - Scheduler string `json:"Scheduler,omitempty"` - Score string `json:"Score,omitempty"` + IsRequired bool `json:"IsRequired,omitempty"` + Scheduler string `json:"Scheduler,omitempty"` + Score string `json:"Score,omitempty"` } diff --git a/gen/go/v2/body.go b/gen/go/v2/body.go index 3859953e1..8ba6e8f66 100644 --- a/gen/go/v2/body.go +++ b/gen/go/v2/body.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,7 +11,6 @@ package swagger type Body struct { - IncludeActive bool `json:"include_active,omitempty"` IncludeArchived bool `json:"include_archived,omitempty"` diff --git a/gen/go/v2/body_1.go b/gen/go/v2/body_1.go index d66c11939..03e81ea16 100644 --- a/gen/go/v2/body_1.go +++ b/gen/go/v2/body_1.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API diff --git a/gen/go/v2/body_2.go b/gen/go/v2/body_2.go index 12c2816ff..1c9d8207c 100644 --- a/gen/go/v2/body_2.go +++ b/gen/go/v2/body_2.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API diff --git a/gen/go/v2/inline_response_200.go b/gen/go/v2/inline_response_200.go index 911b791b9..6f1227268 100644 --- a/gen/go/v2/inline_response_200.go +++ b/gen/go/v2/inline_response_200.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,6 +11,5 @@ package swagger type InlineResponse200 struct { - Licenses *LicensesV2 `json:"Licenses,omitempty"` } diff --git a/gen/go/v2/inline_response_200_1.go b/gen/go/v2/inline_response_200_1.go index fbb595fe0..43e23dadc 100644 --- a/gen/go/v2/inline_response_200_1.go +++ b/gen/go/v2/inline_response_200_1.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,7 +11,6 @@ package swagger type InlineResponse2001 struct { - Licenses *LicensesV2 `json:"licenses,omitempty"` Query string `json:"query,omitempty"` diff --git a/gen/go/v2/inline_response_200_2.go b/gen/go/v2/inline_response_200_2.go index 5a206dca5..42482ed1c 100644 --- a/gen/go/v2/inline_response_200_2.go +++ b/gen/go/v2/inline_response_200_2.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,6 +11,5 @@ package swagger type InlineResponse2002 struct { - License *LicenseV2 `json:"License"` } diff --git a/gen/go/v2/inline_response_200_3.go b/gen/go/v2/inline_response_200_3.go index 23f010266..a1232e293 100644 --- a/gen/go/v2/inline_response_200_3.go +++ b/gen/go/v2/inline_response_200_3.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,6 +11,5 @@ package swagger type InlineResponse2003 struct { - Licenses []LicenseV2 `json:"Licenses,omitempty"` } diff --git a/gen/go/v2/inline_response_201.go b/gen/go/v2/inline_response_201.go index 59d829d69..f86326ffd 100644 --- a/gen/go/v2/inline_response_201.go +++ b/gen/go/v2/inline_response_201.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,6 +11,5 @@ package swagger type InlineResponse201 struct { - License *LicenseV2 `json:"License,omitempty"` } diff --git a/gen/go/v2/license_channel.go b/gen/go/v2/license_channel.go index 2854b4ca2..bb1371729 100644 --- a/gen/go/v2/license_channel.go +++ b/gen/go/v2/license_channel.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,7 +11,6 @@ package swagger type LicenseChannel struct { - Description string `json:"description,omitempty"` Id string `json:"id,omitempty"` diff --git a/gen/go/v2/license_channels.go b/gen/go/v2/license_channels.go index b4ee7d421..d5b7ab270 100644 --- a/gen/go/v2/license_channels.go +++ b/gen/go/v2/license_channels.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API diff --git a/gen/go/v2/license_field_value.go b/gen/go/v2/license_field_value.go index 7c61d40c6..eaa593698 100644 --- a/gen/go/v2/license_field_value.go +++ b/gen/go/v2/license_field_value.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -11,7 +11,6 @@ package swagger type LicenseFieldValue struct { - Field string `json:"field,omitempty"` Title string `json:"title,omitempty"` diff --git a/gen/go/v2/license_field_values.go b/gen/go/v2/license_field_values.go index e85fd35a3..3b8a4d0e0 100644 --- a/gen/go/v2/license_field_values.go +++ b/gen/go/v2/license_field_values.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API diff --git a/gen/go/v2/license_v2.go b/gen/go/v2/license_v2.go index 428ca99ff..417e75963 100644 --- a/gen/go/v2/license_v2.go +++ b/gen/go/v2/license_v2.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API @@ -15,7 +15,6 @@ import ( ) type LicenseV2 struct { - ActivationEmail string `json:"activation_email,omitempty"` ActiveInstanceCount int64 `json:"active_instance_count,omitempty"` diff --git a/gen/go/v2/licenses_v2.go b/gen/go/v2/licenses_v2.go index 561d04fce..e6a943ab5 100644 --- a/gen/go/v2/licenses_v2.go +++ b/gen/go/v2/licenses_v2.go @@ -1,4 +1,4 @@ -/* +/* * Vendor API V2 * * The Vendor API is available as an alternative to configuring your application via the Vendor website. This API will allow you as the Vendor to manage your apps and app configuration, manage customer licenses, view your private container images. The API can be accessed at the URL https://api.replicated.com/vendor/v2. == Authentication Authentication is achieved via a token that can be generated via the Vendor website. You can create a new token by clicking the New API Token button in the API Tokens table. You must give this token a nickname before saving. After you have generated your token, you will need to send this token in the Authorization header of your requests to the Vendor API. The following Error response codes can be expected: [options=\"header\", cols=\".^1,.^3,.^10\"] |=== |Code|Response|Description |400|Bad Request|We were unable to parse your request. |401|Unauthorized|Confirm that your token or username/password is valid. |403|Forbidden|The server is refusing to alloo you to complete this request. |404|Not found|The requested resource was not found. |409|Conflict|The action would result in a conflict and is being rejected. |500|Internal Server Error|Something unexpected happened. |=== You download JSON schemas for this API in our github repo. Check out our Developer Help Center for sample recipes on using our Vendor API diff --git a/pkg/graphql/client.go b/pkg/graphql/client.go index 23bb33c1a..fe8341bfe 100644 --- a/pkg/graphql/client.go +++ b/pkg/graphql/client.go @@ -87,7 +87,6 @@ func (c *Client) ExecuteRequest(requestObj Request, deserializeTarget interface{ return errors.Wrap(err, "read response body") } - var gqlErr ResponseErrorOnly _ = json.Unmarshal(responseBody, &gqlErr) // ignore error to be safe diff --git a/pkg/kotsclient/customer_list.go b/pkg/kotsclient/customer_list.go index 9819f5bda..92ed3d028 100644 --- a/pkg/kotsclient/customer_list.go +++ b/pkg/kotsclient/customer_list.go @@ -83,7 +83,6 @@ func (c *GraphQLClient) ListCustomers(appID string) ([]types.Customer, error) { return nil, errors.Wrapf(err, "set expiry time for customer %q", kotsCustomer.ID) } - customers = append(customers, customer) } diff --git a/pkg/kotsclient/installer.go b/pkg/kotsclient/installer.go index 4660811ee..d6d5b56e9 100644 --- a/pkg/kotsclient/installer.go +++ b/pkg/kotsclient/installer.go @@ -65,10 +65,9 @@ mutation createKotsAppInstaller($appId: ID!, $kurlInstallerId: ID!, $yaml: Strin } }` - type GraphQLResponseCreateInstaller struct { Data *CreateInstallerDataWrapper `json:"data,omitempty"` - Errors []graphql.GQLError `json:"errors,omitempty"` + Errors []graphql.GQLError `json:"errors,omitempty"` } type CreateInstallerDataWrapper struct { @@ -162,9 +161,9 @@ func (c *GraphQLClient) PromoteInstaller(appID string, sequence int64, channelID Query: kotsPromoteInstaller, Variables: map[string]interface{}{ - "appId": appID, - "sequence": sequence, - "channelIds": []string{channelID}, + "appId": appID, + "sequence": sequence, + "channelIds": []string{channelID}, "versionLabel": versionLabel, }, } diff --git a/pkg/shipclient/release.go b/pkg/shipclient/release.go index f195a4234..247e4d58f 100644 --- a/pkg/shipclient/release.go +++ b/pkg/shipclient/release.go @@ -62,7 +62,6 @@ type ShipReleaseLintData struct { Messages []types.LintMessage `json:"lintRelease"` } - const listReleasesQuery = ` query allReleases($appId: ID!) { allReleases(appId: $appId) { diff --git a/pkg/types/customer.go b/pkg/types/customer.go index 13cbe980b..1fe7dedef 100644 --- a/pkg/types/customer.go +++ b/pkg/types/customer.go @@ -13,7 +13,6 @@ type Customer struct { Expires *time.Time } - func (c Customer) WithExpiryTime(expiryTime string) (Customer, error) { if expiryTime != "" { parsed, err := time.Parse(time.RFC3339, expiryTime)