workspacefile

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreateSchemasDir = errors.New("failed to create or access schemas directory")
	ErrReadJSONFile     = errors.New("failed to read JSON file")
	ErrWriteJSONFile    = errors.New("failed to write JSON to file")
	ErrDeleteJSONFile   = errors.New("failed to delete JSON file")
)

Functions

This section is empty.

Types

type FileHandler added in v0.3.4

type FileHandler struct {
	// contains filtered or unexported fields
}

FileHandler is a simple, concrete file store for schemas. It provides basic Read/Write/Delete operations backed by the local filesystem.

func NewIOHandler

func NewIOHandler(schemasDir string) (*FileHandler, error)

NewIOHandler constructs a concrete FileHandler that stores files under schemasDir.

func (*FileHandler) Delete added in v0.3.4

func (h *FileHandler) Delete(clusterName string) error

Delete removes the schema file for the given cluster name.

func (*FileHandler) Read added in v0.3.4

func (h *FileHandler) Read(clusterName string) ([]byte, error)

Read reads the schema file for the given cluster name (relative path) from the schemasDir.

func (*FileHandler) Write added in v0.3.4

func (h *FileHandler) Write(JSON []byte, clusterName string) error

Write writes the given JSON bytes under the clusterName path, creating subdirectories as needed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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