Documentation ¶
Overview ¶
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Index ¶
- func CrappyJson[T CrappyShouldError]() format.Format[T]
- func CrappyStringFormat() format.Format[string]
- func Log(t *testing.T, container testcontainers.Container)
- func LogContains(t *testing.T, container testcontainers.Container, logString string) bool
- func MarshalNoError[T any](t *testing.T, f format.Format[T], v T) []byte
- func UnmarshalNoError[T any](t *testing.T, f format.Format[T], bytes []byte) T
- type BunIDB
- type ChannelProducer
- type ConsumerGroupSession
- type CrappyJsonFormat
- type CrappyShouldError
- type MockBunConnection
- type MockBunConnectionMockRecorder
- type MockBunIDB
- func (m *MockBunIDB) BeginTx(ctx context.Context, opts *sql.TxOptions) (bun.Tx, error)
- func (m *MockBunIDB) Dialect() schema.Dialect
- func (m *MockBunIDB) EXPECT() *MockBunIDBMockRecorder
- func (m *MockBunIDB) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (m *MockBunIDB) NewAddColumn() *bun.AddColumnQuery
- func (m *MockBunIDB) NewCreateIndex() *bun.CreateIndexQuery
- func (m *MockBunIDB) NewCreateTable() *bun.CreateTableQuery
- func (m *MockBunIDB) NewDelete() *bun.DeleteQuery
- func (m *MockBunIDB) NewDropColumn() *bun.DropColumnQuery
- func (m *MockBunIDB) NewDropIndex() *bun.DropIndexQuery
- func (m *MockBunIDB) NewDropTable() *bun.DropTableQuery
- func (m *MockBunIDB) NewInsert() *bun.InsertQuery
- func (m *MockBunIDB) NewRaw(query string, args ...interface{}) *bun.RawQuery
- func (m *MockBunIDB) NewSelect() *bun.SelectQuery
- func (m *MockBunIDB) NewTruncateTable() *bun.TruncateTableQuery
- func (m *MockBunIDB) NewUpdate() *bun.UpdateQuery
- func (m *MockBunIDB) NewValues(model interface{}) *bun.ValuesQuery
- func (m *MockBunIDB) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (m *MockBunIDB) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- func (m *MockBunIDB) RunInTx(ctx context.Context, opts *sql.TxOptions, ...) error
- type MockBunIDBMockRecorder
- func (mr *MockBunIDBMockRecorder) BeginTx(ctx, opts interface{}) *gomock.Call
- func (mr *MockBunIDBMockRecorder) Dialect() *gomock.Call
- func (mr *MockBunIDBMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewAddColumn() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewCreateIndex() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewCreateTable() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewDelete() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewDropColumn() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewDropIndex() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewDropTable() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewInsert() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewRaw(query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewSelect() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewTruncateTable() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewUpdate() *gomock.Call
- func (mr *MockBunIDBMockRecorder) NewValues(model interface{}) *gomock.Call
- func (mr *MockBunIDBMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockBunIDBMockRecorder) QueryRowContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockBunIDBMockRecorder) RunInTx(ctx, opts, f interface{}) *gomock.Call
- type MockConsumerGroupSession
- func (m *MockConsumerGroupSession) Claims() map[string][]int32
- func (m *MockConsumerGroupSession) Commit()
- func (m *MockConsumerGroupSession) Context() context.Context
- func (m *MockConsumerGroupSession) EXPECT() *MockConsumerGroupSessionMockRecorder
- func (m *MockConsumerGroupSession) GenerationID() int32
- func (m *MockConsumerGroupSession) MarkMessage(msg *sarama.ConsumerMessage, metadata string)
- func (m *MockConsumerGroupSession) MarkOffset(topic string, partition int32, offset int64, metadata string)
- func (m *MockConsumerGroupSession) MemberID() string
- func (m *MockConsumerGroupSession) ResetOffset(topic string, partition int32, offset int64, metadata string)
- type MockConsumerGroupSessionMockRecorder
- func (mr *MockConsumerGroupSessionMockRecorder) Claims() *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) Commit() *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) Context() *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) GenerationID() *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) MarkMessage(msg, metadata interface{}) *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) MarkOffset(topic, partition, offset, metadata interface{}) *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) MemberID() *gomock.Call
- func (mr *MockConsumerGroupSessionMockRecorder) ResetOffset(topic, partition, offset, metadata interface{}) *gomock.Call
- type SqliteBunConnection
- type StringJson
- type TestContainerLogging
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrappyJson ¶
func CrappyJson[T CrappyShouldError]() format.Format[T]
func CrappyStringFormat ¶
func LogContains ¶
Types ¶
type ChannelProducer ¶
func NewChannelProducer ¶
func NewChannelProducer() *ChannelProducer
func (*ChannelProducer) Start ¶
func (c *ChannelProducer) Start() error
func (*ChannelProducer) Stop ¶
func (c *ChannelProducer) Stop()
type ConsumerGroupSession ¶
type ConsumerGroupSession interface { // Claims returns information about the claimed partitions by topic. Claims() map[string][]int32 // MemberID returns the cluster member ID. MemberID() string // GenerationID returns the current generation ID. GenerationID() int32 // MarkOffset marks the provided offset, alongside a metadata string // that represents the state of the partition consumer at that point in time. The // metadata string can be used by another consumer to restore that state, so it // can resume consumption. // // To follow upstream conventions, you are expected to mark the offset of the // next message to read, not the last message read. Thus, when calling `MarkOffset` // you should typically add one to the offset of the last consumed message. // // Note: calling MarkOffset does not necessarily commit the offset to the backend // store immediately for efficiency reasons, and it may never be committed if // your application crashes. This means that you may end up processing the same // message twice, and your processing should ideally be idempotent. MarkOffset(topic string, partition int32, offset int64, metadata string) // Commit the offset to the backend // // Note: calling Commit performs a blocking synchronous operation. Commit() // ResetOffset resets to the provided offset, alongside a metadata string that // represents the state of the partition consumer at that point in time. Reset // acts as a counterpart to MarkOffset, the difference being that it allows to // reset an offset to an earlier or smaller value, where MarkOffset only // allows incrementing the offset. cf MarkOffset for more details. ResetOffset(topic string, partition int32, offset int64, metadata string) // MarkMessage marks a message as consumed. MarkMessage(msg *sarama.ConsumerMessage, metadata string) // Context returns the session context. Context() context.Context }
ConsumerGroupSession represents a consumer group member session.
type CrappyJsonFormat ¶
type CrappyJsonFormat[T CrappyShouldError] struct{}
func (CrappyJsonFormat[T]) Default ¶
func (helper CrappyJsonFormat[T]) Default() T
func (CrappyJsonFormat[T]) Marshal ¶
func (helper CrappyJsonFormat[T]) Marshal(value T) ([]byte, error)
func (CrappyJsonFormat[T]) Unmarshal ¶
func (helper CrappyJsonFormat[T]) Unmarshal(value []byte) (T, error)
type CrappyShouldError ¶
type CrappyShouldError interface {
ShouldError() bool
}
type MockBunConnection ¶
type MockBunConnection struct {
// contains filtered or unexported fields
}
MockBunConnection is a mock of BunConnection interface.
func NewMockBunConnection ¶
func NewMockBunConnection(ctrl *gomock.Controller) *MockBunConnection
NewMockBunConnection creates a new mock instance.
func (*MockBunConnection) EXPECT ¶
func (m *MockBunConnection) EXPECT() *MockBunConnectionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBunConnection) Start ¶
func (m *MockBunConnection) Start() error
Start mocks base method.
type MockBunConnectionMockRecorder ¶
type MockBunConnectionMockRecorder struct {
// contains filtered or unexported fields
}
MockBunConnectionMockRecorder is the mock recorder for MockBunConnection.
func (*MockBunConnectionMockRecorder) Db ¶
func (mr *MockBunConnectionMockRecorder) Db() *gomock.Call
Db indicates an expected call of Db.
func (*MockBunConnectionMockRecorder) Start ¶
func (mr *MockBunConnectionMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockBunConnectionMockRecorder) Stop ¶
func (mr *MockBunConnectionMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockBunIDB ¶
type MockBunIDB struct {
// contains filtered or unexported fields
}
MockBunIDB is a mock of BunIDB interface.
func NewMockBunIDB ¶
func NewMockBunIDB(ctrl *gomock.Controller) *MockBunIDB
NewMockBunIDB creates a new mock instance.
func (*MockBunIDB) Dialect ¶
func (m *MockBunIDB) Dialect() schema.Dialect
Dialect mocks base method.
func (*MockBunIDB) EXPECT ¶
func (m *MockBunIDB) EXPECT() *MockBunIDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBunIDB) ExecContext ¶
func (m *MockBunIDB) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecContext mocks base method.
func (*MockBunIDB) NewAddColumn ¶
func (m *MockBunIDB) NewAddColumn() *bun.AddColumnQuery
NewAddColumn mocks base method.
func (*MockBunIDB) NewCreateIndex ¶
func (m *MockBunIDB) NewCreateIndex() *bun.CreateIndexQuery
NewCreateIndex mocks base method.
func (*MockBunIDB) NewCreateTable ¶
func (m *MockBunIDB) NewCreateTable() *bun.CreateTableQuery
NewCreateTable mocks base method.
func (*MockBunIDB) NewDelete ¶
func (m *MockBunIDB) NewDelete() *bun.DeleteQuery
NewDelete mocks base method.
func (*MockBunIDB) NewDropColumn ¶
func (m *MockBunIDB) NewDropColumn() *bun.DropColumnQuery
NewDropColumn mocks base method.
func (*MockBunIDB) NewDropIndex ¶
func (m *MockBunIDB) NewDropIndex() *bun.DropIndexQuery
NewDropIndex mocks base method.
func (*MockBunIDB) NewDropTable ¶
func (m *MockBunIDB) NewDropTable() *bun.DropTableQuery
NewDropTable mocks base method.
func (*MockBunIDB) NewInsert ¶
func (m *MockBunIDB) NewInsert() *bun.InsertQuery
NewInsert mocks base method.
func (*MockBunIDB) NewRaw ¶
func (m *MockBunIDB) NewRaw(query string, args ...interface{}) *bun.RawQuery
NewRaw mocks base method.
func (*MockBunIDB) NewSelect ¶
func (m *MockBunIDB) NewSelect() *bun.SelectQuery
NewSelect mocks base method.
func (*MockBunIDB) NewTruncateTable ¶
func (m *MockBunIDB) NewTruncateTable() *bun.TruncateTableQuery
NewTruncateTable mocks base method.
func (*MockBunIDB) NewUpdate ¶
func (m *MockBunIDB) NewUpdate() *bun.UpdateQuery
NewUpdate mocks base method.
func (*MockBunIDB) NewValues ¶
func (m *MockBunIDB) NewValues(model interface{}) *bun.ValuesQuery
NewValues mocks base method.
func (*MockBunIDB) QueryContext ¶
func (m *MockBunIDB) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryContext mocks base method.
func (*MockBunIDB) QueryRowContext ¶
func (m *MockBunIDB) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
QueryRowContext mocks base method.
type MockBunIDBMockRecorder ¶
type MockBunIDBMockRecorder struct {
// contains filtered or unexported fields
}
MockBunIDBMockRecorder is the mock recorder for MockBunIDB.
func (*MockBunIDBMockRecorder) BeginTx ¶
func (mr *MockBunIDBMockRecorder) BeginTx(ctx, opts interface{}) *gomock.Call
BeginTx indicates an expected call of BeginTx.
func (*MockBunIDBMockRecorder) Dialect ¶
func (mr *MockBunIDBMockRecorder) Dialect() *gomock.Call
Dialect indicates an expected call of Dialect.
func (*MockBunIDBMockRecorder) ExecContext ¶
func (mr *MockBunIDBMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
ExecContext indicates an expected call of ExecContext.
func (*MockBunIDBMockRecorder) NewAddColumn ¶
func (mr *MockBunIDBMockRecorder) NewAddColumn() *gomock.Call
NewAddColumn indicates an expected call of NewAddColumn.
func (*MockBunIDBMockRecorder) NewCreateIndex ¶
func (mr *MockBunIDBMockRecorder) NewCreateIndex() *gomock.Call
NewCreateIndex indicates an expected call of NewCreateIndex.
func (*MockBunIDBMockRecorder) NewCreateTable ¶
func (mr *MockBunIDBMockRecorder) NewCreateTable() *gomock.Call
NewCreateTable indicates an expected call of NewCreateTable.
func (*MockBunIDBMockRecorder) NewDelete ¶
func (mr *MockBunIDBMockRecorder) NewDelete() *gomock.Call
NewDelete indicates an expected call of NewDelete.
func (*MockBunIDBMockRecorder) NewDropColumn ¶
func (mr *MockBunIDBMockRecorder) NewDropColumn() *gomock.Call
NewDropColumn indicates an expected call of NewDropColumn.
func (*MockBunIDBMockRecorder) NewDropIndex ¶
func (mr *MockBunIDBMockRecorder) NewDropIndex() *gomock.Call
NewDropIndex indicates an expected call of NewDropIndex.
func (*MockBunIDBMockRecorder) NewDropTable ¶
func (mr *MockBunIDBMockRecorder) NewDropTable() *gomock.Call
NewDropTable indicates an expected call of NewDropTable.
func (*MockBunIDBMockRecorder) NewInsert ¶
func (mr *MockBunIDBMockRecorder) NewInsert() *gomock.Call
NewInsert indicates an expected call of NewInsert.
func (*MockBunIDBMockRecorder) NewRaw ¶
func (mr *MockBunIDBMockRecorder) NewRaw(query interface{}, args ...interface{}) *gomock.Call
NewRaw indicates an expected call of NewRaw.
func (*MockBunIDBMockRecorder) NewSelect ¶
func (mr *MockBunIDBMockRecorder) NewSelect() *gomock.Call
NewSelect indicates an expected call of NewSelect.
func (*MockBunIDBMockRecorder) NewTruncateTable ¶
func (mr *MockBunIDBMockRecorder) NewTruncateTable() *gomock.Call
NewTruncateTable indicates an expected call of NewTruncateTable.
func (*MockBunIDBMockRecorder) NewUpdate ¶
func (mr *MockBunIDBMockRecorder) NewUpdate() *gomock.Call
NewUpdate indicates an expected call of NewUpdate.
func (*MockBunIDBMockRecorder) NewValues ¶
func (mr *MockBunIDBMockRecorder) NewValues(model interface{}) *gomock.Call
NewValues indicates an expected call of NewValues.
func (*MockBunIDBMockRecorder) QueryContext ¶
func (mr *MockBunIDBMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
QueryContext indicates an expected call of QueryContext.
func (*MockBunIDBMockRecorder) QueryRowContext ¶
func (mr *MockBunIDBMockRecorder) QueryRowContext(ctx, query interface{}, args ...interface{}) *gomock.Call
QueryRowContext indicates an expected call of QueryRowContext.
func (*MockBunIDBMockRecorder) RunInTx ¶
func (mr *MockBunIDBMockRecorder) RunInTx(ctx, opts, f interface{}) *gomock.Call
RunInTx indicates an expected call of RunInTx.
type MockConsumerGroupSession ¶
type MockConsumerGroupSession struct {
// contains filtered or unexported fields
}
MockConsumerGroupSession is a mock of ConsumerGroupSession interface.
func NewMockConsumerGroupSession ¶
func NewMockConsumerGroupSession(ctrl *gomock.Controller) *MockConsumerGroupSession
NewMockConsumerGroupSession creates a new mock instance.
func (*MockConsumerGroupSession) Claims ¶
func (m *MockConsumerGroupSession) Claims() map[string][]int32
Claims mocks base method.
func (*MockConsumerGroupSession) Commit ¶
func (m *MockConsumerGroupSession) Commit()
Commit mocks base method.
func (*MockConsumerGroupSession) Context ¶
func (m *MockConsumerGroupSession) Context() context.Context
Context mocks base method.
func (*MockConsumerGroupSession) EXPECT ¶
func (m *MockConsumerGroupSession) EXPECT() *MockConsumerGroupSessionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConsumerGroupSession) GenerationID ¶
func (m *MockConsumerGroupSession) GenerationID() int32
GenerationID mocks base method.
func (*MockConsumerGroupSession) MarkMessage ¶
func (m *MockConsumerGroupSession) MarkMessage(msg *sarama.ConsumerMessage, metadata string)
MarkMessage mocks base method.
func (*MockConsumerGroupSession) MarkOffset ¶
func (m *MockConsumerGroupSession) MarkOffset(topic string, partition int32, offset int64, metadata string)
MarkOffset mocks base method.
func (*MockConsumerGroupSession) MemberID ¶
func (m *MockConsumerGroupSession) MemberID() string
MemberID mocks base method.
func (*MockConsumerGroupSession) ResetOffset ¶
func (m *MockConsumerGroupSession) ResetOffset(topic string, partition int32, offset int64, metadata string)
ResetOffset mocks base method.
type MockConsumerGroupSessionMockRecorder ¶
type MockConsumerGroupSessionMockRecorder struct {
// contains filtered or unexported fields
}
MockConsumerGroupSessionMockRecorder is the mock recorder for MockConsumerGroupSession.
func (*MockConsumerGroupSessionMockRecorder) Claims ¶
func (mr *MockConsumerGroupSessionMockRecorder) Claims() *gomock.Call
Claims indicates an expected call of Claims.
func (*MockConsumerGroupSessionMockRecorder) Commit ¶
func (mr *MockConsumerGroupSessionMockRecorder) Commit() *gomock.Call
Commit indicates an expected call of Commit.
func (*MockConsumerGroupSessionMockRecorder) Context ¶
func (mr *MockConsumerGroupSessionMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
func (*MockConsumerGroupSessionMockRecorder) GenerationID ¶
func (mr *MockConsumerGroupSessionMockRecorder) GenerationID() *gomock.Call
GenerationID indicates an expected call of GenerationID.
func (*MockConsumerGroupSessionMockRecorder) MarkMessage ¶
func (mr *MockConsumerGroupSessionMockRecorder) MarkMessage(msg, metadata interface{}) *gomock.Call
MarkMessage indicates an expected call of MarkMessage.
func (*MockConsumerGroupSessionMockRecorder) MarkOffset ¶
func (mr *MockConsumerGroupSessionMockRecorder) MarkOffset(topic, partition, offset, metadata interface{}) *gomock.Call
MarkOffset indicates an expected call of MarkOffset.
func (*MockConsumerGroupSessionMockRecorder) MemberID ¶
func (mr *MockConsumerGroupSessionMockRecorder) MemberID() *gomock.Call
MemberID indicates an expected call of MemberID.
func (*MockConsumerGroupSessionMockRecorder) ResetOffset ¶
func (mr *MockConsumerGroupSessionMockRecorder) ResetOffset(topic, partition, offset, metadata interface{}) *gomock.Call
ResetOffset indicates an expected call of ResetOffset.
type SqliteBunConnection ¶
type SqliteBunConnection[T any] struct { FixtureFolder string FixtureFile string // contains filtered or unexported fields }
func (*SqliteBunConnection[T]) Db ¶
func (r *SqliteBunConnection[T]) Db() bun.IDB
func (*SqliteBunConnection[T]) Start ¶
func (r *SqliteBunConnection[T]) Start() error
func (*SqliteBunConnection[T]) Stop ¶
func (r *SqliteBunConnection[T]) Stop()
type StringJson ¶
type StringJson struct {
Message string
}
type TestContainerLogging ¶
type TestContainerLogging struct { }
func (TestContainerLogging) Printf ¶
func (TestContainerLogging) Printf(format string, v ...interface{})