feat(bsr): add channel request types to chan callbacks
This commit is contained in:
1 parent
7ac73d7ba8
commit
93afd24327
1 file changed
+5
-2
@@ -19,15 +19,18 @@ import (
|
||||
type SessionProgram string
|
||||
|
||||
// SessionPrograms
|
||||
// If the channel type is not of type session, then NotApplicable is expected
|
||||
// If the session program is not exec, shell, or subsystem, then None is used
|
||||
const (
|
||||
NotApplicable SessionProgram = "not applicable"
|
||||
None SessionProgram = "none"
|
||||
Exec SessionProgram = "exec"
|
||||
Shell SessionProgram = "shell"
|
||||
Subsystem SessionProgram = "subsystem"
|
||||
)
|
||||
|
||||
// ValidChannelProgram checks if a given SessionProgram is valid.
|
||||
func ValidChannelProgram(d SessionProgram) bool {
|
||||
// ValidSessionProgram checks if a given SessionProgram is valid.
|
||||
func ValidSessionProgram(d SessionProgram) bool {
|
||||
switch d {
|
||||
case Exec, Shell, Subsystem, NotApplicable:
|
||||
return true
|
||||
|
||||
Reference in new issue
Block a user