Documentation ¶
Index ¶
- type Repository
- type RepositoryMock
- func (mmCreate *RepositoryMock) Create(ctx context.Context, url *URLData) (up1 *URLData, err error)
- func (mmCreate *RepositoryMock) CreateAfterCounter() uint64
- func (mmCreate *RepositoryMock) CreateBeforeCounter() uint64
- func (mmFindByID *RepositoryMock) FindByID(ctx context.Context, id int) (up1 *URLData, err error)
- func (mmFindByID *RepositoryMock) FindByIDAfterCounter() uint64
- func (mmFindByID *RepositoryMock) FindByIDBeforeCounter() uint64
- func (mmFindByToken *RepositoryMock) FindByToken(ctx context.Context, token string) (up1 *URLData, err error)
- func (mmFindByToken *RepositoryMock) FindByTokenAfterCounter() uint64
- func (mmFindByToken *RepositoryMock) FindByTokenBeforeCounter() uint64
- func (m *RepositoryMock) MinimockCreateDone() bool
- func (m *RepositoryMock) MinimockCreateInspect()
- func (m *RepositoryMock) MinimockFindByIDDone() bool
- func (m *RepositoryMock) MinimockFindByIDInspect()
- func (m *RepositoryMock) MinimockFindByTokenDone() bool
- func (m *RepositoryMock) MinimockFindByTokenInspect()
- func (m *RepositoryMock) MinimockFinish()
- func (m *RepositoryMock) MinimockUpdateCounterDone() bool
- func (m *RepositoryMock) MinimockUpdateCounterInspect()
- func (m *RepositoryMock) MinimockWait(timeout mm_time.Duration)
- func (mmUpdateCounter *RepositoryMock) UpdateCounter(ctx context.Context, counter int64, shortURL string) (err error)
- func (mmUpdateCounter *RepositoryMock) UpdateCounterAfterCounter() uint64
- func (mmUpdateCounter *RepositoryMock) UpdateCounterBeforeCounter() uint64
- type RepositoryMockCreateExpectation
- type RepositoryMockCreateParams
- type RepositoryMockCreateResults
- type RepositoryMockFindByIDExpectation
- type RepositoryMockFindByIDParams
- type RepositoryMockFindByIDResults
- type RepositoryMockFindByTokenExpectation
- type RepositoryMockFindByTokenParams
- type RepositoryMockFindByTokenResults
- type RepositoryMockUpdateCounterExpectation
- type RepositoryMockUpdateCounterParams
- type RepositoryMockUpdateCounterResults
- type URLData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type RepositoryMock ¶
type RepositoryMock struct { CreateMock mRepositoryMockCreate FindByIDMock mRepositoryMockFindByID FindByTokenMock mRepositoryMockFindByToken UpdateCounterMock mRepositoryMockUpdateCounter // contains filtered or unexported fields }
RepositoryMock implements Repository
func NewRepositoryMock ¶
func NewRepositoryMock(t minimock.Tester) *RepositoryMock
NewRepositoryMock returns a mock for Repository
func (*RepositoryMock) CreateAfterCounter ¶
func (mmCreate *RepositoryMock) CreateAfterCounter() uint64
CreateAfterCounter returns a count of finished RepositoryMock.Create invocations
func (*RepositoryMock) CreateBeforeCounter ¶
func (mmCreate *RepositoryMock) CreateBeforeCounter() uint64
CreateBeforeCounter returns a count of RepositoryMock.Create invocations
func (*RepositoryMock) FindByIDAfterCounter ¶
func (mmFindByID *RepositoryMock) FindByIDAfterCounter() uint64
FindByIDAfterCounter returns a count of finished RepositoryMock.FindByID invocations
func (*RepositoryMock) FindByIDBeforeCounter ¶
func (mmFindByID *RepositoryMock) FindByIDBeforeCounter() uint64
FindByIDBeforeCounter returns a count of RepositoryMock.FindByID invocations
func (*RepositoryMock) FindByToken ¶
func (mmFindByToken *RepositoryMock) FindByToken(ctx context.Context, token string) (up1 *URLData, err error)
FindByToken implements Repository
func (*RepositoryMock) FindByTokenAfterCounter ¶
func (mmFindByToken *RepositoryMock) FindByTokenAfterCounter() uint64
FindByTokenAfterCounter returns a count of finished RepositoryMock.FindByToken invocations
func (*RepositoryMock) FindByTokenBeforeCounter ¶
func (mmFindByToken *RepositoryMock) FindByTokenBeforeCounter() uint64
FindByTokenBeforeCounter returns a count of RepositoryMock.FindByToken invocations
func (*RepositoryMock) MinimockCreateDone ¶
func (m *RepositoryMock) MinimockCreateDone() bool
MinimockCreateDone returns true if the count of the Create invocations corresponds the number of defined expectations
func (*RepositoryMock) MinimockCreateInspect ¶
func (m *RepositoryMock) MinimockCreateInspect()
MinimockCreateInspect logs each unmet expectation
func (*RepositoryMock) MinimockFindByIDDone ¶
func (m *RepositoryMock) MinimockFindByIDDone() bool
MinimockFindByIDDone returns true if the count of the FindByID invocations corresponds the number of defined expectations
func (*RepositoryMock) MinimockFindByIDInspect ¶
func (m *RepositoryMock) MinimockFindByIDInspect()
MinimockFindByIDInspect logs each unmet expectation
func (*RepositoryMock) MinimockFindByTokenDone ¶
func (m *RepositoryMock) MinimockFindByTokenDone() bool
MinimockFindByTokenDone returns true if the count of the FindByToken invocations corresponds the number of defined expectations
func (*RepositoryMock) MinimockFindByTokenInspect ¶
func (m *RepositoryMock) MinimockFindByTokenInspect()
MinimockFindByTokenInspect logs each unmet expectation
func (*RepositoryMock) MinimockFinish ¶
func (m *RepositoryMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*RepositoryMock) MinimockUpdateCounterDone ¶
func (m *RepositoryMock) MinimockUpdateCounterDone() bool
MinimockUpdateCounterDone returns true if the count of the UpdateCounter invocations corresponds the number of defined expectations
func (*RepositoryMock) MinimockUpdateCounterInspect ¶
func (m *RepositoryMock) MinimockUpdateCounterInspect()
MinimockUpdateCounterInspect logs each unmet expectation
func (*RepositoryMock) MinimockWait ¶
func (m *RepositoryMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*RepositoryMock) UpdateCounter ¶
func (mmUpdateCounter *RepositoryMock) UpdateCounter(ctx context.Context, counter int64, shortURL string) (err error)
UpdateCounter implements Repository
func (*RepositoryMock) UpdateCounterAfterCounter ¶
func (mmUpdateCounter *RepositoryMock) UpdateCounterAfterCounter() uint64
UpdateCounterAfterCounter returns a count of finished RepositoryMock.UpdateCounter invocations
func (*RepositoryMock) UpdateCounterBeforeCounter ¶
func (mmUpdateCounter *RepositoryMock) UpdateCounterBeforeCounter() uint64
UpdateCounterBeforeCounter returns a count of RepositoryMock.UpdateCounter invocations
type RepositoryMockCreateExpectation ¶
type RepositoryMockCreateExpectation struct { Counter uint64 // contains filtered or unexported fields }
RepositoryMockCreateExpectation specifies expectation struct of the Repository.Create
func (*RepositoryMockCreateExpectation) Then ¶
func (e *RepositoryMockCreateExpectation) Then(up1 *URLData, err error) *RepositoryMock
Then sets up Repository.Create return parameters for the expectation previously defined by the When method
type RepositoryMockCreateParams ¶
type RepositoryMockCreateParams struct {
// contains filtered or unexported fields
}
RepositoryMockCreateParams contains parameters of the Repository.Create
type RepositoryMockCreateResults ¶
type RepositoryMockCreateResults struct {
// contains filtered or unexported fields
}
RepositoryMockCreateResults contains results of the Repository.Create
type RepositoryMockFindByIDExpectation ¶
type RepositoryMockFindByIDExpectation struct { Counter uint64 // contains filtered or unexported fields }
RepositoryMockFindByIDExpectation specifies expectation struct of the Repository.FindByID
func (*RepositoryMockFindByIDExpectation) Then ¶
func (e *RepositoryMockFindByIDExpectation) Then(up1 *URLData, err error) *RepositoryMock
Then sets up Repository.FindByID return parameters for the expectation previously defined by the When method
type RepositoryMockFindByIDParams ¶
type RepositoryMockFindByIDParams struct {
// contains filtered or unexported fields
}
RepositoryMockFindByIDParams contains parameters of the Repository.FindByID
type RepositoryMockFindByIDResults ¶
type RepositoryMockFindByIDResults struct {
// contains filtered or unexported fields
}
RepositoryMockFindByIDResults contains results of the Repository.FindByID
type RepositoryMockFindByTokenExpectation ¶
type RepositoryMockFindByTokenExpectation struct { Counter uint64 // contains filtered or unexported fields }
RepositoryMockFindByTokenExpectation specifies expectation struct of the Repository.FindByToken
func (*RepositoryMockFindByTokenExpectation) Then ¶
func (e *RepositoryMockFindByTokenExpectation) Then(up1 *URLData, err error) *RepositoryMock
Then sets up Repository.FindByToken return parameters for the expectation previously defined by the When method
type RepositoryMockFindByTokenParams ¶
type RepositoryMockFindByTokenParams struct {
// contains filtered or unexported fields
}
RepositoryMockFindByTokenParams contains parameters of the Repository.FindByToken
type RepositoryMockFindByTokenResults ¶
type RepositoryMockFindByTokenResults struct {
// contains filtered or unexported fields
}
RepositoryMockFindByTokenResults contains results of the Repository.FindByToken
type RepositoryMockUpdateCounterExpectation ¶
type RepositoryMockUpdateCounterExpectation struct { Counter uint64 // contains filtered or unexported fields }
RepositoryMockUpdateCounterExpectation specifies expectation struct of the Repository.UpdateCounter
func (*RepositoryMockUpdateCounterExpectation) Then ¶
func (e *RepositoryMockUpdateCounterExpectation) Then(err error) *RepositoryMock
Then sets up Repository.UpdateCounter return parameters for the expectation previously defined by the When method
type RepositoryMockUpdateCounterParams ¶
type RepositoryMockUpdateCounterParams struct {
// contains filtered or unexported fields
}
RepositoryMockUpdateCounterParams contains parameters of the Repository.UpdateCounter
type RepositoryMockUpdateCounterResults ¶
type RepositoryMockUpdateCounterResults struct {
// contains filtered or unexported fields
}
RepositoryMockUpdateCounterResults contains results of the Repository.UpdateCounter