Skip to content

Commit

Permalink
no-code: Re-locate WorkspaceUpgradeNoUpgradeAvailable.
Browse files Browse the repository at this point in the history
  • Loading branch information
paladin-devops committed Aug 8, 2024
1 parent 3fb6109 commit ee650c5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions registry_no_code_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ type WorkspaceUpgrade struct {
PlanURL string `jsonapi:"attr,plan-url"`
}

// WorkspaceUpgradeNoUpgradeAvailable is a struct used to unmarshal the response
// when a workspace upgrade is not available, but the request was successful.
type WorkspaceUpgradeNoUpgradeAvailable struct {
// Message is the message returned by the API when an upgrade is not available.
Message string `jsonapi:"attr,message,omitempty"`
}

// Create a new registry no-code module
func (r *registryNoCodeModules) Create(ctx context.Context, organization string, options RegistryNoCodeModuleCreateOptions) (*RegistryNoCodeModule, error) {
if !validStringID(&organization) {
Expand Down Expand Up @@ -353,13 +360,6 @@ func (r *registryNoCodeModules) UpgradeWorkspace(
return nil, fmt.Errorf("failed to unmarshal response into known structures")
}

// WorkspaceUpgradeNoUpgradeAvailable is a struct used to unmarshal the response
// when a workspace upgrade is not available, but the request was successful.
type WorkspaceUpgradeNoUpgradeAvailable struct {
// Message is the message returned by the API when an upgrade is not available.
Message string `jsonapi:"attr,message,omitempty"`
}

func (o RegistryNoCodeModuleCreateOptions) valid() error {
if o.RegistryModule == nil || o.RegistryModule.ID == "" {
return ErrRequiredRegistryModule
Expand Down

0 comments on commit ee650c5

Please sign in to comment.