Documentation ¶
Index ¶
- Variables
- func CleanUp()
- func NotifierService(notifierChan chan string, hostIP string)
- func OpAddAlbum(albumname string) (int, error)
- func OpDeleteAlbum(albumname string) (int, error)
- func OpDeleteImage(albumname, imagename string) (int, error)
- func OpListAlbums() []string
- func OpListImages(albumname string) ([]string, error)
- func OpUpdateAlbum(oldname, newname string) (int, error)
- func OpUpdateImage(albumname, oldimagename, newimagename string) (int, error)
- func ReadImageInfoFromFile()
- func WriteImageInfoToFile(imageInfoChan chan bool)
Constants ¶
This section is empty.
Variables ¶
var ImageInfo = model.ImageSchema{}
ImageInfo stores lock and map of image storage
var ImageInfoChan = make(chan bool, 1000)
ImageInfoChan - channel to send signal to write current state of imageInfo map into file
var NotifierChan = make(chan string, 1000)
NotifierChan - channel to send messages to MQ
var StoragePath = "image-db/image-store/"
StoragePath stores relative to image storage
Functions ¶
func NotifierService ¶
NotifierService function sends messages to MQ broker
func OpAddAlbum ¶
OpAddAlbum function creates folder in image-store and adds entry in image-info json
func OpDeleteAlbum ¶
OpDeleteAlbum function deletes the folder in image-store and deletes from image-info if present
func OpDeleteImage ¶
OpDeleteImage function deletes the image from the specified album
func OpListAlbums ¶
func OpListAlbums() []string
OpListAlbums function returns an array of albums present in imageinfo
func OpListImages ¶
OpListImages function returns array of image names present in the specified album
func OpUpdateAlbum ¶
OpUpdateAlbum function modifies the folder name of the album
func OpUpdateImage ¶
OpUpdateImage function modifies the image name in the storage and database
func ReadImageInfoFromFile ¶
func ReadImageInfoFromFile()
ReadImageInfoFromFile function reads the image info on start of the application
func WriteImageInfoToFile ¶
func WriteImageInfoToFile(imageInfoChan chan bool)
WriteImageInfoToFile function writes current state of imageInfo map into file
Types ¶
This section is empty.