handler

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 7 Imported by: 62

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler represent Handler

func NewHandler

func NewHandler() (*Handler, error)

NewHandler new Handler

func (*Handler) GetCacher

func (h *Handler) GetCacher(cName string) (*cacher.Cacher, error)

GetCacher get Cacher

func (*Handler) GetCachers

func (h *Handler) GetCachers() map[string]*cacher.Cacher

GetCachers get Cachers

func (*Handler) GetCasbinEnforcer

func (h *Handler) GetCasbinEnforcer(ceName string) (*casbin.Enforcer, error)

GetCasbinEnforcer get CasbinEnforcer

func (*Handler) GetDefaultConfig

func (h *Handler) GetDefaultConfig() (*config.Config, error)

GetDefaultConfig get DefaultConfig

func (*Handler) GetGormDB

func (h *Handler) GetGormDB(conName string) (*gorm.DB, error)

GetGormDB get GORM database connection by connection name

func (*Handler) GetGormDBs

func (h *Handler) GetGormDBs() map[string]*gorm.DB

GetGormDBs get Gorm Databases

func (*Handler) GetIndexer

func (h *Handler) GetIndexer(idxName string) (*indexer.Indexer, error)

GetIndexer get Indexer

func (*Handler) GetIndexers

func (h *Handler) GetIndexers() map[string]*indexer.Indexer

GetIndexers get Indexers

func (*Handler) GetSpecificConfig

func (h *Handler) GetSpecificConfig(cfgName string) (interface{}, error)

GetSpecificConfig get specific config by config name

func (*Handler) GetViper added in v0.0.9

func (h *Handler) GetViper(key string) (*viper.Viper, error)

GetViper get viper

func (*Handler) SetCacher

func (h *Handler) SetCacher(cName string, c *cacher.Cacher)

SetCacher set Cacher

func (*Handler) SetCasbinEnforcer

func (h *Handler) SetCasbinEnforcer(ceName string, ce *casbin.Enforcer)

SetCasbinEnforcer set CasbinEnforcer

func (*Handler) SetDefaultConfig

func (h *Handler) SetDefaultConfig(config *config.Config)

SetDefaultConfig set DefaultConfig

func (*Handler) SetGormDB

func (h *Handler) SetGormDB(conName string, dbCon *gorm.DB)

SetGormDB set GORM database connection by connection name

func (*Handler) SetIndexer

func (h *Handler) SetIndexer(idxName string, idx *indexer.Indexer)

SetIndexer set Indexer

func (*Handler) SetSpecificConfig

func (h *Handler) SetSpecificConfig(cfgName string, cfg interface{})

SetSpecificConfig set specific config by config name

func (*Handler) SetViper added in v0.0.9

func (h *Handler) SetViper(key string, v *viper.Viper) error

SetViper set viper

Jump to

Keyboard shortcuts

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