session

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("session: nil")

Functions

func IsErrNotFound

func IsErrNotFound(err error) bool

func RegisterSetdb

func RegisterSetdb(fn SetdbFunc)

func Setdb

func Setdb(s *Session) error

Types

type Session

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

func New

func New(data []byte) (*Session, error)

func NewWithReader

func NewWithReader(r io.Reader) (*Session, error)

func NewWithViper

func NewWithViper(v *viper.Viper) *Session

func (*Session) AWSSession

func (s *Session) AWSSession() *session.Session

func (*Session) Close

func (s *Session) Close()

func (*Session) Context

func (s *Session) Context() context.Context

func (*Session) Copy

func (s *Session) Copy() *Session

func (*Session) Deadline

func (s *Session) Deadline() (deadline time.Time, ok bool)

Deadline deadline

func (*Session) Done

func (s *Session) Done() <-chan struct{}

func (*Session) Err

func (s *Session) Err() error

func (*Session) IsErrNotFound

func (s *Session) IsErrNotFound(err error) bool

func (*Session) MysqlBegin

func (s *Session) MysqlBegin() *Session

func (*Session) MysqlCommit

func (s *Session) MysqlCommit() *gorm.DB

func (*Session) MysqlRead

func (s *Session) MysqlRead() *gorm.DB

func (*Session) MysqlReadOnWrite

func (s *Session) MysqlReadOnWrite() *Session

func (*Session) MysqlRollback

func (s *Session) MysqlRollback() *gorm.DB

func (*Session) MysqlRollbackUnlessCommitted

func (s *Session) MysqlRollbackUnlessCommitted() *gorm.DB

func (*Session) MysqlWrite

func (s *Session) MysqlWrite() *gorm.DB

func (*Session) Redis

func (s *Session) Redis() *redis.Client

func (*Session) SubViper

func (s *Session) SubViper(key string) *Session

func (*Session) UnmarshalViper

func (s *Session) UnmarshalViper(r interface{}) error

func (*Session) UnmarshalViperWithTag

func (s *Session) UnmarshalViperWithTag(r interface{}, tag string) error

func (*Session) Value

func (s *Session) Value(key interface{}) interface{}

func (*Session) Viper

func (s *Session) Viper() *viper.Viper

func (*Session) WithContext

func (s *Session) WithContext(ctx context.Context) *Session

type SetdbFunc

type SetdbFunc func(db *gorm.DB) error

Jump to

Keyboard shortcuts

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