Documentation
¶
Overview ¶
Package export provides functionality to export data to files.
Index ¶
Constants ¶
View Source
const (
// DefaultFilePermissions defines the default file permissions for exported files.
DefaultFilePermissions = 0o600
)
Variables ¶
View Source
var ( ErrPathNotRegularFile = errors.New("path exists but is not a regular file") ErrEmptyContent = errors.New("cannot export empty content") ErrOperationCancelled = errors.New("operation cancelled by context") )
Define static errors for better error handling.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Operation string // The operation that failed (e.g., "validate_path", "create_directory", "write_file")
Path string // The file path involved in the error
Message string // Human-readable error message
Cause error // The underlying error that caused this export error
}
Error represents an error that occurred during file export operations.
type FileExporter ¶
type FileExporter struct{}
FileExporter is a file exporter for OPNsense configurations.
func NewFileExporter ¶
func NewFileExporter() *FileExporter
NewFileExporter creates and returns a new FileExporter for writing data to files.
Click to show internal directories.
Click to hide internal directories.