design

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package design is the single source of truth of Enduro's API. It uses the Goa design language (https://goa.design) which is a Go DSL.

We describe multiple services (collection, pipeline) which map to resources in REST or service declarations in gRPC. Services define their own methods, errors, etc...

Index

Constants

This section is empty.

Variables

View Source
var BatchHintsResult = Type("BatchHintsResult", func() {
	Attribute("completed_dirs", ArrayOf(String), "A list of known values of completedDir used by existing watchers.")
})
View Source
var BatchResult = Type("BatchResult", func() {
	Attribute("workflow_id", String)
	Attribute("run_id", String)
	Required("workflow_id", "run_id")
})
View Source
var BatchStatusResult = Type("BatchStatusResult", func() {
	Attribute("running", Boolean)
	Attribute("status", String)
	Attribute("workflow_id", String)
	Attribute("run_id", String)
	Required("running")
})
View Source
var BulkResult = Type("BulkResult", func() {
	Attribute("workflow_id", String)
	Attribute("run_id", String)
	Required("workflow_id", "run_id")
})
View Source
var BulkStatusResult = Type("BulkStatusResult", func() {
	Attribute("running", Boolean)
	Attribute("started_at", String, func() {
		Format(FormatDateTime)
	})
	Attribute("closed_at", String, func() {
		Format(FormatDateTime)
	})
	Attribute("status", String)
	Attribute("workflow_id", String)
	Attribute("run_id", String)
	Required("running")
})
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 CollectionNotFound = Type("CollectionNotfound", func() {
	Description("Collection not found.")
	Attribute("message", String, "Message of error", func() {
		Meta("struct:error:name")
	})
	Attribute("id", UInt, "Identifier of missing collection")
	Required("message", "id")
})
View Source
var EnumCollectionStatus = func() {
	Enum("new", "in progress", "done", "error", "unknown", "queued", "pending", "abandoned")
}
View Source
var MonitorUpdate = ResultType("application/vnd.enduro.monitor-update", func() {
	Attribute("id", UInt, "Identifier of collection")
	Attribute("type", String, "Type of the event")
	Attribute("item", StoredCollection, "Collection")
	Required("id", "type")
})
View Source
var Pipeline = Type("Pipeline", func() {
	Description("Pipeline describes an Archivematica pipeline.")
	Attribute("id", String, "Identifier of the pipeline", func() { Format(FormatUUID) })
	Attribute("name", String, "Name of the pipeline")
	Attribute("capacity", Int64, "Maximum concurrent transfers")
	Attribute("current", Int64, "Current transfers")
	Required("name")
})
View Source
var PipelineNotFound = Type("PipelineNotFound", func() {
	Description("Pipeline not found.")
	Attribute("message", String, "Message of error", func() {
		Meta("struct:error:name")
	})
	Attribute("id", String, "Identifier of missing pipeline")
	Required("message", "id")
})
View Source
var StoredCollection = ResultType("application/vnd.enduro.stored-collection", func() {
	Description("StoredCollection 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 StoredPipeline = ResultType("application/vnd.enduro.stored-pipeline", func() {
	Description("StoredPipeline describes a pipeline retrieved by this service.")
	Reference(Pipeline)
	Attributes(func() {
		Attribute("id")
		Attribute("name")
		Attribute("capacity")
		Attribute("current")
	})
	View("default", func() {
		Attribute("id")
		Attribute("name")
		Attribute("capacity")
		Attribute("current")
	})
	Required("name")
})
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