Skip to content

Commit 385c88b

Browse files
committed
Init
0 parents  commit 385c88b

94 files changed

Lines changed: 7552 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: device-hub
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
# https://github.com/marketplace/actions/golangci-lint#annotations
16+
permissions:
17+
# Required: allow read access to the content for analysis.
18+
contents: read
19+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
20+
pull-requests: read
21+
# Optional: allow write access to checks to allow the action to annotate code in the PR.
22+
checks: write
23+
24+
steps:
25+
- name: checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
30+
- name: check license headers
31+
env:
32+
CI_COMPONENTS_PATH: ci-components
33+
PROJECT_PATH: .
34+
shell: bash
35+
run: |
36+
ci-components/scripts/fmt/check_license.sh
37+
38+
- name: set up Go
39+
uses: actions/setup-go@v5
40+
with:
41+
go-version: 1.23
42+
43+
- name: golangci-lint
44+
uses: golangci/golangci-lint-action@v6
45+
with:
46+
version: v1.60
47+
only-new-issues: true
48+
args: ./...
49+
50+
- name: verify dependencies
51+
shell: bash
52+
run: |
53+
go mod download
54+
go mod tidy
55+
56+
if [ -n "$(git status --porcelain .)" ]; then
57+
echo "Please run 'go mod tidy' and commit the updated files."
58+
exit 1
59+
fi
60+
61+
- name: run tests
62+
shell: bash
63+
run: |
64+
go test ./... --race

.gitignore

Whitespace-only changes.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "ci-components"]
2+
path = ci-components
3+
url = https://github.com/tendry-lab/ci-components.git

.golangci.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
linters:
2+
enable:
3+
- revive
4+
- gofmt
5+
- govet
6+
- staticcheck
7+
- errcheck
8+
- ineffassign
9+
- typecheck
10+
- gosimple
11+
- unconvert
12+
- unused
13+
- gocritic
14+
- copyloopvar
15+
16+
linters-settings:
17+
revive:
18+
# When set to false, ignores files with "GENERATED" header, similar to golint.
19+
# See https://github.com/mgechev/revive#configuration for details.
20+
# Default: false
21+
ignore-generated-header: true
22+
# Sets the default severity.
23+
# See https://github.com/mgechev/revive#configuration
24+
# Default: warning
25+
severity: "warning"
26+
# Sets the default failure confidence.
27+
# This means that linting errors with less than 0.8 confidence will be ignored.
28+
# Default: 0.8
29+
confidence: 0.1
30+
# Enable all available rules.
31+
# Default: false
32+
enable-all-rules: true
33+
rules:
34+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
35+
- name: add-constant
36+
severity: warning
37+
disabled: true
38+
exclude: [""]
39+
arguments:
40+
- maxLitCount: "3"
41+
allowStrs: '""'
42+
allowInts: "0,1,2"
43+
allowFloats: "0.0,0.,1.0,1.,2.0,2."
44+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit
45+
- name: line-length-limit
46+
severity: warning
47+
disabled: false
48+
exclude: [""]
49+
arguments: [95]
50+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
51+
- name: if-return
52+
severity: warning
53+
disabled: true
54+
exclude: [""]
55+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
56+
- name: package-comments
57+
severity: warning
58+
disabled: true
59+
exclude: [""]
60+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
61+
- name: exported
62+
severity: warning
63+
disabled: false
64+
exclude: [""]
65+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
66+
- name: error-naming
67+
severity: warning
68+
disabled: true
69+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity
70+
- name: cognitive-complexity
71+
severity: warning
72+
disabled: true
73+
exclude: [""]
74+
arguments: [7]
75+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length
76+
- name: function-length
77+
severity: warning
78+
disabled: true
79+
exclude: [""]
80+
arguments: [10, 0]
81+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic
82+
- name: cyclomatic
83+
severity: warning
84+
disabled: true
85+
exclude: [""]
86+
arguments: [3]
87+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs
88+
- name: nested-structs
89+
severity: warning
90+
disabled: true
91+
exclude: [""]
92+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#argument-limit
93+
- name: argument-limit
94+
severity: warning
95+
disabled: false
96+
exclude: [""]
97+
arguments: [9]
98+
99+
issues:
100+
include:
101+
# https://golangci-lint.run/usage/false-positives/#exc0012
102+
- EXC0012
103+
# https://golangci-lint.run/usage/false-positives/#exc0014
104+
- EXC0014

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Release 0.1.0
2+
3+
**New Features**
4+
5+
- Allow to store device data in influxdb database
6+
- Automatically synchronize device system time
7+
- Automatically remove inactive devices
8+
- Add support for mDNS server
9+
- Add support for mDNS browser
10+
- Add support for mDNS autodiscovery
11+
- Persist information about registered devices

0 commit comments

Comments
 (0)