api

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGetFileMetadata

func HandleGetFileMetadata(getMetadata GetFileMetadata) http.HandlerFunc

func HandleMarkBundlePublished added in v1.8.0

func HandleMarkBundlePublished(markBundlePublished MarkBundlePublished) http.HandlerFunc

func HandleMarkCollectionPublished

func HandleMarkCollectionPublished(markCollectionPublished MarkCollectionPublished) http.HandlerFunc

func HandleMarkFileMoved added in v1.3.0

func HandleMarkFileMoved(markMovementComplete MarkMovementComplete) http.HandlerFunc

func HandleMarkFilePublished

func HandleMarkFilePublished(markFilePublished MarkFilePublished) http.HandlerFunc

func HandleMarkUploadComplete

func HandleMarkUploadComplete(markUploaded MarkUploadComplete) http.HandlerFunc

func HandleRemoveFile added in v1.10.0

func HandleRemoveFile(removeFile RemoveFile) http.HandlerFunc

func HandlerCreateFileEvent added in v1.13.0

func HandlerCreateFileEvent(createFileEvent CreateFileEvent) http.HandlerFunc

func HandlerGetFileEvents added in v1.13.0

func HandlerGetFileEvents(getFileEvents GetFileEvents) http.HandlerFunc

func HandlerGetFilesMetadata

func HandlerGetFilesMetadata(getFilesMetadata GetFilesMetadata) http.HandlerFunc

func HandlerRegisterUploadStarted

func HandlerRegisterUploadStarted(register RegisterFileUpload, deadlineDuration time.Duration) http.HandlerFunc

func HandlerUpdateBundleID added in v1.8.0

func HandlerUpdateBundleID(updateBundleID UpdateBundleID) http.HandlerFunc

func HandlerUpdateCollectionID

func HandlerUpdateCollectionID(updateCollectionID UpdateCollectionID) http.HandlerFunc

func PatchRequestToHandler

func PatchRequestToHandler(handlers PatchRequestHandlers) http.HandlerFunc

Types

type BundleChange added in v1.8.0

type BundleChange struct {
	BundleID string `json:"bundle_id"`
}

type CollectionChange

type CollectionChange struct {
	CollectionID string `json:"collection_id"`
}

type CreateFileEvent added in v1.13.0

type CreateFileEvent func(ctx context.Context, event *files.FileEvent) error

type EtagChange

type EtagChange struct {
	Etag string `json:"etag" validate:"required"`
}

type FilesCollection

type FilesCollection struct {
	Count      int64                            `json:"count"`
	Limit      int64                            `json:"limit"`
	Offset     int64                            `json:"offset"`
	TotalCount int64                            `json:"total_count"`
	Items      []files.StoredRegisteredMetaData `json:"items"`
}

type GetFileEvents added in v1.13.0

type GetFileEvents func(ctx context.Context, limit, offset int, path string, after, before *time.Time) (*files.EventsList, error)

type GetFileMetadata

type GetFileMetadata func(ctx context.Context, path string) (files.StoredRegisteredMetaData, error)

type GetFilesMetadata

type GetFilesMetadata func(ctx context.Context, collectionID, bundleID string) ([]files.StoredRegisteredMetaData, error)

type JSONError added in v1.14.0

type JSONError struct {
	Code        string `json:"errorCode"`
	Description string `json:"description"`
}

type JSONErrors added in v1.14.0

type JSONErrors struct {
	Error []JSONError `json:"errors"`
}

type MarkBundlePublished added in v1.8.0

type MarkBundlePublished func(ctx context.Context, bundleID string) error

type MarkCollectionPublished

type MarkCollectionPublished func(ctx context.Context, collectionID string) error

type MarkFilePublished

type MarkFilePublished func(ctx context.Context, path string) error

type MarkMovementComplete added in v1.3.0

type MarkMovementComplete func(ctx context.Context, change files.FileEtagChange) error

type MarkUploadComplete

type MarkUploadComplete func(ctx context.Context, metaData files.FileEtagChange) error

type PatchRequestHandlers

type PatchRequestHandlers struct {
	UploadComplete   http.HandlerFunc
	Published        http.HandlerFunc
	Moved            http.HandlerFunc
	CollectionUpdate http.HandlerFunc
	BundleUpdate     http.HandlerFunc
}

type RegisterFileUpload

type RegisterFileUpload func(ctx context.Context, metaData files.StoredRegisteredMetaData) error

type RegisterMetadata

type RegisterMetadata struct {
	Path          string  `json:"path" validate:"required,aws-upload-key"`
	IsPublishable *bool   `json:"is_publishable,omitempty" validate:"required"`
	CollectionID  *string `json:"collection_id,omitempty"`
	BundleID      *string `json:"bundle_id,omitempty"`
	Title         string  `json:"title"`
	SizeInBytes   uint64  `json:"size_in_bytes" validate:"gt=0"`
	Type          string  `json:"type"`
	Licence       string  `json:"licence" validate:"required"`
	LicenceURL    string  `json:"licence_url" validate:"required"`
}

type RemoveFile added in v1.10.0

type RemoveFile func(ctx context.Context, path string) error

type StateMetadata

type StateMetadata struct {
	State        *string `json:"state,omitempty"`
	CollectionID *string `json:"collection_id,omitempty"`
	BundleID     *string `json:"bundle_id,omitempty"`
}

type UpdateBundleID added in v1.8.0

type UpdateBundleID func(ctx context.Context, path, bundleID string) error

type UpdateCollectionID

type UpdateCollectionID func(ctx context.Context, path, collectionID string) error

Jump to

Keyboard shortcuts

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