design

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Collection = Type("Collection", func() {
	Description("Collection describes a collection to be stored.")
	Attribute("name", String, "Name of the collection")
	Attribute("status", String, "Status of the collection", func() {
		EnumCollectionStatus()
		Default("new")
	})
	Attribute("workflow_id", String, "Identifier of processing workflow", func() {
		Format(FormatUUID)
	})
	Attribute("run_id", String, "Identifier of latest processing workflow run", func() {
		Format(FormatUUID)
	})
	Attribute("transfer_id", String, "Identifier of Archivematica transfer", func() {
		Format(FormatUUID)
	})
	Attribute("aip_id", String, "Identifier of Archivematica AIP", func() {
		Format(FormatUUID)
	})
	Attribute("original_id", String, "Identifier provided by the client")
	Attribute("pipeline_id", String, "Identifier of Archivematica pipeline", func() {
		Format(FormatUUID)
	})
	Attribute("created_at", String, "Creation datetime", func() {
		Format(FormatDateTime)
	})
	Attribute("started_at", String, "Start datetime", func() {
		Format(FormatDateTime)
	})
	Attribute("completed_at", String, "Completion datetime", func() {
		Format(FormatDateTime)
	})
	Required("id", "status", "created_at")
})
View Source
var EnumCollectionStatus = func() {
	Enum("new", "in progress", "done", "error", "unknown", "queued")
}
View Source
var NotFound = Type("NotFound", func() {
	Description("NotFound is the type returned when attempting to operate with a collection that does not exist.")
	Attribute("message", String, "Message of error", func() {
		Meta("struct:error:name")
	})
	Attribute("id", UInt, "Identifier of missing collection")
	Required("message", "id")
})
View Source
var StoredCollection = ResultType("application/vnd.enduro.stored-collection", func() {
	Description("StoredPackage describes a collection retrieved by the service.")
	Reference(Collection)
	Attributes(func() {
		Attribute("id", UInt, "Identifier of collection")
		Attribute("name")
		Attribute("status")
		Attribute("workflow_id")
		Attribute("run_id")
		Attribute("transfer_id")
		Attribute("aip_id")
		Attribute("original_id")
		Attribute("pipeline_id")
		Attribute("created_at")
		Attribute("started_at")
		Attribute("completed_at")
	})
	View("default", func() {
		Attribute("id")
		Attribute("name")
		Attribute("status")
		Attribute("workflow_id")
		Attribute("run_id")
		Attribute("transfer_id")
		Attribute("aip_id")
		Attribute("original_id")
		Attribute("pipeline_id")
		Attribute("created_at")
		Attribute("started_at")
		Attribute("completed_at")
	})
	Required("id", "status", "created_at")
})
View Source
var WorkflowHistoryEvent = ResultType("application/vnd.enduro.collection-workflow-history", func() {
	Description("WorkflowHistoryEvent describes a history event in Cadence.")
	Attributes(func() {
		Attribute("id", UInt, "Identifier of collection")
		Attribute("type", String, "Type of the event")
		Attribute("details", Any, "Contents of the event")
	})
})
View Source
var WorkflowStatus = ResultType("application/vnd.enduro.collection-workflow-status", func() {
	Description("WorkflowStatus describes the processing workflow status of a collection.")
	Attribute("status", String)
	Attribute("history", CollectionOf(WorkflowHistoryEvent))
})

Functions

func PaginatedCollectionOf added in v0.5.0

func PaginatedCollectionOf(v interface{}, adsl ...func()) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL