data

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeniedApplicant

type DeniedApplicant struct {
	// Subject is a partition key of the DynamoDB table. The function applies denying rule for this target.
	//
	// it has to follow the following regexp pattern:
	// (?<created_at_epoch_millis>[0-9]+):(?<cidr>[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}):(?<protocol>[0-9]+)(?::(?<port_range>[0-9]{1,5}-[0-9]{1,5}))?
	//
	// NOTE: `protocol` means the protocol number (e.g. 6=TCP and 17=UDP)
	//
	// example:
	// 1582425243392:192.168.1.1/32:6
	// 1582425243392:192.168.1.1/32:6:22-80
	Subject string `json:"subject"`

	// NetworkACLID is an identifier of the target ACL to apply the access control rule.
	NetworkACLID string `json:"networkAclID"`

	// ACLRuleNumber is the number that represents the NACL rule number.
	ACLRuleNumber int64 `json:"aclRuleNumber"`
}

DeniedApplicant is a structure that represents an applicant to deny inbound requests.

func NewDeniedApplicant

func NewDeniedApplicant(subject *Subject, networkACLID string, aclRuleNumber int64) *DeniedApplicant

NewDeniedApplicant creates new DeniedApplicant.

type Subject

type Subject struct {
	CreatedAtEpochMillis uint64
	CIDR                 string
	ProtocolNumber       int64
	FromPort             int64
	ToPort               int64
}

Subject represents the subject to deny.

func ParseSubjectString

func ParseSubjectString(subjectString string) (*Subject, error)

ParseSubjectString parses string and make a new Subject.

func (*Subject) PortRange

func (s *Subject) PortRange() *ec2.PortRange

PortRange returns EC2 port-range according to the struct.

func (*Subject) String

func (s *Subject) String() string

String converts a struct to string.

Jump to

Keyboard shortcuts

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