service

package
v0.0.0-...-37e2b78 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorInvalidContentType = errors.New("invalid content type")
View Source
var ErrorInvalidCredentials = errors.New("invalid credentials")
View Source
var ErrorUserNotFound = errors.New("user not found")

Functions

This section is empty.

Types

type MemeService

type MemeService struct {
	Config     memeConfig.Config
	Repository domain.MemeRepository
}

func (*MemeService) DeleteMeme

func (ms *MemeService) DeleteMeme(id uuid.UUID) error

func (*MemeService) GetMemeById

func (ms *MemeService) GetMemeById(id uuid.UUID) (domain.Meme, error)

func (*MemeService) GetMemes

func (ms *MemeService) GetMemes() ([]domain.Meme, error)

func (*MemeService) UpdateMeme

func (ms *MemeService) UpdateMeme(id uuid.UUID, title string, userId uuid.UUID) error

func (*MemeService) UploadMeme

func (ms *MemeService) UploadMeme(title, contentType string, file io.Reader, userId uuid.UUID) error

type UserService

type UserService struct {
	Config     userConfig.Config
	Repository domain.UserRepository
}

func (*UserService) CheckUsername

func (us *UserService) CheckUsername(username string) (bool, error)

func (*UserService) GetById

func (us *UserService) GetById(id uuid.UUID) (domain.User, error)

func (*UserService) Login

func (us *UserService) Login(username, password string) (domain.User, error)

func (*UserService) Register

func (us *UserService) Register(username, name, password string) error

Jump to

Keyboard shortcuts

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