attachment

package
v0.0.0-...-73eed44 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Id       primitive.ObjectID
	Filename string
}

type AttachmentRepository

type AttachmentRepository struct {
	Client *mongo.Client
}

func NewAttachmentRepository

func NewAttachmentRepository(client *mongo.Client) AttachmentRepository

func (AttachmentRepository) Download

func (a AttachmentRepository) Download(id string) ([]byte, error)

func (AttachmentRepository) Upload

func (a AttachmentRepository) Upload(data []byte, filename string) (bool, error)

type IAttachmentRepository

type IAttachmentRepository interface {
	Upload(data []byte, filename string) (bool, error)
	Download(id string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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