pro

package
v1.188.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrFormatString        = "%w: %s"
	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")
)

Functions

This section is empty.

Types

type AtmosProAPIClient

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

AtmosProAPIClient represents the client to interact with the AtmosPro API.

func NewAtmosProAPIClient

func NewAtmosProAPIClient(logger *logger.Logger, baseURL, baseAPIEndpoint, apiToken string) *AtmosProAPIClient

NewAtmosProAPIClient creates a new instance of AtmosProAPIClient.

func NewAtmosProAPIClientFromEnv

func NewAtmosProAPIClientFromEnv(logger *logger.Logger, 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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