services

package
v0.0.0-...-0a71436 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaService

type MediaService struct {
	// contains filtered or unexported fields
}

func NewMediaService

func NewMediaService(mediaRepository repositories.IMediaRepository, tagRepository repositories.ITagRepository) *MediaService

func (*MediaService) CreateMedia

func (service *MediaService) CreateMedia(ctx context.Context, name string, tags []string, file *multipart.FileHeader) (uint, error)

func (*MediaService) GetMediasByTag

func (service *MediaService) GetMediasByTag(tag string) ([]models.MediaWithTagNames, error)

type StorageService

type StorageService struct {
	Client     *minio.Client
	BucketName string
}

func NewStorageService

func NewStorageService() (*StorageService, error)

func (*StorageService) CreateBucket

func (service *StorageService) CreateBucket(ctx context.Context, bucketName string) error

func (*StorageService) UploadObject

func (service *StorageService) UploadObject(ctx context.Context, fileHeader *multipart.FileHeader) (string, error)

type TagService

type TagService struct {
	// contains filtered or unexported fields
}

func NewTagService

func NewTagService(tagRepository repositories.ITagRepository) *TagService

func (*TagService) CreateTag

func (service *TagService) CreateTag(tag *models.Tag) (uint, error)

func (*TagService) DeleteTag

func (service *TagService) DeleteTag(id string) error

func (*TagService) GetTags

func (service *TagService) GetTags(name string) ([]*models.Tag, error)

Jump to

Keyboard shortcuts

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