input

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 7 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SecureInput

func SecureInput(input string) string

SecureInput ...

func ValidateIfDirExists

func ValidateIfDirExists(input string) error

ValidateIfDirExists ...

func ValidateIfNotEmpty

func ValidateIfNotEmpty(input string) error

ValidateIfNotEmpty ...

func ValidateIfPathExists

func ValidateIfPathExists(input string) error

ValidateIfPathExists ...

func ValidateInt

func ValidateInt(input string) (int, error)

ValidateInt ...

func ValidateWithOptions

func ValidateWithOptions(value string, options ...string) error

ValidateWithOptions ...

Types

type FileDownloader

type FileDownloader interface {
	Get(destination, source string) error
	GetRemoteContents(source string) ([]byte, error)
	ReadLocalFile(path string) ([]byte, error)
}

FileDownloader ..

type FileProvider

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

FileProvider supports retrieving the local path to a file either provided as a local path using `file://` scheme or downloading the file to a temporary location and return the path to it.

func NewFileProvider

func NewFileProvider(filedownloader FileDownloader) FileProvider

NewFileProvider ...

func (FileProvider) Contents

func (fileProvider FileProvider) Contents(srcPath string) ([]byte, error)

Contents returns the contents of remote or local URL

func (FileProvider) LocalPath

func (fileProvider FileProvider) LocalPath(path string) (string, error)

LocalPath ...

Jump to

Keyboard shortcuts

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