Documentation ¶
Overview ¶
Package secret is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { // Save creates or updates secret. // Returns ErrInvalid in case of invalid input. Save(ctx context.Context, name string, value []byte) error // Delete deletes the secret with the given name. Delete(ctx context.Context, name string) error // Get gets secret name if present else returns an error. // Returns ErrNotFound in case of invalid input. Get(ctx context.Context, name string) ([]byte, error) }
Client is an interface to implement secret operations.
type ErrInvalid ¶
type ErrInvalid struct {
Message string
}
ErrInvalid represents error when resource inputs are invalid.
func (*ErrInvalid) Error ¶
func (e *ErrInvalid) Error() string
Error returns a string representation of the error.
func (*ErrInvalid) Is ¶
func (e *ErrInvalid) Is(target error) bool
Is checks if the target error is of type ErrInvalid and if the message of the target error is equal to the message of the current error or if the message of the target error is empty.
type ErrNotFound ¶
type ErrNotFound struct { }
ErrNotFound represents error when resource is missing.
func (*ErrNotFound) Is ¶
func (e *ErrNotFound) Is(target error) bool
Is checks if the error is of type ErrNotFound.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) Delete ¶
func (m *MockClient) Delete(arg0 context.Context, arg1 string) error
Delete mocks base method.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Delete ¶
func (mr *MockClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockClientMockRecorder) Get ¶
func (mr *MockClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockClientMockRecorder) Save ¶
func (mr *MockClientMockRecorder) Save(arg0, arg1, arg2 interface{}) *gomock.Call
Save indicates an expected call of Save.