server

package
v0.0.0-...-db1a339 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmPackagePath

func ConfirmPackagePath(id uint) string

ConfirmPackagePath returns the URL path to the package service confirm HTTP endpoint.

func DecodeConfirmRequest

func DecodeConfirmRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeConfirmRequest returns a decoder for requests sent to the package confirm endpoint.

func DecodeListRequest

func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

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

func DecodeMonitorRequest

func DecodeMonitorRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeMonitorRequest returns a decoder for requests sent to the package monitor endpoint.

func DecodeMonitorRequestRequest

func DecodeMonitorRequestRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeMonitorRequestRequest returns a decoder for requests sent to the package monitor_request endpoint.

func DecodeMoveRequest

func DecodeMoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeMoveRequest returns a decoder for requests sent to the package move endpoint.

func DecodeMoveStatusRequest

func DecodeMoveStatusRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeMoveStatusRequest returns a decoder for requests sent to the package move_status endpoint.

func DecodePreservationActionsRequest

func DecodePreservationActionsRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodePreservationActionsRequest returns a decoder for requests sent to the package preservation_actions endpoint.

func DecodeRejectRequest

func DecodeRejectRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

DecodeRejectRequest returns a decoder for requests sent to the package reject endpoint.

func DecodeShowRequest

func DecodeShowRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)

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

func EncodeConfirmError

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

EncodeConfirmError returns an encoder for errors returned by the confirm package endpoint.

func EncodeConfirmResponse

func EncodeConfirmResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeConfirmResponse returns an encoder for responses returned by the package confirm endpoint.

func EncodeListError

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

EncodeListError returns an encoder for errors returned by the list package endpoint.

func EncodeListResponse

func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

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

func EncodeMonitorError

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

EncodeMonitorError returns an encoder for errors returned by the monitor package endpoint.

func EncodeMonitorRequestError

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

EncodeMonitorRequestError returns an encoder for errors returned by the monitor_request package endpoint.

func EncodeMonitorRequestResponse

func EncodeMonitorRequestResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeMonitorRequestResponse returns an encoder for responses returned by the package monitor_request endpoint.

func EncodeMoveError

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

EncodeMoveError returns an encoder for errors returned by the move package endpoint.

func EncodeMoveResponse

func EncodeMoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeMoveResponse returns an encoder for responses returned by the package move endpoint.

func EncodeMoveStatusError

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

EncodeMoveStatusError returns an encoder for errors returned by the move_status package endpoint.

func EncodeMoveStatusResponse

func EncodeMoveStatusResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeMoveStatusResponse returns an encoder for responses returned by the package move_status endpoint.

func EncodePreservationActionsError

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

EncodePreservationActionsError returns an encoder for errors returned by the preservation_actions package endpoint.

func EncodePreservationActionsResponse

func EncodePreservationActionsResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodePreservationActionsResponse returns an encoder for responses returned by the package preservation_actions endpoint.

func EncodeRejectError

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

EncodeRejectError returns an encoder for errors returned by the reject package endpoint.

func EncodeRejectResponse

func EncodeRejectResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

EncodeRejectResponse returns an encoder for responses returned by the package reject endpoint.

func EncodeShowError

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

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

func EncodeShowResponse

func EncodeShowResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error

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

func HandlePackageOrigin

func HandlePackageOrigin(h http.Handler) http.Handler

HandlePackageOrigin applies the CORS response headers corresponding to the origin for the service package.

func ListPackagePath

func ListPackagePath() string

ListPackagePath returns the URL path to the package service list HTTP endpoint.

func MonitorPackagePath

func MonitorPackagePath() string

MonitorPackagePath returns the URL path to the package service monitor HTTP endpoint.

func MonitorRequestPackagePath

func MonitorRequestPackagePath() string

MonitorRequestPackagePath returns the URL path to the package service monitor_request HTTP endpoint.

func Mount

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

Mount configures the mux to serve the package endpoints.

func MountCORSHandler

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

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

func MountConfirmHandler

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

MountConfirmHandler configures the mux to serve the "package" service "confirm" endpoint.

func MountListHandler

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

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

