pkg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgParser

type CfgParser struct {
	Fs afero.Fs
}

func (CfgParser) BackupFile

func (p CfgParser) BackupFile(file string) error

func (CfgParser) FindDeviceAddresses

func (p CfgParser) FindDeviceAddresses(data string) map[string]string

func (CfgParser) GetMappings

func (c CfgParser) GetMappings(source, dest map[string]string) map[string]string

func (CfgParser) ReadFile

func (p CfgParser) ReadFile(file string) ([]byte, error)

func (CfgParser) RemapDevices

func (c CfgParser) RemapDevices(source string, addrMap map[string]string) string

func (CfgParser) WriteFile

func (p CfgParser) WriteFile(file, data string) error

type IParser

type IParser interface {
	BackupFile(file string) error
	ReadFile(file string) ([]byte, error)
	WriteFile(file, data string) error
	FindDeviceAddresses(data string) map[string]string
	GetMappings(source, dest map[string]string) map[string]string
	RemapDevices(source string, deviceMap map[string]string) string
}

Jump to

Keyboard shortcuts

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