List of gRPC proto files and compiled golang files
Find a file
Arnas Udovic 3a1a4c0565
All checks were successful
Release / release (push) Successful in 49s
add release action
2026-06-14 11:56:22 +03:00
.forgejo/workflows add release action 2026-06-14 11:56:22 +03:00
.gitignore gitignore up 2026-06-14 11:41:43 +03:00
go.mod push services grpc 2026-06-14 11:38:32 +03:00
go.sum push services grpc 2026-06-14 11:38:32 +03:00
README.md add release action 2026-06-14 11:56:22 +03:00
social.pb.go push services grpc 2026-06-14 11:38:32 +03:00
social.proto push services grpc 2026-06-14 11:38:32 +03:00
social_grpc.pb.go push services grpc 2026-06-14 11:38:32 +03:00
tree.pb.go push services grpc 2026-06-14 11:38:32 +03:00
tree.proto push services grpc 2026-06-14 11:38:32 +03:00
tree_grpc.pb.go push services grpc 2026-06-14 11:38:32 +03:00

zord-grpc-schemas

This repository contains gRPC protocol buffer definitions and generated Go code for Zord services.

Services

TreeManager (tree.proto)

The TreeManager service provides methods for interacting with a file tree structure.

  • GetSummery: Retrieves a summary of the file tree.
  • GetFile: Retrieves the content of a specific file by its ID.
  • RebuildTree: Triggers a rebuild of the tree structure (requires secret key).
  • DownloadAttachment: Downloads an attachment as a stream of bytes.

SocialManager (social.proto)

The SocialManager service provides methods for managing social media posts and associated images.

  • GetSummery: Retrieves a summary of social posts (with pagination support).
  • GetFile: Retrieves the content of a specific post by its ID.
  • DownloadImage: Downloads a post's image as a stream of bytes.

Installation

To use these schemas in your Go project:

go get g.arns.lt/zordsdavini/zord-grpc-schemas

Usage

Example of how to import and use the generated code in your Go project:

import (
	"context"
	"log"

	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	pb "g.arns.lt/zordsdavini/zord-grpc-schemas"
)

func main() {
	conn, err := grpc.NewClient("localhost:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		log.Fatalf("did not connect: %v", err)
	}
	defer conn.Close()

	client := pb.NewTreeManagerClient(conn)
	summary, err := client.GetSummery(context.Background(), &pb.TreeRequest{})
	if err != nil {
		log.Fatalf("could not get summary: %v", err)
	}
	log.Printf("Tree summary: %v", summary)
}

Generated Code

The repository includes generated Go code:

  • tree.pb.go, tree_grpc.pb.go
  • social.pb.go, social_grpc.pb.go