entity

package
v0.0.0-...-e8f5a11 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFromString

func FormatFromString(formatStr string) config.Format

FormatFromString turns formatStr, typically a file extension without any ".", into a Format. It returns an empty string for unknown formats.

func UnmarshalTo

func UnmarshalTo(data []byte, f config.Format, v any) error

UnmarshalTo unmarshal data in format f into v.

Types

type Config

type Config struct {
	valueobject.DefaultConfigProvider
	// contains filtered or unexported fields
}

func (*Config) Languages

func (c *Config) Languages() []config.Language

func (*Config) SetDefault

func (c *Config) SetDefault()

func (*Config) SetLanguages

func (c *Config) SetLanguages(languages []config.Language)

func (*Config) SetRoot

func (c *Config) SetRoot(m map[string]any)

type ConfigLoader

type ConfigLoader struct {
	Path string
}

func (*ConfigLoader) LoadConfigFromDisk

func (c *ConfigLoader) LoadConfigFromDisk() (map[string]any, error)

Jump to

Keyboard shortcuts

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