ichubcontext

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MulanPSL-2.0 Imports: 13 Imported by: 18

Documentation

Index

Constants

View Source
const (
	DEFINE_RULE_PATH = "/config/rule_define/"
	DEFILE_RULE_FILE = "rule_define.ini"
	DAO_RULE_PATH    = "/data/output/dao/"

	//used by data-file
	INPUT_RULE_PATH  = "/data/input/rule/"
	OUTPUT_RULE_PATH = "/data/output/rule/"
)

Variables

View Source
var IchubClient = NewIchubClientService()

Functions

This section is empty.

Types

type IchubClientFactroy

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

func NewIchubClientService

func NewIchubClientService() *IchubClientFactroy

func (*IchubClientFactroy) DbClient

func (this *IchubClientFactroy) DbClient() *database.IchubDbClient

func (*IchubClientFactroy) Esclient

func (this *IchubClientFactroy) Esclient() *ichubelastic.ElasticClient

func (*IchubClientFactroy) GetDB

func (this *IchubClientFactroy) GetDB() *gorm.DB

v suite.dbinst = ichubcontext.IchubClient.IniDbClient().DbClient().Db

func (*IchubClientFactroy) GetDbClientDto

func (this *IchubClientFactroy) GetDbClientDto(dbtype string) *baseconfig.DbClientDto

func (*IchubClientFactroy) GetIchubDbClient

func (this *IchubClientFactroy) GetIchubDbClient(dbtype string) *database.IchubDbClient

func (*IchubClientFactroy) Ini

func (*IchubClientFactroy) IniDbClient

func (this *IchubClientFactroy) IniDbClient() *IchubClientFactroy

func (*IchubClientFactroy) IniDsClient

func (this *IchubClientFactroy) IniDsClient() *IchubClientFactroy

func (*IchubClientFactroy) IniEsClient

func (this *IchubClientFactroy) IniEsClient() *IchubClientFactroy

func (*IchubClientFactroy) IniMysqlClient

func (this *IchubClientFactroy) IniMysqlClient() *IchubClientFactroy

func (*IchubClientFactroy) IniRedisClient

func (this *IchubClientFactroy) IniRedisClient() *IchubClientFactroy

func (*IchubClientFactroy) RedisClient

func (this *IchubClientFactroy) RedisClient() *ichubredis.IchubRedisClient

func (*IchubClientFactroy) SetDbClient

func (this *IchubClientFactroy) SetDbClient(dbClient *database.IchubDbClient)

func (*IchubClientFactroy) SetEsclient

func (this *IchubClientFactroy) SetEsclient(esclient *ichubelastic.ElasticClient)

func (*IchubClientFactroy) SetRedisClient

func (this *IchubClientFactroy) SetRedisClient(redisClient *ichubredis.IchubRedisClient)

type IchubCommonContext

type IchubCommonContext struct {
	basedto.BaseEntity
	Container *dig.Container `json:"-"`

	BasePath       string `json:"base_path"`
	DefineRulePath string `json:"define_rule_path"`
	DefineRuleFile string `json:"define_rule_file"`

	DaoFilePath string `json:"dao_file_path"`

	IchubConfigIni *ichubconfig.IchubConfigIni `json:"="`
	FuncDefineMap  map[string]string           `json:"func_define_map"`

	ApiAll map[string]any `json:"-"`
	// contains filtered or unexported fields
}
var CommonContext *IchubCommonContext = newIchubCommonContext()

func (*IchubCommonContext) CheckConfigFileExist

func (this *IchubCommonContext) CheckConfigFileExist() bool

func (*IchubCommonContext) InRulePath

func (this *IchubCommonContext) InRulePath() string

func (*IchubCommonContext) LoadRuleDefine

func (this *IchubCommonContext) LoadRuleDefine() error

func (*IchubCommonContext) NewContainer

func (this *IchubCommonContext) NewContainer() *dig.Container

func (*IchubCommonContext) OutRulePath

func (this *IchubCommonContext) OutRulePath() string

func (*IchubCommonContext) SetInRulePath

func (this *IchubCommonContext) SetInRulePath(inRulePath string)

func (*IchubCommonContext) SetOutRulePath

func (this *IchubCommonContext) SetOutRulePath(outRulePath string)

func (*IchubCommonContext) WriteDaoFile

func (this *IchubCommonContext) WriteDaoFile(daofile string, content string) error

Jump to

Keyboard shortcuts

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