Documentation ¶
Index ¶
Constants ¶
View Source
const ( ReadOnlyPermissionsName = "read-only" ReadWritePermissionsName = "read-write" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actions ¶
type Actions []string
We alias Actions as []string here and implement the UnmarshalJSON interface because AWS IAM policies with a single action are returned with a string, instead of an array with a single element, and Go's type system is no expressive enough to support that.
func (*Actions) UnmarshalJSON ¶
type NoPermissions ¶
type NoPermissions struct{}
func (NoPermissions) Actions ¶
func (NoPermissions) Actions() []string
type Permissions ¶
type Permissions interface {
Actions() []string
}
func ValidatePermissions ¶
func ValidatePermissions(permissionName string) (Permissions, error)
type PolicyDocument ¶
type PolicyDocument struct { Version string `json:"Version"` Statement []Statement `json:"Statement"` }
func BuildPolicy ¶
func BuildPolicy(maybeExistingPolicy string, statement Statement) (PolicyDocument, error)
func RemoveUserFromPolicy ¶
func RemoveUserFromPolicy(existingPolicy string, userArnSuffix string) (PolicyDocument, error)
type PublicBucketPermissions ¶
type PublicBucketPermissions struct{}
func (PublicBucketPermissions) Actions ¶
func (PublicBucketPermissions) Actions() []string
type ReadOnlyPermissions ¶
type ReadOnlyPermissions struct{}
func (ReadOnlyPermissions) Actions ¶
func (ReadOnlyPermissions) Actions() []string
type ReadWritePermissions ¶
type ReadWritePermissions struct{}
func (ReadWritePermissions) Actions ¶
func (ReadWritePermissions) Actions() []string
Click to show internal directories.
Click to hide internal directories.