db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	User(uid.ID) (types.User, error)
	Log(logrus.Entry) error
	Close() error
}
var BackendToUse Backend

type Redis

type Redis struct {
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis(opt godis.Option) *Redis

func (*Redis) Close

func (r *Redis) Close() error

func (*Redis) Log

func (r *Redis) Log(entry logrus.Entry) error

func (*Redis) User

func (r *Redis) User(id uid.ID) (types.User, error)

type SQL

type SQL struct {
	// contains filtered or unexported fields
}

func NewSQL

func NewSQL(driverName string, dataSourceName string) (SQL, error)

func (SQL) Close

func (S SQL) Close() error

func (SQL) Log

func (S SQL) Log(entry logrus.Entry) error

func (SQL) User

func (S SQL) User(id uid.ID) (types.User, error)

type TestNoSecurity

type TestNoSecurity struct{}

func (TestNoSecurity) Close

func (t TestNoSecurity) Close() error

func (TestNoSecurity) Log

func (t TestNoSecurity) Log(entry logrus.Entry) error

func (TestNoSecurity) User

func (t TestNoSecurity) User(id uid.ID) (types.User, error)

Jump to

Keyboard shortcuts

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