cloud

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

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 client for the Atlas Cloud API.

func New

func New(token, version, cliVersion string) *Client

New creates a new Client for the Atlas Cloud API.

func (*Client) PushSnapshot

func (c *Client) PushSnapshot(ctx context.Context, input *PushSnapshotInput) (string, error)

PushSnapshot to the cloud, return the url to the schema snapshot in the cloud.

func (*Client) SnapshotHash

func (c *Client) SnapshotHash(ctx context.Context, input *SnapshotHashInput) (string, error)

SnapshotHash retrieves the hash of the schema snapshot from the cloud.

type PushSnapshotInput

type PushSnapshotInput struct {
	ScopeIdent
	Snapshot  *SnapshotInput `json:"snapshot,omitempty"` // The snapshot taken, required if hashMatch is false.
	HashMatch bool           `json:"hashMatch"`          // If hash of snapshot matches hash of last snapshot.
}

type ScopeIdent

type ScopeIdent struct {
	URL     string   `json:"url"`               // The (Atlas CLI) URL of the database snapshot.
	ExtID   string   `json:"extID,omitempty"`   // Optional user defined identifier for an instance.
	Schemas []string `json:"schemas,omitempty"` // List of schemas to inspect, empty to inspect everything.
	Exclude []string `json:"exclude,omitempty"` // List of exclude patterns to apply on the inspection.
}

type SnapshotHashInput

type SnapshotHashInput struct{ ScopeIdent }

type SnapshotInput

type SnapshotInput struct {
	Hash string `json:"hash"` // Atlas schema hash for the given HCL.
	HCL  string `json:"hcl"`  // HCL representation of the snapshot.
}

Jump to

Keyboard shortcuts

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