Skip to content

Commit

Permalink
Merge pull request #28 from HilkopterBob/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
HilkopterBob authored Aug 19, 2024
2 parents 5c7f3a5 + 0ba6709 commit b635b47
Show file tree
Hide file tree
Showing 18 changed files with 659 additions and 179 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-docker-container.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: ci
name: docker-build

on:
push:
branches: ["binary-release", "master", "devel"]
release:
types: [published]

jobs:
docker:
Expand All @@ -20,3 +20,5 @@ jobs:
with:
push: true
tags: hilkopterbob/packagelock:latest
build-args: |
APP_VERSION=${{ github.event.release.tag_name }}
21 changes: 21 additions & 0 deletions .github/workflows/unstable-build-docker-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: unstable-docker-build

on:
push:

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: hilkopterbob/packagelock:unstable-${{ github.head_ref || github.ref_name }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
certs/**
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ RUN go mod download


# Build

RUN CGO_ENABLED=0 GOOS=linux go build -o /packagelock
ARG APP_VERSION="v0.1.0+hotfixes"
RUN \
CGO_ENABLED=0 GOOS=linux go build -ldflags "-X 'main.AppVersion=$APP_VERSION'" -o /packagelock

# Optional:
# To bind to a TCP port, runtime parameters must be supplied to the docker command.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ TODO: explain usage
- [ ] installable agent as background daemon
- [ ] config management
- [ ] TLS Encryption
- [ ] Secured API
- [ ] Best Practice based Package Layout
- [ ] Check Vars and Func-Names for naming convention
- [ ] persistent storage
Expand Down
7 changes: 4 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ network:
forcehttp: true
fqdn: 0.0.0.0
port: 8080
ssl:
ssl: true
ssl-config:
allowselfsigned: true
certificatepath: /etc/packagelock/ssl/cert.pem
privatekeypath: /etc/packagelock/ssl/privkey.pem
certificatepath: ./certs/testing.crt
privatekeypath: ./certs/testing.key
4 changes: 4 additions & 0 deletions config/conf-init.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"github.com/spf13/viper"
)

var Config ConfigProvider

type ConfigProvider interface {
SetConfigName(name string)
SetConfigType(fileext string)
Expand All @@ -20,6 +22,8 @@ type ConfigProvider interface {
ReadConfig(in io.Reader) error
AllSettings() map[string]any
GetString(string string) string
SetDefault(key string, value any)
Get(key string) any
}

// TODO: How to test?
Expand Down
45 changes: 18 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,45 @@ go 1.22.6

require (
github.com/fsnotify/fsnotify v1.7.0
github.com/gin-gonic/gin v1.10.0
github.com/gofiber/fiber/v2 v2.52.5
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
)

require (
github.com/bytedance/sonic v1.12.1 // indirect
github.com/bytedance/sonic/loader v0.2.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 // indirect
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/MicahParks/keyfunc/v2 v2.1.0 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/gofiber/contrib/jwt v1.0.10 // indirect
github.com/gofiber/jwt/v3 v3.3.10 // indirect
github.com/gofiber/template v1.8.3 // indirect
github.com/gofiber/template/html/v2 v2.1.2 // indirect
github.com/gofiber/utils v1.1.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.55.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/arch v0.9.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit b635b47

Please sign in to comment.