iampolicy

package
v0.0.0-...-9cdaeea Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCacheSize = 128

Variables

This section is empty.

Functions

func NewDocument

func NewDocument() *document

func NewDocumentFromString

func NewDocumentFromString(doc string) (*document, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(service pkgaws.IamPolicyService, path string) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, options *CreateOptions) (*IamPolicy, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, options *DeleteOptions) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, options *GetOptions) (*IamPolicy, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, options *UpdateOptions) (*IamPolicy, error)

type Conditions

type Conditions struct {
	ArnLike                           map[string][]string `json:",omitempty"` // nolint: tagliatelle
	ArnLikeIfExists                   map[string][]string `json:",omitempty"` // nolint: tagliatelle
	ArnNotLike                        map[string][]string `json:",omitempty"` // nolint: tagliatelle
	ArnNotLikeIfExists                map[string][]string `json:",omitempty"` // nolint: tagliatelle
	BinaryEquals                      map[string][]string `json:",omitempty"` // nolint: tagliatelle
	BinaryEqualsIfExists              map[string][]string `json:",omitempty"` // nolint: tagliatelle
	Bool                              map[string][]string `json:",omitempty"` // nolint: tagliatelle
	BoolIfExists                      map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateEquals                        map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateEqualsIfExists                map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateNotEquals                     map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateNotEqualsIfExists             map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateLessThan                      map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateLessThanIfExists              map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateLessThanEquals                map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateLessThanEqualsIfExists        map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateGreaterThan                   map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateGreaterThanIfExists           map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateGreaterThanEquals             map[string][]string `json:",omitempty"` // nolint: tagliatelle
	DateGreaterThanEqualsIfExists     map[string][]string `json:",omitempty"` // nolint: tagliatelle
	IpAddress                         map[string][]string `json:",omitempty"` // nolint: tagliatelle
	IpAddressIfExists                 map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NotIpAddress                      map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NotIpAddressIfExists              map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericEquals                     map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericEqualsIfExists             map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericNotEquals                  map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericNotEqualsIfExists          map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericLessThan                   map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericLessThanIfExists           map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericLessThanEquals             map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericLessThanEqualsIfExists     map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericGreaterThan                map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericGreaterThanIfExists        map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericGreaterThanEquals          map[string][]string `json:",omitempty"` // nolint: tagliatelle
	NumericGreaterThanEqualsIfExists  map[string][]string `json:",omitempty"` // nolint: tagliatelle
	Null                              map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringLike                        map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringLikeIfExists                map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringNotLike                     map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringNotLikeIfExists             map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringEquals                      map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringEqualsIfExists              map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringNotEquals                   map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringNotEqualsIfExists           map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringEqualsIgnoreCase            map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringEqualsIgnoreCaseIfExists    map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringNotEqualsIgnoreCase         map[string][]string `json:",omitempty"` // nolint: tagliatelle
	StringNotEqualsIgnoreCaseIfExists map[string][]string `json:",omitempty"` // nolint: tagliatelle
}

type CreateOptions

type CreateOptions struct {
	Name        string
	Document    string
	Description string
}

type DeleteOptions

type DeleteOptions struct {
	Arn string
}

type Document

type Document interface {
	Equals(Document) (bool, error)
	SetStatements([]Statement)
	GetStatements() []Statement
	SetVersion(string)
	GetVersion() string
	Marshal() (string, error)
}

type GetOptions

type GetOptions struct {
	Arn  string
	Name string
}

type IamPolicy

type IamPolicy struct {
	Arn         string
	CreateDate  time.Time
	Document    string
	Description string
	// VersionId the id of the default version. This client will only maintain
	// a single version -- all others will be deleted after being updated
	VersionId string
	Name      string
	Id        string
}

type Interface

type Interface interface {
	Create(ctx context.Context, options *CreateOptions) (*IamPolicy, error)
	Update(ctx context.Context, options *UpdateOptions) (*IamPolicy, error)
	Get(ctx context.Context, options *GetOptions) (*IamPolicy, error)
	Delete(ctx context.Context, options *DeleteOptions) error
}

type Statement

type Statement struct {
	Sid        string      `json:",omitempty"` // nolint: tagliatelle
	Effect     string      // Allow/Deny
	Action     interface{} `json:",omitempty"` // nolint: tagliatelle
	Resource   interface{}
	Conditions *Conditions `json:"Condition,omitempty"` // nolint: tagliatelle
}

type UpdateOptions

type UpdateOptions struct {
	Arn      string
	Document string
}

Jump to

Keyboard shortcuts

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