Commit 1967cd68 authored by Jürgen Enge's avatar Jürgen Enge
Browse files

refactoring of project layout

parent 586588ce
Pipeline #8562 failed with stages
in 22 seconds
......@@ -18,7 +18,7 @@ COPY --from=builder /etc/passwd /etc/passwd
USER appuser
ADD ./static/ /app/static
ADD ./templates /app/templates
ADD web/template /app/templates
EXPOSE 81
......
......@@ -4,7 +4,7 @@ Memoriav Media Streaming Server
## Installation
go get gitlab.switch.ch/memoriav/memobase-2020/streaming-server
go build gitlab.switch.ch/memoriav/memobase-2020/streaming-server/main
go build gitlab.switch.ch/memoriav/memobase-2020/streaming-server/cmd/main
## Prerequsites
......@@ -15,7 +15,7 @@ MariaDB/MySQL Server with table structure of [table.sql](tables.sql)
## Installation
go get gitlab.switch.ch/memoriav/memobase-2020/streaming-server
go build gitlab.switch.ch/memoriav/memobase-2020/streaming-server/tokenService
go build gitlab.switch.ch/memoriav/memobase-2020/streaming-server/cmd/tokenService
## Usage
......
......@@ -2,7 +2,7 @@ package main
import (
"github.com/BurntSushi/toml"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/memostream"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/pkg/memostream"
"log"
"time"
)
......
......@@ -5,7 +5,7 @@ import (
"database/sql"
"flag"
_ "github.com/go-sql-driver/mysql"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/memostream"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/pkg/memostream"
"io"
"log"
"os"
......
......@@ -3,7 +3,7 @@ package main
import (
"context"
"flag"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/memostream"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/pkg/memostream"
"io"
"log"
"os"
......
......@@ -4,7 +4,7 @@ accesslog = "" # http access log file
addr = "localhost:82"
certpem = "" # tls client certificate file in PEM format
keypem = "" # tls client key file in PEM format
staticdir = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/static/"
staticdir = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/web/static/"
staticprefix = "/static/"
urlprefix = "/memo/" # prefix for accessing signature based content
# http://localhost:81/command/clearcache?auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbWQ6Y2xlYXJjYWNoZSIsImV4cCI6MTgxNjIzOTAyMn0.M_Y6R4yMAFEyo534-SXAffPwdHv929WcuSgQUcjiz10
......@@ -12,9 +12,9 @@ cmdprefix = "/command/"
jwtkey = "swordfish"
jwtalg = ["HS256", "HS384", "HS512"] # "hs256" "hs384" "hs512" "es256" "es384" "es512" "ps256" "ps384" "ps512"
resolverCacheSize = 1000
errorTemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/templates/error.gohtml" # error message for memoHandler
videoviewertemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/templates/videojs.gohtml"
audioviewertemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/templates/audiohowler.gohtml"
errorTemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/web/template/error.gohtml" # error message for memoHandler
videoviewertemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/web/template/videojs.gohtml"
audioviewertemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/web/template/audiohowler.gohtml"
[[filemap]]
alias = "c"
......@@ -29,7 +29,7 @@ folder = "c:/temp"
base = "C:/Users/juergen.enge/Downloads/cantaloupe-4.1.5/data/"
url = "http://localhost:8182/iiif/2/"
jwtsubprefix = "iiif:"
viewertemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/templates/openseadragon.gohtml"
viewertemplate = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/web/template/openseadragon.gohtml"
[resolverDBMySQL]
#if dsn is empty, the static resolver will be used
......
......@@ -9,7 +9,6 @@ github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqR
github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v1.0.2 h1:KPldsxuKGsS2FPWsNeg9ZO18aCrGKujPoWXn2yo+KQM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
......@@ -42,8 +41,6 @@ github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtIS
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server v0.0.0-20200428134555-1b2f17c5d83b h1:unWTj5yUDM1n7h7ri/O1p3EM//O1lFtbE3rHzBxGbMI=
gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server v0.0.0-20200428134555-1b2f17c5d83b/go.mod h1:U/TH5AF3w1u1RhRUMym/wzuILayfStGsqPunzCpv7mw=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
......
......@@ -25,7 +25,7 @@ type FileMapper struct {
}
func NewFileMapper(mapping map[string]string) *FileMapper {
return &FileMapper{mapping:mapping}
return &FileMapper{mapping: mapping}
}
func (fm *FileMapper) Get(uri *url.URL) (string, error) {
......
Markdown is supported
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