validator

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoValidSize = errors.New("no valid uid")

	ErrNoValidUID = errors.New("no valid uid")

	ErrNoValidPermission = errors.New("no valid permission")

	ErrNoValidDuration = errors.New("no valid duration")

	ErrNoValidFile = errors.New("no valid file")

	ErrNoValidLogFile = errors.New("no valid log file")

	ErrNoValidPath = errors.New("no valid path")

	ErrNoValidEndpoint = errors.New("no valid s3 endpoint")
	ErrNoValidWebURL   = errors.New("no valid web URL")

	ErrNoValidS3RemotePath = errors.New("no valid s3 remote path")

	ErrNoValidInstanceName = errors.New("no valid instance name")

	ErrNoValidRefreshTokenRenewTime = errors.New("no valid refresh token time duration: min 15min")
	ErrNoValidRcloneMountOption     = errors.New("mount option not valid")
)

Functions

func InstanceName

func InstanceName(url string) (bool, error)

InstanceName checks if the user instance name is valid.

func LocalPath

func LocalPath(localMountPoint string) (bool, error)

LocalPath verify if the path indicated could be a proper mountpoint.

func LogFile

func LogFile(logFilePath string) (bool, error)

LogFile checks if the path indicated for the log file is valid.

func RcloneMountFlags added in v1.3.0

func RcloneMountFlags(flagList string) (bool, error)

RcloneMountFlags checks if the flags are valid rclone mount flags

func RefreshTokenRenew added in v1.0.1

func RefreshTokenRenew(minutes int) (bool, error)

RefreshTokenRenew checks if the number of minutes are valid: minimum is 15min.

func RemotePath

func RemotePath(remotePath string) (bool, error)

RemotePath checks if the remote path is valid (a valid bucket path: /something...).

func S3Endpoint

func S3Endpoint(endpoint string) (bool, error)

S3Endpoint checks if the given endpoint is a valid s3 endpoint.

func WebURL

func WebURL(url string) (bool, error)

WebURL checks if the given URL is a valid Web URL: http://example.com:port

Types

This section is empty.

Jump to

Keyboard shortcuts

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