storage

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Manager

type Manager struct {
	sync.Map
}

func (*Manager) Get

func (m *Manager) Get(component string) storage.Storage

func (*Manager) New

func (m *Manager) New(component string)

type Storage

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

func (*Storage) GetDB

func (s *Storage) GetDB(readOnly ...bool) *gorm.DB

func (*Storage) GetESv6

func (s *Storage) GetESv6() *es6.Client

func (*Storage) GetESv7

func (s *Storage) GetESv7() *es7.Client

func (*Storage) GetRedis

func (s *Storage) GetRedis(key interface{}) redis.Cmdable

func (*Storage) GetRedisz

func (s *Storage) GetRedisz() []redis.Cmdable

func (*Storage) InitDB

func (s *Storage) InitDB(configs []storage.Config, opts ...storage.SQLOption) error

func (*Storage) InitElasticSearch

func (s *Storage) InitElasticSearch(config storage.Config, opts ...storage.ElasticOption) error

func (*Storage) InitRedis

func (s *Storage) InitRedis(configs []storage.Config, opts ...storage.RedisOption) error

Jump to

Keyboard shortcuts

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