Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `env:"DB_NAME,default=cribe" json:",omitempty"` User string `env:"DB_USER,default=postgres" json:",omitempty"` Host string `env:"DB_HOST,default=localhost" json:",omitempty"` Port int `env:"DB_PORT,default=5430" json:",omitempty"` SSLMode string `env:"DB_SSLMODE,default=disable" json:",omitempty"` ConnTimeout int `env:"DB_CONN_TIMEOUT,default=5" json:",omitempty"` Password string `env:"DB_PASSWORD,default=postgres" json:"-"` PoolMinConns int `env:"DB_POOL_MIN_CONNS,default=10" json:",omitempty"` PoolMaxConns int `env:"DB_POOL_MAX_CONNS,default=50" json:",omitempty"` }
func (Config) ConnectionURL ¶
type DB ¶
func NewFromEnv ¶
NewFromEnv return DB instance with context and DB config
type MetadataRepository ¶
type MetadataRepository struct {
*DB
}
func NewMetadataRepository ¶
func NewMetadataRepository(DB *DB) *MetadataRepository
func (*MetadataRepository) FetchByMetadata ¶
Click to show internal directories.
Click to hide internal directories.