func InitRedis(config *agentdesks.Config) redis.Conn { host := ":" + config.GetRedisPort() conn, err := redis.Dial(config.GetRedisProtocol(), host) if err != nil { utils.PanicError(err, "Error establishing redis connection") } return conn }
func NewImageHelper(conf *agentdesks.Config) *ImageHelper { return &ImageHelper{ Config: conf, s3Conn: s3.New(session.New(), &aws.Config{Region: aws.String(conf.GetAmazonS3Region())}), } }