pro

package
v1.88.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AffectedStacksUploadRequest

type AffectedStacksUploadRequest struct {
	HeadSHA   string            `json:"head_sha"`
	BaseSHA   string            `json:"base_sha"`
	RepoURL   string            `json:"repo_url"`
	RepoName  string            `json:"repo_name"`
	RepoOwner string            `json:"repo_owner"`
	RepoHost  string            `json:"repo_host"`
	Stacks    []schema.Affected `json:"stacks"`
}

type AtmosApiResponse

type AtmosApiResponse struct {
	Request      string                 `json:"request"`
	Success      bool                   `json:"success"`
	ErrorMessage string                 `json:"errorMessage,omitempty"`
	Context      map[string]interface{} `json:"context,omitempty"`
}

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) (*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 AffectedStacksUploadRequest) error

UploadAffectedStacks uploads information about affected stacks

type LockStackRequest

type LockStackRequest struct {
	Key         string                 `json:"key"`
	TTL         int32                  `json:"ttl"`
	LockMessage string                 `json:"lockMessage,omitempty"`
	Properties  map[string]interface{} `json:"properties,omitempty"`
}

type LockStackResponse

type LockStackResponse struct {
	AtmosApiResponse
	Data struct {
		ID          string    `json:"id,omitempty"`
		WorkspaceId string    `json:"workspaceId,omitempty"`
		Key         string    `json:"key,omitempty"`
		LockMessage string    `json:"lockMessage,omitempty"`
		ExpiresAt   time.Time `json:"expiresAt,omitempty"`
		CreatedAt   time.Time `json:"createdAt,omitempty"`
		UpdatedAt   time.Time `json:"updatedAt,omitempty"`
		DeletedAt   time.Time `json:"deletedAt,omitempty"`
	} `json:"data"`
}

type Property

type Property struct {
	ID        string    `json:"id,omitempty"`
	LockID    string    `json:"lockId,omitempty"`
	Key       string    `json:"key,omitempty"`
	Value     string    `json:"value,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	DeletedAt time.Time `json:"deletedAt,omitempty"`
}

type UnlockStackRequest

type UnlockStackRequest struct {
	Key string `json:"key"`
}

type UnlockStackResponse

type UnlockStackResponse struct {
	AtmosApiResponse
	Data struct{} `json:"data"`
}

Jump to

Keyboard shortcuts

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