types

package
v3.0.0-...-bcda2dc Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAMPolicyDocument

type IAMPolicyDocument struct {
	Version   string `json:",omitempty"`
	Statement []IAMPolicyStatement
}

IAMPolicyDocument represents an IAM policy document

func (IAMPolicyDocument) ToJSON

func (i IAMPolicyDocument) ToJSON() string

ToJSON returns the JSON representation of the policy document or panics if the object cannot be marshaled.

func (*IAMPolicyDocument) UnmarshalJSON

func (i *IAMPolicyDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON sets the object from the provided JSON representation. This has been added to handle the special case of a single statement versus an array.

type IAMPolicyStatement

type IAMPolicyStatement struct {
	Sid          string        `json:",omitempty"`
	Effect       string        `json:",omitempty"`
	Principal    *IAMPrincipal `json:",omitempty"`
	NotPrincipal *IAMPrincipal `json:",omitempty"`
	Action       []string      `json:",omitempty"`
	NotAction    []string      `json:",omitempty"`
	Resource     []string      `json:",omitempty"`
	Condition    interface{}   `json:",omitempty"`
}

IAMPolicyStatement represents an IAM policy statement

type IAMPrincipal

type IAMPrincipal struct {
	AWS           []string `json:",omitempty"`
	CanonicalUser []string `json:",omitempty"`
	Federated     []string `json:",omitempty"`
	Service       []string `json:",omitempty"`
}

IAMPrincipal represents a principal in an IAM policy

func (IAMPrincipal) MarshalJSON

func (i IAMPrincipal) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON representation of the object. This has been added to handle the special case of "*" as the Principal value.

func (*IAMPrincipal) UnmarshalJSON

func (i *IAMPrincipal) UnmarshalJSON(data []byte) error

UnmarshalJSON sets the object from the provided JSON representation. This has been added to handle the special case of "*" as the Principal value.

Jump to

Keyboard shortcuts

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