Как сделать импорт в .proto файл проекта java - PullRequest
0 голосов
/ 17 апреля 2020

оператор импорта отображается в RED для проекта java и необязательных параметров '[(validator.field) = {string_not_empty: true, length_lt: 255}];' также показывают красный. Использование проекта Java8 + Gradle


import "github.com/mwitkow/go-proto-validators/validator.proto";

package proto;

/**
The CryptoService takes a number of byte arrays and encrypts / decrypts them using Parcel Encryption.

*/
service CryptoService {
  // Encrypts an array of byte arrays
  rpc Encrypt (EncryptRequest) returns (EncryptResponse) {}

  // Decrypts a ciphertext to an array of byte arrays
  rpc Decrypt (DecryptRequest) returns (DecryptResponse) {}
}

message EncryptRequest {
  string alias = 1 [(validator.field) = {string_not_empty: true, length_lt: 255}]; // The alias that represents the private key
  string derivation_path = 2; // The derivation path to use
  repeated bytes data = 3; // One or more arrays of byte arrays containing the data you wish to encrypt ([][]byte)
}

message EncryptResponse {
  bytes data = 1; // The resulting ciphertext
}

message DecryptRequest {
  string alias = 1; // The alias that represents the private key
  string derivation_path = 2; // The derivation path to use
  bytes data = 3; // The ciphertext to decrypt ([]byte)
}

message DecryptResponse {
  repeated bytes data = 1; // An array of one or more byte arrays ([][]byte)
}```





...