postgres

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Db   string
	Host string
	Pass string
	Port string
	User string
}

func DefaultConfig

func DefaultConfig() *Config

type Postgres

type Postgres interface {
	Open() error
	Close()

	Migrate(model interface{}) error
	Create(model interface{})
	Read(model, cond, value interface{})
	Update(model interface{}, column string, value interface{})
	Delete(model, cond, value interface{})
}

func New

func New(_ context.Context, config *Config) Postgres

Jump to

Keyboard shortcuts

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