feat(bsr): add channel request types to chan callbacks

This commit is contained in:
irenarindos authored and Timothy Messier committed 2023-05-31 12:18:15 +00:00
1 parent 7ac73d7ba8
commit 93afd24327
1 file changed
+5 -2
+5 -2
View File
@@ -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