Commit a0baf318 authored by Ajit Jagtap's avatar Ajit Jagtap
Browse files

made a version which can run "go install"

parent 1ff6fd17
Branches
Tags
1 merge request!6Stagingbranch
Showing with 91 additions and 95 deletions
......@@ -3,7 +3,7 @@
*.a
*.so
InstallLogs.txt
*.txt
# Folders
_obj
......@@ -23,4 +23,6 @@ _testmain.go
*.exe
*.test
*.bench
\ No newline at end of file
*.bench
vendor
\ No newline at end of file
......@@ -5,25 +5,25 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/allegro/bigcache\"" >> InstallLogs.txt
# echo "Installing : \"github.com/spf13/viper\""
# go get "github.com/spf13/viper"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/spf13/viper\"" >> InstallLogs.txt
echo "Installing : \"github.com/spf13/viper\""
go get "github.com/spf13/viper"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/spf13/viper\"" >> InstallLogs.txt
# echo "Installing : \"github.com/gocraft/dbr\""
# go get "github.com/gocraft/dbr"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/gocraft/dbr\"" >> InstallLogs.txt
echo "Installing : \"github.com/gocraft/dbr\""
go get "github.com/gocraft/dbr"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/gocraft/dbr\"" >> InstallLogs.txt
# echo "Installing : \"gopkg.in/mgo.v2\""
# go get "gopkg.in/mgo.v2"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"gopkg.in/mgo.v2\"" >> InstallLogs.txt
echo "Installing : \"gopkg.in/mgo.v2\""
go get "gopkg.in/mgo.v2"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"gopkg.in/mgo.v2\"" >> InstallLogs.txt
echo "Installing : \"github.com/garyburd/redigo/redis\""
......@@ -33,25 +33,25 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/garyburd/redigo/redis\"" >> InstallLogs.txt
# echo "Installing : \"github.com/stretchr/testify/assert\""
# go get "github.com/stretchr/testify/assert"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/stretchr/testify/assert\"" >> InstallLogs.txt
echo "Installing : \"github.com/stretchr/testify/assert\""
go get "github.com/stretchr/testify/assert"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/stretchr/testify/assert\"" >> InstallLogs.txt
# echo "Installing : \"github.com/labstack/echo\""
# go get "github.com/labstack/echo"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/labstack/echo\"" >> InstallLogs.txt
echo "Installing : \"github.com/labstack/echo\""
go get "github.com/labstack/echo"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/labstack/echo\"" >> InstallLogs.txt
# echo "Installing : \"gopkg.in/mgo.v2/bson\""
# go get "gopkg.in/mgo.v2/bson"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"gopkg.in/mgo.v2/bson\"" >> InstallLogs.txt
echo "Installing : \"gopkg.in/mgo.v2/bson\""
go get "gopkg.in/mgo.v2/bson"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"gopkg.in/mgo.v2/bson\"" >> InstallLogs.txt
echo "Installing : \"github.com/dgrijalva/jwt-go\""
......@@ -61,32 +61,32 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/dgrijalva/jwt-go\"" >> InstallLogs.txt
# echo "Installing : \"github.com/labstack/echo/middleware\""
# go get "github.com/labstack/echo/middleware"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/labstack/echo/middleware\"" >> InstallLogs.txt
echo "Installing : \"github.com/labstack/echo/middleware\""
go get "github.com/labstack/echo/middleware"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/labstack/echo/middleware\"" >> InstallLogs.txt
# echo "Installing : \"github.com/sirupsen/logrus\""
# go get "github.com/sirupsen/logrus"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/sirupsen/logrus\"" >> InstallLogs.txt
echo "Installing : \"github.com/sirupsen/logrus\""
go get "github.com/sirupsen/logrus"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/sirupsen/logrus\"" >> InstallLogs.txt
# echo "Installing : \"github.com/go-playground/locales/en\""
# go get "github.com/go-playground/locales/en"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"github.com/go-playground/locales/en\"" >> InstallLogs.txt
echo "Installing : \"github.com/go-playground/locales/en\""
go get "github.com/go-playground/locales/en"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/go-playground/locales/en\"" >> InstallLogs.txt
# echo "Installing : \"gopkg.in/go-playground/validator.v9\""
# go get "gopkg.in/go-playground/validator.v9"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9\"" >> InstallLogs.txt
echo "Installing : \"gopkg.in/go-playground/validator.v9\""
go get "gopkg.in/go-playground/validator.v9"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9\"" >> InstallLogs.txt
echo "Installing : \"github.com/go-playground/universal-translator\""
......@@ -96,17 +96,17 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"github.com/go-playground/universal-translator\"" >> InstallLogs.txt
# echo "Installing : \"gopkg.in/go-playground/validator.v9/translations/en\""
# go get "gopkg.in/go-playground/validator.v9/translations/en"
# echo "Done"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9/translations/en\"" >> InstallLogs.txt
echo "Installing : \"gopkg.in/go-playground/validator.v9/translations/en\""
go get "gopkg.in/go-playground/validator.v9/translations/en"
echo "Done"
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9/translations/en\"" >> InstallLogs.txt
# echo "******************************************"
# echo "Installation complete"
# echo "******************************************"
echo "******************************************"
echo "Installation complete"
echo "******************************************"
# NOW=$(date +"%d-%b-%Y %H:%M:%S")
# echo "******************************************" >> InstallLogs.txt
# echo $NOW "Installation complete" >> InstallLogs.txt
# echo "******************************************" >> InstallLogs.txt
\ No newline at end of file
NOW=$(date +"%d-%b-%Y %H:%M:%S")
echo "******************************************" >> InstallLogs.txt
echo $NOW "Installation complete" >> InstallLogs.txt
echo "******************************************" >> InstallLogs.txt
\ No newline at end of file
package coreos
import (
"GolangFullStack/server/api/server/config"
"fmt"
"time"
......@@ -11,20 +10,20 @@ import (
var bigcacheConfig = bigcache.Config{
// number of shards (must be a power of 2)
// Shards: 4096,
Shards: config.BIGCACHEShards,
// time after which entry can be evicted
LifeWindow: config.BIGCACHELifeWindow * time.Hour,
// rps * lifeWindow, used only in initial memory allocation
MaxEntriesInWindow: 1000 * 10 * 60,
// MaxEntriesInWindow: 10,
// max entry size in bytes, used only in initial memory allocation
MaxEntrySize: config.BIGCACHEMaxEntrySize,
// prints information about additional memory allocation
Verbose: config.BIGCACHEVerbose,
// cache will not allocate more memory than this limit, value in MB
// if value is reached then the oldest entries can be overridden for the new ones
// 0 value means no size limit
HardMaxCacheSize: config.BIGCACHEHardMaxCacheSize,
// Shards: config.BIGCACHEShards,
// // time after which entry can be evicted
// LifeWindow: config.BIGCACHELifeWindow * time.Hour,
// // rps * lifeWindow, used only in initial memory allocation
// MaxEntriesInWindow: 1000 * 10 * 60,
// // MaxEntriesInWindow: 10,
// // max entry size in bytes, used only in initial memory allocation
// MaxEntrySize: config.BIGCACHEMaxEntrySize,
// // prints information about additional memory allocation
// Verbose: config.BIGCACHEVerbose,
// // cache will not allocate more memory than this limit, value in MB
// // if value is reached then the oldest entries can be overridden for the new ones
// // 0 value means no size limit
// HardMaxCacheSize: config.BIGCACHEHardMaxCacheSize,
// callback fired when the oldest entry is removed because of its
// expiration time or no space left for the new entry. Default value is nil which
// means no callback and it prevents from unwrapping the oldest entry.
......
package coreos
import (
"fmt"
"github.com/spf13/viper"
)
//InitViper function to initialize viper
func InitViper() {
viper.SetConfigName("config") // name of config file (without extension)
viper.AddConfigPath(".") // optionally look for config in the working directory
err := viper.ReadInConfig()
// Find and read the config file
if err != nil { // Handle errors reading the config file
panic(fmt.Errorf("Fatal error config file %s ", err))
}
// viper.SetConfigName("config") // name of config file (without extension)
// viper.AddConfigPath(".") // optionally look for config in the working directory
// err := viper.ReadInConfig()
// // Find and read the config file
// if err != nil { // Handle errors reading the config file
// panic(fmt.Errorf("Fatal error config file %s ", err))
// }
}
//GetConfig method to get configs from config file
func GetConfig(keyName string) string {
keyValue := viper.GetString(keyName)
return keyValue
// keyValue := viper.GetString(keyName)
// return keyValue
return ""
}
package: coreospackage
import:
- package: GolangFullStack/server/api/server/config
- package: github.com/allegro/bigcache
- package: github.com/dgrijalva/jwt-go
version: ^3.0.0
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment