This repository has been archived by the owner on Jun 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NETDEV-5569: Port resources.json endpoint to public version (#130)
Co-authored-by: Oliver Geiselhardt-Herms <[email protected]>
- Loading branch information
takt
and
Oliver Geiselhardt-Herms
authored
Mar 27, 2023
1 parent
326f7dc
commit 9076639
Showing
2 changed files
with
278 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package schemas | ||
|
||
type OutputROA struct { | ||
Prefix string `json:"prefix"` | ||
MaxLength int `json:"max-length"` | ||
} | ||
|
||
type OutputASN struct { | ||
ASN uint32 `json:"asn,omitempty"` | ||
Range []uint32 `json:"asn-range,omitempty"` | ||
Inherit bool `json:"inherit,omitempty"` | ||
} | ||
|
||
type OutputIP struct { | ||
Prefix string `json:"prefix,omitempty"` | ||
Range []string `json:"ip-range,omitempty"` | ||
Inherit int `json:"inherit,omitempty"` | ||
} | ||
|
||
// Generating rest of data | ||
type OutputRes struct { | ||
Type string `json:"type"` | ||
Name string `json:"name,omitempty"` | ||
SubjectKeyId string `json:"subject-key-id,omitempty"` | ||
AuthorityKeyId string `json:"authority-key-id,omitempty"` | ||
Path string `json:"path"` | ||
|
||
Hash string `json:"hash"` | ||
|
||
TA string `json:"ta"` | ||
|
||
SIAs []string `json:"sia,omitempty"` | ||
IPs []*OutputIP `json:"ips,omitempty"` | ||
ASNs []*OutputASN `json:"asns,omitempty"` | ||
ROAs []*OutputROA `json:"roas,omitempty"` | ||
ASN uint32 `json:"asn,omitempty"` | ||
Emitted int `json:"emitted,omitempty"` | ||
ValidFrom int `json:"validfrom,omitempty"` | ||
ValidTo int `json:"validto,omitempty"` | ||
Serial string `json:"serial,omitempty"` | ||
|
||
FileList []string `json:"mft-files,omitempty"` | ||
ManifestNumber string `json:"mft-number,omitempty"` | ||
ThisUpdate int `json:"mft-thisupdate,omitempty"` | ||
NextUpdate int `json:"mft-nextupdate,omitempty"` | ||
|
||
State int `json:"state,omitempty"` | ||
Visible int `json:"visible,omitempty"` | ||
} | ||
|
||
type ResourcesJSON struct { | ||
Metadata struct { | ||
Generated int `json:"generated"` | ||
} `json:"metadata"` | ||
Resources []*OutputRes `json:"resources"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters