lib

package
v0.0.0-...-c7c02a3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImageInfo = model.ImageSchema{}

ImageInfo stores lock and map of image storage

View Source
var ImageInfoChan = make(chan bool, 1000)

ImageInfoChan - channel to send signal to write current state of imageInfo map into file

View Source
var NotifierChan = make(chan string, 1000)

NotifierChan - channel to send messages to MQ

View Source
var StoragePath = "image-db/image-store/"

StoragePath stores relative to image storage

Functions

func CleanUp

func CleanUp()

CleanUp function call GC and freeosmem

func NotifierService

func NotifierService(notifierChan chan string, hostIP string)

NotifierService function sends messages to MQ broker

func OpAddAlbum

func OpAddAlbum(albumname string) (int, error)

OpAddAlbum function creates folder in image-store and adds entry in image-info json

func OpDeleteAlbum

func OpDeleteAlbum(albumname string) (int, error)

OpDeleteAlbum function deletes the folder in image-store and deletes from image-info if present

func OpDeleteImage

func OpDeleteImage(albumname, imagename string) (int, error)

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

func OpListImages(albumname string) ([]string, error)

OpListImages function returns array of image names present in the specified album

func OpUpdateAlbum

func OpUpdateAlbum(oldname, newname string) (int, error)

OpUpdateAlbum function modifies the folder name of the album

func OpUpdateImage

func OpUpdateImage(albumname, oldimagename, newimagename string) (int, error)

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.

Jump to

Keyboard shortcuts

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