github.com/DataDog/datadog-agent/pkg/security/secl@v0.55.0-devel.0.20240517055856-10c4965fea94/model/usersession/user_session.go (about) 1 // Unless explicitly stated otherwise all files in this repository are licensed 2 // under the Apache License Version 2.0. 3 // This product includes software developed at Datadog (https://www.datadoghq.com/). 4 // Copyright 2016-present Datadog, Inc. 5 6 // Package usersession holds model related to the user session context 7 package usersession 8 9 var ( 10 // UserSessionTypes are the supported user session types 11 UserSessionTypes = map[string]Type{ 12 "unknown": 0, 13 "k8s": 1, 14 } 15 16 // UserSessionTypeStrings is used to 17 UserSessionTypeStrings = map[Type]string{} 18 ) 19 20 // Type is used to identify the User Session type 21 type Type uint8 22 23 func (ust Type) String() string { 24 return UserSessionTypeStrings[ust] 25 } 26 27 // InitUserSessionTypes initializes internal structures for parsing Type values 28 func InitUserSessionTypes() { 29 for k, v := range UserSessionTypes { 30 UserSessionTypeStrings[v] = k 31 } 32 }