environment

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package environment represents a cloud stack environment operations under the `/cloud/stack/environment` API endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a Service to work with API Jobs.

func New

func New(c *api.Client) *Client

New is an initialisation function.

func (*Client) Get

func (s *Client) Get(ctx context.Context, request GetRequest) (response GetResponse, err error)

Get returns the stack's environment variables.

func (*Client) Update

func (s *Client) Update(ctx context.Context, request UpdateRequest) (response UpdateResponse, err error)

Update applies updates to the stacks environment.

type GetRequest

type GetRequest struct {
	ServerName string `json:"server"`
	Project    string `json:"project"`
	Service    string `json:"service"`
}

GetRequest represents a request to get a stacks environment.

type GetResponse

type GetResponse struct {
	EnvironmentVariables []models.EnvironmentVariable `json:"return"`
	models.APIResponse
}

GetResponse is the response that returns a stacks environment variables.

type UpdateRequest

type UpdateRequest struct {
	ServerName           string `json:"server"`
	Project              string `json:"project"`
	Service              string `json:"service"`
	EnvironmentVariables []models.EnvironmentVariable
}

UpdateRequest represents a call to update the environment variables of a stack.

type UpdateResponse

type UpdateResponse struct {
	Return struct {
		JobID string `json:"job_id"`
	} `json:"return"`
	models.APIResponse
}

UpdateResponse is the result of updating an environment on a stack.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL