Documentation ¶
Index ¶
- Constants
- Variables
- func MakeFailedDependency(err error) *goa.ServiceError
- func MakeNotAvailable(err error) *goa.ServiceError
- func MakeNotValid(err error) *goa.ServiceError
- func NewAddLocationEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDownloadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewLocationPackagesEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewLocationsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewMoveEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewMoveStatusEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewRejectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewShowEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewShowLocationEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewSubmitEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedLocation(res *Location, view string) *storageviews.Location
- func NewViewedLocationCollection(res LocationCollection, view string) storageviews.LocationCollection
- func NewViewedPackage(res *Package, view string) *storageviews.Package
- func NewViewedPackageCollection(res PackageCollection, view string) storageviews.PackageCollection
- type AMSSConfig
- type AddLocationPayload
- type AddLocationResult
- type Auther
- type Client
- func (c *Client) AddLocation(ctx context.Context, p *AddLocationPayload) (res *AddLocationResult, err error)
- func (c *Client) Create(ctx context.Context, p *CreatePayload) (res *Package, err error)
- func (c *Client) Download(ctx context.Context, p *DownloadPayload) (res []byte, err error)
- func (c *Client) LocationPackages(ctx context.Context, p *LocationPackagesPayload) (res PackageCollection, err error)
- func (c *Client) Locations(ctx context.Context, p *LocationsPayload) (res LocationCollection, err error)
- func (c *Client) Move(ctx context.Context, p *MovePayload) (err error)
- func (c *Client) MoveStatus(ctx context.Context, p *MoveStatusPayload) (res *MoveStatusResult, err error)
- func (c *Client) Reject(ctx context.Context, p *RejectPayload) (err error)
- func (c *Client) Show(ctx context.Context, p *ShowPayload) (res *Package, err error)
- func (c *Client) ShowLocation(ctx context.Context, p *ShowLocationPayload) (res *Location, err error)
- func (c *Client) Submit(ctx context.Context, p *SubmitPayload) (res *SubmitResult, err error)
- func (c *Client) Update(ctx context.Context, p *UpdatePayload) (err error)
- type CreatePayload
- type DownloadPayload
- type Endpoints
- type EnduroPackagePreservationAction
- type EnduroPackagePreservationTask
- type EnduroPackagePreservationTaskCollection
- type EnduroStoredPackage
- type Forbidden
- type Location
- type LocationCollection
- type LocationNotFound
- type LocationPackagesPayload
- type LocationsPayload
- type MonitorPingEvent
- type MovePayload
- type MoveStatusPayload
- type MoveStatusResult
- type Package
- type PackageCollection
- type PackageCreatedEvent
- type PackageLocationUpdatedEvent
- type PackageNotFound
- type PackageStatusUpdatedEvent
- type PackageUpdatedEvent
- type PreservationActionCreatedEvent
- type PreservationActionUpdatedEvent
- type PreservationTaskCreatedEvent
- type PreservationTaskUpdatedEvent
- type RejectPayload
- type S3Config
- type SFTPConfig
- type Service
- type ShowLocationPayload
- type ShowPayload
- type SubmitPayload
- type SubmitResult
- type URLConfig
- type Unauthorized
- type UpdatePayload
Constants ¶
const APIName = "enduro"
APIName is the name of the API as defined in the design.
const APIVersion = "0.0.1"
APIVersion is the version of the API as defined in the design.
const ServiceName = "storage"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [12]string{"create", "submit", "update", "download", "move", "move_status", "reject", "show", "locations", "add_location", "show_location", "location_packages"}
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 MakeFailedDependency ¶
func MakeFailedDependency(err error) *goa.ServiceError
MakeFailedDependency builds a goa.ServiceError from an error.
func MakeNotAvailable ¶
func MakeNotAvailable(err error) *goa.ServiceError
MakeNotAvailable builds a goa.ServiceError from an error.
func MakeNotValid ¶
func MakeNotValid(err error) *goa.ServiceError
MakeNotValid builds a goa.ServiceError from an error.
func NewAddLocationEndpoint ¶
func NewAddLocationEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewAddLocationEndpoint returns an endpoint function that calls the method "add_location" of service "storage".
func NewCreateEndpoint ¶
func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewCreateEndpoint returns an endpoint function that calls the method "create" of service "storage".
func NewDownloadEndpoint ¶
func NewDownloadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDownloadEndpoint returns an endpoint function that calls the method "download" of service "storage".
func NewLocationPackagesEndpoint ¶
func NewLocationPackagesEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewLocationPackagesEndpoint returns an endpoint function that calls the method "location_packages" of service "storage".
func NewLocationsEndpoint ¶
func NewLocationsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewLocationsEndpoint returns an endpoint function that calls the method "locations" of service "storage".
func NewMoveEndpoint ¶
func NewMoveEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewMoveEndpoint returns an endpoint function that calls the method "move" of service "storage".
func NewMoveStatusEndpoint ¶
func NewMoveStatusEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewMoveStatusEndpoint returns an endpoint function that calls the method "move_status" of service "storage".
func NewRejectEndpoint ¶
func NewRejectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewRejectEndpoint returns an endpoint function that calls the method "reject" of service "storage".
func NewShowEndpoint ¶
func NewShowEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewShowEndpoint returns an endpoint function that calls the method "show" of service "storage".
func NewShowLocationEndpoint ¶
func NewShowLocationEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewShowLocationEndpoint returns an endpoint function that calls the method "show_location" of service "storage".
func NewSubmitEndpoint ¶
func NewSubmitEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewSubmitEndpoint returns an endpoint function that calls the method "submit" of service "storage".
func NewUpdateEndpoint ¶
func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "storage".
func NewViewedLocation ¶
func NewViewedLocation(res *Location, view string) *storageviews.Location
NewViewedLocation initializes viewed result type Location from result type Location using the given view.
func NewViewedLocationCollection ¶
func NewViewedLocationCollection(res LocationCollection, view string) storageviews.LocationCollection
NewViewedLocationCollection initializes viewed result type LocationCollection from result type LocationCollection using the given view.
func NewViewedPackage ¶
func NewViewedPackage(res *Package, view string) *storageviews.Package
NewViewedPackage initializes viewed result type Package from result type Package using the given view.
func NewViewedPackageCollection ¶
func NewViewedPackageCollection(res PackageCollection, view string) storageviews.PackageCollection
NewViewedPackageCollection initializes viewed result type PackageCollection from result type PackageCollection using the given view.
Types ¶
type AMSSConfig ¶
func (*AMSSConfig) ConvertToAMSSConfig ¶
func (t *AMSSConfig) ConvertToAMSSConfig() *types.AMSSConfig
ConvertToAMSSConfig creates an instance of AMSSConfig initialized from t.
type AddLocationPayload ¶
type AddLocationPayload struct { Name string Description *string Source string Purpose string Config interface { // contains filtered or unexported methods } Token *string }
AddLocationPayload is the payload type of the storage service add_location method.
type AddLocationResult ¶
type AddLocationResult struct {
UUID string
}
AddLocationResult is the result type of the storage service add_location method.
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type Client ¶
type Client struct { CreateEndpoint goa.Endpoint SubmitEndpoint goa.Endpoint UpdateEndpoint goa.Endpoint DownloadEndpoint goa.Endpoint MoveEndpoint goa.Endpoint MoveStatusEndpoint goa.Endpoint RejectEndpoint goa.Endpoint ShowEndpoint goa.Endpoint LocationsEndpoint goa.Endpoint AddLocationEndpoint goa.Endpoint ShowLocationEndpoint goa.Endpoint LocationPackagesEndpoint goa.Endpoint }
Client is the "storage" service client.
func NewClient ¶
func NewClient(create, submit, update, download, move, moveStatus, reject, show, locations, addLocation, showLocation, locationPackages goa.Endpoint) *Client
NewClient initializes a "storage" service client given the endpoints.
func (*Client) AddLocation ¶
func (c *Client) AddLocation(ctx context.Context, p *AddLocationPayload) (res *AddLocationResult, err error)
AddLocation calls the "add_location" endpoint of the "storage" service. AddLocation may return the following errors:
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Create ¶
Create calls the "create" endpoint of the "storage" service. Create may return the following errors:
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Download ¶
Download calls the "download" endpoint of the "storage" service. Download may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) LocationPackages ¶
func (c *Client) LocationPackages(ctx context.Context, p *LocationPackagesPayload) (res PackageCollection, err error)
LocationPackages calls the "location_packages" endpoint of the "storage" service. LocationPackages may return the following errors:
- "not_found" (type *LocationNotFound): Storage location not found
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Locations ¶
func (c *Client) Locations(ctx context.Context, p *LocationsPayload) (res LocationCollection, err error)
Locations calls the "locations" endpoint of the "storage" service. Locations may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Move ¶
func (c *Client) Move(ctx context.Context, p *MovePayload) (err error)
Move calls the "move" endpoint of the "storage" service. Move may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "not_available" (type *goa.ServiceError)
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) MoveStatus ¶
func (c *Client) MoveStatus(ctx context.Context, p *MoveStatusPayload) (res *MoveStatusResult, err error)
MoveStatus calls the "move_status" endpoint of the "storage" service. MoveStatus may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "failed_dependency" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Reject ¶
func (c *Client) Reject(ctx context.Context, p *RejectPayload) (err error)
Reject calls the "reject" endpoint of the "storage" service. Reject may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "not_available" (type *goa.ServiceError)
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Show ¶
Show calls the "show" endpoint of the "storage" service. Show may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) ShowLocation ¶
func (c *Client) ShowLocation(ctx context.Context, p *ShowLocationPayload) (res *Location, err error)
ShowLocation calls the "show_location" endpoint of the "storage" service. ShowLocation may return the following errors:
- "not_found" (type *LocationNotFound): Storage location not found
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Submit ¶
func (c *Client) Submit(ctx context.Context, p *SubmitPayload) (res *SubmitResult, err error)
Submit calls the "submit" endpoint of the "storage" service. Submit may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "not_available" (type *goa.ServiceError)
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, p *UpdatePayload) (err error)
Update calls the "update" endpoint of the "storage" service. Update may return the following errors:
- "not_found" (type *PackageNotFound): Storage package not found
- "not_available" (type *goa.ServiceError)
- "not_valid" (type *goa.ServiceError)
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- error: internal error
type CreatePayload ¶
type CreatePayload struct { // Identifier of AIP AipID string // Name of the package Name string // ObjectKey of AIP ObjectKey string // Status of the package Status string // Identifier of the package's storage location LocationID *uuid.UUID Token *string }
CreatePayload is the payload type of the storage service create method.
type DownloadPayload ¶
DownloadPayload is the payload type of the storage service download method.
type Endpoints ¶
type Endpoints struct { Create goa.Endpoint Submit goa.Endpoint Update goa.Endpoint Download goa.Endpoint Move goa.Endpoint MoveStatus goa.Endpoint Reject goa.Endpoint Show goa.Endpoint Locations goa.Endpoint AddLocation goa.Endpoint ShowLocation goa.Endpoint LocationPackages goa.Endpoint }
Endpoints wraps the "storage" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "storage" service with endpoints.
type EnduroPackagePreservationAction ¶
type EnduroPackagePreservationAction struct { ID uint WorkflowID string Type string Status string StartedAt string CompletedAt *string Tasks EnduroPackagePreservationTaskCollection PackageID *uint }
PreservationAction describes a preservation action.
type EnduroPackagePreservationTask ¶
type EnduroPackagePreservationTask struct { ID uint TaskID string Name string Status string StartedAt string CompletedAt *string Note *string PreservationActionID *uint }
PreservationTask describes a preservation action task.
type EnduroPackagePreservationTaskCollection ¶
type EnduroPackagePreservationTaskCollection []*EnduroPackagePreservationTask
type EnduroStoredPackage ¶
type EnduroStoredPackage struct { // Identifier of package ID uint // Name of the package Name *string // Identifier of storage location LocationID *uuid.UUID // Status of the package Status string // Identifier of processing workflow WorkflowID *string // Identifier of latest processing workflow run RunID *string // Identifier of AIP AipID *string // Creation datetime CreatedAt string // Start datetime StartedAt *string // Completion datetime CompletedAt *string }
StoredPackage describes a package retrieved by the service.
type Forbidden ¶
type Forbidden string
Forbidden
func (Forbidden) ErrorName
deprecated
ErrorName returns "forbidden".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Forbidden) GoaErrorName ¶
GoaErrorName returns "forbidden".
type Location ¶
type Location struct { // Name of location Name string // Description of the location Description *string // Data source of the location Source string // Purpose of the location Purpose string UUID uuid.UUID Config interface { // contains filtered or unexported methods } // Creation datetime CreatedAt string }
Location is the result type of the storage service show_location method.
func NewLocation ¶
func NewLocation(vres *storageviews.Location) *Location
NewLocation initializes result type Location from viewed result type Location.
type LocationCollection ¶
type LocationCollection []*Location
LocationCollection is the result type of the storage service locations method.
func NewLocationCollection ¶
func NewLocationCollection(vres storageviews.LocationCollection) LocationCollection
NewLocationCollection initializes result type LocationCollection from viewed result type LocationCollection.
type LocationNotFound ¶
Storage location not found.
func (*LocationNotFound) Error ¶
func (e *LocationNotFound) Error() string
Error returns an error description.
func (*LocationNotFound) ErrorName
deprecated
func (e *LocationNotFound) ErrorName() string
ErrorName returns "LocationNotFound".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*LocationNotFound) GoaErrorName ¶
func (e *LocationNotFound) GoaErrorName() string
GoaErrorName returns "LocationNotFound".
type LocationPackagesPayload ¶
LocationPackagesPayload is the payload type of the storage service location_packages method.
type LocationsPayload ¶
type LocationsPayload struct {
Token *string
}
LocationsPayload is the payload type of the storage service locations method.
type MonitorPingEvent ¶
type MonitorPingEvent struct {
Message *string
}
type MovePayload ¶
type MovePayload struct { // Identifier of AIP AipID string // Identifier of storage location LocationID uuid.UUID Token *string }
MovePayload is the payload type of the storage service move method.
type MoveStatusPayload ¶
MoveStatusPayload is the payload type of the storage service move_status method.
type MoveStatusResult ¶
type MoveStatusResult struct {
Done bool
}
MoveStatusResult is the result type of the storage service move_status method.
type Package ¶
type Package struct { Name string AipID uuid.UUID // Status of the package Status string ObjectKey uuid.UUID // Identifier of storage location LocationID *uuid.UUID // Creation datetime CreatedAt string }
Package is the result type of the storage service create method.
func NewPackage ¶
func NewPackage(vres *storageviews.Package) *Package
NewPackage initializes result type Package from viewed result type Package.
type PackageCollection ¶
type PackageCollection []*Package
PackageCollection is the result type of the storage service location_packages method.
func NewPackageCollection ¶
func NewPackageCollection(vres storageviews.PackageCollection) PackageCollection
NewPackageCollection initializes result type PackageCollection from viewed result type PackageCollection.
type PackageCreatedEvent ¶
type PackageCreatedEvent struct { // Identifier of package ID uint Item *EnduroStoredPackage }
type PackageNotFound ¶
type PackageNotFound struct { // Message of error Message string // Identifier of missing package AipID uuid.UUID }
Storage package not found.
func (*PackageNotFound) Error ¶
func (e *PackageNotFound) Error() string
Error returns an error description.
func (*PackageNotFound) ErrorName
deprecated
func (e *PackageNotFound) ErrorName() string
ErrorName returns "PackageNotFound".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*PackageNotFound) GoaErrorName ¶
func (e *PackageNotFound) GoaErrorName() string
GoaErrorName returns "PackageNotFound".
type PackageUpdatedEvent ¶
type PackageUpdatedEvent struct { // Identifier of package ID uint Item *EnduroStoredPackage }
type PreservationActionCreatedEvent ¶
type PreservationActionCreatedEvent struct { // Identifier of preservation action ID uint Item *EnduroPackagePreservationAction }
type PreservationActionUpdatedEvent ¶
type PreservationActionUpdatedEvent struct { // Identifier of preservation action ID uint Item *EnduroPackagePreservationAction }
type PreservationTaskCreatedEvent ¶
type PreservationTaskCreatedEvent struct { // Identifier of preservation task ID uint Item *EnduroPackagePreservationTask }
type PreservationTaskUpdatedEvent ¶
type PreservationTaskUpdatedEvent struct { // Identifier of preservation task ID uint Item *EnduroPackagePreservationTask }
type RejectPayload ¶
RejectPayload is the payload type of the storage service reject method.
type S3Config ¶
type S3Config struct { Bucket string Region string Endpoint *string PathStyle *bool Profile *string Key *string Secret *string Token *string }
func (*S3Config) ConvertToS3Config ¶
ConvertToS3Config creates an instance of S3Config initialized from t.
type SFTPConfig ¶
func (*SFTPConfig) ConvertToSFTPConfig ¶
func (t *SFTPConfig) ConvertToSFTPConfig() *types.SFTPConfig
ConvertToSFTPConfig creates an instance of SFTPConfig initialized from t.
type Service ¶
type Service interface { // Create a new package Create(context.Context, *CreatePayload) (res *Package, err error) // Start the submission of a package Submit(context.Context, *SubmitPayload) (res *SubmitResult, err error) // Signal that a package submission is complete Update(context.Context, *UpdatePayload) (err error) // Download package by AIPID Download(context.Context, *DownloadPayload) (res []byte, err error) // Move a package to a permanent storage location Move(context.Context, *MovePayload) (err error) // Retrieve the status of a permanent storage location move of the package MoveStatus(context.Context, *MoveStatusPayload) (res *MoveStatusResult, err error) // Reject a package Reject(context.Context, *RejectPayload) (err error) // Show package by AIPID Show(context.Context, *ShowPayload) (res *Package, err error) // List locations Locations(context.Context, *LocationsPayload) (res LocationCollection, err error) // Create a storage location AddLocation(context.Context, *AddLocationPayload) (res *AddLocationResult, err error) // Show location by UUID ShowLocation(context.Context, *ShowLocationPayload) (res *Location, err error) // List all the packages stored in the location with UUID LocationPackages(context.Context, *LocationPackagesPayload) (res PackageCollection, err error) }
The storage service manages the storage of packages.
type ShowLocationPayload ¶
ShowLocationPayload is the payload type of the storage service show_location method.
type ShowPayload ¶
ShowPayload is the payload type of the storage service show method.
type SubmitPayload ¶
SubmitPayload is the payload type of the storage service submit method.
type SubmitResult ¶
type SubmitResult struct {
URL string
}
SubmitResult is the result type of the storage service submit method.
type URLConfig ¶
type URLConfig struct {
URL string
}
func (*URLConfig) ConvertToURLConfig ¶
ConvertToURLConfig creates an instance of URLConfig initialized from t.
type Unauthorized ¶
type Unauthorized string
Unauthorized
func (Unauthorized) Error ¶
func (e Unauthorized) Error() string
Error returns an error description.
func (Unauthorized) ErrorName
deprecated
func (e Unauthorized) ErrorName() string
ErrorName returns "unauthorized".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Unauthorized) GoaErrorName ¶
func (e Unauthorized) GoaErrorName() string
GoaErrorName returns "unauthorized".
type UpdatePayload ¶
UpdatePayload is the payload type of the storage service update method.