policy

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	Version    string      `json:"Version"`
	Id         string      `json:"ID,omitempty"`
	Statements []Statement `json:"Statement"`
}

func (*Policy) UnmarshalJSON

func (p *Policy) UnmarshalJSON(policy []byte) error

type Statement

type Statement struct {
	StatementId string              `json:"StatementID,omitempty"`
	Effect      string              `json:"Effect"`
	Principal   map[string][]string `json:"Principal,omitempty"`

	Action        []string `json:"Action"`
	Resource      []string `json:"Resource,omitempty"`
	HasConditions bool     `json:"-"` // This is the only thing we need to know at this moment

	NotPrincipal map[string][]string `json:"NotPrincipal,omitempty"`
	NotResource  []string            `json:"NotResource,omitempty"`
	NotAction    []string            `json:"NotAction,omitempty"`

	Condition []string `json:"Condition,omitempty"`
}

func (*Statement) Parse

func (s *Statement) Parse(stm map[string]interface{})

Parse parses a single statement from an AWS IAM Policy

Jump to

Keyboard shortcuts

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