gocontext

package
v0.0.0-...-e3601d1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MulanPSL-2.0 Imports: 21 Imported by: 14

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

This section is empty.

Functions

func InjectGoClientFactroy

func InjectGoClientFactroy(s *GoClientFactroy)

func InjectGoRulefileCtx

func InjectGoRulefileCtx(s *GoRulefileCtx)

func LoadGoClientFactroy

func LoadGoClientFactroy() baseiface.ISingleton

func LoadGoRulefileCtx

func LoadGoRulefileCtx() baseiface.ISingleton

Types

type GoClientFactroy

type GoClientFactroy struct {
	basedto.BaseEntitySingle

	SessionManager *gsession.Manager
	// contains filtered or unexported fields
}

func FindBeanGoClientFactroy

func FindBeanGoClientFactroy() *GoClientFactroy

func NewIchubClientFactroy

func NewIchubClientFactroy() *GoClientFactroy

func (*GoClientFactroy) DbClient

func (this *GoClientFactroy) DbClient() *database.DbClient

func (*GoClientFactroy) Esclient

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

func (*GoClientFactroy) FindConfig

func (this *GoClientFactroy) FindConfig(env string) *ichubconfig.IchubConfig

func (*GoClientFactroy) GetDB

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

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

func (*GoClientFactroy) GetDbClientDto

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

func (*GoClientFactroy) GetIchubDbClient

func (this *GoClientFactroy) GetIchubDbClient(dbtype string) *database.DbClient

func (*GoClientFactroy) GetNatsDto

func (this *GoClientFactroy) GetNatsDto() *baseconfig.NatsClientDto

func (*GoClientFactroy) Gocache

func (this *GoClientFactroy) Gocache(env string) (*ichubconfig.IchubConfig, bool)

func (*GoClientFactroy) Gredis

func (this *GoClientFactroy) Gredis() *gredis.Redis

func (*GoClientFactroy) IchubConfig

func (this *GoClientFactroy) IchubConfig() *ichubconfig.IchubConfig

func (*GoClientFactroy) Ini

func (this *GoClientFactroy) Ini() *GoClientFactroy

func (*GoClientFactroy) IniDbClient

func (this *GoClientFactroy) IniDbClient() *GoClientFactroy

func (*GoClientFactroy) IniDsClient

func (this *GoClientFactroy) IniDsClient() *GoClientFactroy

func (*GoClientFactroy) IniEsClient

func (this *GoClientFactroy) IniEsClient() *GoClientFactroy

func (*GoClientFactroy) IniGredisClient

func (this *GoClientFactroy) IniGredisClient() *GoClientFactroy

func (*GoClientFactroy) IniMysqlClient

func (this *GoClientFactroy) IniMysqlClient() *GoClientFactroy

func (*GoClientFactroy) IniRedisClient

func (this *GoClientFactroy) IniRedisClient() *GoClientFactroy

func (*GoClientFactroy) IniSessionManager

func (this *GoClientFactroy) IniSessionManager() *GoClientFactroy

func (*GoClientFactroy) MakeConfigAgg

func (this *GoClientFactroy) MakeConfigAgg() *configdomain.ConfigAgg

func (*GoClientFactroy) RedisClient

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

func (*GoClientFactroy) RegisterEncDec

func (this *GoClientFactroy) RegisterEncDec(encdec baseiface.IEncDec) *GoClientFactroy

func (*GoClientFactroy) SetDbClient

func (this *GoClientFactroy) SetDbClient(dbClient *database.DbClient)

func (*GoClientFactroy) SetEsclient

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

func (*GoClientFactroy) SetGredis

func (this *GoClientFactroy) SetGredis(gredis *gredis.Redis)

func (*GoClientFactroy) SetIchubConfig

func (this *GoClientFactroy) SetIchubConfig(ichubConfig *ichubconfig.IchubConfig)

func (*GoClientFactroy) SetRedisClient

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

type GoRulefileCtx

type GoRulefileCtx struct {
	basedto.BaseEntitySingle `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 *goinicfg.GoiniConfig `json:"="`
	FuncDefineMap  map[string]string     `json:"func_define_map"`

	ApiAll map[string]any `json:"-"`
	// contains filtered or unexported fields
}

func FindBeanGoRulefileCtx

func FindBeanGoRulefileCtx() *GoRulefileCtx

func (*GoRulefileCtx) CheckConfigFileExist

func (self *GoRulefileCtx) CheckConfigFileExist() bool

func (*GoRulefileCtx) InRulePath

func (self *GoRulefileCtx) InRulePath() string

func (*GoRulefileCtx) LoadRule

func (self *GoRulefileCtx) LoadRule() (map[string]string, error)

func (*GoRulefileCtx) LoadRuleDefine

func (self *GoRulefileCtx) LoadRuleDefine() error

func (*GoRulefileCtx) OutRulePath

func (self *GoRulefileCtx) OutRulePath() string

func (*GoRulefileCtx) SetInRulePath

func (self *GoRulefileCtx) SetInRulePath(inRulePath string)

func (*GoRulefileCtx) SetOutRulePath

func (self *GoRulefileCtx) SetOutRulePath(outRulePath string)

func (*GoRulefileCtx) WriteDaoFile

func (self *GoRulefileCtx) WriteDaoFile(daofile string, content string) error

Jump to

Keyboard shortcuts

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