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

pull/3251/head
irenarindos 3 years ago committed by Timothy Messier
parent 7ac73d7ba8
commit 93afd24327
No known key found for this signature in database
GPG Key ID: EFD2F184F7600572

@ -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

Loading…
Cancel
Save