MCPcopy Index your code
hub / github.com/rclone/rclone / NewNameEncryptionMode

Function NewNameEncryptionMode

backend/crypt/cipher.go:90–103  ·  view source on GitHub ↗

NewNameEncryptionMode turns a string into a NameEncryptionMode

(s string)

Source from the content-addressed store, hash-verified

88
89// NewNameEncryptionMode turns a string into a NameEncryptionMode
90func NewNameEncryptionMode(s string) (mode NameEncryptionMode, err error) {
91 s = strings.ToLower(s)
92 switch s {
93 case "off":
94 mode = NameEncryptionOff
95 case "standard":
96 mode = NameEncryptionStandard
97 case "obfuscate":
98 mode = NameEncryptionObfuscated
99 default:
100 err = fmt.Errorf("unknown file name encryption mode %q", s)
101 }
102 return mode, err
103}
104
105// String turns mode into a human-readable string
106func (mode NameEncryptionMode) String() (out string) {

Callers 2

newCipherForConfigFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…