policies

package
v0.0.0-...-6c048f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketPolicy

type BucketPolicy struct {
	Version    string `json:"Version"`
	Statements []Stmt `json:"Statement"`
}

func DefaultPolicy

func DefaultPolicy(bucketName string) BucketPolicy

DefaultPolicy creates default policy

func ReadOnlyPolicy

func ReadOnlyPolicy(bucketName string) BucketPolicy

func ReadWritePolicy

func ReadWritePolicy(bucketName string) BucketPolicy

func UploadPolicy

func UploadPolicy(bucketName string) BucketPolicy

UploadPolicy uploads files only

type ConditionKeyMap

type ConditionKeyMap map[string]set.StringSet

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 Princ

type Princ struct {
	AWS           set.StringSet `json:"AWS,omitempty"`
	CanonicalUser set.StringSet `json:"CanonicalUser,omitempty"`
}

type Stmt

type Stmt struct {
	Actions    set.StringSet `json:"Action"`
	Conditions ConditionMap  `json:"Condition,omitempty"`
	Effect     string
	Principal  string        `json:"Principal,omitempty"`
	Resources  set.StringSet `json:"Resource"`
	Sid        string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL