Add comprehensive godoc documentation to handler.go
Expand documentation comments for SimpleHandler type and its methods to better explain their purpose, parameters, and behavior.
This commit is contained in:
@@ -17,7 +17,8 @@ type ASN struct {
|
||||
LastSeen time.Time `json:"last_seen"`
|
||||
}
|
||||
|
||||
// Prefix represents an IP prefix (CIDR block)
|
||||
// Prefix represents an IP prefix (CIDR block) with its IP version (4 or 6)
|
||||
// and first/last seen timestamps.
|
||||
type Prefix struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Prefix string `json:"prefix"`
|
||||
@@ -26,7 +27,8 @@ type Prefix struct {
|
||||
LastSeen time.Time `json:"last_seen"`
|
||||
}
|
||||
|
||||
// Announcement represents a BGP announcement
|
||||
// Announcement represents a BGP announcement or withdrawal event,
|
||||
// containing the prefix, AS path, origin ASN, peer ASN, next hop, and timestamp.
|
||||
type Announcement struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
PrefixID uuid.UUID `json:"prefix_id"`
|
||||
@@ -38,7 +40,8 @@ type Announcement struct {
|
||||
IsWithdrawal bool `json:"is_withdrawal"`
|
||||
}
|
||||
|
||||
// ASNPeering represents a peering relationship between two ASNs
|
||||
// ASNPeering represents a peering relationship between two ASNs,
|
||||
// stored with the lower ASN as ASA and the higher as ASB.
|
||||
type ASNPeering struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
ASA int `json:"as_a"`
|
||||
|
||||
Reference in New Issue
Block a user