policy

package
v0.0.0-...-21df278 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

func New

func New(env, region string) *Container

func (*Container) GetPolicy

func (p *Container) GetPolicy(roleName string) (*events.APIGatewayCustomAuthorizerPolicy, error)

GetPolicy returns the policy that was cached from Init

func (*Container) GetRolePolicies

func (p *Container) GetRolePolicies(roleName string) (*events.APIGatewayCustomAuthorizerPolicy, error)

GetRolePolicies takes a roleName and looks up all policies applied to it, converting it to an APIGatewayCustomAuthorizerPolicy Note does this take into account ManagedRoles.

func (*Container) Init

func (p *Container) Init(roles map[string]string) error

type PolicyArrayDocument

type PolicyArrayDocument struct {
	Version   string            `json:"Version"`
	Statement []PolicyStatement `json:"Statement,omitempty"`
}

type PolicyArrayStatement

type PolicyArrayStatement struct {
	Action   []string `json:"Action"`
	Effect   string   `json:"Effect"`
	Resource []string `json:"Resource"`
}

type PolicyDocument

type PolicyDocument struct {
	Version   string                 `json:"Version"`
	Statement []PolicyArrayStatement `json:"Statement,omitempty"`
}

type PolicyStatement

type PolicyStatement struct {
	Action   string   `json:"Action"`
	Effect   string   `json:"Effect"`
	Resource []string `json:"Resource"`
}

Jump to

Keyboard shortcuts

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