Documentation ¶
Overview ¶
Package authclient is a generated GoMock package.
Index ¶
- type AuthClient
- type MockAuthClient
- type MockAuthClientGetAuthClientCall
- func (c *MockAuthClientGetAuthClientCall) Do(f func(context.Context, string) (remote.Client, error)) *MockAuthClientGetAuthClientCall
- func (c *MockAuthClientGetAuthClientCall) DoAndReturn(f func(context.Context, string) (remote.Client, error)) *MockAuthClientGetAuthClientCall
- func (c *MockAuthClientGetAuthClientCall) Return(arg0 remote.Client, arg1 error) *MockAuthClientGetAuthClientCall
- type MockAuthClientMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type AuthClient interface { // GetAuthClient returns ORAS authentication client used to authenticate private bicep registry. GetAuthClient(ctx context.Context, templatePath string) (remote.Client, error) }
AuthClient is an interface for getting appropriate ORAS auth client based on the auth type.
func GetNewRegistryAuthClient ¶
func GetNewRegistryAuthClient(secrets recipes.SecretData) (AuthClient, error)
GetNewRegistryAuthClient creates and returns an appropriate AuthClient based on the provided secret data type.
func NewAwsIRSA ¶
func NewAwsIRSA(roleARN string) AuthClient
NewAwsIRSA creates a new awsIRSA instance.
func NewAzureWorkloadIdentity ¶
func NewAzureWorkloadIdentity(clientID string, tenantID string) AuthClient
NewAzureWorkloadIdentity creates a new azureWorkloadIdentity instance.
func NewBasicAuthentication ¶
func NewBasicAuthentication(username string, password string) AuthClient
NewBasicAuthentication creates a new basicAuthentication instance.
type MockAuthClient ¶
type MockAuthClient struct {
// contains filtered or unexported fields
}
MockAuthClient is a mock of AuthClient interface.
func NewMockAuthClient ¶
func NewMockAuthClient(ctrl *gomock.Controller) *MockAuthClient
NewMockAuthClient creates a new mock instance.
func (*MockAuthClient) EXPECT ¶
func (m *MockAuthClient) EXPECT() *MockAuthClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAuthClient) GetAuthClient ¶
GetAuthClient mocks base method.
type MockAuthClientGetAuthClientCall ¶
MockAuthClientGetAuthClientCall wrap *gomock.Call
func (*MockAuthClientGetAuthClientCall) Do ¶
func (c *MockAuthClientGetAuthClientCall) Do(f func(context.Context, string) (remote.Client, error)) *MockAuthClientGetAuthClientCall
Do rewrite *gomock.Call.Do
func (*MockAuthClientGetAuthClientCall) DoAndReturn ¶
func (c *MockAuthClientGetAuthClientCall) DoAndReturn(f func(context.Context, string) (remote.Client, error)) *MockAuthClientGetAuthClientCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAuthClientGetAuthClientCall) Return ¶
func (c *MockAuthClientGetAuthClientCall) Return(arg0 remote.Client, arg1 error) *MockAuthClientGetAuthClientCall
Return rewrite *gomock.Call.Return
type MockAuthClientMockRecorder ¶
type MockAuthClientMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthClientMockRecorder is the mock recorder for MockAuthClient.
func (*MockAuthClientMockRecorder) GetAuthClient ¶
func (mr *MockAuthClientMockRecorder) GetAuthClient(arg0, arg1 any) *MockAuthClientGetAuthClientCall
GetAuthClient indicates an expected call of GetAuthClient.