Back to godoc.org

Package server

v0.30.2
Latest Go to latest

The highest tagged major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/artefactual-labs/enduro

Index

func BulkCollectionPath

func BulkCollectionPath() string

BulkCollectionPath returns the URL path to the collection service bulk HTTP endpoint.

func BulkStatusCollectionPath

func BulkStatusCollectionPath() string

BulkStatusCollectionPath returns the URL path to the collection service bulk_status HTTP endpoint.

func CancelCollectionPath

func CancelCollectionPath(id uint) string

CancelCollectionPath returns the URL path to the collection service cancel HTTP endpoint.

func DecideCollectionPath

func DecideCollectionPath(id uint) string

DecideCollectionPath returns the URL path to the collection service decide HTTP endpoint.

func DecodeBulkRequest

func DecodeBulkRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeBulkRequest returns a decoder for requests sent to the collection bulk endpoint.

func DecodeCancelRequest

func DecodeCancelRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeCancelRequest returns a decoder for requests sent to the collection cancel endpoint.

func DecodeDecideRequest

func DecodeDecideRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDecideRequest returns a decoder for requests sent to the collection decide endpoint.

func DecodeDeleteRequest

func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDeleteRequest returns a decoder for requests sent to the collection delete endpoint.

func DecodeDownloadRequest

func DecodeDownloadRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDownloadRequest returns a decoder for requests sent to the collection download endpoint.

func DecodeListRequest

func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeListRequest returns a decoder for requests sent to the collection list endpoint.

func DecodeRetryRequest

func DecodeRetryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeRetryRequest returns a decoder for requests sent to the collection retry endpoint.

func DecodeShowRequest

func DecodeShowRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeShowRequest returns a decoder for requests sent to the collection show endpoint.

func DecodeWorkflowRequest

func DecodeWorkflowRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeWorkflowRequest returns a decoder for requests sent to the collection workflow endpoint.

func DeleteCollectionPath

func DeleteCollectionPath(id uint) string

DeleteCollectionPath returns the URL path to the collection service delete HTTP endpoint.

func DownloadCollectionPath

func DownloadCollectionPath(id uint) string

DownloadCollectionPath returns the URL path to the collection service download HTTP endpoint.

func EncodeBulkError

func EncodeBulkError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeBulkError returns an encoder for errors returned by the bulk collection endpoint.

func EncodeBulkResponse

func EncodeBulkResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeBulkResponse returns an encoder for responses returned by the collection bulk endpoint.

func EncodeBulkStatusResponse

func EncodeBulkStatusResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeBulkStatusResponse returns an encoder for responses returned by the collection bulk_status endpoint.

func EncodeCancelError

func EncodeCancelError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeCancelError returns an encoder for errors returned by the cancel collection endpoint.

func EncodeCancelResponse

func EncodeCancelResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeCancelResponse returns an encoder for responses returned by the collection cancel endpoint.

func EncodeDecideError

func EncodeDecideError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeDecideError returns an encoder for errors returned by the decide collection endpoint.

func EncodeDecideResponse

func EncodeDecideResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDecideResponse returns an encoder for responses returned by the collection decide endpoint.

func EncodeDeleteError

func EncodeDeleteError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeDeleteError returns an encoder for errors returned by the delete collection endpoint.

func EncodeDeleteResponse

func EncodeDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDeleteResponse returns an encoder for responses returned by the collection delete endpoint.

func EncodeDownloadError

func EncodeDownloadError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeDownloadError returns an encoder for errors returned by the download collection endpoint.

func EncodeDownloadResponse

func EncodeDownloadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDownloadResponse returns an encoder for responses returned by the collection download endpoint.

func EncodeListResponse

func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeListResponse returns an encoder for responses returned by the collection list endpoint.

func EncodeRetryError

func EncodeRetryError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeRetryError returns an encoder for errors returned by the retry collection endpoint.

func EncodeRetryResponse

func EncodeRetryResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeRetryResponse returns an encoder for responses returned by the collection retry endpoint.

func EncodeShowError

func EncodeShowError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeShowError returns an encoder for errors returned by the show collection endpoint.

func EncodeShowResponse

func EncodeShowResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeShowResponse returns an encoder for responses returned by the collection show endpoint.

func EncodeWorkflowError

func EncodeWorkflowError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeWorkflowError returns an encoder for errors returned by the workflow collection endpoint.

func EncodeWorkflowResponse

func EncodeWorkflowResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeWorkflowResponse returns an encoder for responses returned by the collection workflow endpoint.

func ListCollectionPath

func ListCollectionPath() string

ListCollectionPath returns the URL path to the collection service list HTTP endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the collection endpoints.

func MountBulkHandler

func MountBulkHandler(mux goahttp.Muxer, h http.Handler)

MountBulkHandler configures the mux to serve the "collection" service "bulk" endpoint.

func MountBulkStatusHandler

func MountBulkStatusHandler(mux goahttp.Muxer, h http.Handler)

MountBulkStatusHandler configures the mux to serve the "collection" service "bulk_status" endpoint.

func MountCORSHandler

func MountCORSHandler(mux goahttp.Muxer, h http.Handler)

MountCORSHandler configures the mux to serve the CORS endpoints for the service collection.

func MountCancelHandler

func MountCancelHandler(mux goahttp.Muxer, h http.Handler)

MountCancelHandler configures the mux to serve the "collection" service "cancel" endpoint.

func MountDecideHandler

func MountDecideHandler(mux goahttp.Muxer, h http.Handler)

MountDecideHandler configures the mux to serve the "collection" service "decide" endpoint.

func MountDeleteHandler

func MountDeleteHandler(mux goahttp.Muxer, h http.Handler)

MountDeleteHandler configures the mux to serve the "collection" service "delete" endpoint.

func MountDownloadHandler

func MountDownloadHandler(mux goahttp.Muxer, h http.Handler)

MountDownloadHandler configures the mux to serve the "collection" service "download" endpoint.

func MountListHandler

func MountListHandler(mux goahttp.Muxer, h http.Handler)

MountListHandler configures the mux to serve the "collection" service "list" endpoint.

func MountRetryHandler

func MountRetryHandler(mux goahttp.Muxer, h http.Handler)

MountRetryHandler configures the mux to serve the "collection" service "retry" endpoint.

func MountShowHandler

func MountShowHandler(mux goahttp.Muxer, h http.Handler)

MountShowHandler configures the mux to serve the "collection" service "show" endpoint.

func MountWorkflowHandler

func MountWorkflowHandler(mux goahttp.Muxer, h http.Handler)

MountWorkflowHandler configures the mux to serve the "collection" service "workflow" endpoint.

func NewBulkHandler

func NewBulkHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewBulkHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "bulk" endpoint.

func NewBulkPayload

func NewBulkPayload(body *BulkRequestBody) *collection.BulkPayload

NewBulkPayload builds a collection service bulk endpoint payload.

func NewBulkStatusHandler

func NewBulkStatusHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewBulkStatusHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "bulk_status" endpoint.

func NewCORSHandler

func NewCORSHandler() http.Handler

NewCORSHandler creates a HTTP handler which returns a simple 200 response.

func NewCancelHandler

func NewCancelHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewCancelHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "cancel" endpoint.

func NewCancelPayload

func NewCancelPayload(id uint) *collection.CancelPayload

NewCancelPayload builds a collection service cancel endpoint payload.

func NewDecideHandler

func NewDecideHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewDecideHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "decide" endpoint.

func NewDecidePayload

func NewDecidePayload(body struct {
	// Decision option to proceed with
	Option *string `form:"option" json:"option" xml:"option"`
}, id uint) *collection.DecidePayload

NewDecidePayload builds a collection service decide endpoint payload.

func NewDeleteHandler

func NewDeleteHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewDeleteHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "delete" endpoint.

func NewDeletePayload

func NewDeletePayload(id uint) *collection.DeletePayload

NewDeletePayload builds a collection service delete endpoint payload.

func NewDownloadHandler

func NewDownloadHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewDownloadHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "download" endpoint.

func NewDownloadPayload

func NewDownloadPayload(id uint) *collection.DownloadPayload

NewDownloadPayload builds a collection service download endpoint payload.

func NewListHandler

func NewListHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewListHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "list" endpoint.

func NewListPayload

func NewListPayload(name *string, originalID *string, transferID *string, aipID *string, pipelineID *string, earliestCreatedTime *string, latestCreatedTime *string, status *string, cursor *string) *collection.ListPayload

NewListPayload builds a collection service list endpoint payload.

func NewRetryHandler

func NewRetryHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewRetryHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "retry" endpoint.

func NewRetryPayload

func NewRetryPayload(id uint) *collection.RetryPayload

NewRetryPayload builds a collection service retry endpoint payload.

func NewShowHandler

func NewShowHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewShowHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "show" endpoint.

func NewShowPayload

func NewShowPayload(id uint) *collection.ShowPayload

NewShowPayload builds a collection service show endpoint payload.

func NewWorkflowHandler

func NewWorkflowHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewWorkflowHandler creates a HTTP handler which loads the HTTP request and calls the "collection" service "workflow" endpoint.

func NewWorkflowPayload

func NewWorkflowPayload(id uint) *collection.WorkflowPayload

NewWorkflowPayload builds a collection service workflow endpoint payload.

func RetryCollectionPath

func RetryCollectionPath(id uint) string

RetryCollectionPath returns the URL path to the collection service retry HTTP endpoint.

func ShowCollectionPath

func ShowCollectionPath(id uint) string

ShowCollectionPath returns the URL path to the collection service show HTTP endpoint.

func ValidateBulkRequestBody

func ValidateBulkRequestBody(body *BulkRequestBody) (err error)

ValidateBulkRequestBody runs the validations defined on BulkRequestBody

func WorkflowCollectionPath

func WorkflowCollectionPath(id uint) string

WorkflowCollectionPath returns the URL path to the collection service workflow HTTP endpoint.

type BulkNotAvailableResponseBody

type BulkNotAvailableResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

BulkNotAvailableResponseBody is the type of the "collection" service "bulk" endpoint HTTP response body for the "not_available" error.

func NewBulkNotAvailableResponseBody

func NewBulkNotAvailableResponseBody(res *goa.ServiceError) *BulkNotAvailableResponseBody

NewBulkNotAvailableResponseBody builds the HTTP response body from the result of the "bulk" endpoint of the "collection" service.

type BulkNotValidResponseBody

type BulkNotValidResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

BulkNotValidResponseBody is the type of the "collection" service "bulk" endpoint HTTP response body for the "not_valid" error.

func NewBulkNotValidResponseBody

func NewBulkNotValidResponseBody(res *goa.ServiceError) *BulkNotValidResponseBody

NewBulkNotValidResponseBody builds the HTTP response body from the result of the "bulk" endpoint of the "collection" service.

type BulkRequestBody

type BulkRequestBody struct {
	Operation *string `form:"operation,omitempty" json:"operation,omitempty" xml:"operation,omitempty"`
	Status    *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	Size      *uint   `form:"size,omitempty" json:"size,omitempty" xml:"size,omitempty"`
}

BulkRequestBody is the type of the "collection" service "bulk" endpoint HTTP request body.

type BulkResponseBody

type BulkResponseBody struct {
	WorkflowID string `form:"workflow_id" json:"workflow_id" xml:"workflow_id"`
	RunID      string `form:"run_id" json:"run_id" xml:"run_id"`
}

BulkResponseBody is the type of the "collection" service "bulk" endpoint HTTP response body.

func NewBulkResponseBody

func NewBulkResponseBody(res *collection.BulkResult) *BulkResponseBody

NewBulkResponseBody builds the HTTP response body from the result of the "bulk" endpoint of the "collection" service.

type BulkStatusResponseBody