func MountMonitorHandler

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

MountMonitorHandler configures the mux to serve the "package" service "monitor" endpoint.

func MountMonitorRequestHandler

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

MountMonitorRequestHandler configures the mux to serve the "package" service "monitor_request" endpoint.

func MountMoveHandler

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

MountMoveHandler configures the mux to serve the "package" service "move" endpoint.

func MountMoveStatusHandler

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

MountMoveStatusHandler configures the mux to serve the "package" service "move_status" endpoint.

func MountPreservationActionsHandler

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

MountPreservationActionsHandler configures the mux to serve the "package" service "preservation_actions" endpoint.

func MountRejectHandler

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

MountRejectHandler configures the mux to serve the "package" service "reject" endpoint.

func MountShowHandler

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

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

func MovePackagePath

func MovePackagePath(id uint) string

MovePackagePath returns the URL path to the package service move HTTP endpoint.

func MoveStatusPackagePath

func MoveStatusPackagePath(id uint) string

MoveStatusPackagePath returns the URL path to the package service move_status HTTP endpoint.

func NewCORSHandler

func NewCORSHandler() http.Handler

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

func NewConfirmHandler

func NewConfirmHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewConfirmHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "confirm" endpoint.

func NewConfirmPayload

func NewConfirmPayload(body *ConfirmRequestBody, id uint, oauthToken *string) *package_.ConfirmPayload

NewConfirmPayload builds a package service confirm 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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

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

func NewListPayload

func NewListPayload(name *string, aipID *string, earliestCreatedTime *string, latestCreatedTime *string, locationID *string, status *string, cursor *string, oauthToken *string) *package_.ListPayload

NewListPayload builds a package service list endpoint payload.

func NewMonitorHandler

func NewMonitorHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
	upgrader goahttp.Upgrader,
	configurer goahttp.ConnConfigureFunc,
) http.Handler

NewMonitorHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "monitor" endpoint.

func NewMonitorPayload

func NewMonitorPayload(ticket *string) *package_.MonitorPayload

NewMonitorPayload builds a package service monitor endpoint payload.

func NewMonitorRequestHandler

func NewMonitorRequestHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewMonitorRequestHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "monitor_request" endpoint.

func NewMonitorRequestPayload

func NewMonitorRequestPayload(oauthToken *string) *package_.MonitorRequestPayload

NewMonitorRequestPayload builds a package service monitor_request endpoint payload.

func NewMoveHandler

func NewMoveHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewMoveHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "move" endpoint.

func NewMovePayload

func NewMovePayload(body *MoveRequestBody, id uint, oauthToken *string) *package_.MovePayload

NewMovePayload builds a package service move endpoint payload.

func NewMoveStatusHandler

func NewMoveStatusHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewMoveStatusHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "move_status" endpoint.

func NewMoveStatusPayload

func NewMoveStatusPayload(id uint, oauthToken *string) *package_.MoveStatusPayload

NewMoveStatusPayload builds a package service move_status endpoint payload.

func NewPreservationActionsHandler

func NewPreservationActionsHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewPreservationActionsHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "preservation_actions" endpoint.

func NewPreservationActionsPayload

func NewPreservationActionsPayload(id uint, oauthToken *string) *package_.PreservationActionsPayload

NewPreservationActionsPayload builds a package service preservation_actions endpoint payload.

func NewRejectHandler

func NewRejectHandler(
	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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

NewRejectHandler creates a HTTP handler which loads the HTTP request and calls the "package" service "reject" endpoint.

func NewRejectPayload

func NewRejectPayload(id uint, oauthToken *string) *package_.RejectPayload

NewRejectPayload builds a package service reject 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(ctx context.Context, err error) goahttp.Statuser,
) http.Handler

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

func NewShowPayload

func NewShowPayload(id uint, oauthToken *string) *package_.ShowPayload

NewShowPayload builds a package service show endpoint payload.

func PreservationActionsPackagePath

func PreservationActionsPackagePath(id uint) string

PreservationActionsPackagePath returns the URL path to the package service preservation_actions HTTP endpoint.

func RejectPackagePath

func RejectPackagePath(id uint) string

