Documentation ¶
Index ¶
- type IPictureService
- type IUserService
- type PictureService
- func (ps *PictureService) AddPicture(src io.Reader, filename string, title string) error
- func (ps *PictureService) DeletePicture(id_hex string) error
- func (ps *PictureService) GetPicture(id_hex string) (*models.Picture, error)
- func (ps *PictureService) GetPictures() []models.Picture
- func (ps *PictureService) PutPicture(id_hex string, title string) error
- type UserService
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 (*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) GetUserByToken ¶
func (us *UserService) GetUserByToken(token string) (*models.User, error)
func (*UserService) IsUsernameTaken ¶
func (us *UserService) IsUsernameTaken(username string) bool
Click to show internal directories.
Click to hide internal directories.