metactx

package
v1.0.2-dev-10 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MulanPSL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetaCtxInst = NewMetaCtx()

@Title 文件名称: metadata_context.go @Description 描述: 元数据--字典

@Author 作者: leijianming@163.com 时间(2024-01-31 22:38:21) @Update 作者: leijianming@163.com 时间(2024-01-31 22:38:21)

Functions

This section is empty.

Types

type MetaCtx

type MetaCtx struct {
	DbType string `json:"db_type"`
	// contains filtered or unexported fields
}

func NewMetaCtx

func NewMetaCtx() *MetaCtx

func (*MetaCtx) FindEsType

func (this *MetaCtx) FindEsType(fieldType string) (goType string)

func (*MetaCtx) FindGoType

func (this *MetaCtx) FindGoType(fieldType string) (pbType string)

func (*MetaCtx) FindProtoType

func (this *MetaCtx) FindProtoType(fieldType string) (goType string)

func (*MetaCtx) Mysql

func (this *MetaCtx) Mysql() bool

type MetaCtxMysql

type MetaCtxMysql struct {
	Db2GoMap    map[string]string `json:"db2gomap"`    /*创建集合 */
	Db2ProtoMap map[string]string `json:"db2protomap"` /*创建集合 */
	Db2EsMap    map[string]string `json:"-"`
}

原文链接:https://blog.csdn.net/PacosonSWJTU/article/details/127200021

func DefaultMysql

func DefaultMysql() *MetaCtxMysql

func (*MetaCtxMysql) FindEsType

func (this *MetaCtxMysql) FindEsType(fieldType string) (esType string)

func (*MetaCtxMysql) FindGoType

func (this *MetaCtxMysql) FindGoType(fieldType string) (goType string)

func (*MetaCtxMysql) FindProtoType

func (this *MetaCtxMysql) FindProtoType(fieldType string) (pbType string)

type MetaCtxPostgres

type MetaCtxPostgres struct {
	DbType2GoMap    map[string]string `json:"dbtype_2_gomap"`    /*创建集合 */
	DbType2ProtoMap map[string]string `json:"dbtype_2_protomap"` /*创建集合 */
	Db2EsMap        map[string]string `json:"db_2_esmap"`
}

func DefaultPosygres

func DefaultPosygres() *MetaCtxPostgres

func (*MetaCtxPostgres) FindEsType

func (this *MetaCtxPostgres) FindEsType(fieldType string) (esType string)

func (*MetaCtxPostgres) FindGoType

func (this *MetaCtxPostgres) FindGoType(fieldType string) (goType string)

func (*MetaCtxPostgres) FindProtoType

func (this *MetaCtxPostgres) FindProtoType(fieldType string) (pbType string)

Jump to

Keyboard shortcuts

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