file

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentInfo

type ContentInfo struct {
	Content string
	Path    string
}

type FileProvider

type FileProvider struct {
	OnChanged provider.ChangeFunc
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(opts Options) *FileProvider

func (*FileProvider) Add

func (p *FileProvider) Add(path string)

func (*FileProvider) Open

func (p *FileProvider) Open() ([]*ContentInfo, error)

func (*FileProvider) Reset

func (p *FileProvider) Reset()

func (*FileProvider) SetOnChanged

func (p *FileProvider) SetOnChanged(changeFunc provider.ChangeFunc)

func (*FileProvider) Watch

func (p *FileProvider) Watch() error

type Options

type Options struct {
	Paths      []string `yaml:"paths" json:"paths"`
	Extensions []string `yaml:"extensions" json:"extensions"`
	Watch      bool
	Enabled    bool `yaml:"enabled" json:"enabled"`
}

Jump to

Keyboard shortcuts

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