cloudapi

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRequestBodySize = 2.5 * 1024 * 1024 // 2.5MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config ClientConfig) (*Client, error)

func (*Client) UploadTFStateArtifact

func (c *Client) UploadTFStateArtifact(ctx context.Context, artifact *terraform.State) (e error)

type ClientConfig

type ClientConfig struct {
	HTTPClient     HTTPClient
	URL            string
	Authorization  string
	Version        string
	OrganisationID string
}

type Data

type Data struct {
	Attributes terraform.State `json:"attributes"`
	Type       string          `json:"type"`
}

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type HttpError

type HttpError struct {
	StatusCode int
	Title      string
	Detail     string
}

func NewHttpError

func NewHttpError(statusCode int, title string, detail string) *HttpError

func (*HttpError) Error

func (h *HttpError) Error() string

type UploadTFStateArtifactRequest

type UploadTFStateArtifactRequest struct {
	Data Data `json:"data"`
}

Jump to

Keyboard shortcuts

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