Versions in this module Expand all Collapse all v0 v0.2.0 Jun 8, 2022 Changes in this version type Artifact + func (a Artifact) Version() int type ArtifactEntry + func (e ArtifactEntry) ToGeneric() GenericEntry + type GenericEntry map[string]interface + func (e GenericEntry) Sanitize() GenericEntry + func (e GenericEntry) ToTyped(value interface{}) v0.1.0 Jun 5, 2022 Changes in this version + const ArtifactFileExtension + const CurrentArtifactVersion + var ErrInvalidArtifactFiles = errors.New("one or more artifact files are invalid") + var ErrNoFrontMatter = errors.New("this file has no front matter") + func ExtractCids(artifacts []Artifact) ([]cid.Cid, error) + func ValidateEntry(entry ArtifactEntry, filePath string) error + type Artifact struct + Commit *ArtifactCommit + Entry ArtifactEntry + Path string + Slug string + func History(workspacePath, artifactsPath string) ([]Artifact, error) + func Tree(workspacePath, artifactsPath string) ([]Artifact, error) + type ArtifactCommit struct + Date time.Time + Rev string + type ArtifactEntry struct + Aliases []string + Decades []int + Description string + Files []ArtifactEntryFile + FromYear int + Identities []string + Links []ArtifactEntryLink + LongDescription *string + People []string + Title string + ToYear *int + Version int + type ArtifactEntryFile struct + Cid string + Filename *string + MediaType *string + Name string + type ArtifactEntryLink struct + Name string + Url string + type ArtifactParseError struct + Path string + Reason string + func (e ArtifactParseError) Error() string + type ContentKey string + func ContentKeyFromCid(id cid.Cid) ContentKey + type EntryField string + const FieldAliases + const FieldDecades + const FieldDescription + const FieldFileCid + const FieldFileFilename + const FieldFileMediaType + const FieldFileName + const FieldFiles + const FieldFromYear + const FieldIdentities + const FieldLinkName + const FieldLinkUrl + const FieldLinks + const FieldLongDescription + const FieldPeople + const FieldTitle + const FieldToYear + const FieldVersion + func (f EntryField) At(index int) EntryField + func (f EntryField) Literal() string + func (f EntryField) Of(outer EntryField) EntryField + type ErrorCallback func(field EntryField, reason string) + type FieldValidator func(entry ArtifactEntry, reportError ErrorCallback) + type InvalidArtifactError struct + FilePath string + Reasons []InvalidArtifactReason + func (e InvalidArtifactError) Error() string + type InvalidArtifactReason struct + Field EntryField + Reason string + type Revision struct + Date time.Time + File object.File + Path string + Rev string