Documentation
¶
Index ¶
- func HandleDeleteAttachment(c *gin.Context, store registrystore.MemoryStore, ...)
- func HandleDownloadByToken(c *gin.Context, store registrystore.MemoryStore, ...)
- func HandleDownloadURL(c *gin.Context, store registrystore.MemoryStore, ...)
- func HandleGetAttachment(c *gin.Context, store registrystore.MemoryStore, ...)
- func HandleUpload(c *gin.Context, store registrystore.MemoryStore, ...)
- func NewSourceURLTransportForTest(allowPrivate bool) http.RoundTripper
- func SignDownloadToken(storageKey string, secret []byte, expiresAt time.Time) string
- func SignedURLOptions(disposition string, filename *string) *registryattach.SignedURLOptions
- func StartSourceURLAttachmentDownload(store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, ...)
- func ValidateSourceURLForTest(raw string, allowPrivate bool) error
- type ResponsePolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleDeleteAttachment ¶
func HandleDeleteAttachment(c *gin.Context, store registrystore.MemoryStore, attachStore registryattach.AttachmentStore)
HandleDeleteAttachment exposes attachment delete for wrapper-native adapters.
func HandleDownloadByToken ¶
func HandleDownloadByToken(c *gin.Context, store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, signingKeys [][]byte)
HandleDownloadByToken exposes token download for wrapper-native adapters.
func HandleDownloadURL ¶
func HandleDownloadURL(c *gin.Context, store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, cfg *config.Config, signingKey []byte)
HandleDownloadURL exposes attachment signed URL issuance for wrapper-native adapters.
func HandleGetAttachment ¶
func HandleGetAttachment(c *gin.Context, store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, cfg *config.Config)
HandleGetAttachment exposes attachment retrieval for wrapper-native adapters.
func HandleUpload ¶
func HandleUpload(c *gin.Context, store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, cfg *config.Config)
HandleUpload exposes attachment upload/create for wrapper-native adapters.
func NewSourceURLTransportForTest ¶
func NewSourceURLTransportForTest(allowPrivate bool) http.RoundTripper
func SignDownloadToken ¶ added in v0.1.0
SignDownloadToken returns the HMAC token used by public attachment download URLs.
func SignedURLOptions ¶ added in v0.1.0
func SignedURLOptions(disposition string, filename *string) *registryattach.SignedURLOptions
SignedURLOptions returns the S3 signing options for a disposition/filename pair.
func StartSourceURLAttachmentDownload ¶ added in v0.1.0
func StartSourceURLAttachmentDownload(store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, cfg *config.Config, attachmentID uuid.UUID, userID, sourceURL, contentType string)
StartSourceURLAttachmentDownload starts the same asynchronous source URL download workflow used by the REST attachment API.
Types ¶
type ResponsePolicy ¶ added in v0.1.0
type ResponsePolicy = responsePolicy
ResponsePolicy is the attachment response policy shared by REST and gRPC attachment download URL handlers.
func AttachmentResponsePolicy ¶ added in v0.1.0
func AttachmentResponsePolicy(contentType, requestedDisposition string) ResponsePolicy
AttachmentResponsePolicy returns the content/disposition/direct-download policy for an attachment response.