Skip to content
/ protos Public

Protocol buffers definition for TuiHub, import as a library rather than a directory

License

Notifications You must be signed in to change notification settings

tuihub/protos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains protobuf definition and generated code for TuiHub developers and contributors. All the .proto files located at proto folder, it is recommended to import generated code rather than original definition.

Usage

Document

Config files located at docs, But document content is generated by Action Bot
Check https://tuihub.github.io/protos

Go

go get github.com/tuihub/protos

Js/Ts

npm install https://github.com/tuihub/protos
# Or
yarn add https://github.com/tuihub/protos

Rust

cargo add --git https://github.com/tuihub/protos

CSharp

  • Check Package page or nuget for pre-packed file
  • Or pack locally
git clone https://github.com/tuihub/protos && cd protos
# How to install `dotnet`: https://learn.microsoft.com/en-us/dotnet/core/install/
dotnet pack TuiHub.Protos.csproj -c Release

Dart

# pubspec.yaml
dependencies:
  ...
  # Add following lines
  tuihub_protos:
    git: https://github.com/tuihub/protos.git

Build Locally

Not Recommended. You can focus on proto files and just use buf lint to make sure proto files are correct. Action Bot will deal with the rest.

Install dependency

basic cli tool

compiler

language plugins

GO111MODULE=off go get github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
  • Go:
GO111MODULE=off go get github.com/gogo/protobuf/protoc-gen-gofast
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
export PATH="$PATH:$(go env GOPATH)/bin"
  • Js/Ts:
npm i

Build

make generate