pubaccblk

package
v0.0.5-0...-3bd4ab3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pubaccblk provides methods and filters to test AWS S3 PublicAccessBlocks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicAccessBlock

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

PublicAccessBlock contains the necessary properties for filtering *s3.PublicAccessBlockConfiguration objects

func New

func New(client client.ConfigProvider, name string) *PublicAccessBlock

New returns a new *PublicAccessBlock

func (*PublicAccessBlock) Assert

Assert applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched config if config is not provided, *s3.PublicAccessBlockConfiguration objects will be retreived from AWS

func (*PublicAccessBlock) BlockPublicAcls

func (e *PublicAccessBlock) BlockPublicAcls(t bool) *PublicAccessBlock

BlockPublicAcls adds the BlockPublicAcls filter to the filter list the BlockPublicAcls filter: filters configs by whether they have BlockPublicAcls set to the provided boolean value

func (*PublicAccessBlock) BlockPublicPolicy

func (e *PublicAccessBlock) BlockPublicPolicy(t bool) *PublicAccessBlock

BlockPublicPolicy adds the BlockPublicPolicy filter to the filter list the BlockPublicPolicy filter: filters configs by whether they have BlockPublicPolicy set to the provided boolean value

func (*PublicAccessBlock) Filter

func (e *PublicAccessBlock) Filter(filter shared.Filter) *PublicAccessBlock

Filter adds the 'filter' provided to the filter list

func (*PublicAccessBlock) First

First applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched config if config is not provided, *s3.PublicAccessBlockConfiguration objects will be retreived from AWS

func (*PublicAccessBlock) IgnorePublicAcls

func (e *PublicAccessBlock) IgnorePublicAcls(t bool) *PublicAccessBlock

IgnorePublicAcls adds the IgnorePublicAcls filter to the filter list the IgnorePublicAcls filter: filters configs by whether they have IgnorePublicAcls set to the provided boolean value

func (*PublicAccessBlock) RestrictPublicBuckets

func (e *PublicAccessBlock) RestrictPublicBuckets(t bool) *PublicAccessBlock

RestrictPublicBuckets adds the RestrictPublicBuckets filter to the filter list the RestrictPublicBuckets filter: filters configs by whether they have RestrictPublicBuckets set to the provided boolean value

func (*PublicAccessBlock) Selected

Selected returns the currently selected *s3.PublicAccessBlockConfiguration

Jump to

Keyboard shortcuts

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