Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AllowReadParent allows reading files from parent directories. AllowReadParent = "read:parent" // AllowReadRemote allows reading files from remote sources. AllowReadRemote = "read:remote" // AllowRunExec allows executing commands. AllowRunExec = "run:exec" //nostyle:repetition // DenyReadParent denies reading files from parent directories. DenyReadParent = "!read:parent" // DenyReadRemote denies reading files from remote sources. DenyReadRemote = "!read:remote" // DenyRunExec denies executing commands. DenyRunExec = "!run:exec" //nostyle:repetition )
Variables ¶
View Source
var ErrInvalidScope = errors.New("invalid scope") //nostyle:repetition
ErrInvalidScope is returned when an invalid scope is provided.
View Source
var Global = &Scopes{ readParent: false, readRemote: false, runExec: false, }
Global is the global scopes instance.
Functions ¶
func IsReadParentAllowed ¶
func IsReadParentAllowed() bool
IsReadParentAllowed returns whether reading files from parent directories is allowed.
func IsReadRemoteAllowed ¶
func IsReadRemoteAllowed() bool
IsReadRemoteAllowed returns whether reading files from remote sources is allowed.
func IsRunExecAllowed ¶
func IsRunExecAllowed() bool
IsRunExecAllowed returns whether executing commands is allowed.
Types ¶
Click to show internal directories.
Click to hide internal directories.