Documentation ¶
Index ¶
- type Client
- type MockClient
- func (_m *MockClient) GetContainerGroup(ctx context.Context, resourceGroup string, containerGroup string) (armcontainerinstance.ContainerGroupsClientGetResponse, error)
- func (_m *MockClient) GetContainerLogs(ctx context.Context, resourceGroup string, containerGroup string, ...) (*string, error)
- func (_m *MockClient) ListContainerGroups(ctx context.Context, resourceGroup string) ([]*armcontainerinstance.ContainerGroup, error)
- func (_m *MockClient) RestartContainerGroup(ctx context.Context, resourceGroup string, containerGroup string) error
- type NewMockClientT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ListContainerGroups(ctx context.Context, resourceGroup string) ([]*armcontainerinstance.ContainerGroup, error) GetContainerGroup(ctx context.Context, resourceGroup, containerGroup string) (armcontainerinstance.ContainerGroupsClientGetResponse, error) GetContainerLogs(ctx context.Context, resourceGroup, containerGroup, container string, tail *int32, timestamps *bool) (*string, error) RestartContainerGroup(ctx context.Context, resourceGroup, containerGroup string) error }
Client is the interface for a client to interact with the Azure container instances.
func New ¶
func New(subscriptionID string, credentials *azidentity.ClientSecretCredential) (Client, error)
New returns a new client to interact with the container instances API.
type MockClient ¶
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶
func NewMockClient(t NewMockClientT) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockClient) GetContainerGroup ¶
func (_m *MockClient) GetContainerGroup(ctx context.Context, resourceGroup string, containerGroup string) (armcontainerinstance.ContainerGroupsClientGetResponse, error)
GetContainerGroup provides a mock function with given fields: ctx, resourceGroup, containerGroup
func (*MockClient) GetContainerLogs ¶
func (_m *MockClient) GetContainerLogs(ctx context.Context, resourceGroup string, containerGroup string, container string, tail *int32, timestamps *bool) (*string, error)
GetContainerLogs provides a mock function with given fields: ctx, resourceGroup, containerGroup, container, tail, timestamps
func (*MockClient) ListContainerGroups ¶
func (_m *MockClient) ListContainerGroups(ctx context.Context, resourceGroup string) ([]*armcontainerinstance.ContainerGroup, error)
ListContainerGroups provides a mock function with given fields: ctx, resourceGroup
func (*MockClient) RestartContainerGroup ¶
func (_m *MockClient) RestartContainerGroup(ctx context.Context, resourceGroup string, containerGroup string) error
RestartContainerGroup provides a mock function with given fields: ctx, resourceGroup, containerGroup