Documentation ¶
Overview ¶
Package configuration has all the functions and structures required for the application.
Index ¶
- func CacheConfiguration()
- func GetShortCode() int64
- func QRCodeGenerate(data, target string) error
- func SaveConfiguration() error
- func SaveIPDetailsConfig(iPDetailsConfig []IPDetails) error
- func SaveShortCode(shortCode int64) error
- func Zipit(source, target string, keepHierarchy bool) error
- type Configuration
- type DownloadDetails
- type IPDetails
- type UploadDetails
- type UploadFileDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheConfiguration ¶
func CacheConfiguration()
CacheConfiguration method will cache the configuration file contents.
func GetShortCode ¶
func GetShortCode() int64
GetShortCode method will return user credentails if available.
func QRCodeGenerate ¶
QRCodeGenerate function will generate the QR Code for particular string
func SaveConfiguration ¶
func SaveConfiguration() error
SaveConfiguration function will save the user credentials
func SaveIPDetailsConfig ¶
SaveIPDetailsConfig function will save the user credentials
func SaveShortCode ¶
SaveShortCode function will save the user credentials
Types ¶
type Configuration ¶
type Configuration struct { //ShortCode for file uploads and downloads ShortCode int64 //IPDetailsConfig array conatins the IPDetails IPDetailsConfig []IPDetails }
Configuration has the required configuration variables
var ( //ConfigurationLoaded will have the configuration of the application ConfigurationLoaded Configuration )
type DownloadDetails ¶
type DownloadDetails struct { //DownloadCode for the files. DownloadCode string }
DownloadDetails structure for storing download file details.
type IPDetails ¶
type IPDetails struct { //IPAddr holds the ipaddres IPAddr string //NWInterface holds the interface name NWInterface string }
IPDetails has the interface and its corresponding ip
func GetIPDetailsConfig ¶
func GetIPDetailsConfig() []IPDetails
GetIPDetailsConfig function will return user credentails if available.
type UploadDetails ¶
type UploadDetails struct { //UploadFiles to store the files. UploadFiles []multipart.File //UploadFileNames to store the filenames. UploadFileNames []string }
UploadDetails structure for storing the upload file details.
type UploadFileDetails ¶
type UploadFileDetails struct { //ShortCode holds the shortcode for the download ShortCode string //IPDetailsConfig holds the IPDetails array IPDetailsConfig []IPDetails }
UploadFileDetails structure has IPDetails array and Shortcode