Documentation ¶
Index ¶
- type ImagesService
- func (s *ImagesService) DeleteImage(ctx context.Context, imageID string) (err error)
- func (s *ImagesService) GetProfilePictureURL(ctx context.Context, pictureID string) string
- func (s *ImagesService) ReplaceImage(ctx context.Context, image []byte, imageID string, createIfNotExist bool) (newPictureID string, err error)
- func (s *ImagesService) ResizeImage(ctx context.Context, image []byte) (resizedImage []byte, err error)
- func (s *ImagesService) Shutdown()
- func (s *ImagesService) UploadImage(ctx context.Context, image []byte) (imageID string, err error)
- type ImagesServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImagesService ¶
type ImagesService struct {
// contains filtered or unexported fields
}
func NewImagesService ¶
func NewImagesService(cfg *ImagesServiceConfig, logger *logrus.Logger, imagesStorageAddr string, imageStorageSecureConfig config.ConnectionSecureConfig, imageProcessingAddr string, imageProcessingSecureConfig config.ConnectionSecureConfig) (*ImagesService, error)
func (*ImagesService) DeleteImage ¶
func (s *ImagesService) DeleteImage(ctx context.Context, imageID string) (err error)
func (*ImagesService) GetProfilePictureURL ¶
func (s *ImagesService) GetProfilePictureURL(ctx context.Context, pictureID string) string
Returns profile picture url for GET request, or returns empty string if there are error or picture unreachable
func (*ImagesService) ReplaceImage ¶
func (*ImagesService) ResizeImage ¶
func (*ImagesService) Shutdown ¶
func (s *ImagesService) Shutdown()
func (*ImagesService) UploadImage ¶
type ImagesServiceConfig ¶
Click to show internal directories.
Click to hide internal directories.