Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRedisCacheStorage ¶ added in v0.2.0
func GetRedisCacheStorage() definitions.UrlCacheStorage
GetRedisCacheStorage returns a singleton instance of RedisCacheStorage
func GetS3CloudStorage ¶
func GetS3CloudStorage() definitions.CloudStorage
GetS3CloudStorage returns a singleton instance of S3CloudStorage
func GetXxHashGenerator ¶ added in v0.2.0
func GetXxHashGenerator() definitions.HashGenerator
GetXxHashGenerator returns a singleton instance of XxHashGenerator
Types ¶
type RedisCacheStorage ¶ added in v0.2.0
type RedisCacheStorage struct {
// contains filtered or unexported fields
}
RedisCacheStorage implements the UrlCacheStorage interface for Redis
func (*RedisCacheStorage) Delete ¶ added in v0.2.0
func (r *RedisCacheStorage) Delete(key string) error
Delete removes a key from the Redis cache
func (*RedisCacheStorage) Get ¶ added in v0.2.0
func (r *RedisCacheStorage) Get(key string) (*string, error)
Get retrieves a value from the Redis cache by key
func (*RedisCacheStorage) Set ¶ added in v0.2.0
func (r *RedisCacheStorage) Set(request definitions.SetURLCacheRequest) error
Set stores a key-value pair in the Redis cache with an optional expiration time
type S3CloudStorage ¶
type S3CloudStorage struct {
// contains filtered or unexported fields
}
S3CloudStorage implements the CloudStorage interface for AWS S3
func (*S3CloudStorage) FileExists ¶
func (s *S3CloudStorage) FileExists(request definitions.FileExistsRequest) (bool, error)
FileExists checks if a file exists in the S3 bucket
func (*S3CloudStorage) UploadFile ¶
func (s *S3CloudStorage) UploadFile(request definitions.UploadFileRequest) (string, error)
UploadFile uploads a file to S3 and returns the URL
type XxHashGenerator ¶ added in v0.2.0
type XxHashGenerator struct{}
XxHashGenerator implements the HashGenerator interface using xxHash algorithm
func (*XxHashGenerator) GenerateHash ¶ added in v0.2.0
func (x *XxHashGenerator) GenerateHash(input string) (string, error)
GenerateHash generates a hash from the given input string using xxHash algorithm