Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linters-settings:
- errors
stylecheck:
go: "1.18"
checks: ["all", "-ST1003"]
checks: ["all", "-ST1000" , "-ST1003"]

linters:
enable:
Expand Down Expand Up @@ -105,5 +105,13 @@ linters:
# # Fix found issues (if it's supported by the linter).
# fix: true

issues:
exclude-use-default: false
exclude-rules:
# Allow complex tests, better to be self contained
- path: _test\.go
linters:
- goconst

run:
skip-dirs-use-default: false
2 changes: 1 addition & 1 deletion cmd/extractUI.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func extractUI(directory string) (errRet error) {
if err != nil {
return fmt.Errorf("cannot get executable path: %w", err)
}
f, err := os.OpenFile(ex, os.O_RDONLY, 0)
f, err := os.OpenFile(ex, os.O_RDONLY, 0) //nolint:gosec
if err != nil {
return fmt.Errorf("cannot open executable: %w", err)
}
Expand Down
10 changes: 6 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ func loadConfig() config.Config {
os.Exit(1)
}
}
if cfg.APIs.HTTP.Enabled && cfg.APIs.HTTP.TLS.Enabled && !checkSelfSignedCertificate(cfg.APIs.HTTP.TLS.CertFile, cfg.APIs.HTTP.TLS.KeyFile) {
if err = generateSelfSigned(cfg.APIs.HTTP.TLS.CertFile, cfg.APIs.HTTP.TLS.KeyFile); err != nil {
if cfg.APIs.HTTP.Enabled && cfg.APIs.HTTP.TLS.Enabled &&
!checkSelfSignedCertificate(cfg.APIs.HTTP.TLS.CertFile.FilePath(), cfg.APIs.HTTP.TLS.KeyFile.FilePath()) {
if err = generateSelfSigned(cfg.APIs.HTTP.TLS.CertFile.FilePath(), cfg.APIs.HTTP.TLS.KeyFile.FilePath()); err != nil {
log.Errorf("cannot generate self signed certificate for HTTP: %v", err)
os.Exit(1)
}
}
if cfg.APIs.GRPC.Enabled && cfg.APIs.GRPC.TLS.Enabled && !checkSelfSignedCertificate(cfg.APIs.GRPC.TLS.CertFile, cfg.APIs.GRPC.TLS.KeyFile) {
if err = generateSelfSigned(cfg.APIs.GRPC.TLS.CertFile, cfg.APIs.GRPC.TLS.KeyFile); err != nil {
if cfg.APIs.GRPC.Enabled && cfg.APIs.GRPC.TLS.Enabled &&
!checkSelfSignedCertificate(cfg.APIs.GRPC.TLS.CertFile.FilePath(), cfg.APIs.GRPC.TLS.KeyFile.FilePath()) {
if err = generateSelfSigned(cfg.APIs.GRPC.TLS.CertFile.FilePath(), cfg.APIs.GRPC.TLS.KeyFile.FilePath()); err != nil {
log.Errorf("cannot generate self signed certificate for GRPC: %v", err)
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion dependency/googleapis
Submodule googleapis updated 1029 files
70 changes: 39 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@ module github.com/plgd-dev/client-application
go 1.18

require (
cloud.google.com/go v0.110.8
cloud.google.com/go v0.110.10
github.com/apex/log v1.9.0
github.com/favadi/protoc-go-inject-tag v1.4.0
github.com/fullstorydev/grpchan v1.1.1
github.com/glendc/go-external-ip v0.1.0
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/google/uuid v1.3.1
github.com/google/uuid v1.4.0
github.com/goreleaser/goreleaser v1.9.2
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
github.com/jellydator/ttlcache/v3 v3.1.0
github.com/jessevdk/go-flags v1.5.0
github.com/lestrrat-go/jwx v1.2.26
github.com/pion/dtls/v2 v2.2.8-0.20231001141911-840187442335
github.com/plgd-dev/device/v2 v2.2.1
github.com/plgd-dev/go-coap/v3 v3.1.6-0.20231002093212-ea0ff53e8348
github.com/plgd-dev/hub/v2 v2.12.1
github.com/pion/dtls/v2 v2.2.8-0.20231026152330-9cc3df9c3369
github.com/plgd-dev/device/v2 v2.2.3-0.20231102140441-be15c594982e
github.com/plgd-dev/go-coap/v3 v3.1.6
github.com/plgd-dev/hub/v2 v2.13.1-0.20231103112740-d2a9b071272d
github.com/plgd-dev/kit/v2 v2.0.0-20211006190727-057b33161b90
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/otel/trace v1.14.0
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.24.0
google.golang.org/api v0.143.0
google.golang.org/api v0.149.0
google.golang.org/grpc v1.58.2
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v3 v3.0.1
)

require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.2 // indirect
cloud.google.com/go/kms v1.15.2 // indirect
cloud.google.com/go/iam v1.1.3 // indirect
cloud.google.com/go/kms v1.15.3 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
code.gitea.io/sdk/gitea v0.15.1 // indirect
github.com/AlekSi/pointer v1.2.0 // indirect
Expand Down Expand Up @@ -96,29 +96,29 @@ require (
github.com/emirpasic/gods v1.12.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/go-co-op/gocron v1.35.0 // indirect
github.com/go-co-op/gocron v1.35.3 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.4.2 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v44 v44.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/rpmpack v0.0.0-20220314092521-38642b5e571e // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/wire v0.5.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/goreleaser/chglog v0.1.2 // indirect
github.com/goreleaser/fileglob v1.3.0 // indirect
Expand Down Expand Up @@ -150,12 +150,11 @@ require (
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.4 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.13 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.16 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand All @@ -166,9 +165,8 @@ require (
github.com/muesli/mango-cobra v1.1.0 // indirect
github.com/muesli/mango-pflag v0.1.0 // indirect
github.com/muesli/roff v0.1.0 // indirect
github.com/nats-io/jwt/v2 v2.2.0 // indirect
github.com/nats-io/nats.go v1.30.2 // indirect
github.com/nats-io/nkeys v0.4.5 // indirect
github.com/nats-io/nats.go v1.31.0 // indirect
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/panjf2000/ants/v2 v2.8.2 // indirect
github.com/pion/logging v0.2.2 // indirect
Expand All @@ -184,8 +182,13 @@ require (
github.com/spf13/cobra v1.4.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
github.com/tidwall/gjson v1.17.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/vincent-petithory/dataurl v1.0.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/go-gitlab v0.65.0 // indirect
github.com/xanzy/ssh-agent v0.3.1 // indirect
Expand All @@ -207,28 +210,30 @@ require (
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
gocloud.dev v0.24.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/mail.v2 v2.3.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

exclude (
// note github.com/klauspost/compress must be kept at v1.16.0 as long as golang1.18 is supported
// note github.com/klauspost/compress must be kept at v1.16.7 as long as golang1.18 is supported
github.com/klauspost/compress v1.17.0
github.com/klauspost/compress v1.17.1
github.com/klauspost/compress v1.17.2
// note: opentelemetry must be kept at v1.14.0 as long as golang1.18 is supported
go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.41.0
go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.41.1
Expand Down Expand Up @@ -294,4 +299,7 @@ exclude (
// note: go.uber.org/zap must be kept at v1.24.0 as long as golang1.18 is supported
go.uber.org/zap v1.25.0
go.uber.org/zap v1.26.0
// note: google.golang.org/grpc must be kept at v1.58.2 as long as golang1.18 is supported
google.golang.org/grpc v1.58.3
google.golang.org/grpc v1.59.0
)
Loading