Skip to content

Instantly share code, notes, and snippets.

@jhump
Created June 29, 2020 15:06
Show Gist options
  • Save jhump/96a5d3973ea80adcc0ea0eb3f8b1527b to your computer and use it in GitHub Desktop.
Save jhump/96a5d3973ea80adcc0ea0eb3f8b1527b to your computer and use it in GitHub Desktop.
Example descriptor options
syntax = "proto3";
package fs.auth;
import "fs/shared/flags/flags.proto";
import "google/protobuf/descriptor.proto";
extend google.protobuf.MethodOptions {
repeated fs.flags.Flag required_flags = 20000;
// force people to explicitly declare if they really want
// to allow callers with no permissions, to guard against
// people just forgetting to set required flags
bool allow_no_flags = 20001;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment