pro

package
v1.185.1-test.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultHTTPTimeoutSecs = 30
)

Variables

View Source
var (
	ErrFailedToCreateRequest          = errors.New("failed to create request")
	ErrFailedToMarshalPayload         = errors.New("failed to marshal payload")
	ErrFailedToCreateAuthRequest      = errors.New("failed to create authenticated request")
	ErrFailedToMakeRequest            = errors.New("failed to make request")
	ErrFailedToUploadStacks           = errors.New("failed to upload stacks")
	ErrFailedToMarshalRequestBody     = errors.New("failed to marshal request body")
	ErrFailedToReadResponseBody       = errors.New("error reading response body")
	ErrFailedToUnmarshalJSON          = errors.New("error unmarshaling JSON")
	ErrFailedToLockStack              = errors.New("an error occurred while attempting to lock stack")
	ErrFailedToUnlockStack            = errors.New("an error occurred while attempting to unlock stack")
	ErrOIDCWorkspaceIDRequired        = errors.New("workspace ID environment variable is required for OIDC authentication")
	ErrOIDCTokenExchangeFailed        = errors.New("failed to exchange OIDC token for Atmos token")
	ErrOIDCAuthFailedNoToken          = errors.New("OIDC authentication failed")
	ErrNotInGitHubActions             = errors.New("not running in GitHub Actions or missing OIDC token environment variables")
	ErrFailedToGetOIDCToken           = errors.New("failed to get OIDC token")
	ErrFailedToDecodeOIDCResponse     = errors.New("failed to decode OIDC token response")
	ErrFailedToExchangeOIDCToken      = errors.New("failed to exchange OIDC token")
	ErrFailedToDecodeTokenResponse    = errors.New("failed to decode token response")
	ErrFailedToGetGitHubOIDCToken     = errors.New("failed to get GitHub OIDC token")
	ErrFailedToUploadDeployments      = errors.New("failed to upload deployments")
	ErrFailedToUploadDeploymentStatus = errors.New("failed to upload deployment status")
)

Functions

This section is empty.

Types

type AtmosProAPIClient

type AtmosProAPIClient struct {
	APIToken        string
	BaseAPIEndpoint string
	BaseURL         string
	HTTPClient      *http.Client
}

AtmosProAPIClient represents the client to interact with the AtmosPro API.

func NewAtmosProAPIClient

func NewAtmosProAPIClient(baseURL, baseAPIEndpoint, apiToken string) *AtmosProAPIClient

NewAtmosProAPIClient creates a new instance of AtmosProAPIClient.

func NewAtmosProAPIClientFromEnv

func NewAtmosProAPIClientFromEnv(atmosConfig *schema.AtmosConfiguration) (*AtmosProAPIClient, error)

NewAtmosProAPIClientFromEnv creates a new AtmosProAPIClient from environment variables.

func (*AtmosProAPIClient) LockStack

LockStack locks a specific stack.

func (*AtmosProAPIClient) UnlockStack

UnlockStack unlocks a specific stack.

func (*AtmosProAPIClient) UploadAffectedStacks

func (c *AtmosProAPIClient) UploadAffectedStacks(dto *dtos.UploadAffectedStacksRequest) error

UploadAffectedStacks uploads information about affected stacks.

func (*AtmosProAPIClient) UploadDeploymentStatus

func (c *AtmosProAPIClient) UploadDeploymentStatus(dto *dtos.DeploymentStatusUploadRequest) error

UploadDeploymentStatus uploads the drift detection result status to the pro API.

func (*AtmosProAPIClient) UploadDeployments

func (c *AtmosProAPIClient) UploadDeployments(dto *dtos.DeploymentsUploadRequest) error

UploadDeployments uploads drift detection data to the API.

type AtmosProAPIClientInterface added in v1.192.0

type AtmosProAPIClientInterface interface {
	UploadDeploymentStatus(dto *dtos.DeploymentStatusUploadRequest) error
}

AtmosProAPIClientInterface defines the interface for the AtmosProAPIClient.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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