fileprovider

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileProvider

type FileProvider interface {
	List() ([]string, error)

	Get(string) ([]byte, error)
	Put(string, []byte) error
	Delete(string) error
	Rename(string, string) error

	ToInput() (rules.Input, error)
}

type InMemoryFileProvider

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

func NewInMemoryFileProvider

func NewInMemoryFileProvider(files map[string][]byte) *InMemoryFileProvider

func NewInMemoryFileProviderFromFS added in v0.26.0

func NewInMemoryFileProviderFromFS(paths ...string) (*InMemoryFileProvider, error)

func (*InMemoryFileProvider) Delete added in v0.26.0

func (p *InMemoryFileProvider) Delete(file string) error

func (*InMemoryFileProvider) DeletedFiles added in v0.26.0

func (p *InMemoryFileProvider) DeletedFiles() []string

func (*InMemoryFileProvider) Get added in v0.26.0

func (p *InMemoryFileProvider) Get(file string) ([]byte, error)

func (*InMemoryFileProvider) List added in v0.26.0

func (p *InMemoryFileProvider) List() ([]string, error)

func (*InMemoryFileProvider) ModifiedFiles added in v0.26.0

func (p *InMemoryFileProvider) ModifiedFiles() []string

func (*InMemoryFileProvider) Put added in v0.26.0

func (p *InMemoryFileProvider) Put(file string, content []byte) error

func (*InMemoryFileProvider) Rename added in v0.26.0

func (p *InMemoryFileProvider) Rename(from, to string) error

func (*InMemoryFileProvider) ToInput

func (p *InMemoryFileProvider) ToInput() (rules.Input, error)

type RenameConflictError added in v0.28.0

type RenameConflictError struct {
	From string
	To   string
}

func (RenameConflictError) Error added in v0.28.0

func (e RenameConflictError) Error() string

Jump to

Keyboard shortcuts

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