type BulkStatusResponseBody struct {
	Running    bool    `form:"running" json:"running" xml:"running"`
	StartedAt  *string `form:"started_at,omitempty" json:"started_at,omitempty" xml:"started_at,omitempty"`
	ClosedAt   *string `form:"closed_at,omitempty" json:"closed_at,omitempty" xml:"closed_at,omitempty"`
	Status     *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	WorkflowID *string `form:"workflow_id,omitempty" json:"workflow_id,omitempty" xml:"workflow_id,omitempty"`
	RunID      *string `form:"run_id,omitempty" json:"run_id,omitempty" xml:"run_id,omitempty"`
}

BulkStatusResponseBody is the type of the "collection" service "bulk_status" endpoint HTTP response body.

func NewBulkStatusResponseBody

func NewBulkStatusResponseBody(res *collection.BulkStatusResult) *BulkStatusResponseBody

NewBulkStatusResponseBody builds the HTTP response body from the result of the "bulk_status" endpoint of the "collection" service.

type CancelNotFoundResponseBody

type CancelNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

CancelNotFoundResponseBody is the type of the "collection" service "cancel" endpoint HTTP response body for the "not_found" error.

func NewCancelNotFoundResponseBody

func NewCancelNotFoundResponseBody(res *collection.NotFound) *CancelNotFoundResponseBody

NewCancelNotFoundResponseBody builds the HTTP response body from the result of the "cancel" endpoint of the "collection" service.

type CancelNotRunningResponseBody

type CancelNotRunningResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

CancelNotRunningResponseBody is the type of the "collection" service "cancel" endpoint HTTP response body for the "not_running" error.

func NewCancelNotRunningResponseBody

func NewCancelNotRunningResponseBody(res *goa.ServiceError) *CancelNotRunningResponseBody

NewCancelNotRunningResponseBody builds the HTTP response body from the result of the "cancel" endpoint of the "collection" service.

type DecideNotFoundResponseBody

type DecideNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

DecideNotFoundResponseBody is the type of the "collection" service "decide" endpoint HTTP response body for the "not_found" error.

func NewDecideNotFoundResponseBody

func NewDecideNotFoundResponseBody(res *collection.NotFound) *DecideNotFoundResponseBody

NewDecideNotFoundResponseBody builds the HTTP response body from the result of the "decide" endpoint of the "collection" service.

type DecideNotValidResponseBody

type DecideNotValidResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DecideNotValidResponseBody is the type of the "collection" service "decide" endpoint HTTP response body for the "not_valid" error.

func NewDecideNotValidResponseBody

func NewDecideNotValidResponseBody(res *goa.ServiceError) *DecideNotValidResponseBody

NewDecideNotValidResponseBody builds the HTTP response body from the result of the "decide" endpoint of the "collection" service.

type DeleteNotFoundResponseBody

type DeleteNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

DeleteNotFoundResponseBody is the type of the "collection" service "delete" endpoint HTTP response body for the "not_found" error.

func NewDeleteNotFoundResponseBody

func NewDeleteNotFoundResponseBody(res *collection.NotFound) *DeleteNotFoundResponseBody

NewDeleteNotFoundResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "collection" service.

type DownloadNotFoundResponseBody

type DownloadNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

DownloadNotFoundResponseBody is the type of the "collection" service "download" endpoint HTTP response body for the "not_found" error.

func NewDownloadNotFoundResponseBody

func NewDownloadNotFoundResponseBody(res *collection.NotFound) *DownloadNotFoundResponseBody

NewDownloadNotFoundResponseBody builds the HTTP response body from the result of the "download" endpoint of the "collection" service.

type EnduroCollectionWorkflowHistoryResponseBody

type EnduroCollectionWorkflowHistoryResponseBody struct {
	// Identifier of collection
	ID *uint `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Type of the event
	Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"`
	// Contents of the event
	Details interface{} `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"`
}

EnduroCollectionWorkflowHistoryResponseBody is used to define fields on response body types.

type EnduroCollectionWorkflowHistoryResponseBodyCollection

type EnduroCollectionWorkflowHistoryResponseBodyCollection []*EnduroCollectionWorkflowHistoryResponseBody

EnduroCollectionWorkflowHistoryResponseBodyCollection is used to define fields on response body types.

type EnduroStoredCollectionCollectionResponseBody

type EnduroStoredCollectionCollectionResponseBody []*EnduroStoredCollectionResponseBody

EnduroStoredCollectionCollectionResponseBody is used to define fields on response body types.

type EnduroStoredCollectionResponseBody

type EnduroStoredCollectionResponseBody struct {
	// Identifier of collection
	ID uint `form:"id" json:"id" xml:"id"`
	// Name of the collection
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Status of the collection
	Status string `form:"status" json:"status" xml:"status"`
	// Identifier of processing workflow
	WorkflowID *string `form:"workflow_id,omitempty" json:"workflow_id,omitempty" xml:"workflow_id,omitempty"`
	// Identifier of latest processing workflow run
	RunID *string `form:"run_id,omitempty" json:"run_id,omitempty" xml:"run_id,omitempty"`
	// Identifier of Archivematica transfer
	TransferID *string `form:"transfer_id,omitempty" json:"transfer_id,omitempty" xml:"transfer_id,omitempty"`
	// Identifier of Archivematica AIP
	AipID *string `form:"aip_id,omitempty" json:"aip_id,omitempty" xml:"aip_id,omitempty"`
	// Identifier provided by the client
	OriginalID *string `form:"original_id,omitempty" json:"original_id,omitempty" xml:"original_id,omitempty"`
	// Identifier of Archivematica pipeline
	PipelineID *string `form:"pipeline_id,omitempty" json:"pipeline_id,omitempty" xml:"pipeline_id,omitempty"`
	// Creation datetime
	CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"`
	// Start datetime
	StartedAt *string `form:"started_at,omitempty" json:"started_at,omitempty" xml:"started_at,omitempty"`
	// Completion datetime
	CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"`
}

EnduroStoredCollectionResponseBody is used to define fields on response body types.

type ErrorNamer

type ErrorNamer interface {
	ErrorName() string
}

ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.

type ListResponseBody

type ListResponseBody struct {
	Items      EnduroStoredCollectionCollectionResponseBody `form:"items" json:"items" xml:"items"`
	NextCursor *string                                      `form:"next_cursor,omitempty" json:"next_cursor,omitempty" xml:"next_cursor,omitempty"`
}

ListResponseBody is the type of the "collection" service "list" endpoint HTTP response body.

func NewListResponseBody

func NewListResponseBody(res *collection.ListResult) *ListResponseBody

NewListResponseBody builds the HTTP response body from the result of the "list" endpoint of the "collection" service.

type MountPoint

type MountPoint struct {
	// Method is the name of the service method served by the mounted HTTP handler.
	Method string
	// Verb is the HTTP method used to match requests to the mounted handler.
	Verb string
	// Pattern is the HTTP request path pattern used to match requests to the
	// mounted handler.
	Pattern string
}

MountPoint holds information about the mounted endpoints.

type RetryNotFoundResponseBody

type RetryNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

RetryNotFoundResponseBody is the type of the "collection" service "retry" endpoint HTTP response body for the "not_found" error.

func NewRetryNotFoundResponseBody

func NewRetryNotFoundResponseBody(res *collection.NotFound) *RetryNotFoundResponseBody

NewRetryNotFoundResponseBody builds the HTTP response body from the result of the "retry" endpoint of the "collection" service.

type RetryNotRunningResponseBody

type RetryNotRunningResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

RetryNotRunningResponseBody is the type of the "collection" service "retry" endpoint HTTP response body for the "not_running" error.

func NewRetryNotRunningResponseBody

func NewRetryNotRunningResponseBody(res *goa.ServiceError) *RetryNotRunningResponseBody

NewRetryNotRunningResponseBody builds the HTTP response body from the result of the "retry" endpoint of the "collection" service.

type Server

type Server struct {
	Mounts     []*MountPoint
	List       http.Handler
	Show       http.Handler
	Delete     http.Handler
	Cancel     http.Handler
	Retry      http.Handler
	Workflow   http.Handler
	Download   http.Handler
	Decide     http.Handler
	Bulk       http.Handler
	BulkStatus http.Handler
	CORS       http.Handler
}

Server lists the collection service endpoint HTTP handlers.

func New

func New(
	e *collection.Endpoints,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) *Server

New instantiates HTTP handlers for all the collection service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.

func (*Server) Service

func (s *Server) Service() string

Service returns the name of the service served.

func (*Server) Use

func (s *Server) Use(m func(http.Handler) http.Handler)

Use wraps the server handlers with the given middleware.

type ShowNotFoundResponseBody

type ShowNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

ShowNotFoundResponseBody is the type of the "collection" service "show" endpoint HTTP response body for the "not_found" error.

func NewShowNotFoundResponseBody

func NewShowNotFoundResponseBody(res *collection.NotFound) *ShowNotFoundResponseBody

NewShowNotFoundResponseBody builds the HTTP response body from the result of the "show" endpoint of the "collection" service.

type ShowResponseBody

type ShowResponseBody struct {
	// Identifier of collection
	ID uint `form:"id" json:"id" xml:"id"`
	// Name of the collection
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Status of the collection
	Status string `form:"status" json:"status" xml:"status"`
	// Identifier of processing workflow
	WorkflowID *string `form:"workflow_id,omitempty" json:"workflow_id,omitempty" xml:"workflow_id,omitempty"`
	// Identifier of latest processing workflow run
	RunID *string `form:"run_id,omitempty" json:"run_id,omitempty" xml:"run_id,omitempty"`
	// Identifier of Archivematica transfer
	TransferID *string `form:"transfer_id,omitempty" json:"transfer_id,omitempty" xml:"transfer_id,omitempty"`
	// Identifier of Archivematica AIP
	AipID *string `form:"aip_id,omitempty" json:"aip_id,omitempty" xml:"aip_id,omitempty"`
	// Identifier provided by the client
	OriginalID *string `form:"original_id,omitempty" json:"original_id,omitempty" xml:"original_id,omitempty"`
	// Identifier of Archivematica pipeline
	PipelineID *string `form:"pipeline_id,omitempty" json:"pipeline_id,omitempty" xml:"pipeline_id,omitempty"`
	// Creation datetime
	CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"`
	// Start datetime
	StartedAt *string `form:"started_at,omitempty" json:"started_at,omitempty" xml:"started_at,omitempty"`
	// Completion datetime
	CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"`
}

ShowResponseBody is the type of the "collection" service "show" endpoint HTTP response body.

func NewShowResponseBody

func NewShowResponseBody(res *collectionviews.EnduroStoredCollectionView) *ShowResponseBody

NewShowResponseBody builds the HTTP response body from the result of the "show" endpoint of the "collection" service.

type WorkflowNotFoundResponseBody

type WorkflowNotFoundResponseBody struct {
	// Message of error
	Message string `form:"message" json:"message" xml:"message"`
	// Identifier of missing collection
	ID uint `form:"id" json:"id" xml:"id"`
}

WorkflowNotFoundResponseBody is the type of the "collection" service "workflow" endpoint HTTP response body for the "not_found" error.

func NewWorkflowNotFoundResponseBody

func NewWorkflowNotFoundResponseBody(res *collection.NotFound) *WorkflowNotFoundResponseBody

NewWorkflowNotFoundResponseBody builds the HTTP response body from the result of the "workflow" endpoint of the "collection" service.

type WorkflowResponseBody

type WorkflowResponseBody struct {
	Status  *string                                               `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	History EnduroCollectionWorkflowHistoryResponseBodyCollection `form:"history,omitempty" json:"history,omitempty" xml:"history,omitempty"`
}

WorkflowResponseBody is the type of the "collection" service "workflow" endpoint HTTP response body.

func NewWorkflowResponseBody

func NewWorkflowResponseBody(res *collectionviews.EnduroCollectionWorkflowStatusView) *WorkflowResponseBody

NewWorkflowResponseBody builds the HTTP response body from the result of the "workflow" endpoint of the "collection" service.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier