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 ¶
func (c *AtmosProAPIClient) LockStack(dto dtos.LockStackRequest) (dtos.LockStackResponse, error)
LockStack locks a specific stack..
func (*AtmosProAPIClient) UnlockStack ¶
func (c *AtmosProAPIClient) UnlockStack(dto dtos.UnlockStackRequest) (dtos.UnlockStackResponse, error)
UnlockStack unlocks a specific stack.
func (*AtmosProAPIClient) UploadAffectedStacks ¶
func (c *AtmosProAPIClient) UploadAffectedStacks(dto *dtos.UploadAffectedStacksRequest) error
UploadAffectedStacks uploads information about affected stacks.
Click to show internal directories.
Click to hide internal directories.