mountpoint

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArgForeground      = "--foreground"
	ArgReadOnly        = "--read-only"
	ArgAllowOther      = "--allow-other"
	ArgAllowRoot       = "--allow-root"
	ArgRegion          = "--region"
	ArgCache           = "--cache"
	ArgUserAgentPrefix = "--user-agent-prefix"
	ArgAWSMaxAttempts  = "--aws-max-attempts"
	ArgGid             = "--gid"
	ArgDirMode         = "--dir-mode"
	ArgFileMode        = "--file-mode"
)
View Source
const ArgNoValue = ""

A value to use in arguments without any value, i.e., an option.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgKey

type ArgKey = string

An ArgKey represents the key of an argument.

type ArgValue

type ArgValue = string

An ArgValue represents the value of an argument.

type Args

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

An Args represents arguments to be passed to Mountpoint during mount.

func ParseArgs

func ParseArgs(passedArgs []string) Args

ParseArgs parses given list of unnormalized and returns a normalized Args.

func (*Args) Has

func (a *Args) Has(key ArgKey) bool

Has returns whether given key exists in Args.

func (*Args) Remove

func (a *Args) Remove(key ArgKey) (ArgValue, bool)

Remove removes given key, it returns the key's value and whether the key was found.

func (*Args) Set

func (a *Args) Set(key ArgKey, value ArgValue)

Set sets or replaces value of given key.

func (*Args) SetIfAbsent

func (a *Args) SetIfAbsent(key ArgKey, value ArgValue)

SetIfAbsent sets value of given key only if that key does not exist.

func (*Args) SortedList

func (a *Args) SortedList() []string

SortedList returns ordered list of normalized arguments.

func (*Args) Value

func (a *Args) Value(key ArgKey) (ArgValue, bool)

Value extracts value of given key, it returns extracted value and whether the key was found.

Jump to

Keyboard shortcuts

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