Documentation
¶
Index ¶
- type EntityType
- type IAM
- func (svc *IAM) Errorf(format string, v ...interface{})
- func (svc *IAM) GetGroup(groupName string) (*SDK.GetGroupOutput, error)
- func (svc *IAM) GetPolicyVersion(arn, versionID string) (*SDK.PolicyVersion, error)
- func (svc *IAM) Infof(format string, v ...interface{})
- func (svc *IAM) ListAllPolicies() ([]Policy, error)
- func (svc *IAM) ListAttachedPolicies() ([]Policy, error)
- func (svc *IAM) ListEntitiesForPolicy(arn string) ([]PolicyEntity, error)
- func (svc *IAM) SetLogger(logger log.Logger)
- type Policy
- type PolicyDocument
- type PolicyEntity
- type Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityType ¶
type EntityType string
EntityType represents entity's type.
func NewEntityTypeGroup ¶
func NewEntityTypeGroup() EntityType
NewEntityTypeGroup returns group's EntityType.
func NewEntityTypeRole ¶
func NewEntityTypeRole() EntityType
NewEntityTypeRole returns role's EntityType.
func NewEntityTypeUser ¶
func NewEntityTypeUser() EntityType
NewEntityTypeUser returns user's EntityType.
type IAM ¶
type IAM struct {
// contains filtered or unexported fields
}
IAM has IAM client.
func (*IAM) GetGroup ¶
func (svc *IAM) GetGroup(groupName string) (*SDK.GetGroupOutput, error)
GetGroup executes GetGroup operation.
func (*IAM) GetPolicyVersion ¶
func (svc *IAM) GetPolicyVersion(arn, versionID string) (*SDK.PolicyVersion, error)
GetPolicyVersion executes GetPolicyVersion operation.
func (*IAM) ListAllPolicies ¶
ListAllPolicies fetches all of the policies list.
func (*IAM) ListAttachedPolicies ¶
ListAttachedPolicies fetches attached policy list.
func (*IAM) ListEntitiesForPolicy ¶
func (svc *IAM) ListEntitiesForPolicy(arn string) ([]PolicyEntity, error)
ListEntitiesForPolicy executes ListEntitiesForPolicy operation.
type Policy ¶
type Policy struct { ARN string PolicyID string PolicyName string VersionID string Description string AttachmentCount int64 CreateDate time.Time UpdateDate time.Time }
Policy contains IAM policy data.
func NewPoilicy ¶
NewPoilicy returns initialized Policy from *SDK.Policy.
func NewPolicies ¶
NewPolicies converts from []*SDK.Policy to []Policy.
type PolicyDocument ¶
type PolicyDocument struct { Version string `json:"Version"` Statement []Statement `json:"Statement"` }
PolicyDocument contains permission data of a policy.
func NewPolicyDocumentFromDocument ¶
func NewPolicyDocumentFromDocument(document string) (PolicyDocument, error)
NewPolicyDocumentFromDocument returns initialized PolicyDocument from response data.
func NewPolicyDocumentFromJSONString ¶
func NewPolicyDocumentFromJSONString(data string) (PolicyDocument, error)
NewPolicyDocumentFromJSONString returns initialized PolicyDocument from JSON data.
func (*PolicyDocument) UnmarshalJSON ¶
func (p *PolicyDocument) UnmarshalJSON(data []byte) error
UnmarshalJSON converts from json to *PolicyDocument.
type PolicyEntity ¶
type PolicyEntity struct { Type EntityType ID string Name string }
PolicyEntity contains Entity's id and name. Entity is User, Group or Role.
func NewPolicyEntityList ¶
func NewPolicyEntityList(o *SDK.ListEntitiesForPolicyOutput) []PolicyEntity
NewPolicyEntityList creates []PolicyEntity from *SDK.ListEntitiesForPolicyOutput.
func (PolicyEntity) IsGroup ¶
func (e PolicyEntity) IsGroup() bool
IsGroup checks this entity is group or not.
func (PolicyEntity) IsRole ¶
func (e PolicyEntity) IsRole() bool
IsRole checks this entity is role or not.
func (PolicyEntity) IsUser ¶
func (e PolicyEntity) IsUser() bool
IsUser checks this entity is user or not.