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 ¶
ParseSubjectString parses string and make a new Subject.
Click to show internal directories.
Click to hide internal directories.