Skip to content

Commit

Permalink
New pre-compiled protobuf
Browse files Browse the repository at this point in the history
Using Bug v1.11.0. Attach version information to HTTP response
headers.
  • Loading branch information
bcessa committed Jan 23, 2023
1 parent 8bfe11a commit 487bdec
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 52 deletions.
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pkg?="..."
# locally (on a dev container) or using a builder image.
buf:=buf
ifndef REMOTE_CONTAINERS_SOCKETS
buf=docker run --platform linux/amd64 --rm -it -v $(shell pwd):/workdir ghcr.io/bryk-io/buf-builder:1.7.0 buf
buf=docker run --platform linux/amd64 --rm -it -v $(shell pwd):/workdir ghcr.io/bryk-io/buf-builder:1.11.0 buf
endif

help:
Expand Down Expand Up @@ -146,16 +146,15 @@ release:
## scan-deps: Look for known vulnerabilities in the project dependencies
# https://github.com/sonatype-nexus-community/nancy
scan-deps:
@go list -mod=readonly -f '{{if not .Indirect}}{{.}}{{end}}' -m all | nancy sleuth --skip-update-check
@go list -json -deps ./... | nancy sleuth --skip-update-check

## scan-secrets: Scan project code for accidentally leaked secrets
# https://github.com/trufflesecurity/trufflehog
scan-secrets:
@docker run --platform linux/amd64 --rm \
-v $(shell pwd):/proj \
dxa4481/trufflehog file:///proj \
-x .exclude-secrets-scan.txt \
--regex \
--entropy false
@docker run -it --rm --platform linux/arm64 \
-v "$PWD:/repo" \
trufflesecurity/trufflehog:latest \
filesystem --directory /repo --only-verified

## test: Run unit tests excluding the vendor dependencies
test:
Expand All @@ -166,4 +165,4 @@ test:
## updates: List available updates for direct dependencies
# https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies
updates:
@GOWORK=off go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -mod=mod -m all 2> /dev/null
@GOWORK=off go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}} [{{.Version}} -> {{.Update.Version}}]{{end}}' -m all 2> /dev/null
5 changes: 5 additions & 0 deletions client/internal/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/spf13/viper"
"go.bryk.io/pkg/cli"
xlog "go.bryk.io/pkg/log"
mwHeaders "go.bryk.io/pkg/net/middleware/headers"
"go.bryk.io/pkg/net/rpc"
"go.bryk.io/pkg/otel"
"go.bryk.io/pkg/otel/sentry"
Expand Down Expand Up @@ -206,6 +207,10 @@ func (s *Settings) Gateway(oop *otel.Operator) []rpc.GatewayOption {
rpc.WithClientOptions(clOpts...),
rpc.WithHandlerName("http-gateway"),
rpc.WithPrettyJSON("json+pretty"),
rpc.WithGatewayMiddleware(mwHeaders.Handler(map[string]string{
"x-didctl-version": info.CoreVersion,
"x-didctl-build": info.BuildCode,
})),
}
}

Expand Down
2 changes: 1 addition & 1 deletion helm/didctl/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: didctl
description: Network agent deployment for the "bryk" DID method
type: application
version: 0.3.0
appVersion: 0.9.2
appVersion: 0.9.3
home: https://github.com/bryk-io/did-method
icon: https://raw.githubusercontent.com/bryk-io/did-method/master/helm/didctl/icon.png
sources:
Expand Down
14 changes: 7 additions & 7 deletions proto/did/v1/agent_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 36 additions & 30 deletions proto/did/v1/agent_api.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions proto/did/v1/agent_api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,10 @@
"type": "object",
"properties": {
"task": {
"$ref": "#/definitions/ProcessRequestTask",
"description": "Mutation type."
"$ref": "#/definitions/ProcessRequestTask"
},
"ticket": {
"$ref": "#/definitions/v1Ticket",
"description": "Request ticket."
"$ref": "#/definitions/v1Ticket"
}
},
"description": "Mutation request, either to publish or deactivate a DID record."
Expand Down
2 changes: 1 addition & 1 deletion proto/did/v1/agent_api_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 487bdec

Please sign in to comment.