Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhon-henkel/go-lang-full-cycle-grpc
Repositório para estudar a aplicação do gRPC
https://github.com/jhon-henkel/go-lang-full-cycle-grpc
Last synced: about 1 month ago
JSON representation
Repositório para estudar a aplicação do gRPC
- Host: GitHub
- URL: https://github.com/jhon-henkel/go-lang-full-cycle-grpc
- Owner: Jhon-Henkel
- License: mit
- Created: 2023-12-26T13:55:58.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-29T21:20:55.000Z (12 months ago)
- Last Synced: 2023-12-29T22:54:57.725Z (12 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go-lang gRPC
Repositório para estudar a aplicação do gRPC
## Como rodar
- Instalar o [protoc](https://grpc.io/docs/protoc-installation/).
- Instalar os [plugins do protoc para Go-lang e gRPC](https://grpc.io/docs/languages/go/quickstart/).
- Instalar o [evans](https://github.com/ktr0731/evans)- Criar as tabelas no banco de dados:
```sh
sqlite3 db.sqlite;
CREATE TABLE categories (id string, name string, description string);
CREATE TABLE courses (id string, name string, description string, category_id string);
```
- Rodando o server:
```sh
go run cmd/grpcServer/main.go
```
- Usando o Evans:
```sh
evans -r repl # Iniciar o evans.
package pb # Selecionar o pacote.
service [Service Name] # Seleciona o serviço.
call [Method Name] # Seleciona o método.
```## Guias de ajuda
- [gRPC](https://grpc.io/)
- [Protocol Buffers](https://developers.google.com/protocol-buffers)
- Quando fazer o cadastro de categorias via stream use CTRL+D para finalizar o stream.## Comandos
- `protoc --go_out=. --go-grpc_out=. path-to-protofile` - Gera os arquivos conforme o proto-file.