mergers

package
v5.0.0-...-470bbe4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllExtensions

func GetAllExtensions() []string

GetAllExtensions get all extensions supported

func GetAllNames

func GetAllNames() []string

GetAllNames get names of all formats

func GetExtensions

func GetExtensions(formatName string) ([]string, error)

GetExtensions get extensions of given format

func Merge

func Merge(input interface{}, m map[string]interface{}) error

Merge loads inputs and merges them into m it detects extension for merger selecting, or try all mergers if no extension found

func MergeAs

func MergeAs(formatName string, input interface{}, m map[string]interface{}) error

MergeAs load input and merge as specified format into m

func RegisterMerger

func RegisterMerger(format *Merger) error

RegisterMerger add a new Merger.

Types

type MergeFunc

type MergeFunc func(input interface{}, m map[string]interface{}) error

MergeFunc is a utility to merge V2Ray config from external source into a map and returns it.

type Merger

type Merger struct {
	Name       string
	Extensions []string
	Merge      MergeFunc
}

Merger is a configurable format merger for V2Ray config files.

Jump to

Keyboard shortcuts

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