loader

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* @Descripttion: * @version: * @Author: lfzxs@qq.com * @Date: 2023-06-15 11:25:23 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-06-21 09:58:31

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgItem

type CfgItem struct {
	Key, Value any
}

func MakeCfgItem

func MakeCfgItem(key, value any) CfgItem

type CfgSlice

type CfgSlice []CfgItem

func MapSliceToCfgSlice

func MapSliceToCfgSlice(source yaml.MapSlice) (result CfgSlice)

type LoaderService

type LoaderService interface {
	// 从字节流加载
	LoadFromByte(data []byte) (cfgs CfgSlice, err error)
	// 从资源路径加载
	LoadFromURI(uri string) (cfg CfgSlice, err error)
}

type YmlLoader

type YmlLoader struct {
}

func (*YmlLoader) LoadFromByte

func (sf *YmlLoader) LoadFromByte(data []byte) (cfgs CfgSlice, err error)

func (*YmlLoader) LoadFromURI

func (sf *YmlLoader) LoadFromURI(uri string) (cfg CfgSlice, err error)

Jump to

Keyboard shortcuts

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