config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceKey = "config"

Variables

This section is empty.

Functions

func NewService

func NewService(k types.IKernel) types.IKernelService

Types

type Service

type Service struct {
	bases.BaseKernelService
}

func (*Service) Get

func (c *Service) Get(path string) interface{}

Get retrieves the value at the given path from the map.

func (*Service) GetAsInt

func (c *Service) GetAsInt(key string) (int, error)

func (*Service) GetAsString

func (c *Service) GetAsString(key string) (string, error)

func (*Service) GetAsStringOrDefault

func (c *Service) GetAsStringOrDefault(key string, def string) (string, error)

func (*Service) GetCurrent

func (c *Service) GetCurrent() map[string]interface{}

func (*Service) Has

func (c *Service) Has(key string) bool

func (*Service) Init

func (c *Service) Init() error

func (*Service) LoadFromEmbedFS

func (s *Service) LoadFromEmbedFS(folder string, fs *embed.FS) error

func (*Service) Untemplate

func (s *Service) Untemplate(templated []byte, baseRoute string) ([]byte, error)

Jump to

Keyboard shortcuts

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