Documentation
¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PermissionStrings = map[Permission]string{ ReadContent: "read_content", UpdateContent: "update_content", InsertContent: "insert_content", ReadComments: "read_comments", InsertComments: "insert_comments", ReadUsersWithEmail: "read_users_with_email", ReadUsersWithoutEmail: "read_users_without_email", } StringToPermission = map[string]Permission{ "read_content": ReadContent, "update_content": UpdateContent, "insert_content": InsertContent, "read_comments": ReadComments, "insert_comments": InsertComments, "read_users_with_email": ReadUsersWithEmail, "read_users_without_email": ReadUsersWithoutEmail, } PermissionIDs = map[Permission]int{ ReadContent: 1, UpdateContent: 2, InsertContent: 3, ReadComments: 4, InsertComments: 5, ReadUsersWithEmail: 6, ReadUsersWithoutEmail: 7, } IdToPermission = map[int]Permission{ 1: ReadContent, 2: UpdateContent, 3: InsertContent, 4: ReadComments, 5: InsertComments, 6: ReadUsersWithEmail, 7: ReadUsersWithoutEmail, } )
Functions ¶
func StatusContains ¶
Types ¶
type Analyzer ¶
func (Analyzer) Type ¶
func (Analyzer) Type() analyzers.AnalyzerType
type HttpStatusTest ¶
type Permission ¶
type Permission int
const ( Invalid Permission = iota ReadContent Permission = iota UpdateContent Permission = iota InsertContent Permission = iota ReadComments Permission = iota InsertComments Permission = iota ReadUsersWithEmail Permission = iota ReadUsersWithoutEmail Permission = iota )
func PermissionFromID ¶
func PermissionFromID(id int) (Permission, error)
PermissionFromID converts an ID to its Permission enum
func PermissionFromString ¶
func PermissionFromString(s string) (Permission, error)
PermissionFromString converts a string representation to its Permission enum
func (Permission) ToID ¶
func (p Permission) ToID() (int, error)
ToID converts a Permission enum to its ID
func (Permission) ToString ¶
func (p Permission) ToString() (string, error)
ToString converts a Permission enum to its string representation
type Scope ¶
type Scope struct { Name string `json:"name"` HttpTest HttpStatusTest `json:"test"` }
type SecretInfo ¶
type SecretInfo struct { Bot *bot WorkspaceUsers []user Permissions []string }
func AnalyzePermissions ¶
func AnalyzePermissions(cfg *config.Config, key string) (*SecretInfo, error)
Click to show internal directories.
Click to hide internal directories.