Documentation ¶
Index ¶
- Constants
- Variables
- func MakeNotAvailable(err error) *goa.ServiceError
- func MakeNotRunning(err error) *goa.ServiceError
- func MakeNotValid(err error) *goa.ServiceError
- func NewBulkEndpoint(s Service) goa.Endpoint
- func NewBulkStatusEndpoint(s Service) goa.Endpoint
- func NewCancelEndpoint(s Service) goa.Endpoint
- func NewDecideEndpoint(s Service) goa.Endpoint
- func NewDeleteEndpoint(s Service) goa.Endpoint
- func NewDownloadEndpoint(s Service) goa.Endpoint
- func NewListEndpoint(s Service) goa.Endpoint
- func NewMonitorEndpoint(s Service) goa.Endpoint
- func NewRetryEndpoint(s Service) goa.Endpoint
- func NewShowEndpoint(s Service) goa.Endpoint
- func NewViewedEnduroCollectionWorkflowStatus(res *EnduroCollectionWorkflowStatus, view string) *collectionviews.EnduroCollectionWorkflowStatus
- func NewViewedEnduroMonitorUpdate(res *EnduroMonitorUpdate, view string) *collectionviews.EnduroMonitorUpdate
- func NewViewedEnduroStoredCollection(res *EnduroStoredCollection, view string) *collectionviews.EnduroStoredCollection
- func NewWorkflowEndpoint(s Service) goa.Endpoint
- type BulkPayload
- type BulkResult
- type BulkStatusResult
- type CancelPayload
- type Client
- func (c *Client) Bulk(ctx context.Context, p *BulkPayload) (res *BulkResult, err error)
- func (c *Client) BulkStatus(ctx context.Context) (res *BulkStatusResult, err error)
- func (c *Client) Cancel(ctx context.Context, p *CancelPayload) (err error)
- func (c *Client) Decide(ctx context.Context, p *DecidePayload) (err error)
- func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
- func (c *Client) Download(ctx context.Context, p *DownloadPayload) (res []byte, err error)
- func (c *Client) List(ctx context.Context, p *ListPayload) (res *ListResult, err error)
- func (c *Client) Monitor(ctx context.Context) (res MonitorClientStream, err error)
- func (c *Client) Retry(ctx context.Context, p *RetryPayload) (err error)
- func (c *Client) Show(ctx context.Context, p *ShowPayload) (res *EnduroStoredCollection, err error)
- func (c *Client) Workflow(ctx context.Context, p *WorkflowPayload) (res *EnduroCollectionWorkflowStatus, err error)
- type CollectionNotfound
- type DecidePayload
- type DeletePayload
- type DownloadPayload
- type Endpoints
- type EnduroCollectionWorkflowHistory
- type EnduroCollectionWorkflowHistoryCollection
- type EnduroCollectionWorkflowStatus
- type EnduroMonitorUpdate
- type EnduroStoredCollection
- type EnduroStoredCollectionCollection
- type ListPayload
- type ListResult
- type MonitorClientStream
- type MonitorEndpointInput
- type MonitorServerStream
- type RetryPayload
- type Service
- type ShowPayload
- type WorkflowPayload
Constants ¶
const ServiceName = "collection"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [11]string{"monitor", "list", "show", "delete", "cancel", "retry", "workflow", "download", "decide", "bulk", "bulk_status"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeNotAvailable ¶ added in v0.26.0
func MakeNotAvailable(err error) *goa.ServiceError
MakeNotAvailable builds a goa.ServiceError from an error.
func MakeNotRunning ¶
func MakeNotRunning(err error) *goa.ServiceError
MakeNotRunning builds a goa.ServiceError from an error.
func MakeNotValid ¶ added in v0.22.0
func MakeNotValid(err error) *goa.ServiceError
MakeNotValid builds a goa.ServiceError from an error.
func NewBulkEndpoint ¶ added in v0.26.0
NewBulkEndpoint returns an endpoint function that calls the method "bulk" of service "collection".
func NewBulkStatusEndpoint ¶ added in v0.26.0
NewBulkStatusEndpoint returns an endpoint function that calls the method "bulk_status" of service "collection".
func NewCancelEndpoint ¶
NewCancelEndpoint returns an endpoint function that calls the method "cancel" of service "collection".
func NewDecideEndpoint ¶ added in v0.22.0
NewDecideEndpoint returns an endpoint function that calls the method "decide" of service "collection".
func NewDeleteEndpoint ¶
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "collection".
func NewDownloadEndpoint ¶ added in v0.14.0
NewDownloadEndpoint returns an endpoint function that calls the method "download" of service "collection".
func NewListEndpoint ¶
NewListEndpoint returns an endpoint function that calls the method "list" of service "collection".
func NewMonitorEndpoint ¶ added in v0.34.0
NewMonitorEndpoint returns an endpoint function that calls the method "monitor" of service "collection".
func NewRetryEndpoint ¶
NewRetryEndpoint returns an endpoint function that calls the method "retry" of service "collection".
func NewShowEndpoint ¶
NewShowEndpoint returns an endpoint function that calls the method "show" of service "collection".
func NewViewedEnduroCollectionWorkflowStatus ¶
func NewViewedEnduroCollectionWorkflowStatus(res *EnduroCollectionWorkflowStatus, view string) *collectionviews.EnduroCollectionWorkflowStatus
NewViewedEnduroCollectionWorkflowStatus initializes viewed result type EnduroCollectionWorkflowStatus from result type EnduroCollectionWorkflowStatus using the given view.
func NewViewedEnduroMonitorUpdate ¶ added in v0.34.0
func NewViewedEnduroMonitorUpdate(res *EnduroMonitorUpdate, view string) *collectionviews.EnduroMonitorUpdate
NewViewedEnduroMonitorUpdate initializes viewed result type EnduroMonitorUpdate from result type EnduroMonitorUpdate using the given view.
func NewViewedEnduroStoredCollection ¶
func NewViewedEnduroStoredCollection(res *EnduroStoredCollection, view string) *collectionviews.EnduroStoredCollection
NewViewedEnduroStoredCollection initializes viewed result type EnduroStoredCollection from result type EnduroStoredCollection using the given view.
func NewWorkflowEndpoint ¶
NewWorkflowEndpoint returns an endpoint function that calls the method "workflow" of service "collection".
Types ¶
type BulkPayload ¶ added in v0.26.0
BulkPayload is the payload type of the collection service bulk method.
type BulkResult ¶ added in v0.26.0
BulkResult is the result type of the collection service bulk method.
type BulkStatusResult ¶ added in v0.26.0
type BulkStatusResult struct { Running bool StartedAt *string ClosedAt *string Status *string WorkflowID *string RunID *string }
BulkStatusResult is the result type of the collection service bulk_status method.
type CancelPayload ¶
type CancelPayload struct { // Identifier of collection to remove ID uint }
CancelPayload is the payload type of the collection service cancel method.
type Client ¶
type Client struct { MonitorEndpoint goa.Endpoint ListEndpoint goa.Endpoint ShowEndpoint goa.Endpoint DeleteEndpoint goa.Endpoint CancelEndpoint goa.Endpoint RetryEndpoint goa.Endpoint WorkflowEndpoint goa.Endpoint DownloadEndpoint goa.Endpoint DecideEndpoint goa.Endpoint BulkEndpoint goa.Endpoint BulkStatusEndpoint goa.Endpoint }
Client is the "collection" service client.
func NewClient ¶
func NewClient(monitor, list, show, delete_, cancel, retry, workflow, download, decide, bulk, bulkStatus goa.Endpoint) *Client
NewClient initializes a "collection" service client given the endpoints.
func (*Client) Bulk ¶ added in v0.26.0
func (c *Client) Bulk(ctx context.Context, p *BulkPayload) (res *BulkResult, err error)
Bulk calls the "bulk" endpoint of the "collection" service. Bulk may return the following errors:
- "not_available" (type *goa.ServiceError)
- "not_valid" (type *goa.ServiceError)
- error: internal error
func (*Client) BulkStatus ¶ added in v0.26.0
func (c *Client) BulkStatus(ctx context.Context) (res *BulkStatusResult, err error)
BulkStatus calls the "bulk_status" endpoint of the "collection" service.
func (*Client) Cancel ¶
func (c *Client) Cancel(ctx context.Context, p *CancelPayload) (err error)
Cancel calls the "cancel" endpoint of the "collection" service. Cancel may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- "not_running" (type *goa.ServiceError)
- error: internal error
func (*Client) Decide ¶ added in v0.22.0
func (c *Client) Decide(ctx context.Context, p *DecidePayload) (err error)
Decide calls the "decide" endpoint of the "collection" service. Decide may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- "not_valid" (type *goa.ServiceError)
- error: internal error
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
Delete calls the "delete" endpoint of the "collection" service. Delete may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- error: internal error
func (*Client) Download ¶ added in v0.14.0
Download calls the "download" endpoint of the "collection" service. Download may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- error: internal error
func (*Client) List ¶
func (c *Client) List(ctx context.Context, p *ListPayload) (res *ListResult, err error)
List calls the "list" endpoint of the "collection" service.
func (*Client) Monitor ¶ added in v0.34.0
func (c *Client) Monitor(ctx context.Context) (res MonitorClientStream, err error)
Monitor calls the "monitor" endpoint of the "collection" service.
func (*Client) Retry ¶
func (c *Client) Retry(ctx context.Context, p *RetryPayload) (err error)
Retry calls the "retry" endpoint of the "collection" service. Retry may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- "not_running" (type *goa.ServiceError)
- error: internal error
func (*Client) Show ¶
func (c *Client) Show(ctx context.Context, p *ShowPayload) (res *EnduroStoredCollection, err error)
Show calls the "show" endpoint of the "collection" service. Show may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- error: internal error
func (*Client) Workflow ¶
func (c *Client) Workflow(ctx context.Context, p *WorkflowPayload) (res *EnduroCollectionWorkflowStatus, err error)
Workflow calls the "workflow" endpoint of the "collection" service. Workflow may return the following errors:
- "not_found" (type *CollectionNotfound): Collection not found
- error: internal error
type CollectionNotfound ¶ added in v0.34.0
type CollectionNotfound struct { // Message of error Message string // Identifier of missing collection ID uint }
Collection not found.
func (*CollectionNotfound) Error ¶ added in v0.34.0
func (e *CollectionNotfound) Error() string
Error returns an error description.
func (*CollectionNotfound) ErrorName
deprecated
added in
v0.34.0
func (e *CollectionNotfound) ErrorName() string
ErrorName returns "CollectionNotfound".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*CollectionNotfound) GoaErrorName ¶ added in v0.37.0
func (e *CollectionNotfound) GoaErrorName() string
GoaErrorName returns "CollectionNotfound".
type DecidePayload ¶ added in v0.22.0
type DecidePayload struct { // Identifier of collection to look up ID uint // Decision option to proceed with Option string }
DecidePayload is the payload type of the collection service decide method.
type DeletePayload ¶
type DeletePayload struct { // Identifier of collection to delete ID uint }
DeletePayload is the payload type of the collection service delete method.
type DownloadPayload ¶ added in v0.14.0
type DownloadPayload struct { // Identifier of collection to look up ID uint }
DownloadPayload is the payload type of the collection service download method.
type Endpoints ¶
type Endpoints struct { Monitor goa.Endpoint List goa.Endpoint Show goa.Endpoint Delete goa.Endpoint Cancel goa.Endpoint Retry goa.Endpoint Workflow goa.Endpoint Download goa.Endpoint Decide goa.Endpoint Bulk goa.Endpoint BulkStatus goa.Endpoint }
Endpoints wraps the "collection" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "collection" service with endpoints.
type EnduroCollectionWorkflowHistory ¶
type EnduroCollectionWorkflowHistory struct { // Identifier of collection ID *uint // Type of the event Type *string // Contents of the event Details any }
WorkflowHistoryEvent describes a history event in Cadence.
type EnduroCollectionWorkflowHistoryCollection ¶
type EnduroCollectionWorkflowHistoryCollection []*EnduroCollectionWorkflowHistory
type EnduroCollectionWorkflowStatus ¶
type EnduroCollectionWorkflowStatus struct { Status *string History EnduroCollectionWorkflowHistoryCollection }
EnduroCollectionWorkflowStatus is the result type of the collection service workflow method.
func NewEnduroCollectionWorkflowStatus ¶
func NewEnduroCollectionWorkflowStatus(vres *collectionviews.EnduroCollectionWorkflowStatus) *EnduroCollectionWorkflowStatus
NewEnduroCollectionWorkflowStatus initializes result type EnduroCollectionWorkflowStatus from viewed result type EnduroCollectionWorkflowStatus.
type EnduroMonitorUpdate ¶ added in v0.34.0
type EnduroMonitorUpdate struct { // Identifier of collection ID uint // Type of the event Type string // Collection Item *EnduroStoredCollection }
EnduroMonitorUpdate is the result type of the collection service monitor method.
func NewEnduroMonitorUpdate ¶ added in v0.34.0
func NewEnduroMonitorUpdate(vres *collectionviews.EnduroMonitorUpdate) *EnduroMonitorUpdate
NewEnduroMonitorUpdate initializes result type EnduroMonitorUpdate from viewed result type EnduroMonitorUpdate.
type EnduroStoredCollection ¶
type EnduroStoredCollection struct { // Identifier of collection ID uint // Name of the collection Name *string // Status of the collection Status string // Identifier of processing workflow WorkflowID *string // Identifier of latest processing workflow run RunID *string // Identifier of Archivematica transfer TransferID *string // Identifier of Archivematica AIP AipID *string // Identifier provided by the client OriginalID *string // Identifier of Archivematica pipeline PipelineID *string // Creation datetime CreatedAt string // Start datetime StartedAt *string // Completion datetime CompletedAt *string }
EnduroStoredCollection is the result type of the collection service show method.
func NewEnduroStoredCollection ¶
func NewEnduroStoredCollection(vres *collectionviews.EnduroStoredCollection) *EnduroStoredCollection
NewEnduroStoredCollection initializes result type EnduroStoredCollection from viewed result type EnduroStoredCollection.
type EnduroStoredCollectionCollection ¶
type EnduroStoredCollectionCollection []*EnduroStoredCollection
type ListPayload ¶
type ListPayload struct { Name *string OriginalID *string TransferID *string AipID *string PipelineID *string EarliestCreatedTime *string LatestCreatedTime *string Status *string // Pagination cursor Cursor *string }
ListPayload is the payload type of the collection service list method.
type ListResult ¶ added in v0.5.0
type ListResult struct { Items EnduroStoredCollectionCollection NextCursor *string }
ListResult is the result type of the collection service list method.
type MonitorClientStream ¶ added in v0.34.0
type MonitorClientStream interface { // Recv reads instances of "EnduroMonitorUpdate" from the stream. Recv() (*EnduroMonitorUpdate, error) }
MonitorClientStream is the interface a "monitor" endpoint client stream must satisfy.
type MonitorEndpointInput ¶ added in v0.34.0
type MonitorEndpointInput struct { // Stream is the server stream used by the "monitor" method to send data. Stream MonitorServerStream }
MonitorEndpointInput holds both the payload and the server stream of the "monitor" method.
type MonitorServerStream ¶ added in v0.34.0
type MonitorServerStream interface { // Send streams instances of "EnduroMonitorUpdate". Send(*EnduroMonitorUpdate) error // Close closes the stream. Close() error }
MonitorServerStream is the interface a "monitor" endpoint server stream must satisfy.
type RetryPayload ¶
type RetryPayload struct { // Identifier of collection to retry ID uint }
RetryPayload is the payload type of the collection service retry method.
type Service ¶
type Service interface { // Monitor implements monitor. Monitor(context.Context, MonitorServerStream) (err error) // List all stored collections List(context.Context, *ListPayload) (res *ListResult, err error) // Show collection by ID Show(context.Context, *ShowPayload) (res *EnduroStoredCollection, err error) // Delete collection by ID Delete(context.Context, *DeletePayload) (err error) // Cancel collection processing by ID Cancel(context.Context, *CancelPayload) (err error) // Retry collection processing by ID Retry(context.Context, *RetryPayload) (err error) // Retrieve workflow status by ID Workflow(context.Context, *WorkflowPayload) (res *EnduroCollectionWorkflowStatus, err error) // Download collection by ID Download(context.Context, *DownloadPayload) (res []byte, err error) // Make decision for a pending collection by ID Decide(context.Context, *DecidePayload) (err error) // Bulk operations (retry, cancel...). Bulk(context.Context, *BulkPayload) (res *BulkResult, err error) // Retrieve status of current bulk operation. BulkStatus(context.Context) (res *BulkStatusResult, err error) }
The collection service manages packages being transferred to Archivematica.
type ShowPayload ¶
type ShowPayload struct { // Identifier of collection to show ID uint }
ShowPayload is the payload type of the collection service show method.
type WorkflowPayload ¶
type WorkflowPayload struct { // Identifier of collection to look up ID uint }
WorkflowPayload is the payload type of the collection service workflow method.