Documentation ¶
Index ¶
- type CreateFileDTO
- type File
- type Service
- func (s *Service) Create(ctx context.Context, noteUUID string, dto CreateFileDTO) error
- func (s *Service) Delete(ctx context.Context, noteUUID, fileName string) error
- func (s *Service) GetFile(ctx context.Context, noteUUID, fileID string) (f *File, err error)
- func (s *Service) GetFilesByNoteUUID(ctx context.Context, noteUUID string) ([]*File, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateFileDTO ¶
type File ¶
type File struct { ID string `json:"id"` Name string `json:"name"` Size int64 `json:"size"` Bytes []byte `json:"bytes"` }
func NewFile ¶
func NewFile(dto CreateFileDTO) (*File, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
type Storage ¶
type Storage interface { GetFile(ctx context.Context, bucketName, fileName string) (*File, error) GetFilesByNoteUUID(ctx context.Context, uuid string) ([]*File, error) CreateFile(ctx context.Context, noteUUID string, file *File) error DeleteFile(ctx context.Context, noteUUID, fileName string) error }
Click to show internal directories.
Click to hide internal directories.