Documentation
¶
Overview ¶
Package auth provides authorization management for Dirvana projects.
Index ¶
- type Auth
- func (a *Auth) Allow(path string) error
- func (a *Auth) ApproveShellCommands(dir string, shellCmds map[string]string) error
- func (a *Auth) Clear() error
- func (a *Auth) GetAuth(path string) *DirAuth
- func (a *Auth) IsAllowed(path string) (bool, error)
- func (a *Auth) List() []string
- func (a *Auth) RequiresShellApproval(dir string, shellCmds map[string]string) bool
- func (a *Auth) Revoke(path string) error
- type DirAuth
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth manages project directory authorization and shell command approval
func (*Auth) ApproveShellCommands ¶ added in v0.1.0
ApproveShellCommands saves shell command approval for a directory
func (*Auth) GetAuth ¶ added in v0.1.0
GetAuth returns the DirAuth structure for a given directory path
func (*Auth) RequiresShellApproval ¶ added in v0.1.0
RequiresShellApproval returns true if shell command approval is needed for the directory
type DirAuth ¶ added in v0.1.0
type DirAuth struct {
Allowed bool `json:"allowed"`
AllowedAt time.Time `json:"allowed_at,omitempty"`
ShellCommandsHash string `json:"shell_commands_hash,omitempty"`
ShellApprovedAt time.Time `json:"shell_approved_at,omitempty"`
}
DirAuth stores the authorization state of a directory, including dynamic shell command approval
Click to show internal directories.
Click to hide internal directories.