Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JSONSchema string
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
func (LogLevel) JSONSchema ¶
func (LogLevel) JSONSchema() *jsonschema.Schema
func (LogLevel) MarshalJSON ¶
func (*LogLevel) UnmarshalJSON ¶
type Spec ¶
type Spec struct { // Connection string to connect to the database. This can be a URL or a DSN, for example: // // - `"postgres://user:pass@localhost:5432/mydb?sslmode=prefer"` connect with tcp and prefer TLS // - `"postgres://user:pass@localhost:5432/mydb?sslmode=disable&search_path=myschema"` connect with tcp, disable TLS and use a custom schema // - `"user=user password=pass host=localhost port=5432 dbname=mydb sslmode=disable"` DSN format ConnectionString string `json:"connection_string,omitempty" jsonschema:"required,minLength=1,example=${POSTGRESQL_CONNECTION_STRING}"` // Available: `error`, `warn`, `info`, `debug`, `trace`. // Defines what [`pgx`](https://github.com/jackc/pgx) call events should be logged. PgxLogLevel LogLevel `json:"pgx_log_level,omitempty" jsonschema:"default=error"` // Maximum number of items that may be grouped together to be written in a single write. BatchSize int `json:"batch_size,omitempty" jsonschema:"minimum=1,default=10000"` // Maximum size of items that may be grouped together to be written in a single write. BatchSizeBytes int `json:"batch_size_bytes,omitempty" jsonschema:"minimum=1,default=100000000"` // Maximum interval between batch writes. BatchTimeout configtype.Duration `json:"batch_timeout,omitempty"` }
func (Spec) JSONSchemaExtend ¶
func (Spec) JSONSchemaExtend(sc *jsonschema.Schema)
func (*Spec) SetDefaults ¶
func (s *Spec) SetDefaults()
Click to show internal directories.
Click to hide internal directories.