Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:saner api directory #218

Merged
merged 4 commits into from
Sep 13, 2023
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
2 changes: 1 addition & 1 deletion client/localServer/localTestClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"time"

pb "github.com/TUM-Dev/Campus-Backend/server/api"
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand Down
2 changes: 1 addition & 1 deletion client/publicServer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"
"crypto/x509"
pb "github.com/TUM-Dev/Campus-Backend/api"
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down
1 change: 1 addition & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ COPY go.mod go.sum ./
RUN go mod download

# Copy source code
COPY api/tumdev/campus_backend.swagger.json ./swagger/swagger.json
COPY . .

# bundle version into binary if specified in build-args, dev otherwise.
Expand Down
14 changes: 3 additions & 11 deletions server/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,10 @@ sudo dnf install go protobuf
## Buf
Buf is required to generate protobuf files automatically.
Follow the installation instructions detailed here: https://docs.buf.build/installation#github-releases
Alternatively, we have prepared this installation script:

## Go Dependencies

```bash
go get google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc

go install \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc
```shell
sh installBuf.sh
```

## Generating
Expand Down
2 changes: 1 addition & 1 deletion server/api/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ plugins:
- paths=source_relative
- allow_repeated_fields_in_body=true
- name: openapiv2
out: gen/openapiv2
out: .
opt:
- allow_repeated_fields_in_body=true
6 changes: 0 additions & 6 deletions server/api/buf.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
3 changes: 1 addition & 2 deletions server/api/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: v1
deps:
- buf.build/googleapis/googleapis
deps: []
lint:
use:
- DEFAULT
Expand Down
Loading
Loading