file

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: 0BSD Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownProtocol   = errors.New("unknown protocol")
	ErrUnknownMethod     = errors.New("unknown method")
	ErrDuplicateProtocol = errors.New("duplicate protocol")
)
View Source
var ErrFileMethodUndefined = errors.New("file method undefined")

Functions

func NewFileProvider added in v0.0.5

func NewFileProvider(id string, source, destination, hash string, params map[string]interface{}) (types.FileProvider, error)

func RegisterProvider added in v0.0.5

func RegisterProvider(provider types.FileProvider) error

Types

type File

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

func (File) Apply

func (f File) Apply(ctx context.Context) (types.Result, error)

func (File) Methods

func (f File) Methods() (string, []string)

func (File) Parse

func (f File) Parse(id, method string, params map[string]interface{}) (types.RecipeCooker, error)

TODO error check, set id, properly parse

func (File) Properties

func (f File) Properties() (map[string]interface{}, error)

func (File) PropertiesForMethod

func (f File) PropertiesForMethod(method string) (map[string]string, error)

func (File) Test

func (f File) Test(ctx context.Context) (types.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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