Documentation
¶
Index ¶
- Constants
- func AddArtifactMeta(ctxt context.Context, artifactID string, schemaName string, meta io.Reader, ...) (adapter.Payload, error)
- func AddArtifactToCollection(ctxt context.Context, artifactID string, collectionName string, ...) (adapter.Payload, error)
- func CreateArtifact(ctxt context.Context, cmd *CreateArtifactRequest, contentType string, ...) (*api.UploadResponseBody, error)
- func CreateArtifactRaw(ctxt context.Context, cmd *CreateArtifactRequest, contentType string, ...) (adapter.Payload, error)
- func ForFile(fileName, schema string, metadata Metadata) ([]byte, error)
- func IsArchive(fileName string) bool
- func ListArtifacts(ctxt context.Context, cmd *sdk.ListRequest, adpt *adapter.Adapter, ...) (*api.ListResponseBody, error)
- func ListArtifactsRaw(ctxt context.Context, cmd *sdk.ListRequest, adpt *adapter.Adapter, ...) (adapter.Payload, error)
- func ReadArtifact(ctxt context.Context, cmd *ReadArtifactRequest, adpt *adapter.Adapter, ...) (*api.ReadResponseBody, error)
- func ReadArtifactRaw(ctxt context.Context, cmd *ReadArtifactRequest, adpt *adapter.Adapter, ...) (adapter.Payload, error)
- func RemoveArtifactToCollection(ctxt context.Context, artifactID string, collectionName string, ...) (adapter.Payload, error)
- func UploadArtifact(ctxt context.Context, reader io.Reader, size int64, offset int64, ...) (err error)
- type Aspect
- type CreateArtifactRequest
- type Document
- type Entity
- type Entry
- type License
- type Metadata
- type ReadArtifactRequest
- type Ref
Constants ¶
View Source
const ( ArchiveManifestSchema = "urn:ivcap:schema:artifact.archive-manifest.1" ROCrateContext = "https://w3id.org/ro/crate/1.2/context" ROCrateProfile = "https://w3id.org/ro/crate/1.2" // LicenseUndefined is the default of --license: the license of the content is not known. LicenseUndefined = "undefined" )
Variables ¶
This section is empty.
Functions ¶
func AddArtifactMeta ¶
func AddArtifactToCollection ¶
func CreateArtifact ¶
func CreateArtifactRaw ¶
func IsArchive ¶
IsArchive reports whether the file gets a manifest: a regular file whose name ends in .zip, .tar, .tar.gz or .tgz. Only the name decides. The content is deliberately not sniffed, so ZIP-based formats such as .docx or .jar are not indexed and pipes are never read.
func ListArtifacts ¶
func ListArtifactsRaw ¶
func ReadArtifact ¶
func ReadArtifact(ctxt context.Context, cmd *ReadArtifactRequest, adpt *adapter.Adapter, logger *log.Logger) (*api.ReadResponseBody, error)
func ReadArtifactRaw ¶
Types ¶
type CreateArtifactRequest ¶
type Entity ¶
type Entity struct {
ID string `json:"@id"`
Type string `json:"@type"`
About *Ref `json:"about,omitempty"`
ConformsTo *Ref `json:"conformsTo,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Identifier string `json:"identifier,omitempty"`
HasPart []Ref `json:"hasPart,omitempty"`
License *Ref `json:"license,omitempty"`
DatePublished string `json:"datePublished,omitempty"`
ContentSize string `json:"contentSize,omitempty"`
EncodingFormat string `json:"encodingFormat,omitempty"`
}
type License ¶
License is the contextual entity the root dataset of a manifest points at.
func ResolveLicense ¶
ResolveLicense turns a --license value into the license entity of the manifest. The value is 'undefined' (or empty), an absolute http(s) URL, or an SPDX license identifier. Identifiers are not checked against the SPDX list, so a misspelt one yields a link that does not resolve.
type ReadArtifactRequest ¶
type ReadArtifactRequest struct {
Id string
}
Click to show internal directories.
Click to hide internal directories.