syntax = "proto3";
package host;

option go_package = "github.com/knqyf263/go-plugin/tests/host-functions/proto";

// The greeting service definition.
// go:plugin type=plugin version=1
service Greeter {
  // Sends a greeting
  rpc Greet(GreetRequest) returns (GreetReply) {}
}

// The request message containing the user's name.
message GreetRequest {
  string name = 1;
}

// The response message containing the greetings
message GreetReply {
  string message = 1;
}

// The host functions embedded into the plugin
// go:plugin type=host
service HostFunctions {
  rpc ParseJson(ParseJsonRequest) returns (ParseJsonResponse) {}
}

message ParseJsonRequest {
  bytes content = 1;
}

message ParseJsonResponse {
  Person response = 1;
}

message Person {
  string name = 1;
  int64  age  = 2;
}
