iam

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrCode

func ErrCode(msg string, err error) error

Types

type Condition

type Condition map[string]ConditionStatement

Condition maps a condition operator to the condition-key/condition-value statement ie. "{ "StringEquals" : { "aws:username" : "johndoe" }}" for more information, see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html

type ConditionStatement

type ConditionStatement map[string]string

ConditionStatement maps condition-key to condition-value ie. "{ "aws:username" : "johndoe" }"

type IAM

type IAM struct {
	Service iamiface.IAMAPI
	// contains filtered or unexported fields
}

func New

func New(opts ...IAMOption) IAM

type IAMOption

type IAMOption func(*IAM)

func WithCredentials

func WithCredentials(key, secret, token, region string) IAMOption

func WithSession

func WithSession(sess *session.Session) IAMOption

type PolicyDocument

type PolicyDocument struct {
	Version   string
	Statement []StatementEntry
}

type StatementEntry

type StatementEntry struct {
	Sid       string `json:",omitempty"`
	Effect    string
	Action    []string
	Resource  string
	Condition Condition `json:",omitempty"`
}

Jump to

Keyboard shortcuts

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