Skip to content

Commit

Permalink
Merge pull request #10 from lruggieri/design
Browse files Browse the repository at this point in the history
README updated - design added
  • Loading branch information
lruggieri committed Mar 15, 2020
2 parents 5f9321a + d8fbff2 commit ae578d0
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 30 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[Website](https://gonemaweb.ruggieri.tech/)

#### DESIGN
![Design](design.png)


#### REASON
I like movies!
I like to watch some movie even twice ot 3 times, and I am not always
Expand Down Expand Up @@ -35,7 +39,7 @@ sudo ./scripts/install_dependencies.sh
```

#### DOCKER
Docker for this project is available in Goggle Cloud Container Registry under '[eu.gcr.io/gonema/gonema](eu.gcr.io/gonema/gonemaweb)'
Docker for this project is available in Google Cloud Container Registry under '[eu.gcr.io/gonema/gonema](eu.gcr.io/gonema/gonemaweb)'
To run the website:
```
docker-compose up -d --build gonemaweb
Expand Down
Binary file added design.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
module github.com/lruggieri/gonema

go 1.12
go 1.14

require (
github.com/NYTimes/gziphandler v1.1.1
github.com/chromedp/cdproto v0.0.0-20200209033844-7e00b02ea7d2 // indirect
github.com/chromedp/chromedp v0.5.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/lruggieri/utils v1.1.2
github.com/nmmh/magneturi v0.0.0-20180607142838-464c677b3fb5 // indirect
github.com/otiai10/gosseract v2.2.1+incompatible // indirect
github.com/otiai10/mint v1.3.1 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.4.0 // indirect
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
)
42 changes: 33 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g=
github.com/chromedp/cdproto v0.0.0-20200209033844-7e00b02ea7d2 h1:osPk40NN+GLEj2Tay/N+H/K4itKyHZ6gdrC/pXjjgQ8=
github.com/chromedp/cdproto v0.0.0-20200209033844-7e00b02ea7d2/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g=
github.com/chromedp/chromedp v0.5.3 h1:F9LafxmYpsQhWQBdCs+6Sret1zzeeFyHS5LkRF//Ffg=
github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08 h1:V0an7KRw92wmJysvFvtqtKMAPmvS5O0jtB0nYo6t+gs=
github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/lruggieri/utils v1.1.2 h1:w/FlTcKWMMr20UxZT4pfUIgZvr/fMLjQgVziBWwhfx0=
github.com/lruggieri/utils v1.1.2/go.mod h1:K3uwhacPLDy7PkDxICWL9S7MmFl09i8X1vcasPl0ZYM=
github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/nmmh/magneturi v0.0.0-20180607142838-464c677b3fb5 h1:BEYgtKU14i2fXQ2MwBAzO/YRK4IsB2tMIYADodiGW0w=
github.com/nmmh/magneturi v0.0.0-20180607142838-464c677b3fb5/go.mod h1:Ba1Kx0jP1Jdj8YebTpPewkUYOwirRWl23oThXozXB/U=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I=
github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc=
github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
26 changes: 14 additions & 12 deletions pkg/util/cache/cache.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
/*
Package Cache provides a general purpose thread-safe caching system, with support for custom "root" duration.
A cache KEY is basically a string composed by a "root" and a "key".
The root part is used to customize how different cache elements have to behave.
The key part is the actual element key, but belongs to a root.
Different roots can have the same key.
Having several roots is useful in order to set different durations to a different set of keys.
In the end, the actual cache hashmap will have 'root_key' as entry.
*/
package cache

import (
"github.com/lruggieri/gonema/pkg/util"
"fmt"
"sync"
"time"
)


type (
/*
Cache is a general purpose thread-safe caching system, with support for custom "root" duration.
A cache KEY is basically a string composed by a "root" and a "key".
The root part is used to customize how different cache elements have to behave.
The key part is the actual element key, but belongs to a root.
Different roots can have the same key.
Having several roots is useful in order to set different durations to a different set of keys.
In the end, the actual cache hashmap will have 'root_key' as entry.
*/
//Cache is the main cache struct
Cache struct{
sync.RWMutex

Expand Down Expand Up @@ -64,7 +65,8 @@ func (c *Cache) SetNewRootElementDuration(iRoot CacheElementRoot, iDuration time
//loops through localCache elements and remove expired one
func (c *Cache) startLocalExpirationFetch(){
if localCacheExpirationCheckStarted {
util.Logger.Warn("local cache expiration check already started")
fmt.Println("local cache expiration check already started")
return
}


Expand Down
1 change: 0 additions & 1 deletion website/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func main() {

func mainPageHandler(w http.ResponseWriter, r *http.Request){
mainPage := filepath.Join(templatesDir,"index.tmpl")

tmpl := template.Must(template.ParseFiles(mainPage))

err := tmpl.Execute(w,nil)
Expand Down
2 changes: 1 addition & 1 deletion website/static/js/gonema/gonema-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ $(function() {
}else{
currentSlidePosters++;
}

let col = $('<div class="col-sm"></div>');
let href = $('<a class="poster-link" href="#"</a>');
let poster = $('<img class="d-block w-100 carousel-poster" src="'+resp[i].poster+'" alt="slide '+i+'" ' +
Expand Down

0 comments on commit ae578d0

Please sign in to comment.