Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigData ¶
ConfigData holds all sections and their ordering
type ConfigTag ¶ added in v0.9.6
type ConfigTag struct { Type PropertyType Key string Required bool MinLength *int MaxLength *int IsID bool // New field to mark which field is the section ID }
ConfigTag represents the parsed configuration tags from struct fields
type FileMutexManager ¶ added in v0.9.2
type FileMutexManager struct {
// contains filtered or unexported fields
}
func NewFileMutexManager ¶ added in v0.9.2
func NewFileMutexManager() *FileMutexManager
func (*FileMutexManager) WithReadLock ¶ added in v0.9.2
func (fm *FileMutexManager) WithReadLock(path string, fn func() error) error
func (*FileMutexManager) WithWriteLock ¶ added in v0.9.2
func (fm *FileMutexManager) WithWriteLock(path string, fn func() error) error
type PropertyType ¶
type PropertyType string
PropertyType represents the type of a configuration property
const ( TypeString PropertyType = "string" TypeInt PropertyType = "int" TypeBool PropertyType = "bool" TypeArray PropertyType = "array" TypeObject PropertyType = "object" )
type SectionConfig ¶
type SectionConfig[T any] struct { // contains filtered or unexported fields }
func NewSectionConfig ¶
func NewSectionConfig[T any](plugin *SectionPlugin[T]) *SectionConfig[T]
func (*SectionConfig[T]) Parse ¶
func (sc *SectionConfig[T]) Parse(filename string) (*ConfigData[T], error)
Parse reads and parses a configuration file
func (*SectionConfig[T]) Write ¶
func (sc *SectionConfig[T]) Write(config *ConfigData[T]) error
Click to show internal directories.
Click to hide internal directories.