Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCachedImageNotFound = errors.New("cached image not found") ErrCachedImageAlreadyExists = errors.New("cached image already exists") )
View Source
var ( ErrImageAlreadyExists = errors.New("image already exists") ErrImageNotFound = errors.New("image not found") )
Functions ¶
This section is empty.
Types ¶
type CachedImageModel ¶
type CachedImageModel struct { RawRequest string `json:"rawRequest" bson:"rawRequest"` RequestSignature string `json:"requestSignature" bson:"requestSignature"` ProcessorType string `json:"processorType" bson:"processorType"` ProcessorEndpoint string `json:"processorEndpoint" bson:"processorEndpoint"` MimeType string `json:"mimeType" bson:"mimeType"` ImageSize int64 `json:"imageSize" bson:"imageSize"` SourceImageURL string `json:"sourceImageURL" bson:"sourceImageURL"` ProcessingParams map[string][]string `json:"processingParams" bson:"processingParams"` }
type CachedImagesRepository ¶
type CachedImagesRepository interface { CreateCachedImageInfo(ctx context.Context, info CachedImageModel) error DeleteCachedImageInfo(ctx context.Context, requestSignature, processorType string) error GetCachedImageInfo(ctx context.Context, requestSignature, processorType string) (CachedImageModel, error) GetCachedImageInfosOfSource(ctx context.Context, sourceImageURL string) ([]CachedImageModel, error) }
func NewCachedImagesRepository ¶
func NewCachedImagesRepository(conn dbconnections.CacheDBConnection) CachedImagesRepository
type CachedImagesStorage ¶
type CachedImagesStorage interface { Save(ctx context.Context, requestSignature, processorType, mimeType string, size int64, reader hub.DataStreamOutput) error Get(ctx context.Context, requestSignature, processorType string, writer hub.DataStreamInput) error Delete(ctx context.Context, requestSignature, processorType string) error }
func NewCachedImagesStorage ¶
func NewCachedImagesStorage(conn dbconnections.MinioBlockStorageConnection) CachedImagesStorage
type InvalidationModel ¶
type InvalidationModel struct { ProjectName string `json:"projectName" bson:"projectName"` CommitHash string `json:"commitHash" bson:"commitHash"` InvalidationDate time.Time `json:"invalidationDate" bson:"invalidationDate"` RequestedInvalidations []string `json:"requestedInvalidations" bson:"requestedInvalidations"` DoneInvalidations []string `json:"doneInvalidations" bson:"doneInvalidations"` InvalidatedImages []CachedImageModel `json:"invalidatedImages" bson:"invalidatedImages"` InvalidationError *string `json:"invalidationError" bson:"invalidationError"` }
type InvalidationsRepository ¶
type InvalidationsRepository interface { CreateInvalidation(ctx context.Context, invalidation InvalidationModel) error GetLatestInvalidation(ctx context.Context, projectName string) (InvalidationModel, error) }
func NewInvalidationsRepository ¶
func NewInvalidationsRepository(conn dbconnections.CacheDBConnection) InvalidationsRepository
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_cacherepositories is a generated GoMock package.
|
Package mock_cacherepositories is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.