Documentation ¶
Index ¶
- Variables
- func IsErrNotFound(err error) bool
- func RegisterSetdb(fn SetdbFunc)
- func Setdb(s *Session) error
- type Session
- func (s *Session) AWSSession() *session.Session
- func (s *Session) Close()
- func (s *Session) Context() context.Context
- func (s *Session) Copy() *Session
- func (s *Session) Deadline() (deadline time.Time, ok bool)
- func (s *Session) Done() <-chan struct{}
- func (s *Session) Err() error
- func (s *Session) IsErrNotFound(err error) bool
- func (s *Session) MemoryCache() *cache.Cache
- func (s *Session) MysqlBegin() *Session
- func (s *Session) MysqlCommit() *gorm.DB
- func (s *Session) MysqlRead() *gorm.DB
- func (s *Session) MysqlReadOnWrite() *Session
- func (s *Session) MysqlRollback() *gorm.DB
- func (s *Session) MysqlRollbackUnlessCommitted() *gorm.DB
- func (s *Session) MysqlWrite() *gorm.DB
- func (s *Session) Redis() *redis.Client
- func (s *Session) SubViper(key string) *Session
- func (s *Session) UnmarshalViper(r interface{}) error
- func (s *Session) UnmarshalViperWithTag(r interface{}, tag string) error
- func (s *Session) Value(key interface{}) interface{}
- func (s *Session) Viper() *viper.Viper
- func (s *Session) WithContext(ctx context.Context) *Session
- type SetdbFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("session: nil")
ErrNotFound err not found
Functions ¶
func RegisterSetdb ¶
func RegisterSetdb(fn SetdbFunc)
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session session
func NewWithReader ¶
NewWithReader new session with reader
func (*Session) IsErrNotFound ¶
IsErrNotFound is err not found
func (*Session) MemoryCache ¶ added in v1.0.3
func (s *Session) MemoryCache() *cache.Cache
MemoryCache memory cache
func (*Session) MysqlReadOnWrite ¶
MysqlReadOnWrite mysql all write
func (*Session) MysqlRollback ¶
MysqlRollback mysql rollback
func (*Session) MysqlRollbackUnlessCommitted ¶
MysqlRollbackUnlessCommitted rollback unless committed
func (*Session) UnmarshalViper ¶
UnmarshalViper unmarshal
func (*Session) UnmarshalViperWithTag ¶
UnmarshalViperWithTag unmarshal with tag
Click to show internal directories.
Click to hide internal directories.