Compare commits
No commits in common. "f49b420e7872498351be5f31465183113fd7962e" and "8ba2c8b18def77e05285038936916140fa596b46" have entirely different histories.
f49b420e78
...
8ba2c8b18d
@ -1,17 +0,0 @@
|
||||
package config
|
||||
|
||||
type Config struct {
|
||||
Server Server
|
||||
Services map[string]Service
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
Address string
|
||||
Port int
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
BaseURL string
|
||||
ForwardTo string
|
||||
Protocol string
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"server": {
|
||||
"address": "127.0.0.1",
|
||||
"port": 8080
|
||||
},
|
||||
"services": {
|
||||
"test-app1": {
|
||||
"baseUrl": "test/",
|
||||
"forwardTo": "127.0.0.1:3030/",
|
||||
"protocol": "http"
|
||||
},
|
||||
"test-app2": {
|
||||
"baseUrl": "test2/",
|
||||
"forwardTo": "httpbin.org/",
|
||||
"protocol": "http"
|
||||
}
|
||||
}
|
||||
}
|
2
go.mod
2
go.mod
@ -1,5 +1,3 @@
|
||||
module vegvisir
|
||||
|
||||
go 1.13
|
||||
|
||||
require github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
|
6
main.go
6
main.go
@ -9,11 +9,5 @@ package main
|
||||
// Copyright (c) 2021 Piotr Biernat. https://pbiernat.dev. MIT License
|
||||
// Repo: https://git.pbiernat.dev/golang/vegvisir
|
||||
|
||||
import (
|
||||
"vegvisir/server"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := server.NewServer()
|
||||
err := s.LoadConfig("config/test/sample.json")
|
||||
}
|
||||
|
@ -1,14 +1,5 @@
|
||||
package server
|
||||
|
||||
// ___ ____ ___ ___
|
||||
// \ \ / / | _ | __| \ \ / / || | __ || || _ |
|
||||
// \ \/ / |___ | |__ \ \/ / || |___ || ||___|
|
||||
// \ / | _ | _ | \ / || __ | || ||\\
|
||||
// \/ |___ |___ | \/ || ____| || || \\
|
||||
|
||||
// Copyright (c) 2021 Piotr Biernat. https://pbiernat.dev. MIT License
|
||||
// Repo: https://git.pbiernat.dev/golang/vegvisir
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
|
Loading…
Reference in New Issue
Block a user