Documentation ¶
Overview ¶
Package pkicmn contains some commonly used functionality and definitions.
Index ¶
- Constants
- Variables
- func Contains(ases []addr.IA, as addr.IA) bool
- func ContainsAS(ases []addr.AS, as addr.AS) bool
- func ErrorAndExit(format string, a ...interface{})
- func GetAsPath(baseDir string, ia addr.IA) string
- func GetIsdPath(baseDir string, isd addr.ISD) string
- func ParseSelector(selector string) (string, string, error)
- func QuietPrint(format string, a ...interface{})
- func WriteToFile(raw []byte, path string, perm os.FileMode) error
- type ASMap
- type Dirs
Constants ¶
View Source
const ( CertNameFmt = "ISD%d-AS%s-V%d.crt" CoreCertNameFmt = "ISD%d-AS%s-V%d-core.crt" TrcNameFmt = "ISD%d-V%d.trc" TRCPartsDirFmt = "ISD%d-V%d.parts" TRCSigPartFmt = "ISD%d-V%d.%s.sig" TRCProtoNameFmt = "ISD%d-V%d.prototype" TRCsDir = "trcs" CertsDir = "certs" KeysDir = "keys" )
View Source
const ( ErrInvalidSelector common.ErrMsg = "Invalid selector." ErrNoISDDirFound common.ErrMsg = "No ISD directories found" ErrNoASDirFound common.ErrMsg = "No AS directories found" )
Error values
Variables ¶
View Source
var ( RootDir string OutDir string Force bool Quiet bool )
Functions ¶
func ErrorAndExit ¶
func ErrorAndExit(format string, a ...interface{})
func ParseSelector ¶ added in v0.4.0
ParseSelector parses the given selector. The returned strings are in file format.
func QuietPrint ¶
func QuietPrint(format string, a ...interface{})
Types ¶
type ASMap ¶ added in v0.4.0
ASMap contains all ASes matched by the selector.
func ProcessSelector ¶
ProcessSelector processes the given selector and returns a mapping from ISD id to ASes of that ISD. In case of an ISD-only selector, i.e., a '*' or any number the lists of ASes will be empty.
Click to show internal directories.
Click to hide internal directories.