Documentation
¶
Index ¶
- func GeneratedPageLimit(ctx context.Context) int64
- func NewHandler(operations Operations, options Options) (http.Handler, error)
- func RequestID(ctx context.Context) string
- type AssetResult
- type BearerAuth
- type BulkUpgradeItemResult
- type BulkUpgradeOptions
- type BulkUpgradePlan
- type BulkUpgradeRequest
- type BulkUpgradeResult
- type Capabilities
- type CapabilitiesAPIVersion
- type CapabilitiesUploadFormats
- type Client
- func (c *Client) Capabilities(ctx context.Context) (Capabilities, error)
- func (c *Client) CreateDocumentRevision(ctx context.Context, upload CreateDocumentRevisionUpload) (DocumentRevisionResult, error)
- func (c *Client) DeleteUpload(ctx context.Context, request DeleteRequest) (DeleteResult, error)
- func (c *Client) ExecuteBulkUpgrade(ctx context.Context, request BulkUpgradeRequest) (BulkUpgradeResult, error)
- func (c *Client) ExecuteDocumentUpgrade(ctx context.Context, request UpgradeDocumentPlan) (UpgradeDocumentResult, error)
- func (c *Client) ExecutePurge(ctx context.Context, request PurgeRequest) (PurgeResult, error)
- func (c *Client) GetUpload(ctx context.Context, request GetUploadRequest) (Download, error)
- func (c *Client) Health(ctx context.Context) (Health, error)
- func (c *Client) InspectUpload(ctx context.Context, request TargetRequest) (UploadInspection, error)
- func (c *Client) ListManifestUploads(ctx context.Context) (ManifestList, error)
- func (c *Client) ListStorageUploads(ctx context.Context) (StorageList, error)
- func (c *Client) OpenAPI(ctx context.Context) ([]byte, error)
- func (c *Client) PlanBulkUpgrade(ctx context.Context, request BulkUpgradeOptions) (BulkUpgradePlan, error)
- func (c *Client) PlanDocumentUpgrade(ctx context.Context, request UpgradePlanRequest) (UpgradeDocumentPlan, error)
- func (c *Client) PreviewPurge(ctx context.Context, request PurgePreviewRequest) (PurgePreview, error)
- func (c *Client) ProtectUpload(ctx context.Context, request ProtectRequest) (ProtectionResult, error)
- func (c *Client) SyncManifest(ctx context.Context, request SyncRequest) (SyncResult, error)
- func (c *Client) UnprotectUpload(ctx context.Context, request TargetRequest) (ProtectionResult, error)
- func (c *Client) UpdateDocument(ctx context.Context, metadata UpdateDocumentMetadata, document io.Reader) (UpdateDocumentResult, error)
- func (c *Client) UpdateDocumentBundle(ctx context.Context, upload CreateDocumentRevisionUpload) (DocumentRevisionResult, error)
- func (c *Client) UploadCollection(ctx context.Context, metadata CollectionMetadata, files []CollectionFile) (UploadResult, error)
- func (c *Client) UploadDocument(ctx context.Context, metadata DocumentMetadata, document io.Reader) (UploadResult, error)
- func (c *Client) UploadDocumentBundle(ctx context.Context, upload DocumentUpload) (UploadResult, error)
- type CollectionFile
- type CollectionMetadata
- type CollectionUpload
- type CreateDocumentRevisionMetadata
- type CreateDocumentRevisionMetadataFormat
- type CreateDocumentRevisionUpload
- type DeleteRequest
- type DeleteResult
- type DeleteResultKind
- type DocumentAsset
- type DocumentAssetDescriptor
- type DocumentBundleCapabilities
- type DocumentMetadata
- type DocumentMetadataFormat
- type DocumentPage
- type DocumentPageDescriptor
- type DocumentPageDescriptorFormat
- type DocumentRevisionResult
- type DocumentRevisionResultKind
- type DocumentUpload
- type Download
- type FileResult
- type GetUploadRequest
- type Health
- type HealthStatus
- type InspectedObject
- type InspectedObjectRole
- type InspectedPage
- type ManifestList
- type ManifestRecord
- type ManifestRecordKind
- type ManifestRecordType
- type Operations
- type Options
- type OriginGuard
- type PageResult
- type Problem
- type ProblemError
- type ProtectRequest
- type ProtectionResult
- type ProtectionResultKind
- type PurgeCandidate
- type PurgeItemResult
- type PurgePreview
- type PurgePreviewRequest
- type PurgePreviewRequestSource
- type PurgeRequest
- type PurgeResult
- type RemoteUpload
- type RemoteUploadKind
- type Server
- func (s *Server) CreateDocumentRevision(ctx context.Context, request generated.CreateDocumentRevisionRequestObject) (generated.CreateDocumentRevisionResponseObject, error)
- func (s *Server) DeleteUpload(ctx context.Context, request generated.DeleteUploadRequestObject) (generated.DeleteUploadResponseObject, error)
- func (s *Server) ExecuteBulkUpgrade(ctx context.Context, request generated.ExecuteBulkUpgradeRequestObject) (generated.ExecuteBulkUpgradeResponseObject, error)
- func (s *Server) ExecuteDocumentUpgrade(ctx context.Context, request generated.ExecuteDocumentUpgradeRequestObject) (generated.ExecuteDocumentUpgradeResponseObject, error)
- func (s *Server) ExecutePurge(ctx context.Context, request generated.ExecutePurgeRequestObject) (generated.ExecutePurgeResponseObject, error)
- func (s *Server) GetCapabilities(ctx context.Context, _ generated.GetCapabilitiesRequestObject) (generated.GetCapabilitiesResponseObject, error)
- func (s *Server) GetOpenAPI(context.Context, generated.GetOpenAPIRequestObject) (generated.GetOpenAPIResponseObject, error)
- func (s *Server) GetUpload(ctx context.Context, request generated.GetUploadRequestObject) (generated.GetUploadResponseObject, error)
- func (s *Server) Handler() (http.Handler, error)
- func (s *Server) Health(context.Context, generated.HealthRequestObject) (generated.HealthResponseObject, error)
- func (s *Server) InspectUpload(ctx context.Context, request generated.InspectUploadRequestObject) (generated.InspectUploadResponseObject, error)
- func (s *Server) ListManifestUploads(ctx context.Context, _ generated.ListManifestUploadsRequestObject) (generated.ListManifestUploadsResponseObject, error)
- func (s *Server) ListStorageUploads(ctx context.Context, _ generated.ListStorageUploadsRequestObject) (generated.ListStorageUploadsResponseObject, error)
- func (s *Server) PlanBulkUpgrade(ctx context.Context, request generated.PlanBulkUpgradeRequestObject) (generated.PlanBulkUpgradeResponseObject, error)
- func (s *Server) PlanDocumentUpgrade(ctx context.Context, request generated.PlanDocumentUpgradeRequestObject) (generated.PlanDocumentUpgradeResponseObject, error)
- func (s *Server) PreviewPurge(ctx context.Context, request generated.PreviewPurgeRequestObject) (generated.PreviewPurgeResponseObject, error)
- func (s *Server) ProtectUpload(ctx context.Context, request generated.ProtectUploadRequestObject) (generated.ProtectUploadResponseObject, error)
- func (s *Server) SyncManifest(ctx context.Context, request generated.SyncManifestRequestObject) (generated.SyncManifestResponseObject, error)
- func (s *Server) UnprotectUpload(ctx context.Context, request generated.UnprotectUploadRequestObject) (generated.UnprotectUploadResponseObject, error)
- func (s *Server) UpdateDocument(ctx context.Context, request generated.UpdateDocumentRequestObject) (generated.UpdateDocumentResponseObject, error)
- func (s *Server) UploadCollection(ctx context.Context, request generated.UploadCollectionRequestObject) (generated.UploadCollectionResponseObject, error)
- func (s *Server) UploadDocument(ctx context.Context, request generated.UploadDocumentRequestObject) (generated.UploadDocumentResponseObject, error)
- type StorageList
- type SyncFailure
- type SyncFailureOperation
- type SyncRequest
- type SyncResult
- type TargetRequest
- type UpdateDocumentMetadata
- type UpdateDocumentResult
- type UpdateDocumentResultKind
- type UpdateDocumentUpload
- type UpgradeDocumentPlan
- type UpgradeDocumentResult
- type UpgradePlanRequest
- type UpgradeState
- type UploadInspection
- type UploadInspectionKind
- type UploadInspectionState
- type UploadLimits
- type UploadResult
- type UploadResultKind
- type VersionsMetadata
- type VersionsMetadataSchema
- type VersionsMetadataVersion
- type VersionsRevision
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratedPageLimit ¶ added in v0.11.0
GeneratedPageLimit returns the server's effective generated-HTML ceiling for the current document operation. It is zero outside the HTTP server.
func NewHandler ¶
func NewHandler(operations Operations, options Options) (http.Handler, error)
NewHandler constructs the complete generated REST handler.
Types ¶
type AssetResult ¶ added in v0.11.0
type AssetResult = generated.AssetResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type BearerAuth ¶
type BearerAuth struct {
// contains filtered or unexported fields
}
BearerAuth authenticates one static token using fixed-size digests.
func NewBearerAuth ¶
func NewBearerAuth(token string) (*BearerAuth, error)
NewBearerAuth prepares static bearer authentication.
func (*BearerAuth) Wrap ¶
func (a *BearerAuth) Wrap(next http.Handler) http.Handler
Wrap rejects missing, duplicate, malformed, and incorrect credentials before the downstream handler reads a request body.
func (*BearerAuth) WrapWithLogger ¶
func (a *BearerAuth) WrapWithLogger( next http.Handler, logger *slog.Logger, transport string, ) http.Handler
WrapWithLogger authenticates like Wrap and logs only a safe rejection reason.
type BulkUpgradeItemResult ¶ added in v0.8.0
type BulkUpgradeItemResult = generated.BulkUpgradeItemResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type BulkUpgradeOptions ¶ added in v0.8.0
type BulkUpgradeOptions = generated.BulkUpgradeOptions
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type BulkUpgradePlan ¶ added in v0.8.0
type BulkUpgradePlan = generated.BulkUpgradePlan
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type BulkUpgradeRequest ¶ added in v0.8.0
type BulkUpgradeRequest = generated.BulkUpgradeRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type BulkUpgradeResult ¶ added in v0.8.0
type BulkUpgradeResult = generated.BulkUpgradeResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type Capabilities ¶
type Capabilities = generated.Capabilities
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type CapabilitiesAPIVersion ¶
type CapabilitiesAPIVersion = generated.CapabilitiesAPIVersion
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type CapabilitiesUploadFormats ¶
type CapabilitiesUploadFormats = generated.CapabilitiesUploadFormats
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the typed, non-retrying Airplan REST client foundation.
func (*Client) Capabilities ¶
func (c *Client) Capabilities(ctx context.Context) (Capabilities, error)
Capabilities returns safe compatibility information.
func (*Client) CreateDocumentRevision ¶ added in v0.11.0
func (c *Client) CreateDocumentRevision( ctx context.Context, upload CreateDocumentRevisionUpload, ) (DocumentRevisionResult, error)
CreateDocumentRevision sends revision data to the canonical route.
func (*Client) DeleteUpload ¶
func (c *Client) DeleteUpload( ctx context.Context, request DeleteRequest, ) (DeleteResult, error)
DeleteUpload permanently deletes one marker-managed upload.
func (*Client) ExecuteBulkUpgrade ¶ added in v0.8.0
func (c *Client) ExecuteBulkUpgrade( ctx context.Context, request BulkUpgradeRequest, ) (BulkUpgradeResult, error)
func (*Client) ExecuteDocumentUpgrade ¶ added in v0.8.0
func (c *Client) ExecuteDocumentUpgrade( ctx context.Context, request UpgradeDocumentPlan, ) (UpgradeDocumentResult, error)
func (*Client) ExecutePurge ¶
func (c *Client) ExecutePurge( ctx context.Context, request PurgeRequest, ) (PurgeResult, error)
ExecutePurge permanently deletes explicit reviewed upload IDs.
func (*Client) GetUpload ¶
GetUpload opens one streaming marker-declared object response. The caller must close Download.Body.
func (*Client) InspectUpload ¶
func (c *Client) InspectUpload( ctx context.Context, request TargetRequest, ) (UploadInspection, error)
InspectUpload validates and describes one marker-managed upload.
func (*Client) ListManifestUploads ¶
func (c *Client) ListManifestUploads(ctx context.Context) (ManifestList, error)
ListManifestUploads lists scoped server manifest history.
func (*Client) ListStorageUploads ¶
func (c *Client) ListStorageUploads(ctx context.Context) (StorageList, error)
ListStorageUploads lists direct storage candidates.
func (*Client) PlanBulkUpgrade ¶ added in v0.8.0
func (c *Client) PlanBulkUpgrade( ctx context.Context, request BulkUpgradeOptions, ) (BulkUpgradePlan, error)
func (*Client) PlanDocumentUpgrade ¶ added in v0.8.0
func (c *Client) PlanDocumentUpgrade( ctx context.Context, request UpgradePlanRequest, ) (UpgradeDocumentPlan, error)
func (*Client) PreviewPurge ¶
func (c *Client) PreviewPurge( ctx context.Context, request PurgePreviewRequest, ) (PurgePreview, error)
PreviewPurge returns explicit candidates without deleting them.
func (*Client) ProtectUpload ¶ added in v0.7.0
func (c *Client) ProtectUpload( ctx context.Context, request ProtectRequest, ) (ProtectionResult, error)
ProtectUpload marks one marker-managed upload as purge-protected.
func (*Client) SyncManifest ¶
func (c *Client) SyncManifest( ctx context.Context, request SyncRequest, ) (SyncResult, error)
SyncManifest plans or applies storage-to-manifest reconciliation.
func (*Client) UnprotectUpload ¶ added in v0.7.0
func (c *Client) UnprotectUpload( ctx context.Context, request TargetRequest, ) (ProtectionResult, error)
UnprotectUpload removes purge protection from one marker-managed upload.
func (*Client) UpdateDocument ¶ added in v0.8.0
func (c *Client) UpdateDocument( ctx context.Context, metadata UpdateDocumentMetadata, document io.Reader, ) (UpdateDocumentResult, error)
func (*Client) UpdateDocumentBundle ¶ added in v0.11.0
func (c *Client) UpdateDocumentBundle( ctx context.Context, upload CreateDocumentRevisionUpload, ) (DocumentRevisionResult, error)
UpdateDocumentBundle sends revision data to the deprecated compatibility route. Callers choose the route before opening this non-replayable body.
func (*Client) UploadCollection ¶
func (c *Client) UploadCollection( ctx context.Context, metadata CollectionMetadata, files []CollectionFile, ) (UploadResult, error)
UploadCollection streams collection members in caller order.
func (*Client) UploadDocument ¶
func (c *Client) UploadDocument( ctx context.Context, metadata DocumentMetadata, document io.Reader, ) (UploadResult, error)
UploadDocument streams a multipart document upload without buffering the document in memory. The request is never retried automatically.
func (*Client) UploadDocumentBundle ¶ added in v0.11.0
func (c *Client) UploadDocumentBundle( ctx context.Context, upload DocumentUpload, ) (UploadResult, error)
UploadDocumentBundle streams an ordered document multipart request.
type CollectionFile ¶
type CollectionFile struct {
Name string
ContentType string
Size int64
Reader io.ReadSeeker
}
CollectionFile is one mode-0600 spooled collection member.
type CollectionMetadata ¶
type CollectionMetadata = generated.CollectionMetadata
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type CollectionUpload ¶
type CollectionUpload struct {
Metadata CollectionMetadata
Files []CollectionFile
}
CollectionUpload carries a fully validated collection to the operation adapter. Readers are valid only for the duration of UploadCollection.
type CreateDocumentRevisionMetadata ¶ added in v0.11.0
type CreateDocumentRevisionMetadata = generated.CreateDocumentRevisionMetadata
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type CreateDocumentRevisionMetadataFormat ¶ added in v0.11.0
type CreateDocumentRevisionMetadataFormat = generated.CreateDocumentRevisionMetadataFormat
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type CreateDocumentRevisionUpload ¶ added in v0.11.0
type CreateDocumentRevisionUpload struct {
Metadata CreateDocumentRevisionMetadata
Document io.Reader
DocumentSize int64
Pages []DocumentPage
Assets []DocumentAsset
}
type DeleteRequest ¶ added in v0.7.0
type DeleteRequest = generated.DeleteRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DeleteResult ¶
type DeleteResult = generated.DeleteResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DeleteResultKind ¶
type DeleteResultKind = generated.DeleteResultKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentAsset ¶ added in v0.11.0
type DocumentAsset struct {
DocumentAssetDescriptor
Reader io.ReadSeeker
Start int64
}
DocumentAsset is one exact-size, seekable asset bound to its descriptor.
type DocumentAssetDescriptor ¶ added in v0.11.0
type DocumentAssetDescriptor = generated.DocumentAssetDescriptor
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentBundleCapabilities ¶ added in v0.11.0
type DocumentBundleCapabilities = generated.DocumentBundleCapabilities
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentMetadata ¶
type DocumentMetadata = generated.DocumentMetadata
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentMetadataFormat ¶
type DocumentMetadataFormat = generated.DocumentMetadataFormat
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentPage ¶ added in v0.11.0
type DocumentPage struct {
DocumentPageDescriptor
Reader io.Reader
Size int64
}
DocumentPage is one managed page bound to its ordered metadata descriptor.
type DocumentPageDescriptor ¶ added in v0.11.0
type DocumentPageDescriptor = generated.DocumentPageDescriptor
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentPageDescriptorFormat ¶ added in v0.11.0
type DocumentPageDescriptorFormat = generated.DocumentPageDescriptorFormat
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentRevisionResult ¶ added in v0.11.0
type DocumentRevisionResult = generated.DocumentRevisionResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentRevisionResultKind ¶ added in v0.11.0
type DocumentRevisionResultKind = generated.DocumentRevisionResultKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type DocumentUpload ¶
type DocumentUpload struct {
Metadata DocumentMetadata
Document io.Reader
DocumentSize int64
Pages []DocumentPage
Assets []DocumentAsset
}
DocumentUpload carries the streaming document request to the operation adapter. The Reader is valid only for the duration of UploadDocument.
type Download ¶
type Download struct {
Body io.ReadCloser
Key string
Filename string
ContentType string
}
Download is a streaming marker-declared object response.
type FileResult ¶
type FileResult = generated.FileResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type GetUploadRequest ¶
type GetUploadRequest = generated.GetUploadRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type Health ¶
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type HealthStatus ¶
type HealthStatus = generated.HealthStatus
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type InspectedObject ¶
type InspectedObject = generated.InspectedObject
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type InspectedObjectRole ¶ added in v0.11.0
type InspectedObjectRole = generated.InspectedObjectRole
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type InspectedPage ¶ added in v0.11.0
type InspectedPage = generated.InspectedPage
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ManifestList ¶
type ManifestList = generated.ManifestList
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ManifestRecord ¶
type ManifestRecord = generated.ManifestRecord
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ManifestRecordKind ¶
type ManifestRecordKind = generated.ManifestRecordKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ManifestRecordType ¶
type ManifestRecordType = generated.ManifestRecordType
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type Operations ¶
type Operations interface {
Capabilities(context.Context) (Capabilities, error)
UploadDocument(context.Context, DocumentUpload) (UploadResult, error)
CreateDocumentRevision(context.Context, CreateDocumentRevisionUpload) (DocumentRevisionResult, error)
UploadCollection(context.Context, CollectionUpload) (UploadResult, error)
PlanDocumentUpgrade(context.Context, UpgradePlanRequest) (UpgradeDocumentPlan, error)
ExecuteDocumentUpgrade(context.Context, UpgradeDocumentPlan) (UpgradeDocumentResult, error)
PlanBulkUpgrade(context.Context, BulkUpgradeOptions) (BulkUpgradePlan, error)
ExecuteBulkUpgrade(context.Context, BulkUpgradeRequest) (BulkUpgradeResult, error)
InspectUpload(context.Context, TargetRequest) (UploadInspection, error)
GetUpload(context.Context, GetUploadRequest) (Download, error)
DeleteUpload(context.Context, DeleteRequest) (DeleteResult, error)
ProtectUpload(context.Context, ProtectRequest) (ProtectionResult, error)
UnprotectUpload(context.Context, TargetRequest) (ProtectionResult, error)
ListManifestUploads(context.Context) (ManifestList, error)
ListStorageUploads(context.Context) (StorageList, error)
SyncManifest(context.Context, SyncRequest) (SyncResult, error)
PreviewPurge(context.Context, PurgePreviewRequest) (PurgePreview, error)
ExecutePurge(context.Context, PurgeRequest) (PurgeResult, error)
}
Operations is the transport boundary between HTTP and Airplan's shared operation service. Implementations contain business logic; handlers only decode, bound, authenticate, and encode requests.
type Options ¶
type Options struct {
Token string
Logger *slog.Logger
TempDir string
OpenAPI []byte
MaxRequestBodyBytes int64
MaxJSONBodyBytes int64
MaxDocumentBytes int64
MaxTotalPageBytes int64
MaxGeneratedPageBytes int64
MaxAssetBytes int64
MaxDocumentAssetTotalBytes int64
MaxMetadataBytes int64
MaxDocumentItems int
MaxCollectionFileBytes int64
MaxCollectionTotalBytes int64
MaxCollectionFiles int
}
Options sets HTTP transport policy. Zero size values use conservative defaults; callers cannot disable a server hard limit.
type OriginGuard ¶
type OriginGuard struct {
// contains filtered or unexported fields
}
OriginGuard validates present browser origins against an exact allowlist. Requests without Origin are accepted for non-browser agent clients.
func NewOriginGuard ¶
func NewOriginGuard(origins []string) (*OriginGuard, error)
NewOriginGuard validates and stores an explicit origin allowlist.
type PageResult ¶ added in v0.11.0
type PageResult = generated.PageResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type Problem ¶
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ProblemError ¶
type ProblemError struct {
Problem Problem
// contains filtered or unexported fields
}
ProblemError lets the operation adapter return a safe, typed HTTP failure.
func NewProblemError ¶
func NewProblemError(status int, code, title, detail string) *ProblemError
NewProblemError constructs a typed problem safe to expose to clients.
func (*ProblemError) Error ¶
func (e *ProblemError) Error() string
type ProtectRequest ¶ added in v0.7.0
type ProtectRequest = generated.ProtectRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ProtectionResult ¶ added in v0.7.0
type ProtectionResult = generated.ProtectionResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type ProtectionResultKind ¶ added in v0.7.0
type ProtectionResultKind = generated.ProtectionResultKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgeCandidate ¶
type PurgeCandidate = generated.PurgeCandidate
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgeItemResult ¶
type PurgeItemResult = generated.PurgeItemResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgePreview ¶
type PurgePreview = generated.PurgePreview
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgePreviewRequest ¶
type PurgePreviewRequest = generated.PurgePreviewRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgePreviewRequestSource ¶
type PurgePreviewRequestSource = generated.PurgePreviewRequestSource
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgeRequest ¶
type PurgeRequest = generated.PurgeRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type PurgeResult ¶
type PurgeResult = generated.PurgeResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type RemoteUpload ¶
type RemoteUpload = generated.RemoteUpload
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type RemoteUploadKind ¶
type RemoteUploadKind = generated.RemoteUploadKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the OpenAPI-generated strict server interface around the shared Airplan operation service.
func NewServer ¶
func NewServer(operations Operations, options Options) (*Server, error)
NewServer validates transport policy and constructs a REST adapter.
func (*Server) CreateDocumentRevision ¶ added in v0.11.0
func (s *Server) CreateDocumentRevision( ctx context.Context, request generated.CreateDocumentRevisionRequestObject, ) (generated.CreateDocumentRevisionResponseObject, error)
CreateDocumentRevision implements the canonical revision operation.
func (*Server) DeleteUpload ¶
func (s *Server) DeleteUpload( ctx context.Context, request generated.DeleteUploadRequestObject, ) (generated.DeleteUploadResponseObject, error)
DeleteUpload implements the generated operation.
func (*Server) ExecuteBulkUpgrade ¶ added in v0.8.0
func (s *Server) ExecuteBulkUpgrade( ctx context.Context, request generated.ExecuteBulkUpgradeRequestObject, ) (generated.ExecuteBulkUpgradeResponseObject, error)
func (*Server) ExecuteDocumentUpgrade ¶ added in v0.8.0
func (s *Server) ExecuteDocumentUpgrade( ctx context.Context, request generated.ExecuteDocumentUpgradeRequestObject, ) (generated.ExecuteDocumentUpgradeResponseObject, error)
func (*Server) ExecutePurge ¶
func (s *Server) ExecutePurge( ctx context.Context, request generated.ExecutePurgeRequestObject, ) (generated.ExecutePurgeResponseObject, error)
ExecutePurge implements the generated operation.
func (*Server) GetCapabilities ¶
func (s *Server) GetCapabilities( ctx context.Context, _ generated.GetCapabilitiesRequestObject, ) (generated.GetCapabilitiesResponseObject, error)
GetCapabilities implements the generated operation.
func (*Server) GetOpenAPI ¶
func (s *Server) GetOpenAPI( context.Context, generated.GetOpenAPIRequestObject, ) (generated.GetOpenAPIResponseObject, error)
GetOpenAPI implements the generated public schema operation.
func (*Server) GetUpload ¶
func (s *Server) GetUpload( ctx context.Context, request generated.GetUploadRequestObject, ) (generated.GetUploadResponseObject, error)
GetUpload implements the generated streaming response operation.
func (*Server) Handler ¶
Handler registers the generated strict server and schema request validator, then adds authentication, size limits, and request IDs around it.
func (*Server) Health ¶
func (s *Server) Health( context.Context, generated.HealthRequestObject, ) (generated.HealthResponseObject, error)
Health implements the generated public liveness operation.
func (*Server) InspectUpload ¶
func (s *Server) InspectUpload( ctx context.Context, request generated.InspectUploadRequestObject, ) (generated.InspectUploadResponseObject, error)
InspectUpload implements the generated operation.
func (*Server) ListManifestUploads ¶
func (s *Server) ListManifestUploads( ctx context.Context, _ generated.ListManifestUploadsRequestObject, ) (generated.ListManifestUploadsResponseObject, error)
ListManifestUploads implements the generated operation.
func (*Server) ListStorageUploads ¶
func (s *Server) ListStorageUploads( ctx context.Context, _ generated.ListStorageUploadsRequestObject, ) (generated.ListStorageUploadsResponseObject, error)
ListStorageUploads implements the generated operation.
func (*Server) PlanBulkUpgrade ¶ added in v0.8.0
func (s *Server) PlanBulkUpgrade( ctx context.Context, request generated.PlanBulkUpgradeRequestObject, ) (generated.PlanBulkUpgradeResponseObject, error)
func (*Server) PlanDocumentUpgrade ¶ added in v0.8.0
func (s *Server) PlanDocumentUpgrade( ctx context.Context, request generated.PlanDocumentUpgradeRequestObject, ) (generated.PlanDocumentUpgradeResponseObject, error)
func (*Server) PreviewPurge ¶
func (s *Server) PreviewPurge( ctx context.Context, request generated.PreviewPurgeRequestObject, ) (generated.PreviewPurgeResponseObject, error)
PreviewPurge implements the generated operation.
func (*Server) ProtectUpload ¶ added in v0.7.0
func (s *Server) ProtectUpload( ctx context.Context, request generated.ProtectUploadRequestObject, ) (generated.ProtectUploadResponseObject, error)
ProtectUpload implements the generated operation.
func (*Server) SyncManifest ¶
func (s *Server) SyncManifest( ctx context.Context, request generated.SyncManifestRequestObject, ) (generated.SyncManifestResponseObject, error)
SyncManifest implements the generated operation.
func (*Server) UnprotectUpload ¶ added in v0.7.0
func (s *Server) UnprotectUpload( ctx context.Context, request generated.UnprotectUploadRequestObject, ) (generated.UnprotectUploadResponseObject, error)
UnprotectUpload implements the generated operation.
func (*Server) UpdateDocument ¶ added in v0.8.0
func (s *Server) UpdateDocument( ctx context.Context, request generated.UpdateDocumentRequestObject, ) (generated.UpdateDocumentResponseObject, error)
func (*Server) UploadCollection ¶
func (s *Server) UploadCollection( ctx context.Context, request generated.UploadCollectionRequestObject, ) (generated.UploadCollectionResponseObject, error)
UploadCollection implements the generated streaming multipart operation.
func (*Server) UploadDocument ¶
func (s *Server) UploadDocument( ctx context.Context, request generated.UploadDocumentRequestObject, ) (generated.UploadDocumentResponseObject, error)
UploadDocument implements the generated streaming multipart operation.
type StorageList ¶
type StorageList = generated.StorageList
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type SyncFailure ¶
type SyncFailure = generated.SyncFailure
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type SyncFailureOperation ¶
type SyncFailureOperation = generated.SyncFailureOperation
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type SyncRequest ¶
type SyncRequest = generated.SyncRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type SyncResult ¶
type SyncResult = generated.SyncResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type TargetRequest ¶
type TargetRequest = generated.TargetRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UpdateDocumentMetadata ¶ added in v0.8.0
type UpdateDocumentMetadata = generated.CreateDocumentRevisionMetadata
Compatibility aliases for the deprecated update route.
type UpdateDocumentResult ¶ added in v0.8.0
type UpdateDocumentResult = generated.DocumentRevisionResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UpdateDocumentResultKind ¶ added in v0.8.0
type UpdateDocumentResultKind = generated.DocumentRevisionResultKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UpdateDocumentUpload ¶ added in v0.8.0
type UpdateDocumentUpload = CreateDocumentRevisionUpload
UpdateDocumentUpload is the compatibility name for revision multipart data.
type UpgradeDocumentPlan ¶ added in v0.8.0
type UpgradeDocumentPlan = generated.UpgradeDocumentPlan
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UpgradeDocumentResult ¶ added in v0.8.0
type UpgradeDocumentResult = generated.UpgradeDocumentResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UpgradePlanRequest ¶ added in v0.8.0
type UpgradePlanRequest = generated.UpgradePlanRequest
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UpgradeState ¶ added in v0.8.0
type UpgradeState = generated.UpgradeState
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UploadInspection ¶
type UploadInspection = generated.UploadInspection
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UploadInspectionKind ¶
type UploadInspectionKind = generated.UploadInspectionKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UploadInspectionState ¶
type UploadInspectionState = generated.UploadInspectionState
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UploadLimits ¶
type UploadLimits = generated.UploadLimits
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UploadResult ¶
type UploadResult = generated.UploadResult
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type UploadResultKind ¶
type UploadResultKind = generated.UploadResultKind
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type VersionsMetadata ¶ added in v0.8.0
type VersionsMetadata = generated.VersionsMetadata
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type VersionsMetadataSchema ¶ added in v0.8.0
type VersionsMetadataSchema = generated.VersionsMetadataSchema
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type VersionsMetadataVersion ¶ added in v0.8.0
type VersionsMetadataVersion = generated.VersionsMetadataVersion
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.
type VersionsRevision ¶ added in v0.8.0
type VersionsRevision = generated.VersionsRevision
REST wire models are aliases to the checked-in OpenAPI output. Keeping the public adapter names here avoids leaking the generated package throughout the domain layer while making schema drift a compile-time failure.