Documentation
¶
Index ¶
- Constants
- Variables
- func NewDbConnection(cfg *Config, logger *zap.SugaredLogger) (*gorm.DB, error)
- type Config
- type JSONB
- func (j *JSONB) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (j JSONB) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (JSONB) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (j JSONB) GormDataType() string
- func (j JSONB) MarshalJSON() ([]byte, error)
- func (j *JSONB) Scan(src interface{}) error
- func (j *JSONB) UnmarshalJSON(b []byte) error
- func (j JSONB) Value() (driver.Value, error)
Constants ¶
View Source
const RETRY_TIMES = 6
Variables ¶
View Source
var DbWireSet = wire.NewSet( GetConfig, NewDbConnection, )
Functions ¶
func NewDbConnection ¶
Types ¶
type Config ¶
type Config struct { Addr string `env:"ILLA_PG_ADDR" envDefault:"localhost"` Port string `env:"ILLA_PG_PORT" envDefault:"5432"` User string `env:"ILLA_PG_USER" envDefault:"illa_builder"` Password string `env:"ILLA_PG_PASSWORD" envDefault:"71De5JllWSetLYU"` Database string `env:"ILLA_PG_DATABASE" envDefault:"illa_builder"` }
type JSONB ¶
type JSONB map[string]interface{}
func (JSONB) EncodeText ¶
func (JSONB) GormDBDataType ¶
GormDBDataType gorm db data type
func (JSONB) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*JSONB) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
Click to show internal directories.
Click to hide internal directories.