pro

package
v1.202.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package pro is a generated GoMock package.

Index

Constants

View Source
const (
	DefaultHTTPTimeoutSecs           = 30
	DefaultDialTimeoutSecs           = 10
	DefaultIdleConnTimeoutSecs       = 30
	DefaultResponseHeaderTimeoutSecs = 15
	DefaultExpectContinueTimeoutSecs = 1
)
View Source
const (
	// DefaultHTTPClientTimeout is the default timeout for HTTP client requests.
	DefaultHTTPClientTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient added in v1.195.0

type APIClient interface {
	// UploadInstances uploads component instances to Atmos Pro.
	UploadInstances(req *dtos.InstancesUploadRequest) error
}

APIClient defines operations for interacting with Atmos Pro API. This interface allows mocking of API operations in tests.

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) UploadInstanceStatus added in v1.192.0

func (c *AtmosProAPIClient) UploadInstanceStatus(dto *dtos.InstanceStatusUploadRequest) error

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

func (*AtmosProAPIClient) UploadInstances added in v1.192.0

func (c *AtmosProAPIClient) UploadInstances(dto *dtos.InstancesUploadRequest) error

UploadInstances uploads drift detection data to the API.

type AtmosProAPIClientInterface added in v1.192.0

type AtmosProAPIClientInterface interface {
	UploadInstances(req *dtos.InstancesUploadRequest) error
	UploadInstanceStatus(dto *dtos.InstanceStatusUploadRequest) error
	UploadAffectedStacks(dto *dtos.UploadAffectedStacksRequest) error
	LockStack(dto *dtos.LockStackRequest) (dtos.LockStackResponse, error)
	UnlockStack(dto *dtos.UnlockStackRequest) (dtos.UnlockStackResponse, error)
}

AtmosProAPIClientInterface defines the interface for the AtmosProAPIClient.

type ClientFactory added in v1.195.0

type ClientFactory interface {
	// NewClient creates a new API client from the given configuration.
	NewClient(atmosConfig *schema.AtmosConfiguration) (APIClient, error)
}

ClientFactory creates an APIClient from configuration.

type DefaultClientFactory added in v1.195.0

type DefaultClientFactory struct{}

DefaultClientFactory implements ClientFactory using real API client creation.

func (*DefaultClientFactory) NewClient added in v1.195.0

func (d *DefaultClientFactory) NewClient(atmosConfig *schema.AtmosConfiguration) (APIClient, error)

NewClient creates a new API client from environment variables.

type MockAPIClient added in v1.195.0

type MockAPIClient struct {
	// contains filtered or unexported fields
}

MockAPIClient is a mock of APIClient interface.

func NewMockAPIClient added in v1.195.0

func NewMockAPIClient(ctrl *gomock.Controller) *MockAPIClient

NewMockAPIClient creates a new mock instance.

func (*MockAPIClient) EXPECT added in v1.195.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAPIClient) UploadInstances added in v1.195.0

func (m *MockAPIClient) UploadInstances(req *dtos.InstancesUploadRequest) error

UploadInstances mocks base method.

type MockAPIClientMockRecorder added in v1.195.0

type MockAPIClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockAPIClientMockRecorder is the mock recorder for MockAPIClient.

func (*MockAPIClientMockRecorder) UploadInstances added in v1.195.0

func (mr *MockAPIClientMockRecorder) UploadInstances(req any) *gomock.Call

UploadInstances indicates an expected call of UploadInstances.

type MockClientFactory added in v1.195.0

type MockClientFactory struct {
	// contains filtered or unexported fields
}

MockClientFactory is a mock of ClientFactory interface.

func NewMockClientFactory added in v1.195.0

func NewMockClientFactory(ctrl *gomock.Controller) *MockClientFactory

NewMockClientFactory creates a new mock instance.

func (*MockClientFactory) EXPECT added in v1.195.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClientFactory) NewClient added in v1.195.0

func (m *MockClientFactory) NewClient(atmosConfig *schema.AtmosConfiguration) (APIClient, error)

NewClient mocks base method.

type MockClientFactoryMockRecorder added in v1.195.0

type MockClientFactoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientFactoryMockRecorder is the mock recorder for MockClientFactory.

func (*MockClientFactoryMockRecorder) NewClient added in v1.195.0

func (mr *MockClientFactoryMockRecorder) NewClient(atmosConfig any) *gomock.Call

NewClient indicates an expected call of NewClient.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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