Documentation ¶
Index ¶
- Constants
- func New(opts Opts, queryTimeout time.Duration, logger *zap.Logger) (persistence.Persister, error)
- func NewSQLClient(opts Opts, logger *zap.Logger) (*sql.DB, error)
- type Opts
- type Postgres
- func (s *Postgres) Close() error
- func (s *Postgres) Delete(ctx context.Context, key string) error
- func (s *Postgres) Get(ctx context.Context, key string) ([]byte, error)
- func (s *Postgres) List(ctx context.Context, prefix string, opts *persistence.ListOpts) (persistence.ListResult, error)
- func (s *Postgres) Put(ctx context.Context, key string, value []byte) error
- func (s *Postgres) Tx(ctx context.Context) (persistence.Tx, error)
Constants ¶
View Source
const (
DefaultPort = 5432
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) List ¶
func (s *Postgres) List(ctx context.Context, prefix string, opts *persistence.ListOpts) (persistence.ListResult, error, )
Click to show internal directories.
Click to hide internal directories.