-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
35 changed files
with
3,916 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.build/ | ||
.tarballs/ | ||
|
||
!.build/linux-amd64/ | ||
!.build/linux-armv7 | ||
!.build/linux-arm64 | ||
!.build/linux-ppc64le | ||
!.build/linux-s390x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Feature request | ||
**Use case. Why is this important?** | ||
|
||
*“Nice to have” is not a good use case. :)* | ||
|
||
## Bug Report | ||
**What did you do?** | ||
|
||
**What did you expect to see?** | ||
|
||
**What did you see instead? Under which circumstances?** | ||
|
||
**Environment** | ||
|
||
* System information: | ||
|
||
Insert output of `uname -srm` here. | ||
|
||
* Apptheus version: | ||
|
||
Insert output of `apptheus--version` here. | ||
|
||
* Apptheus command line: | ||
|
||
Insert full command line. | ||
|
||
* Logs: | ||
``` | ||
Insert Apptheus logs relevant to the issue here. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: golang-build-test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.x' | ||
- name: Install dependencies | ||
run: go get . | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Test with the Go CLI | ||
run: go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
cache: false | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: "latest" | ||
args: --timeout=30m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: gotest-coverage | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
go-test-coverage: | ||
name: Go test coverage check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.x' | ||
|
||
- name: Install dependencies | ||
run: go get . | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: generate test coverage | ||
run: go test ./... -coverprofile=./cover.out | ||
|
||
- name: check test coverage | ||
uses: vladopajic/go-test-coverage@v2 | ||
with: | ||
config: ./.testcoverage.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: license-check | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
license-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.x' | ||
- name: Install dependencies | ||
run: go get . | ||
- name: Install go-license | ||
run: go install github.com/google/go-licenses@latest | ||
- name: Check license | ||
run: go-licenses check --include_tests github.com/jasonyangshadow/apptheus... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/apptheus | ||
/.build | ||
/.release | ||
/.tarballs | ||
*.test | ||
*~ | ||
*.exe | ||
*.tar.gz | ||
/vendor | ||
/testutil/main/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
linters: | ||
enable-all: true | ||
disable: | ||
- maligned | ||
- interfacer | ||
- scopelint | ||
- golint | ||
- dupl | ||
- funlen | ||
- gomnd | ||
- lll | ||
- gochecknoglobals | ||
- varnamelen | ||
- ireturn | ||
- gomoddirectives | ||
- godox | ||
- gocyclo | ||
- exhaustivestruct | ||
- exhaustruct | ||
- tagliatelle | ||
- wsl | ||
- forbidigo | ||
- makezero | ||
- depguard | ||
- wrapcheck | ||
- gocritic | ||
- gci | ||
- godot | ||
- cyclop | ||
- gocognit | ||
- maintidx | ||
- goerr113 | ||
- errname | ||
- nilnil | ||
- prealloc | ||
- ifshort | ||
- nlreturn | ||
- exhaustive | ||
- nestif | ||
- forcetypeassert | ||
- containedctx | ||
- contextcheck | ||
- wastedassign | ||
- promlinter | ||
- nonamedreturns | ||
- nosnakecase | ||
- gochecknoinits | ||
- goconst | ||
- goheader | ||
- paralleltest | ||
- errcheck | ||
- thelper | ||
- usestdlibvars | ||
|
||
linters-settings: | ||
goheader: | ||
values: | ||
const: | ||
COMPANY: CIQ, Inc | ||
template: |- | ||
SPDX-FileCopyrightText: Copyright (c) {{ YEAR-RANGE }}, {{ COMPANY }}. All rights reserved | ||
SPDX-License-Identifier: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# (mandatory) | ||
# Path to coverprofile file (output of `go test -coverprofile` command) | ||
profile: cover.out | ||
|
||
# Holds coverage thresholds percentages, values should be in range [0-100] | ||
threshold: | ||
# (optional; default 0) | ||
# The minimum coverage that each file should have | ||
file: 80 | ||
|
||
# (optional; default 0) | ||
# The minimum coverage that each package should have | ||
package: 80 | ||
|
||
# (optional; default 0) | ||
# The minimum total coverage project should have | ||
total: 80 | ||
|
||
#override: | ||
# Increase coverage threshold to 100% for `foo` package (default is 80, as configured above) | ||
#- threshold: 100 | ||
# path: ^pkg/lib/foo$ | ||
|
||
# Holds regexp rules which will exclude matched files or packages from coverage statistics | ||
exclude: | ||
# Exclude files or packages matching their paths | ||
paths: | ||
- ^storage/interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## 0.1.0 / 2023-10-01 | ||
|
||
### Feature | ||
1. Add SO_PASSCRED verification | ||
|
||
### Changes | ||
1. Removed most unused code | ||
2. Add new ci configuration for github actions | ||
3. Refactor existing code base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Apptheus Community Code of Conduct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Contributing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ARG ARCH="amd64" | ||
ARG OS="linux" | ||
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest | ||
LABEL maintainer="The Apptheus Contributors" | ||
|
||
ARG ARCH="amd64" | ||
ARG OS="linux" | ||
COPY --chown=nobody:nobody apptheus /bin/apptheus | ||
|
||
EXPOSE 9091 | ||
RUN mkdir -p /apptheus && chown nobody:nobody /apptheus | ||
WORKDIR /apptheus | ||
|
||
USER 65534 | ||
|
||
ENTRYPOINT [ "/bin/apptheus" ] |
Oops, something went wrong.