RejectPackagePath returns the URL path to the package service reject HTTP endpoint.

func ShowPackagePath

func ShowPackagePath(id uint) string

ShowPackagePath returns the URL path to the package service show HTTP endpoint.

func ValidateConfirmRequestBody

func ValidateConfirmRequestBody(body *ConfirmRequestBody) (err error)

ValidateConfirmRequestBody runs the validations defined on ConfirmRequestBody

func ValidateMoveRequestBody

func ValidateMoveRequestBody(body *MoveRequestBody) (err error)

ValidateMoveRequestBody runs the validations defined on MoveRequestBody

Types

type ConfirmNotAvailableResponseBody

type ConfirmNotAvailableResponseBody 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"`
}

ConfirmNotAvailableResponseBody is the type of the "package" service "confirm" endpoint HTTP response body for the "not_available" error.

func NewConfirmNotAvailableResponseBody

func NewConfirmNotAvailableResponseBody(res *goa.ServiceError) *ConfirmNotAvailableResponseBody

NewConfirmNotAvailableResponseBody builds the HTTP response body from the result of the "confirm" endpoint of the "package" service.

type ConfirmNotFoundResponseBody

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

ConfirmNotFoundResponseBody is the type of the "package" service "confirm" endpoint HTTP response body for the "not_found" error.

func NewConfirmNotFoundResponseBody

func NewConfirmNotFoundResponseBody(res *package_.PackageNotFound) *ConfirmNotFoundResponseBody

NewConfirmNotFoundResponseBody builds the HTTP response body from the result of the "confirm" endpoint of the "package" service.

type ConfirmNotValidResponseBody

type ConfirmNotValidResponseBody 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"`
}

ConfirmNotValidResponseBody is the type of the "package" service "confirm" endpoint HTTP response body for the "not_valid" error.

func NewConfirmNotValidResponseBody

func NewConfirmNotValidResponseBody(res *goa.ServiceError) *ConfirmNotValidResponseBody

NewConfirmNotValidResponseBody builds the HTTP response body from the result of the "confirm" endpoint of the "package" service.

type ConfirmRequestBody

type ConfirmRequestBody struct {
	// Identifier of storage location
	LocationID *uuid.UUID `form:"location_id,omitempty" json:"location_id,omitempty" xml:"location_id,omitempty"`
}

ConfirmRequestBody is the type of the "package" service "confirm" endpoint HTTP request body.

type ConnConfigurer

type ConnConfigurer struct {
	MonitorFn goahttp.ConnConfigureFunc
}

ConnConfigurer holds the websocket connection configurer functions for the streaming endpoints in "package" service.

func NewConnConfigurer

func NewConnConfigurer(fn goahttp.ConnConfigureFunc) *ConnConfigurer

NewConnConfigurer initializes the websocket connection configurer function with fn for all the streaming endpoints in "package" service.

type EnduroPackagePreservationActionResponseBody

type EnduroPackagePreservationActionResponseBody struct {
	ID          uint                                                `form:"id" json:"id" xml:"id"`
	WorkflowID  string                                              `form:"workflow_id" json:"workflow_id" xml:"workflow_id"`
	Type        string                                              `form:"type" json:"type" xml:"type"`
	Status      string                                              `form:"status" json:"status" xml:"status"`
	StartedAt   string                                              `form:"started_at" json:"started_at" xml:"started_at"`
	CompletedAt *string                                             `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"`
	Tasks       EnduroPackagePreservationTaskResponseBodyCollection `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"`
	PackageID   *uint                                               `form:"package_id,omitempty" json:"package_id,omitempty" xml:"package_id,omitempty"`
}

EnduroPackagePreservationActionResponseBody is used to define fields on response body types.

type EnduroPackagePreservationActionResponseBodyCollection

type EnduroPackagePreservationActionResponseBodyCollection []*EnduroPackagePreservationActionResponseBody

EnduroPackagePreservationActionResponseBodyCollection is used to define fields on response body types.

type EnduroPackagePreservationTaskResponseBody

type EnduroPackagePreservationTaskResponseBody struct {
	ID                   uint    `form:"id" json:"id" xml:"id"`
	TaskID               string  `form:"task_id" json:"task_id" xml:"task_id"`
	Name                 string  `form:"name" json:"name" xml:"name"`
	Status               string  `form:"status" json:"status" xml:"status"`
	StartedAt            string  `form:"started_at" json:"started_at" xml:"started_at"`
	CompletedAt          *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"`
	Note                 *string `form:"note,omitempty" json:"note,omitempty" xml:"note,omitempty"`
	PreservationActionID *uint   `form:"preservation_action_id,omitempty" json:"preservation_action_id,omitempty" xml:"preservation_action_id,omitempty"`
}

EnduroPackagePreservationTaskResponseBody is used to define fields on response body types.

type EnduroPackagePreservationTaskResponseBodyCollection

type EnduroPackagePreservationTaskResponseBodyCollection []*EnduroPackagePreservationTaskResponseBody

EnduroPackagePreservationTaskResponseBodyCollection is used to define fields on response body types.

type EnduroStoredPackageCollectionResponseBody

type EnduroStoredPackageCollectionResponseBody []*EnduroStoredPackageResponseBody

EnduroStoredPackageCollectionResponseBody is used to define fields on response body types.

type EnduroStoredPackageResponseBody

type EnduroStoredPackageResponseBody struct {
	// Identifier of package
	ID uint `form:"id" json:"id" xml:"id"`
	// Name of the package
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Identifier of storage location
	LocationID *uuid.UUID `form:"location_id,omitempty" json:"location_id,omitempty" xml:"location_id,omitempty"`
	// Status of the package
	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 AIP
	AipID *string `form:"aip_id,omitempty" json:"aip_id,omitempty" xml:"aip_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"`
}

EnduroStoredPackageResponseBody is used to define fields on response body types.

type ListResponseBody

type ListResponseBody struct {
	Items      EnduroStoredPackageCollectionResponseBody `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 "package" service "list" endpoint HTTP response body.

func NewListResponseBody

func NewListResponseBody(res *package_.ListResult) *ListResponseBody

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

type MonitorNotAvailableResponseBody

type MonitorNotAvailableResponseBody 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"`
}

MonitorNotAvailableResponseBody is the type of the "package" service "monitor" endpoint HTTP response body for the "not_available" error.

func NewMonitorNotAvailableResponseBody

func NewMonitorNotAvailableResponseBody(res *goa.ServiceError) *MonitorNotAvailableResponseBody

NewMonitorNotAvailableResponseBody builds the HTTP response body from the result of the "monitor" endpoint of the "package" service.

type MonitorRequestNotAvailableResponseBody

type MonitorRequestNotAvailableResponseBody 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"`
}

MonitorRequestNotAvailableResponseBody is the type of the "package" service "monitor_request" endpoint HTTP response body for the "not_available" error.

func NewMonitorRequestNotAvailableResponseBody

func NewMonitorRequestNotAvailableResponseBody(res *goa.ServiceError) *MonitorRequestNotAvailableResponseBody

NewMonitorRequestNotAvailableResponseBody builds the HTTP response body from the result of the "monitor_request" endpoint of the "package" service.

type MonitorResponseBody

type MonitorResponseBody struct {
	Event *struct {
		// Union type name, one of:
		// - "monitor_ping_event"
		// - "package_created_event"
		// - "package_updated_event"
		// - "package_status_updated_event"
		// - "package_location_updated_event"
		// - "preservation_action_created_event"
		// - "preservation_action_updated_event"
		// - "preservation_task_created_event"
		// - "preservation_task_updated_event"
		Type string `form:"Type" json:"Type" xml:"Type"`
		// JSON encoded union value
		Value string `form:"Value" json:"Value" xml:"Value"`
	} `form:"event,omitempty" json:"event,omitempty" xml:"event,omitempty"`
}

MonitorResponseBody is the type of the "package" service "monitor" endpoint HTTP response body.

func NewMonitorResponseBody

func NewMonitorResponseBody(res *package_.MonitorEvent) *MonitorResponseBody

NewMonitorResponseBody builds the HTTP response body from the result of the "monitor" endpoint of the "package" service.

type MonitorServerStream

type MonitorServerStream struct {
	// contains filtered or unexported fields
}

MonitorServerStream implements the package_.MonitorServerStream interface.

func (*MonitorServerStream) Close

func (s *MonitorServerStream) Close() error

Close closes the "monitor" endpoint websocket connection.

func (*MonitorServerStream) Send

Send streams instances of "package_.MonitorEvent" to the "monitor" endpoint websocket connection.

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 MoveNotAvailableResponseBody

type MoveNotAvailableResponseBody 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"`
}

MoveNotAvailableResponseBody is the type of the "package" service "move" endpoint HTTP response body for the "not_available" error.

func NewMoveNotAvailableResponseBody

func NewMoveNotAvailableResponseBody(res *goa.ServiceError) *MoveNotAvailableResponseBody

NewMoveNotAvailableResponseBody builds the HTTP response body from the result of the "move" endpoint of the "package" service.

type MoveNotFoundResponseBody

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

MoveNotFoundResponseBody is the type of the "package" service "move" endpoint HTTP response body for the "not_found" error.

func NewMoveNotFoundResponseBody

func NewMoveNotFoundResponseBody(res *package_.PackageNotFound) *MoveNotFoundResponseBody

NewMoveNotFoundResponseBody builds the HTTP response body from the result of the "move" endpoint of the "package" service.

type MoveNotValidResponseBody

type MoveNotValidResponseBody 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"`
}

MoveNotValidResponseBody is the type of the "package" service "move" endpoint HTTP response body for the "not_valid" error.

func NewMoveNotValidResponseBody

func NewMoveNotValidResponseBody(res *goa.ServiceError) *MoveNotValidResponseBody

NewMoveNotValidResponseBody builds the HTTP response body from the result of the "move" endpoint of the "package" service.

type MoveRequestBody

type MoveRequestBody struct {
	// Identifier of storage location
	LocationID *uuid.UUID `form:"location_id,omitempty" json:"location_id,omitempty" xml:"location_id,omitempty"`
}

MoveRequestBody is the type of the "package" service "move" endpoint HTTP request body.

type MoveStatusFailedDependencyResponseBody

type MoveStatusFailedDependencyResponseBody 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"`
}

MoveStatusFailedDependencyResponseBody is the type of the "package" service "move_status" endpoint HTTP response body for the "failed_dependency" error.

func NewMoveStatusFailedDependencyResponseBody

func NewMoveStatusFailedDependencyResponseBody(res *goa.ServiceError) *MoveStatusFailedDependencyResponseBody

NewMoveStatusFailedDependencyResponseBody builds the HTTP response body from the result of the "move_status" endpoint of the "package" service.

type MoveStatusNotFoundResponseBody

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

MoveStatusNotFoundResponseBody is the type of the "package" service "move_status" endpoint HTTP response body for the "not_found" error.

func NewMoveStatusNotFoundResponseBody

func NewMoveStatusNotFoundResponseBody(res *package_.PackageNotFound) *MoveStatusNotFoundResponseBody

NewMoveStatusNotFoundResponseBody builds the HTTP response body from the result of the "move_status" endpoint of the "package" service.

type MoveStatusResponseBody

type MoveStatusResponseBody struct {
	Done bool `form:"done" json:"done" xml:"done"`
}

MoveStatusResponseBody is the type of the "package" service "move_status" endpoint HTTP response body.

func NewMoveStatusResponseBody

func NewMoveStatusResponseBody(res *package_.MoveStatusResult) *MoveStatusResponseBody

NewMoveStatusResponseBody builds the HTTP response body from the result of the "move_status" endpoint of the "package" service.

type PreservationActionsNotFoundResponseBody

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

PreservationActionsNotFoundResponseBody is the type of the "package" service "preservation_actions" endpoint HTTP response body for the "not_found" error.

func NewPreservationActionsNotFoundResponseBody

func NewPreservationActionsNotFoundResponseBody(res *package_.PackageNotFound) *PreservationActionsNotFoundResponseBody

NewPreservationActionsNotFoundResponseBody builds the HTTP response body from the result of the "preservation_actions" endpoint of the "package" service.

