Documentation ¶
Overview ¶
Package dynamodb is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config provides abstraction over DynamoDB service configuration. It controls the following parameters:
- Region - AWS region. If not specified in ~/.aws/config file the region is set to `defaultRegion` constant
- TableName - Name of DynamoDB table. If not set explicitly, the service will be initialized with value set in the `defaultTableName` constant
- Endpoint - Only applicable for testing using a local instance of DynamoDB e.g. https://dynamodb:8000. Leave blank to operate on a table in AWS.
type Item ¶
Item provides abstraction over DynamoDB item (entry). * Key - Represents index of the item * Value - Represents value assigned to the index in `Key`
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) DeleteItem ¶
func (m *MockService) DeleteItem(key string) error
DeleteItem mocks base method.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) GetItem ¶
func (m *MockService) GetItem(key string) (*Item, error)
GetItem mocks base method.
func (*MockService) PutItem ¶
func (m *MockService) PutItem(key, value string) error
PutItem mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) DeleteItem ¶
func (mr *MockServiceMockRecorder) DeleteItem(key interface{}) *gomock.Call
DeleteItem indicates an expected call of DeleteItem.
func (*MockServiceMockRecorder) GetItem ¶
func (mr *MockServiceMockRecorder) GetItem(key interface{}) *gomock.Call
GetItem indicates an expected call of GetItem.
func (*MockServiceMockRecorder) PutItem ¶
func (mr *MockServiceMockRecorder) PutItem(key, value interface{}) *gomock.Call
PutItem indicates an expected call of PutItem.
type Service ¶
type Service interface { GetItem(key string) (*Item, error) PutItem(key string, value string) error DeleteItem(key string) error }
Service interface provides CRUD abstraction over DynamoDB table
func InitService ¶
InitService initializes the service with parameters supplied in the `config` parameter