Documentation ¶
Index ¶
Constants ¶
const ( // Raw key on "ARTIFACT_ADD" type Records UInfoKey = "u" // Raw key on "ARTIFACT_ADD" type Records InfoKey = "i" // Raw key on "ARTIFACT_ADD" type Records NameKey = "n" // Raw key on "ARTIFACT_ADD" type Records DescriptionKey = "d" // Raw key on "ARTIFACT_ADD" type Records RecordModifiedKey = "m" // Raw key on "ARTIFACT_ADD" type Records ClassnamesKey = "classnames" // Raw key on "ARTIFACT_ADD" type Records SHA1Key = "1" // Raw key on "DESCRIPTOR" type Records IDXINFO = "IDXINFO" // Parsed value for null records found in index source NotAvailable = "NA" // Field separator for parsing raw index-sourced records with multi values RecordValueSeparator = `|` )
Variables ¶
var ( ArtifactAddRecordKeys = []keys.Record{ keys.RecordModified, keys.GroupID, keys.ArtifactID, keys.Version, keys.Classifier, keys.FileExtension, keys.FileModified, keys.FileSize, keys.Packaging, keys.HasSources, keys.HasJavadoc, keys.HasSignature, keys.Name, keys.Description, keys.SHA1, keys.Classnames, keys.PluginPrefix, keys.PluginGoals, } ArtifactRemoveRecordKeys = []keys.Record{ keys.RecordModified, keys.GroupID, keys.ArtifactID, keys.Version, keys.Classifier, keys.FileExtension, keys.Packaging, } DescriptorRecordKeys = []keys.Record{ keys.RepositoryID, keys.Version, } AllGroupsRecordKeys = []keys.Record{ keys.AllGroupsList, } RootGroupsRecordKeys = []keys.Record{ keys.RootGroupsList, } )
The RecordKey lists below determine an ordering for iterating over known Record values, for Output formats that require stable ordering
var RecordTypeNames = map[RecordType]string{ Descriptor: "descriptor", ArtifactAdd: "artifact_add", ArtifactRemove: "artifact_remove", AllGroups: "all_groups", RootGroups: "root_groups", }
Functions ¶
This section is empty.
Types ¶
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties represents a well-formed Java properties file along with some convenience methods.
func NewProperties ¶
func NewProperties(props map[string]string) Properties
func (Properties) GetAsString ¶
func (pr Properties) GetAsString(key string) (string, error)
func (Properties) GetAsTimestamp ¶
func (pr Properties) GetAsTimestamp(key string) (time.Time, error)
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record -
func NewRecord ¶
NewRecord - parses the input map then populates and returns a well-formed Record, or an error.
func (Record) Get ¶
Get - obtain a parsed well-formed, well-typed attribute value as stored on the given Record, or nil if no value is present. result values must be cast by caller if non-nil
func (Record) Keys ¶
Keys - obtain a fixed-order list of well-formed Record attribute keys the caller can iterate on to obtain similarly-ordered values.
type RecordType ¶
type RecordType uint8
RecordType - the type of index entry this record represents. For index reading purposes, only ArtifactAdd and ArtifactRemove are important to parse and retain.
const ( Descriptor RecordType = iota ArtifactAdd ArtifactRemove AllGroups RootGroups )