feat(session): Add include_termianted option to list endpoint

This commit is contained in:
Timothy Messier committed 2022-06-09 19:28:04 +00:00
1 parent d741034829
commit e79714e93f
8 files changed
+145 -66

No files matched your search

+13
View File
@@ -1,6 +1,7 @@
package sessions
import (
"fmt"
"strconv"
"strings"
@@ -86,3 +87,15 @@ func WithRecursive(recurse bool) Option {
o.withRecursive = true
}
}
func WithIncludeTerminated(inIncludeTerminated bool) Option {
return func(o *options) {
o.queryMap["include_terminated"] = fmt.Sprintf("%v", inIncludeTerminated)
}
}
func DefaultIncludeTerminated() Option {
return func(o *options) {
o.postMap["include_terminated"] = nil
}
}