policy

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package policy exists for handling operations on AWS Policies, defines structures and functions for processing and comparing policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Version   string           `json:"Version"`
	ID        string           `json:"Id"`
	Statement []StatementEntry `json:"Statement"`
}

func NewFromJSON

func NewFromJSON(jsonString string) (Document, error)

JSON to PolicyDocument.

func (*Document) Equal

func (p *Document) Equal(p2 *Document) bool

Check equality between documents.

func (*Document) ToJSON

func (p *Document) ToJSON() (string, error)

To JSON to string.

type PrincipalEntry

type PrincipalEntry struct {
	AWS []string `json:"AWS"`
}

func (*PrincipalEntry) Equal

func (p *PrincipalEntry) Equal(p2 *PrincipalEntry) bool

Check equality between principals.

type StatementEntry

type StatementEntry struct {
	Effect    string         `json:"Effect"`
	Action    []string       `json:"Action"`
	Resource  []string       `json:"Resource"`
	Principal PrincipalEntry `json:"Principal"`
	Sid       string         `json:"Sid"`
}

func (*StatementEntry) Equal

func (s *StatementEntry) Equal(s2 *StatementEntry) bool

Check equality between statements.

Jump to

Keyboard shortcuts

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