Documentation ¶
Index ¶
- func Flatten(tree any) ([][]string, error)
- type Client
- type ConfigService
- func (svc *ConfigService) Delete(ctx context.Context, path string, value ...any) error
- func (svc *ConfigService) LoadFile(ctx context.Context, file string) error
- func (svc *ConfigService) Save(ctx context.Context) error
- func (svc *ConfigService) SaveFile(ctx context.Context, file string) error
- func (svc *ConfigService) Set(ctx context.Context, path string, value any) error
- func (svc *ConfigService) Show(ctx context.Context, path string) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Config *ConfigService // contains filtered or unexported fields }
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func (*ConfigService) Delete ¶
Delete values at the specified path.
If `value` is nil or zero length the whole `path` will be deleted. If `value` is a string it will be directly deleted. For lists maps, and any nesting of those types, each individual value will be deleted in a batch.
func (*ConfigService) LoadFile ¶
func (svc *ConfigService) LoadFile(ctx context.Context, file string) error
Load a configuration file
func (*ConfigService) Save ¶
func (svc *ConfigService) Save(ctx context.Context) error
Save the running configuration to the default startup configuration
func (*ConfigService) SaveFile ¶
func (svc *ConfigService) SaveFile(ctx context.Context, file string) error
Save the running configuration to the specified file
Click to show internal directories.
Click to hide internal directories.