image

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrData = errs.NewValidation().Add("image", "invalid")

ErrData the image does not seem valid

View Source
var ErrSize = errs.NewValidation().Add("size", "invalid")

ErrSize the size is incorrect

Functions

This section is empty.

Types

type Image

type Image struct {
	ID    string `json:"id"  validate:"required"`
	Image string `json:"image"  validate:"required"`
}

Image estructura de la imagen

func New

func New(img string) *Image

New crea una nueva imagen

type ImageRepository

type ImageRepository interface {
	Insert(image *Image) (string, error)
	Find(imageID string) (*Image, error)
	ValidateSchema(image *Image) error
}

func NewImageRepository

func NewImageRepository(
	log log.LogRusEntry,
	redisClient redisx.RedisClient,
) ImageRepository

type ImageService

type ImageService interface {
	Insert(image *Image) (string, error)
	Find(imageID string, size int) (*Image, error)
}

func NewImageService

func NewImageService(
	log log.LogRusEntry,
	repo ImageRepository,
) ImageService

Jump to

Keyboard shortcuts

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