Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Errors = struct { InitConfigError error DBConnectionError error }{}
Functions ¶
func GetDBConnection ¶
func RenderSchemaTemplate ¶
func RenderSchemaTemplate() error
func SyncEntityWithSchema ¶
Types ¶
type ApplySchemaResult ¶
type ApplySchemaResult struct {
Changes SchemaChanges `json:"Changes,omitempty"`
}
func SyncDBWithSchema ¶
func SyncDBWithSchema(dryRun bool) (*ApplySchemaResult, error)
func (*ApplySchemaResult) String ¶
func (res *ApplySchemaResult) String() string
type Config ¶
type Config struct {
Service struct {
Name string `yaml:"name" envconfig:"SERVICE_NAME"`
Env string `yaml:"env" envconfig:"SERVICE_ENV"`
} `yaml:"service"`
Server struct {
Port int `yaml:"port" envconfig:"SERVER_PORT"`
} `yaml:"server"`
Database struct {
Host string `yaml:"host" envconfig:"DB_HOST"`
Port int `yaml:"port" envconfig:"DB_PORT"`
Name string `yaml:"name" envconfig:"DB_NAME"`
User string `yaml:"user" envconfig:"DB_USER"`
Pass string `yaml:"pass" envconfig:"DB_PASS"`
} `yaml:"database"`
OpenTelemtry struct {
Host string `yaml:"host" envconfig:"OPENTELEMTRY_HOST"`
Insecure bool `yaml:"insecure" envconfig:"OPENTELEMTRY_INSECURE"`
} `yaml:"opentelemtry"`
}
type SchemaChanges ¶
Click to show internal directories.
Click to hide internal directories.