collection

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var MethodNames = [10]string{"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

func NewBulkEndpoint(s Service) goa.Endpoint

NewBulkEndpoint returns an endpoint function that calls the method "bulk" of service "collection".

func NewBulkStatusEndpoint added in v0.26.0

func NewBulkStatusEndpoint(s Service) goa.Endpoint

NewBulkStatusEndpoint returns an endpoint function that calls the method "bulk_status" of service "collection".

func NewCancelEndpoint

func NewCancelEndpoint(s Service) goa.Endpoint

NewCancelEndpoint returns an endpoint function that calls the method "cancel" of service "collection".

func NewDecideEndpoint added in v0.22.0

func NewDecideEndpoint(s Service) goa.Endpoint

NewDecideEndpoint returns an endpoint function that calls the method "decide" of service "collection".

func NewDeleteEndpoint

func NewDeleteEndpoint(s Service) goa.Endpoint

NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "collection".

func NewDownloadEndpoint added in v0.14.0

func NewDownloadEndpoint(s Service) goa.Endpoint

NewDownloadEndpoint returns an endpoint function that calls the method "download" of service "collection".

func NewListEndpoint

func NewListEndpoint(s Service) goa.Endpoint

NewListEndpoint returns an endpoint function that calls the method "list" of service "collection".

func NewRetryEndpoint

func NewRetryEndpoint(s Service) goa.Endpoint

NewRetryEndpoint returns an endpoint function that calls the method "retry" of service "collection".

func NewShowEndpoint

func NewShowEndpoint(s Service) goa.Endpoint

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 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

func NewWorkflowEndpoint(s Service) goa.Endpoint

NewWorkflowEndpoint returns an endpoint function that calls the method "workflow" of service "collection".

Types

type BulkPayload added in v0.26.0

type BulkPayload struct {
	Operation string
	Status    string
	Size      uint
}

BulkPayload is the payload type of the collection service bulk method.

type BulkResult added in v0.26.0

type BulkResult struct {
	WorkflowID string
	RunID      string
}

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 {
	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(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 *NotFound): 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 *NotFound): 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 *NotFound): Collection not found
  • error: internal error

func (*Client) Download added in v0.14.0

func (c *Client) Download(ctx context.Context, p *DownloadPayload) (res []byte, err error)

Download calls the "download" endpoint of the "collection" service. Download may return the following errors:

  • "not_found" (type *NotFound): 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) 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 *NotFound): 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 *NotFound): 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 *NotFound): Collection not found
  • error: internal error

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 {
	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

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "collection" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "collection" service endpoints.

type EnduroCollectionWorkflowHistory

type EnduroCollectionWorkflowHistory struct {
	// Identifier of collection
	ID *uint
	// Type of the event
	Type *string
	// Contents of the event
	Details interface{}
}

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 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
}

StoredPipeline describes a collection retrieved by the service.

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 NotFound

type NotFound struct {
	// Message of error
	Message string
	// Identifier of missing collection
	ID uint
}

NotFound is the type returned when attempting to operate with a collection that does not exist.

func (*NotFound) Error

func (e *NotFound) Error() string

Error returns an error description.

func (*NotFound) ErrorName

func (e *NotFound) ErrorName() string

ErrorName returns "NotFound".

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 {
	// 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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