file

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ns *HwConfFile = nil
	Gb *HwConfFile = nil
	Pf *HwJsonFile = nil
	Bs *HwAuthFile = nil
)

Functions

func BsConfigExist

func BsConfigExist() (bool, error)

func CleanAuthFile

func CleanAuthFile() error

func Get

func Get(c any) error

func GetFromDefault added in v1.0.3

func GetFromDefault(region string) (*conf.NsConfig, *conf.PfConfig, error)

func NewViper

func NewViper(dir string, configdefault string, configtype string) *viper.Viper

func Set

func Set(c any) error

func Setup

func Setup(region string, nsdir string, gbdir string, pfdir string, bsdir string) error

Types

type File

type File conf.File

func NewFile

func NewFile(dir string, content []byte) *File

func (*File) Exist

func (f *File) Exist() (bool, error)

func (*File) Read

func (f *File) Read() error

func (*File) Wirte

func (f *File) Wirte() error

type HwAuthFile

type HwAuthFile struct {
	Dir string
}

func (*HwAuthFile) Get

func (c *HwAuthFile) Get(_c *conf.BsConfig) error

func (*HwAuthFile) Set

func (c *HwAuthFile) Set(_c *conf.BsConfig) error

type HwConfFile

type HwConfFile struct {
	Dir   string
	Viper *viper.Viper
}

func (*HwConfFile) Get

func (c *HwConfFile) Get(_c any) error

func (*HwConfFile) Set

func (c *HwConfFile) Set(_c any) error

type HwJsonFile

type HwJsonFile struct {
	Dir     string
	Default string
}

func (*HwJsonFile) Get

func (c *HwJsonFile) Get(_c *conf.PfConfig) error

func (*HwJsonFile) Set

func (c *HwJsonFile) Set(_c *conf.PfConfig) error

Jump to

Keyboard shortcuts

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