workspace

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workspace

type Workspace interface {
	// ReadObject reads the provided object from disk.
	ReadObject(context.Context, string, interface{}) error
	// WriteObject writes the provided object to disk.
	WriteObject(context.Context, string, interface{}) error
	// GetWriter returns an os.File as a writer.
	GetWriter(context.Context, string) (io.Writer, error)
	// Walk will traverse the workspace directory.
	Walk(filepath.WalkFunc) error
	// NewDirectory creates a new workspace under the current workspace.
	NewDirectory(string) (Workspace, error)
	// DeleteDirectory will delete a directory under a workspace.
	DeleteDirectory(string) error
	// Path generates a path of a file with the workspace directory.
	Path(...string) string
}

Workspace defines methods for accessing and publishing files in a local context.

func NewLocalWorkspace

func NewLocalWorkspace(dir string) (Workspace, error)

NewLocalWorkspace returns a new local workspace.

Jump to

Keyboard shortcuts

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