Versions in this module Expand all Collapse all v0 v0.0.2 Apr 12, 2024 v0.0.1 Apr 11, 2024 Changes in this version + type Coco struct + func (i Coco) CocoInfra() + type Elastic struct + func NewElastic(cfg ElasticConfig) (*Elastic, error) + type ElasticConfig struct + Addresses []string + Password string + Username string + type Infra interface + CocoInfra func() + type KafkaMessage = kafka.Message + type KafkaReader struct + func NewKafkaReader(c KafkaReaderConfig) (*KafkaReader, error) + type KafkaReaderConfig struct + Brokers []string + GroupID string + GroupTopics []string + Topic string + type KafkaWriter struct + func NewKafkaWriter(c KafkaWriterConfig) (*KafkaWriter, error) + type KafkaWriterConfig struct + Async bool + BatchTimeout time.Duration + Brokers []string + ClientID string + DialTimeout time.Duration + Topic string + type Mongo struct + func NewMongo(c MongoConfig) (*Mongo, error) + func (m *Mongo) WithTransaction(ctx context.Context, fn TransactionFn) (interface{}, error) + type MongoConfig struct + ConnectTimeout time.Duration + MaxConnIdleTime time.Duration + MaxPoolSize uint64 + SocketTimeout time.Duration + URL string + type Postgres struct + func NewPostgres(cfg PostgresConfig) (*Postgres, func(), error) + type PostgresConfig struct + Addr string + Database string + Password string + User string + type Redis struct + func NewRedis(cfg RedisConfig) (*Redis, error) + type RedisConfig struct + ConnectTimeout time.Duration + URL string + type Sentry struct + func NewSentry(opts sentry.ClientOptions) (*Sentry, error) + type TransactionFn = func(sessionContext mongo.SessionContext) (interface{}, error)