config

package
v2.3.104 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilFile = fmt.Errorf("no file")
	ErrNoPath  = fmt.Errorf("no file path")
)
View Source
var Replacer = map[string]func() string{
	"___ip_address___":   ipReplacer,
	"___random___":       randomReplacer(16),
	"___random8___":      randomReplacer(8),
	"___random32___":     randomReplacer(32),
	"___random64___":     randomReplacer(64),
	"___project_name___": projectNameReplacer,
}

Functions

func Merge

func Merge(a, b map[string]interface{}) map[string]interface{}

Types

type Json

type Json struct {
	// contains filtered or unexported fields
}

func NewJson

func NewJson(config *JsonConfig) (*Json, error)

func (*Json) Close

func (j *Json) Close() error

func (*Json) Drop

func (j *Json) Drop() error

func (*Json) Lock

func (j *Json) Lock() error

func (*Json) Open

func (j *Json) Open(filePath string) (database.Driver, error)

func (*Json) Run

func (j *Json) Run(migration io.Reader) error

func (*Json) SetVersion

func (j *Json) SetVersion(version int, dirty bool) error

func (*Json) Unlock

func (j *Json) Unlock() error

func (*Json) Version

func (j *Json) Version() (int, bool, error)

type JsonConfig

type JsonConfig struct {
	Path string
}

type Yaml

type Yaml struct {
	// contains filtered or unexported fields
}

func NewYaml

func NewYaml(config *YamlConfig) (*Yaml, error)

func (*Yaml) Close

func (y *Yaml) Close() error

func (*Yaml) Drop

func (y *Yaml) Drop() error

func (*Yaml) Lock

func (y *Yaml) Lock() error

func (*Yaml) Open

func (y *Yaml) Open(filePath string) (database.Driver, error)

func (*Yaml) Run

func (y *Yaml) Run(migration io.Reader) error

func (*Yaml) SetVersion

func (y *Yaml) SetVersion(version int, dirty bool) error

func (*Yaml) Unlock

func (y *Yaml) Unlock() error

func (*Yaml) Version

func (y *Yaml) Version() (int, bool, error)

type YamlConfig

type YamlConfig struct {
	Path string
}

Jump to

Keyboard shortcuts

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