Documentation ¶
Overview ¶
Package pubaccblk provides methods and filters to test AWS S3 PublicAccessBlocks
Index ¶
- type PublicAccessBlock
- func (e *PublicAccessBlock) Assert(t *testing.T, configs ...*s3.PublicAccessBlockConfiguration) *PublicAccessBlock
- func (e *PublicAccessBlock) BlockPublicAcls(t bool) *PublicAccessBlock
- func (e *PublicAccessBlock) BlockPublicPolicy(t bool) *PublicAccessBlock
- func (e *PublicAccessBlock) Filter(filter shared.Filter) *PublicAccessBlock
- func (e *PublicAccessBlock) First(t *testing.T, configs ...*s3.PublicAccessBlockConfiguration) *PublicAccessBlock
- func (e *PublicAccessBlock) IgnorePublicAcls(t bool) *PublicAccessBlock
- func (e *PublicAccessBlock) RestrictPublicBuckets(t bool) *PublicAccessBlock
- func (e *PublicAccessBlock) Selected() *s3.PublicAccessBlockConfiguration
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 ¶
func (e *PublicAccessBlock) Assert(t *testing.T, configs ...*s3.PublicAccessBlockConfiguration) *PublicAccessBlock
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 ¶
func (e *PublicAccessBlock) First(t *testing.T, configs ...*s3.PublicAccessBlockConfiguration) *PublicAccessBlock
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 ¶
func (e *PublicAccessBlock) Selected() *s3.PublicAccessBlockConfiguration
Selected returns the currently selected *s3.PublicAccessBlockConfiguration