Documentation ¶
Overview ¶
Package db is a generated GoMock package.
Index ¶
- type ErrSimpleThingAlreadyExists
- type ErrSimpleThingNotFound
- type ErrThingAlreadyExists
- type ErrThingNotFound
- type ErrThingWithDateRangeNotFound
- type ErrThingWithUnderscoresNotFound
- type Interface
- type MockInterface
- func (m *MockInterface) DeleteSimpleThing(ctx context.Context, name string) error
- func (m *MockInterface) DeleteThing(ctx context.Context, name string, version int64) error
- func (m *MockInterface) DeleteThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) error
- func (m *MockInterface) DeleteThingWithUnderscores(ctx context.Context, idApp string) error
- func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder
- func (m *MockInterface) GetSimpleThing(ctx context.Context, name string) (*models.SimpleThing, error)
- func (m *MockInterface) GetThing(ctx context.Context, name string, version int64) (*models.Thing, error)
- func (m *MockInterface) GetThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) (*models.ThingWithDateRange, error)
- func (m *MockInterface) GetThingWithUnderscores(ctx context.Context, idApp string) (*models.ThingWithUnderscores, error)
- func (m_2 *MockInterface) SaveSimpleThing(ctx context.Context, m models.SimpleThing) error
- func (m_2 *MockInterface) SaveThing(ctx context.Context, m models.Thing) error
- func (m_2 *MockInterface) SaveThingWithDateRange(ctx context.Context, m models.ThingWithDateRange) error
- func (m_2 *MockInterface) SaveThingWithUnderscores(ctx context.Context, m models.ThingWithUnderscores) error
- type MockInterfaceMockRecorder
- func (mr *MockInterfaceMockRecorder) DeleteSimpleThing(ctx, name interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) DeleteThing(ctx, name, version interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) DeleteThingWithDateRange(ctx, name, date interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) DeleteThingWithUnderscores(ctx, idApp interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetSimpleThing(ctx, name interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetThing(ctx, name, version interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetThingWithDateRange(ctx, name, date interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetThingWithUnderscores(ctx, idApp interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) SaveSimpleThing(ctx, m interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) SaveThing(ctx, m interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) SaveThingWithDateRange(ctx, m interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) SaveThingWithUnderscores(ctx, m interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrSimpleThingAlreadyExists ¶
type ErrSimpleThingAlreadyExists struct {
Name string
}
ErrSimpleThingAlreadyExists is returned when trying to overwrite a SimpleThing.
func (ErrSimpleThingAlreadyExists) Error ¶
func (e ErrSimpleThingAlreadyExists) Error() string
Error returns a description of the error.
type ErrSimpleThingNotFound ¶
type ErrSimpleThingNotFound struct {
Name string
}
ErrSimpleThingNotFound is returned when the database fails to find a SimpleThing.
func (ErrSimpleThingNotFound) Error ¶
func (e ErrSimpleThingNotFound) Error() string
Error returns a description of the error.
type ErrThingAlreadyExists ¶
ErrThingAlreadyExists is returned when trying to overwrite a Thing.
func (ErrThingAlreadyExists) Error ¶
func (e ErrThingAlreadyExists) Error() string
Error returns a description of the error.
type ErrThingNotFound ¶
ErrThingNotFound is returned when the database fails to find a Thing.
func (ErrThingNotFound) Error ¶
func (e ErrThingNotFound) Error() string
Error returns a description of the error.
type ErrThingWithDateRangeNotFound ¶
ErrThingWithDateRangeNotFound is returned when the database fails to find a ThingWithDateRange.
func (ErrThingWithDateRangeNotFound) Error ¶
func (e ErrThingWithDateRangeNotFound) Error() string
Error returns a description of the error.
type ErrThingWithUnderscoresNotFound ¶ added in v1.7.1
type ErrThingWithUnderscoresNotFound struct {
IDApp string
}
ErrThingWithUnderscoresNotFound is returned when the database fails to find a ThingWithUnderscores.
func (ErrThingWithUnderscoresNotFound) Error ¶ added in v1.7.1
func (e ErrThingWithUnderscoresNotFound) Error() string
Error returns a description of the error.
type Interface ¶
type Interface interface { // SaveSimpleThing saves a SimpleThing to the database. SaveSimpleThing(ctx context.Context, m models.SimpleThing) error // GetSimpleThing retrieves a SimpleThing from the database. GetSimpleThing(ctx context.Context, name string) (*models.SimpleThing, error) // DeleteSimpleThing deletes a SimpleThing from the database. DeleteSimpleThing(ctx context.Context, name string) error // SaveThing saves a Thing to the database. SaveThing(ctx context.Context, m models.Thing) error // GetThing retrieves a Thing from the database. GetThing(ctx context.Context, name string, version int64) (*models.Thing, error) // DeleteThing deletes a Thing from the database. DeleteThing(ctx context.Context, name string, version int64) error // SaveThingWithDateRange saves a ThingWithDateRange to the database. SaveThingWithDateRange(ctx context.Context, m models.ThingWithDateRange) error // GetThingWithDateRange retrieves a ThingWithDateRange from the database. GetThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) (*models.ThingWithDateRange, error) // DeleteThingWithDateRange deletes a ThingWithDateRange from the database. DeleteThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) error // SaveThingWithUnderscores saves a ThingWithUnderscores to the database. SaveThingWithUnderscores(ctx context.Context, m models.ThingWithUnderscores) error // GetThingWithUnderscores retrieves a ThingWithUnderscores from the database. GetThingWithUnderscores(ctx context.Context, idApp string) (*models.ThingWithUnderscores, error) // DeleteThingWithUnderscores deletes a ThingWithUnderscores from the database. DeleteThingWithUnderscores(ctx context.Context, idApp string) error }
Interface for interacting with the swagger-test database.
type MockInterface ¶
type MockInterface struct {
// contains filtered or unexported fields
}
MockInterface is a mock of Interface interface
func NewMockInterface ¶
func NewMockInterface(ctrl *gomock.Controller) *MockInterface
NewMockInterface creates a new mock instance
func (*MockInterface) DeleteSimpleThing ¶
func (m *MockInterface) DeleteSimpleThing(ctx context.Context, name string) error
DeleteSimpleThing mocks base method
func (*MockInterface) DeleteThing ¶
DeleteThing mocks base method
func (*MockInterface) DeleteThingWithDateRange ¶
func (m *MockInterface) DeleteThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) error
DeleteThingWithDateRange mocks base method
func (*MockInterface) DeleteThingWithUnderscores ¶ added in v1.7.1
func (m *MockInterface) DeleteThingWithUnderscores(ctx context.Context, idApp string) error
DeleteThingWithUnderscores mocks base method
func (*MockInterface) EXPECT ¶
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockInterface) GetSimpleThing ¶
func (m *MockInterface) GetSimpleThing(ctx context.Context, name string) (*models.SimpleThing, error)
GetSimpleThing mocks base method
func (*MockInterface) GetThing ¶
func (m *MockInterface) GetThing(ctx context.Context, name string, version int64) (*models.Thing, error)
GetThing mocks base method
func (*MockInterface) GetThingWithDateRange ¶
func (m *MockInterface) GetThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) (*models.ThingWithDateRange, error)
GetThingWithDateRange mocks base method
func (*MockInterface) GetThingWithUnderscores ¶ added in v1.7.1
func (m *MockInterface) GetThingWithUnderscores(ctx context.Context, idApp string) (*models.ThingWithUnderscores, error)
GetThingWithUnderscores mocks base method
func (*MockInterface) SaveSimpleThing ¶
func (m_2 *MockInterface) SaveSimpleThing(ctx context.Context, m models.SimpleThing) error
SaveSimpleThing mocks base method
func (*MockInterface) SaveThingWithDateRange ¶
func (m_2 *MockInterface) SaveThingWithDateRange(ctx context.Context, m models.ThingWithDateRange) error
SaveThingWithDateRange mocks base method
func (*MockInterface) SaveThingWithUnderscores ¶ added in v1.7.1
func (m_2 *MockInterface) SaveThingWithUnderscores(ctx context.Context, m models.ThingWithUnderscores) error
SaveThingWithUnderscores mocks base method
type MockInterfaceMockRecorder ¶
type MockInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockInterfaceMockRecorder is the mock recorder for MockInterface
func (*MockInterfaceMockRecorder) DeleteSimpleThing ¶
func (mr *MockInterfaceMockRecorder) DeleteSimpleThing(ctx, name interface{}) *gomock.Call
DeleteSimpleThing indicates an expected call of DeleteSimpleThing
func (*MockInterfaceMockRecorder) DeleteThing ¶
func (mr *MockInterfaceMockRecorder) DeleteThing(ctx, name, version interface{}) *gomock.Call
DeleteThing indicates an expected call of DeleteThing
func (*MockInterfaceMockRecorder) DeleteThingWithDateRange ¶
func (mr *MockInterfaceMockRecorder) DeleteThingWithDateRange(ctx, name, date interface{}) *gomock.Call
DeleteThingWithDateRange indicates an expected call of DeleteThingWithDateRange
func (*MockInterfaceMockRecorder) DeleteThingWithUnderscores ¶ added in v1.7.1
func (mr *MockInterfaceMockRecorder) DeleteThingWithUnderscores(ctx, idApp interface{}) *gomock.Call
DeleteThingWithUnderscores indicates an expected call of DeleteThingWithUnderscores
func (*MockInterfaceMockRecorder) GetSimpleThing ¶
func (mr *MockInterfaceMockRecorder) GetSimpleThing(ctx, name interface{}) *gomock.Call
GetSimpleThing indicates an expected call of GetSimpleThing
func (*MockInterfaceMockRecorder) GetThing ¶
func (mr *MockInterfaceMockRecorder) GetThing(ctx, name, version interface{}) *gomock.Call
GetThing indicates an expected call of GetThing
func (*MockInterfaceMockRecorder) GetThingWithDateRange ¶
func (mr *MockInterfaceMockRecorder) GetThingWithDateRange(ctx, name, date interface{}) *gomock.Call
GetThingWithDateRange indicates an expected call of GetThingWithDateRange
func (*MockInterfaceMockRecorder) GetThingWithUnderscores ¶ added in v1.7.1
func (mr *MockInterfaceMockRecorder) GetThingWithUnderscores(ctx, idApp interface{}) *gomock.Call
GetThingWithUnderscores indicates an expected call of GetThingWithUnderscores
func (*MockInterfaceMockRecorder) SaveSimpleThing ¶
func (mr *MockInterfaceMockRecorder) SaveSimpleThing(ctx, m interface{}) *gomock.Call
SaveSimpleThing indicates an expected call of SaveSimpleThing
func (*MockInterfaceMockRecorder) SaveThing ¶
func (mr *MockInterfaceMockRecorder) SaveThing(ctx, m interface{}) *gomock.Call
SaveThing indicates an expected call of SaveThing
func (*MockInterfaceMockRecorder) SaveThingWithDateRange ¶
func (mr *MockInterfaceMockRecorder) SaveThingWithDateRange(ctx, m interface{}) *gomock.Call
SaveThingWithDateRange indicates an expected call of SaveThingWithDateRange
func (*MockInterfaceMockRecorder) SaveThingWithUnderscores ¶ added in v1.7.1
func (mr *MockInterfaceMockRecorder) SaveThingWithUnderscores(ctx, m interface{}) *gomock.Call
SaveThingWithUnderscores indicates an expected call of SaveThingWithUnderscores