durable

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allow

func Allow(key string) bool

Types

type Database

type Database struct {
	*sql.DB
}

func NewDatabase

func NewDatabase(ctx context.Context, db *sql.DB) (*Database, error)

func (*Database) RunInTransaction

func (d *Database) RunInTransaction(ctx context.Context, fn func(ctx context.Context, tx *sql.Tx) error) error

type Logger

type Logger struct{}

func BuildLogger

func BuildLogger() *Logger

func (*Logger) Debug

func (logger *Logger) Debug(v ...interface{})

func (*Logger) Debugf

func (logger *Logger) Debugf(format string, v ...interface{})

func (*Logger) Error

func (logger *Logger) Error(v ...interface{})

func (*Logger) Errorf

func (logger *Logger) Errorf(format string, v ...interface{})

func (*Logger) Info

func (logger *Logger) Info(v ...interface{})

func (*Logger) Infof

func (logger *Logger) Infof(format string, v ...interface{})

func (*Logger) Panicln

func (logger *Logger) Panicln(v ...interface{})

type LoggerClient

type LoggerClient struct{}

func NewLoggerClient

func NewLoggerClient() *LoggerClient

type Row

type Row interface {
	Scan(dest ...interface{}) error
}

Jump to

Keyboard shortcuts

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