Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elastic ¶
type Elastic struct {
	*elasticsearch.Client
	Coco
}
    func NewElastic ¶
func NewElastic(cfg ElasticConfig) (*Elastic, error)
NewElastic provides a new Elastic client
type ElasticConfig ¶
type KafkaMessage ¶
type KafkaMessage = kafka.Message
type KafkaReader ¶
type KafkaReader struct {
	*kafka.Reader
	Coco
}
    KafkaReader is a wrapper of kafka reader.
func NewKafkaReader ¶
func NewKafkaReader(c KafkaReaderConfig) (*KafkaReader, error)
NewKafkaReader creates a new kafka reader.
type KafkaReaderConfig ¶
type KafkaWriter ¶
type KafkaWriter struct {
	*kafka.Writer
	Coco
}
    KafkaWriter is a wrapper of kafka writer.
func NewKafkaWriter ¶
func NewKafkaWriter(c KafkaWriterConfig) (*KafkaWriter, error)
NewKafkaWriter creates a new kafka writer.
type KafkaWriterConfig ¶
type Mongo ¶
func (*Mongo) WithTransaction ¶
func (m *Mongo) WithTransaction(ctx context.Context, fn TransactionFn) (interface{}, error)
type MongoConfig ¶
type Postgres ¶
type Postgres struct {
	*pg.DB
	Coco
}
    func NewPostgres ¶
func NewPostgres(cfg PostgresConfig) (*Postgres, func(), error)
NewPostgres provides a new Postgres client
type PostgresConfig ¶
type RedisConfig ¶
type TransactionFn ¶
type TransactionFn = func(sessionContext mongo.SessionContext) (interface{}, error)
 Click to show internal directories. 
   Click to hide internal directories.