services

package
v0.0.0-...-17c7d27 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPictureService

type IPictureService interface {
	AddPicture(pic io.Reader, filename string, title string) error
	GetPicture(id_hex string) (*models.Picture, error)
	GetPictures() []models.Picture
	DeletePicture(id_hex string) error
	PutPicture(id_hex string, title string) error
}

func NewPictureService

func NewPictureService() IPictureService

type IUserService

type IUserService interface {
	Create(username string, password string) error
	GetUserByToken(token string) (*models.User, error)
	LoginUser(username string, password string) (string, error)
	IsUsernameTaken(username string) bool
}

func NewUserService

func NewUserService() IUserService

type PictureService

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

func (*PictureService) AddPicture

func (ps *PictureService) AddPicture(src io.Reader, filename string, title string) error

func (*PictureService) DeletePicture

func (ps *PictureService) DeletePicture(id_hex string) error

func (*PictureService) GetPicture

func (ps *PictureService) GetPicture(id_hex string) (*models.Picture, error)

func (*PictureService) GetPictures

func (ps *PictureService) GetPictures() []models.Picture

func (*PictureService) PutPicture

func (ps *PictureService) PutPicture(id_hex string, title string) error

type UserService

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

func (*UserService) Create

func (us *UserService) Create(username string, password string) error

func (*UserService) GetUserByToken

func (us *UserService) GetUserByToken(token string) (*models.User, error)

func (*UserService) IsUsernameTaken

func (us *UserService) IsUsernameTaken(username string) bool

func (*UserService) LoginUser

func (us *UserService) LoginUser(username string, password string) (string, error)

Jump to

Keyboard shortcuts

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