Versions in this module Expand all Collapse all v0 v0.2.0 Jul 30, 2021 Changes in this version + const AlertActive + const AlertApplying + const AlertFixed + const AlertIgnored + const PolicyStatusActive + const PolicyStatusResolved + func GetRoleOrUserNameFromARN(arn string) (string, error) + func PolicyStatusIsValid(status string) bool + type AWSAction struct + Enabled bool + Event AWSEvent + HasRecommendations bool + ID string + PolicyID string + Recommendations []Advice + Resources []Resource + SelectedAdvisoryID string + Status string + Time time.Time + func (a *AWSAction) GetSelectedAdvisory() Advice + func (a *AWSAction) SelectAdvisory(id string) error + type AWSData struct + ExceptionCode string + ExceptionMessage string + Operation string + Parameters map[string]interface{} + Region string + Service string + type AWSEvent struct + Data AWSData + Identity AWSIdentity + Time string + type AWSIAMPolicy struct + Id *string + Statement []AWSIAMStatement + Version string + type AWSIAMPrincipal struct + AWS string + type AWSIAMStatement struct + Action []string + Effect string + Principal *AWSIAMPrincipal + Resource []string + Sid string + type AWSIdentity struct + Account string + Role string + User string + type Advice interface + Apply func(log *zap.SugaredLogger) error + Details func() RecommendationDetails + GetID func() string + type AdviceFactory = func(e AWSEvent) (Advice, error) + func GetJSONAdvice(r JSONPolicyParams) AdviceFactory + type Advisor struct + AlertsMapping map[string][]AdviceFactory + func NewAdvisor() *Advisor + func (a *Advisor) Advise(e AWSEvent) ([]Advice, error) + type Description struct + AppliedTo string + Policy interface{} + Type string + type JSONAdvice struct + AWSPolicy AWSIAMPolicy + Comment string + ID string + Resources []Resource + RoleName string + func (a *JSONAdvice) Apply(log *zap.SugaredLogger) error + func (a *JSONAdvice) Details() RecommendationDetails + func (a *JSONAdvice) GetID() string + type JSONPolicyParams struct + Comment string + DocLink string + Policy []Statement + type KMSRecommendation struct + AccountID string + Comment string + ID string + KeyARN string + RoleARN string + func (r *KMSRecommendation) Apply(log *zap.SugaredLogger) error + func (r *KMSRecommendation) Details() RecommendationDetails + func (r *KMSRecommendation) GetID() string + type Policy struct + Document AWSIAMPolicy + EventCount int + ID string + Identity AWSIdentity + LastUpdated time.Time + Status string + Token tokens.Token + func (p *Policy) RecalculateDocument(actions []AWSAction) + type RecommendationDetails struct + Comment string + Description []Description + ID string + Resources []Resource + type Resource struct + ID string + Name string + type Statement struct + Action []string + Resource []string v0.1.0 May 20, 2021