data

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerTypeID = "rpcImplement"
)

Variables

This section is empty.

Functions

func FindDots

func FindDots(dirs []string) (data []byte, notExistDir []string, err error)

dirs用户传入的数据 返回组件数据、不存在的目录信息包括mod依赖目录、错误信息

func RpcImplementTypeLives

func RpcImplementTypeLives() []*dot.TypeLives

RpcImplementTypeLives make all type lives

Types

type Config

type Config struct {
	Dc *config.Config
}

For storage configuration

func NewConfig

func NewConfig() *Config

Configuring storage object instantiation

func (*Config) ConfLoad

func (sc *Config) ConfLoad(configPaths ...string) (map[string]interface{}, error)

Return loaded data

func (*Config) GetJsonByte

func (sc *Config) GetJsonByte(key string) ([]byte, error)

Get the Json bytes configuration information of this part by key Key uses `.` as an interval to represent hierarchical relationships

func (*Config) LoadConfigFile

func (sc *Config) LoadConfigFile(configPaths ...string) (map[string]interface{}, error)

By default, the configuration file is loaded from the path where the executable is located. It is also possible to load the configuration according to the configPaths parameter passed in by the user. The configPaths passed by the user can be an absolute path or a path relative to the path of the executable file. Support for incoming multiple paths. The priority of the configuration files loading is json > toml > yaml

type FuncOfDot

type FuncOfDot struct {
	FuncName string //函数名
	IsSlice  bool   //返回值是否是数组
	// contains filtered or unexported fields
}

type RpcImplement

type RpcImplement struct {
	ServerNobl gserver.ServerNobl `dot:""`
}

func (*RpcImplement) ExportConfig

func (c *RpcImplement) ExportConfig(_ context.Context, in *rpc.ExportReq) (*rpc.ExportRes, error)

导出配置信息 支持三种格式json toml yaml 由文件名来区分不同格式

func (*RpcImplement) ExportDot

func (c *RpcImplement) ExportDot(_ context.Context, in *rpc.ExportReq) (*rpc.ExportRes, error)

导出组件信息 json

func (*RpcImplement) FindDot

func (c *RpcImplement) FindDot(_ context.Context, in *rpc.FindReq) (*rpc.FindRes, error)

func (*RpcImplement) ImportByConfig

func (c *RpcImplement) ImportByConfig(_ context.Context, im *rpc.ImportReq) (*rpc.ImportRes, error)

支持三种格式json toml yaml

func (*RpcImplement) ImportByDot

func (c *RpcImplement) ImportByDot(_ context.Context, in *rpc.ImportReq) (*rpc.ImportRes, error)

func (*RpcImplement) InitImport

func (c *RpcImplement) InitImport(_ context.Context, im *rpc.ImportReq) (*rpc.ImportRes, error)

获取预置组件

func (*RpcImplement) Start

func (c *RpcImplement) Start(ignore bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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