protos

module
v0.4.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2024 License: MIT

README

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL