format and function visibility fixed
This commit is contained in:
parent
4721c762f1
commit
ff00ca9f0a
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func Run(rootPath string) {
|
||||
context := ConfigureContext(rootPath)
|
||||
context := configureContext(rootPath)
|
||||
|
||||
loginToPiwigoAndConfigureContext(context)
|
||||
|
||||
@ -22,22 +22,6 @@ func Run(rootPath string) {
|
||||
authentication.Logout(context.Piwigo)
|
||||
}
|
||||
|
||||
func ConfigureContext(rootPath string) *AppContext {
|
||||
logrus.Infoln("Preparing application context and configuration")
|
||||
|
||||
context := new(AppContext)
|
||||
context.LocalRootPath = rootPath
|
||||
context.Piwigo = new(authentication.PiwigoContext)
|
||||
|
||||
//TODO: Move this values to configuration files
|
||||
//No, these are not real credentials :-P
|
||||
context.Piwigo.Url = "http://pictures.haefelfinger.net/ws.php?format=json"
|
||||
context.Piwigo.Username = "admin"
|
||||
context.Piwigo.Password = "asdf"
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
func ScanLocalDirectories(context *AppContext) {
|
||||
var fileNodes map[string]localFileStructure.FilesystemNode = localFileStructure.ScanLocalFileStructure(context.LocalRootPath)
|
||||
for _, node := range fileNodes {
|
||||
@ -67,6 +51,22 @@ func UploadImages() {
|
||||
logrus.Warnln("Uploading missing images (NotImplemented)")
|
||||
}
|
||||
|
||||
func configureContext(rootPath string) *AppContext {
|
||||
logrus.Infoln("Preparing application context and configuration")
|
||||
|
||||
context := new(AppContext)
|
||||
context.LocalRootPath = rootPath
|
||||
context.Piwigo = new(authentication.PiwigoContext)
|
||||
|
||||
//TODO: Move this values to configuration files
|
||||
//No, these are not real credentials :-P
|
||||
context.Piwigo.Url = "http://pictures.haefelfinger.net/ws.php?format=json"
|
||||
context.Piwigo.Username = "admin"
|
||||
context.Piwigo.Password = "asdf"
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
func loginToPiwigoAndConfigureContext(context *AppContext) {
|
||||
logrus.Infoln("Logging in to piwigo and getting chunk size configuration for uploads")
|
||||
authentication.Login(context.Piwigo)
|
||||
|
Loading…
Reference in New Issue
Block a user