Documentation ¶
Index ¶
- func Contains(slice []string, item string) bool
- func Decode(value []byte) ([]byte, error)
- func Encode(value []byte) []byte
- func NewResourceError(msg string, resource string, err error) error
- func ParseString(s string) bool
- func Provider() terraform.ResourceProvider
- type BucketPolicy
- type ConditionKeyMap
- type ConditionMap
- type Error
- type IAMPolicyDoc
- type IAMPolicyStatement
- type IAMPolicyStatementCondition
- type IAMPolicyStatementConditionSet
- type Princ
- type ResponseError
- type S3MinioBucket
- type S3MinioClient
- type S3MinioConfig
- type S3MinioIAMGroupAttachmentConfig
- type S3MinioIAMGroupConfig
- type S3MinioIAMGroupMembershipConfig
- type S3MinioIAMGroupPolicyConfig
- type S3MinioIAMPolicyConfig
- type S3MinioIAMUserConfig
- type Stmt
- type UserStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceError ¶
NewResourceError creates a new error with the given msg argument.
Types ¶
type BucketPolicy ¶
type BucketPolicy struct { Version string `json:",omitempty"` ID string `json:",omitempty"` Statements []Stmt `json:"Statement"` }
BucketPolicy defines bucket policy
func PublicPolicy ¶
func PublicPolicy(bucket *S3MinioBucket) BucketPolicy
PublicPolicy returns readonly policy
func ReadOnlyPolicy ¶
func ReadOnlyPolicy(bucket *S3MinioBucket) BucketPolicy
ReadOnlyPolicy returns readonly policy
func ReadWritePolicy ¶
func ReadWritePolicy(bucket *S3MinioBucket) BucketPolicy
ReadWritePolicy returns readonly policy
func WriteOnlyPolicy ¶
func WriteOnlyPolicy(bucket *S3MinioBucket) BucketPolicy
WriteOnlyPolicy returns writeonly policy
type ConditionKeyMap ¶
ConditionKeyMap - map of policy condition key and value.
func CopyConditionKeyMap ¶
func CopyConditionKeyMap(condKeyMap ConditionKeyMap) ConditionKeyMap
CopyConditionKeyMap - returns new copy of given ConditionKeyMap.
func (ConditionKeyMap) Add ¶
func (ckm ConditionKeyMap) Add(key string, value set.StringSet)
Add - adds key and value. The value is appended If key already exists.
func (ConditionKeyMap) Remove ¶
func (ckm ConditionKeyMap) Remove(key string, value set.StringSet)
Remove - removes value of given key. If key has empty after removal, the key is also removed.
func (ConditionKeyMap) RemoveKey ¶
func (ckm ConditionKeyMap) RemoveKey(key string)
RemoveKey - removes key and its value.
type ConditionMap ¶
type ConditionMap map[string]ConditionKeyMap
ConditionMap - map of condition and conditional values.
func (ConditionMap) Add ¶
func (cond ConditionMap) Add(condKey string, condKeyMap ConditionKeyMap)
Add - adds condition key and condition value. The value is appended if key already exists.
func (ConditionMap) Remove ¶
func (cond ConditionMap) Remove(condKey string)
Remove - removes condition key and its value.
type Error ¶
type Error struct {
Message string
}
Error represents a basic error that implies the error interface.
type IAMPolicyDoc ¶
type IAMPolicyDoc struct { Version string `json:"Version,omitempty"` ID string `json:"Id,omitempty"` Statements []*IAMPolicyStatement `json:"Statement"` }
IAMPolicyDoc returns IAM policy
type IAMPolicyStatement ¶
type IAMPolicyStatement struct { Sid string Effect string `json:",omitempty"` Actions interface{} `json:"Action,omitempty"` Resources interface{} `json:"Resource,omitempty"` Principal string `json:"Principal,omitempty"` Conditions interface{} `json:"Condition,omitempty"` }
IAMPolicyStatement returns IAM policy statement
type IAMPolicyStatementCondition ¶
type IAMPolicyStatementCondition struct { Test string `json:"-"` Variable string `json:"-"` Values interface{} }
IAMPolicyStatementCondition returns IAM policy condition
type IAMPolicyStatementConditionSet ¶
type IAMPolicyStatementConditionSet []IAMPolicyStatementCondition
IAMPolicyStatementConditionSet returns IAM policy condition set
type Princ ¶
type Princ struct { AWS set.StringSet `json:"AWS,omitempty"` CanonicalUser set.StringSet `json:"CanonicalUser,omitempty"` }
Princ defines policy princ
type ResponseError ¶
type ResponseError struct { Code string `json:"Code,omitempty"` Message string `json:"Message,omitempty"` BucketName string `json:"BucketName,omitempty"` Region string `json:"Region,omitempty"` }
ResponseError handles error message
type S3MinioBucket ¶
type S3MinioBucket struct { MinioClient *minio.Client MinioAdmin *madmin.AdminClient MinioRegion string MinioBucket string MinioBucketPrefix string MinioACL string MinioAccess string MinioForceDestroy bool }
S3MinioBucket defines minio config
func BucketConfig ¶
func BucketConfig(d *schema.ResourceData, meta interface{}) *S3MinioBucket
BucketConfig creates a new config for minio buckets
type S3MinioClient ¶
type S3MinioClient struct { S3UserAccess string S3Region string S3Client *minio.Client S3Admin *madmin.AdminClient }
S3MinioClient defines default minio
type S3MinioConfig ¶
type S3MinioConfig struct { S3HostPort string S3UserAccess string S3UserSecret string S3Region string S3APISignature string S3SSL bool }
S3MinioConfig defines variable for minio
func NewConfig ¶
func NewConfig(d *schema.ResourceData) *S3MinioConfig
NewConfig creates a new config for minio
func (*S3MinioConfig) NewClient ¶
func (config *S3MinioConfig) NewClient() (interface{}, error)
NewClient returns a new minio client
type S3MinioIAMGroupAttachmentConfig ¶
type S3MinioIAMGroupAttachmentConfig struct { MinioAdmin *madmin.AdminClient MinioIAMUser string MinioIAMGroup string }
S3MinioIAMGroupAttachmentConfig defines IAM Group membership config
func IAMGroupAttachmentConfig ¶
func IAMGroupAttachmentConfig(d *schema.ResourceData, meta interface{}) *S3MinioIAMGroupAttachmentConfig
IAMGroupAttachmentConfig creates new membership config for a single user
type S3MinioIAMGroupConfig ¶
type S3MinioIAMGroupConfig struct { MinioAdmin *madmin.AdminClient MinioIAMName string MinioDisableGroup bool MinioForceDestroy bool }
S3MinioIAMGroupConfig defines IAM Group config
func IAMGroupConfig ¶
func IAMGroupConfig(d *schema.ResourceData, meta interface{}) *S3MinioIAMGroupConfig
IAMGroupConfig creates new group config
type S3MinioIAMGroupMembershipConfig ¶
type S3MinioIAMGroupMembershipConfig struct { MinioAdmin *madmin.AdminClient MinioIAMName string MinioIAMUsers []*string MinioIAMGroup string }
S3MinioIAMGroupMembershipConfig defines IAM Group membership config
func IAMGroupMembersipConfig ¶
func IAMGroupMembersipConfig(d *schema.ResourceData, meta interface{}) *S3MinioIAMGroupMembershipConfig
IAMGroupMembersipConfig creates new membership config
type S3MinioIAMGroupPolicyConfig ¶
type S3MinioIAMGroupPolicyConfig struct { MinioAdmin *madmin.AdminClient MinioIAMName string MinioIAMNamePrefix string MinioIAMPolicy string MinioIAMGroup string }
S3MinioIAMGroupPolicyConfig defines IAM Policy config
func IAMGroupPolicyConfig ¶
func IAMGroupPolicyConfig(d *schema.ResourceData, meta interface{}) *S3MinioIAMGroupPolicyConfig
IAMGroupPolicyConfig creates new group policy config
type S3MinioIAMPolicyConfig ¶
type S3MinioIAMPolicyConfig struct { MinioAdmin *madmin.AdminClient MinioIAMName string MinioIAMNamePrefix string MinioIAMPolicy string }
S3MinioIAMPolicyConfig defines IAM Policy config
func IAMPolicyConfig ¶
func IAMPolicyConfig(d *schema.ResourceData, meta interface{}) *S3MinioIAMPolicyConfig
IAMPolicyConfig creates new policy config
type S3MinioIAMUserConfig ¶
type S3MinioIAMUserConfig struct { MinioAdmin *madmin.AdminClient MinioIAMName string MinioDisableUser bool MinioForceDestroy bool MinioUpdateKey bool MinioIAMTags map[string]string }
S3MinioIAMUserConfig defines IAM config
func IAMUserConfig ¶
func IAMUserConfig(d *schema.ResourceData, meta interface{}) *S3MinioIAMUserConfig
IAMUserConfig creates new user config
type Stmt ¶
type Stmt struct { Sid string Actions set.StringSet `json:"Action"` Conditions ConditionMap `json:"Condition,omitempty"` Effect string `json:",omitempty"` Principal string `json:"Principal,omitempty"` Resources set.StringSet `json:"Resource"` }
Stmt defines policy statement
type UserStatus ¶
type UserStatus struct { AccessKey string `json:"accessKey,omitempty"` SecretKey string `json:"secretKey,omitempty"` Status madmin.AccountStatus `json:"status,omitempty"` }
UserStatus User status
Source Files ¶
- check_config.go
- data_source_minio_iam_policy_document.go
- error.go
- import_minio_s3_buckets.go
- new_client.go
- payload.go
- policy_utils.go
- provider.go
- public_policy.go
- readonly_policy.go
- readwrite_policy.go
- resource_minio_iam_group.go
- resource_minio_iam_group_membership.go
- resource_minio_iam_group_policy.go
- resource_minio_iam_group_policy_attachment.go
- resource_minio_iam_group_user_attachment.go
- resource_minio_iam_policy.go
- resource_minio_iam_user.go
- resource_minio_iam_user_policy_attachment.go
- resource_minio_s3_bucket.go
- utils.go
- writeonly_policy.go