loader

package
v0.0.0-...-4cc6d5b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPath       = errors.New("invalid local or remote path")
	ErrInvalidLocalPath  = errors.New("failed to load the local file")
	ErrInvalidRemotePath = errors.New("failed to load the remote file")
	ErrNoFileToLoad      = errors.New("specific loader is not properly configured")
)

Functions

This section is empty.

Types

type GeneralLoader

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

func NewGeneralLoader

func NewGeneralLoader(filePath string) (*GeneralLoader, error)

func (*GeneralLoader) Load

func (l *GeneralLoader) Load(ctx context.Context) ([]byte, error)

type Loader

type Loader interface {
	Load(ctx context.Context) ([]byte, error)
}

type LocalLoader

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

func NewLocalLoader

func NewLocalLoader(path string) *LocalLoader

func (*LocalLoader) Load

func (l *LocalLoader) Load(_ context.Context) ([]byte, error)

type RemoteLoader

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

func NewRemoteLoader

func NewRemoteLoader(path string) *RemoteLoader

func (*RemoteLoader) Load

func (r *RemoteLoader) Load(ctx context.Context) ([]byte, error)

Jump to

Keyboard shortcuts

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