Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Path string
}
Config represents the configuration for file reader Path is the base path for the file reader
type FileConfigReader ¶
type FileConfigReader struct {
// contains filtered or unexported fields
}
func NewFileConfigReader ¶
func NewFileConfigReader(config *Config) *FileConfigReader
func (*FileConfigReader) Read ¶
func (a *FileConfigReader) Read(ctx context.Context, path string, conf any, configFormat ...common.ConfigFormatType) error
Read reads the configuration from the file path : path in file to read the configuration from conf : configuration object to unmarshal the data into configFormat : format of the configuration data returns error if any returns nil if successful
func (*FileConfigReader) Update ¶
func (a *FileConfigReader) Update(ctx context.Context, path string, conf any, configFormat ...common.ConfigFormatType) error
Update updates the configuration in the file path : path in file to update the configuration conf : configuration object to marshal the data from configFormat : format of the configuration data returns error if any returns nil if successful
Click to show internal directories.
Click to hide internal directories.