Documentation ¶
Index ¶
- type Handler
- type Store
- func (s Store) Add(ctx domain.RequestContext, a attachment.Attachment) (err error)
- func (s Store) Delete(ctx domain.RequestContext, id string) (rows int64, err error)
- func (s Store) GetAttachment(ctx domain.RequestContext, orgID, attachmentID string) (a attachment.Attachment, err error)
- func (s Store) GetAttachments(ctx domain.RequestContext, docID string) (a []attachment.Attachment, err error)
- func (s Store) GetAttachmentsWithData(ctx domain.RequestContext, docID string) (a []attachment.Attachment, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler contains the runtime information such as logging and database.
func (*Handler) Add ¶
func (h *Handler) Add(w http.ResponseWriter, r *http.Request)
Add stores files against a document.
func (*Handler) Delete ¶
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
Delete is an endpoint that deletes a particular document attachment.
type Store ¶ added in v1.71.0
type Store struct { store.Context store.AttachmentStorer }
Store provides data access to document/section attachments information.
func (Store) Add ¶ added in v1.71.0
func (s Store) Add(ctx domain.RequestContext, a attachment.Attachment) (err error)
Add inserts the given record into the database attachment table.
func (Store) Delete ¶ added in v1.71.0
Delete deletes the id record from the database attachment table.
func (Store) GetAttachment ¶ added in v1.71.0
func (s Store) GetAttachment(ctx domain.RequestContext, orgID, attachmentID string) (a attachment.Attachment, err error)
GetAttachment returns the database attachment record specified by the parameters.
func (Store) GetAttachments ¶ added in v1.71.0
func (s Store) GetAttachments(ctx domain.RequestContext, docID string) (a []attachment.Attachment, err error)
GetAttachments returns a slice containing the attachment records (excluding their data) for document docID, ordered by filename.
func (Store) GetAttachmentsWithData ¶ added in v1.71.0
func (s Store) GetAttachmentsWithData(ctx domain.RequestContext, docID string) (a []attachment.Attachment, err error)
GetAttachmentsWithData returns a slice containing the attachment records (including their data) for document docID, ordered by filename.