Documentation ¶
Index ¶
- type EntityType
- type Group
- type IAM
- func (svc *IAM) Errorf(format string, v ...interface{})
- func (svc *IAM) GetGroup(groupName string) (*SDK.GetGroupOutput, error)
- func (svc *IAM) GetGroupPolicyDocument(groupName, policyName string) (*PolicyDocument, error)
- func (svc *IAM) GetPolicyVersion(arn, versionID string) (*SDK.PolicyVersion, error)
- func (svc *IAM) GetRolePolicyDocument(roleName, policyName string) (*PolicyDocument, error)
- func (svc *IAM) GetUserPolicyDocument(userName, policyName string) (*PolicyDocument, 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) ListGroupPolicies(groupName string) ([]string, error)
- func (svc *IAM) ListGroups() ([]Group, error)
- func (svc *IAM) ListRolePolicies(roleName string) ([]string, error)
- func (svc *IAM) ListRoles() ([]Role, error)
- func (svc *IAM) ListUserPolicies(userName string) ([]string, error)
- func (svc *IAM) ListUsers() ([]User, error)
- func (svc *IAM) SetLogger(logger log.Logger)
- type Policy
- type PolicyDocument
- type PolicyEntity
- type Role
- type Statement
- type User
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 Group ¶
Group contains IAM Group data.
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) GetGroupPolicyDocument ¶
func (svc *IAM) GetGroupPolicyDocument(groupName, policyName string) (*PolicyDocument, error)
GetGroupPolicyDocument fetched Statement from user's inline policy.
func (*IAM) GetPolicyVersion ¶
func (svc *IAM) GetPolicyVersion(arn, versionID string) (*SDK.PolicyVersion, error)
GetPolicyVersion executes GetPolicyVersion operation.
func (*IAM) GetRolePolicyDocument ¶
func (svc *IAM) GetRolePolicyDocument(roleName, policyName string) (*PolicyDocument, error)
GetRolePolicyDocument fetched Statement from user's inline policy.
func (*IAM) GetUserPolicyDocument ¶
func (svc *IAM) GetUserPolicyDocument(userName, policyName string) (*PolicyDocument, error)
GetUserPolicyDocument fetched Statement from user's inline policy.
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.
func (*IAM) ListGroupPolicies ¶
ListGroupPolicies fetches inline policies of the user.
func (*IAM) ListGroups ¶
ListGroups fetches all of the group list.
func (*IAM) ListRolePolicies ¶
ListRolePolicies fetches inline policies of the user.
func (*IAM) ListUserPolicies ¶
ListUserPolicies fetches inline policies of the user.
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.
type Role ¶
type Role struct { ARN string RoleID string RoleName string Path string Description string AssumeRolePolicyDocument string CreateDate time.Time }
Role contains IAM Role data.
type Statement ¶
type Statement struct { Sid string `json:"Sid"` Effect string `json:"Effect"` Action []string `json:"Action"` Resource []string `json:"Resource"` }
Statement represents statement of iam policy.
func (*Statement) UnmarshalJSON ¶
UnmarshalJSON converts from json to *Statement.