Documentation
¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PermissionStrings = map[Permission]string{ Read: "read", Write: "write", FullAccess: "full_access", } StringToPermission = map[string]Permission{ "read": Read, "write": Write, "full_access": FullAccess, } PermissionIDs = map[Permission]int{ Read: 1, Write: 2, FullAccess: 3, } IdToPermission = map[int]Permission{ 1: Read, 2: Write, 3: FullAccess, } )
Functions ¶
func AnalyzeAndPrintPermissions ¶ added in v3.80.5
Types ¶
type Analyzer ¶ added in v3.80.5
func (Analyzer) Type ¶ added in v3.80.5
func (Analyzer) Type() analyzers.AnalyzerType
type Domain ¶
type Domain struct { ID string `json:"id"` URL string `json:"name"` IsDisabled bool `json:"is_disabled"` Type string `json:"type"` State string `json:"state"` CreatedAt string `json:"created_at"` }
Domain is a single mailgun domain details
type DomainsJSON ¶
DomainsJSON is /domains API response
type Key ¶ added in v3.88.7
type Key struct { ID string `json:"id"` Requester string `json:"requestor"` UserName string `json:"user_name"` Role string `json:"role"` Type string `json:"kind"` ExpiresAt string `json:"expires_at"` }
Key is a single mailgun Key details
type Permission ¶ added in v3.82.2
type Permission int
const ( Invalid Permission = iota Read Permission = iota Write Permission = iota FullAccess Permission = iota )
func PermissionFromID ¶ added in v3.82.2
func PermissionFromID(id int) (Permission, error)
PermissionFromID converts an ID to its Permission enum
func PermissionFromString ¶ added in v3.82.2
func PermissionFromString(s string) (Permission, error)
PermissionFromString converts a string representation to its Permission enum
func (Permission) ToID ¶ added in v3.82.2
func (p Permission) ToID() (int, error)
ToID converts a Permission enum to its ID
func (Permission) ToString ¶ added in v3.82.2
func (p Permission) ToString() (string, error)
ToString converts a Permission enum to its string representation
type SecretInfo ¶ added in v3.88.7
type SecretInfo struct { ID string // key id UserName string Type string // type of key Role string // key role ExpiresAt string // key expiry time if any Domains []Domain }
func AnalyzePermissions ¶
func AnalyzePermissions(cfg *config.Config, apiKey string) (*SecretInfo, error)
Click to show internal directories.
Click to hide internal directories.