type PreservationActionsResponseBody

type PreservationActionsResponseBody struct {
	Actions EnduroPackagePreservationActionResponseBodyCollection `form:"actions,omitempty" json:"actions,omitempty" xml:"actions,omitempty"`
}

PreservationActionsResponseBody is the type of the "package" service "preservation_actions" endpoint HTTP response body.

func NewPreservationActionsResponseBody

NewPreservationActionsResponseBody builds the HTTP response body from the result of the "preservation_actions" endpoint of the "package" service.

type RejectNotAvailableResponseBody

type RejectNotAvailableResponseBody 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"`
}

RejectNotAvailableResponseBody is the type of the "package" service "reject" endpoint HTTP response body for the "not_available" error.

func NewRejectNotAvailableResponseBody

func NewRejectNotAvailableResponseBody(res *goa.ServiceError) *RejectNotAvailableResponseBody

NewRejectNotAvailableResponseBody builds the HTTP response body from the result of the "reject" endpoint of the "package" service.

type RejectNotFoundResponseBody

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

RejectNotFoundResponseBody is the type of the "package" service "reject" endpoint HTTP response body for the "not_found" error.

func NewRejectNotFoundResponseBody

func NewRejectNotFoundResponseBody(res *package_.PackageNotFound) *RejectNotFoundResponseBody

NewRejectNotFoundResponseBody builds the HTTP response body from the result of the "reject" endpoint of the "package" service.

type RejectNotValidResponseBody

type RejectNotValidResponseBody 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"`
}

RejectNotValidResponseBody is the type of the "package" service "reject" endpoint HTTP response body for the "not_valid" error.

func NewRejectNotValidResponseBody

func NewRejectNotValidResponseBody(res *goa.ServiceError) *RejectNotValidResponseBody

NewRejectNotValidResponseBody builds the HTTP response body from the result of the "reject" endpoint of the "package" service.

type Server

type Server struct {
	Mounts              []*MountPoint
	MonitorRequest      http.Handler
	Monitor             http.Handler
	List                http.Handler
	Show                http.Handler
	PreservationActions http.Handler
	Confirm             http.Handler
	Reject              http.Handler
	Move                http.Handler
	MoveStatus          http.Handler
	CORS                http.Handler
}

Server lists the package service endpoint HTTP handlers.

func New

func New(
	e *package_.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(ctx context.Context, err error) goahttp.Statuser,
	upgrader goahttp.Upgrader,
	configurer *ConnConfigurer,
) *Server

New instantiates HTTP handlers for all the package 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) MethodNames

func (s *Server) MethodNames() []string

MethodNames returns the methods served.

func (*Server) Mount

func (s *Server) Mount(mux goahttp.Muxer)

Mount configures the mux to serve the package endpoints.

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 ShowNotAvailableResponseBody

type ShowNotAvailableResponseBody 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"`
}

ShowNotAvailableResponseBody is the type of the "package" service "show" endpoint HTTP response body for the "not_available" error.

func NewShowNotAvailableResponseBody

func NewShowNotAvailableResponseBody(res *goa.ServiceError) *ShowNotAvailableResponseBody

NewShowNotAvailableResponseBody builds the HTTP response body from the result of the "show" endpoint of the "package" service.

type ShowNotFoundResponseBody

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

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

func NewShowNotFoundResponseBody

func NewShowNotFoundResponseBody(res *package_.PackageNotFound) *ShowNotFoundResponseBody

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

type ShowResponseBody

type ShowResponseBody struct {
	// Identifier of package
	ID uint `form:"id" json:"id" xml:"id"`
	// Name of the package
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Identifier of storage location
	LocationID *uuid.UUID `form:"location_id,omitempty" json:"location_id,omitempty" xml:"location_id,omitempty"`
	// Status of the package
	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 AIP
	AipID *string `form:"aip_id,omitempty" json:"aip_id,omitempty" xml:"aip_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 "package" service "show" endpoint HTTP response body.

func NewShowResponseBody

func NewShowResponseBody(res *package_views.EnduroStoredPackageView) *ShowResponseBody

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

Jump to

Keyboard shortcuts

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