Skip to content

Provides protos to generate gRPC client/server stubs for djin.dev

Notifications You must be signed in to change notification settings

andrewtsun25/djin-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

djin-proto: Protobufs for djin.dev

This Git repository contains gRPC & entity definitions that are to be shared between client and server of the site djin.dev using a common IDL language called protobuf. Server stubs will be generated in Go, while client stubs will be generated in TypeScript. Upon committing to this repository, updated stubs will be auto-generated and published into Buf.

Fetching Stubs

Protobuf stubs are available in TypeScript on the client side via npm and Go modules on the server side.

Client-Side Stubs

Prerequisites: npm, TypeScript

After setting up your .npmrc to use Buf's npm registry via

npm config set @buf:registry https://npm.buf.build

Client-side stubs are available in TypeScript via

npm install @buf/grpc_web_andrewtsun25_djin

Note: This feature provided by Buf is currently in alpha.

Server-Side Stubs

Prerequisites: Go

Server-side stubs are available in Go via

go get go.buf.build/grpc/go/andrewtsun25/djin

Note: This feature provided by Buf is currently in alpha.

Frequently Used Commands

Prerequisites: Buf

Linting

Linting ensures correctness of protos and buildability.

buf lint

Check for Breaking Changes

Last thing we want to do is to break compatibility with past versions of this API. This step checks for breaking changes.

buf breaking

Code Generation

This is the actual step that generates Go & TypeScript stubs locally.

buf generate

About

Provides protos to generate gRPC client/server stubs for djin.dev

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published