permissions

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPermissionsFromFile

func NewPermissionsFromFile(file string, period time.Duration) sshd.Permissions

Types

type Permission

type Permission struct {
	Default bool     `json:"default,omitempty"`
	Allows  []string `json:"allows,omitempty"`
	Blocks  []string `json:"blocks,omitempty"`
}

func (Permission) Allow

func (p Permission) Allow(req string, args string) bool

type Permissions

type Permissions map[string]Permission

func (Permissions) Allow

func (p Permissions) Allow(req string, args string) bool

type PermissionsFromFile

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

func (*PermissionsFromFile) Allow

func (s *PermissionsFromFile) Allow(req string, args string) bool

Jump to

Keyboard shortcuts

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