helper

package
v0.0.0-...-7b63a7d Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 24 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessConditionMapping

func AccessConditionMapping(accessCondition string) string

AccessConditionMapping ...

func CheckFileExistInRedisHSET

func CheckFileExistInRedisHSET(redisClient *redis.Client, key string, redisFileHSETQueue string) (bool, error)

CheckFileExistInRedisHSET checks if a key exists in redis HSET, which has prefilled it receives a redis client and in addition the key (filename) and the redis queue name. return true,nil if the key exist return false,error if the key doesn't exist or an error occured

func CheckIfPaused

func CheckIfPaused(retries int, redisClient *redis.Client) (bool, error)

CheckIfPaused ...

func CheckKalliope

func CheckKalliope(id string) bool

CheckKalliope ...

func CheckKeyExistInS3

func CheckKeyExistInS3(s3Client *s3.S3, bucket string, key string) (bool, error)

CheckKeyExistInS3 checks if a key exists in S3, it receives a S3 client and in addition the bucket name and key. return true,nil if the key exist return false,error if the key doesn't exist or an error occured

func CheckOpac

func CheckOpac(id string) bool

CheckOpac ...

func ClassifcationMappingDE

func ClassifcationMappingDE(classifcation string) string

ClassifcationMappingDE ...

func Contains

func Contains(arr []string, el string) bool

Contains ... check if the slice contains the value

func CreateImageInfoAndSaveInfoJsonInS3

func CreateImageInfoAndSaveInfoJsonInS3(bucket string, context string, infojsonkey string, imagekey string, pid string, document string, product string, page string, href string) (*types.ImageInfo, error)

CreateImageInfoAndSaveInfoJsonInS3 ...

func DeriveWork

func DeriveWork(id string) string

DeriveWork ...

func DownloadFile

func DownloadFile(url string) (string, error)

DownloadFile ...

func ExistInfoJsonInS3

func ExistInfoJsonInS3(bucket string, key string) bool

ExistInfoJsonInS3 ...

func GetFileFromOLAHDS

func GetFileFromOLAHDS(url string) (string, error)

GetFileFromOLAHDS ...

func GetImageDimensionFromOLAHDS

func GetImageDimensionFromOLAHDS(bucket string, key string) (*types.ImageInfo, error)

TODO not yet implemented GetImageDimensionFromOLAHDS ...

func GetImageInfoFromInfoJsonInS3

func GetImageInfoFromInfoJsonInS3(bucket string, infojsonkey string) (*types.ImageInfo, error)

GetImageInfoFromInfoJsonInS3 ...

func GetLogToXLinkMap

func GetLogToXLinkMap(structlink types.Structlink, recordIdentifier string) (map[string]types.LogToPhysLink, map[string]types.PhysToLogLink)

GetLogToXLinkMap ...

func GetMinMaxStartPhys

func GetMinMaxStartPhys(logToPhysLink types.LogToPhysLink, physicalIDToAttrMap map[string]types.PhysicalAttributes, workID string, product string) (int64, int64, string, string)

GetMinMaxStartPhys ...

func GetNumberFromPPNID

func GetNumberFromPPNID(recordID string) string

GetNumberFromPPNID ...

func GetNumberFromXID

func GetNumberFromXID(id string) int64

GetNumberFromXID ...

func GetS3Client

func GetS3Client() *s3.S3

GetS3Client ...

func GetXMLFrom

func GetXMLFrom(bucket string, key string, context string, doctype string) (string, error)

GetXMLFrom ...

func ImageFileFormatMapping

func ImageFileFormatMapping(format string) string

ImageFileFormatMapping ...

func ListContainsStringItem

func ListContainsStringItem(item string) bool

ListContainsStringItem ...

func MonthMapping

func MonthMapping(month string) string

MonthMapping ...

func NomalizePublisherName

func NomalizePublisherName(publisherName string) string

NomalizePublisherName ...

func Prettyprint

func Prettyprint(b []byte) ([]byte, error)

Prettyprint ...

func StrctypeLabelMapping

func StrctypeLabelMapping(strctypeLabel string) string

StrctypeLabelMapping ...

func StrctypeMapping

func StrctypeMapping(strctype string) string

StrctypeMapping ...

func UploadTo

func UploadTo(bucket string, key string, content []byte) error

UploadTo ...

func ValidationRun

func ValidationRun() bool

ValidationRun...

returns true if validation is running, false in the indexing

Types

This section is empty.

Jump to

Keyboard shortcuts

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