ent

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

type MySQL struct {
	NetworkDB

	SSL SSL `json:"ssl"`
	// contains filtered or unexported fields
}

MySQL options for creating an SQL db.

func (*MySQL) Open

func (m *MySQL) Open(logger log.Logger) (storage.Storage, error)

Open always returns a new in sqlite3 storage.

type NetworkDB

type NetworkDB struct {
	Database string
	User     string
	Password string
	Host     string
	Port     uint16

	ConnectionTimeout int // Seconds

	MaxOpenConns    int // default: 5
	MaxIdleConns    int // default: 5
	ConnMaxLifetime int // Seconds, default: not set
}

NetworkDB contains options common to SQL databases accessed over network.

type Postgres

type Postgres struct {
	NetworkDB

	SSL SSL `json:"ssl"`
}

Postgres options for creating an SQL db.

func (*Postgres) Open

func (p *Postgres) Open(logger log.Logger) (storage.Storage, error)

Open always returns a new in sqlite3 storage.

type SQLite3

type SQLite3 struct {
	File string `json:"file"`
}

SQLite3 options for creating an SQL db.

func (*SQLite3) Open

func (s *SQLite3) Open(logger log.Logger) (storage.Storage, error)

Open always returns a new in sqlite3 storage.

type SSL

type SSL struct {
	Mode   string
	CAFile string
	// Files for client auth.
	KeyFile  string
	CertFile string
}

SSL represents SSL options for network databases.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL