github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/protobuf/permission.proto (about)

     1  syntax = 'proto2';
     2  
     3  package permission;
     4  
     5  option go_package = "github.com/hyperledger/burrow/permission";
     6  
     7  import "gogoproto/gogo.proto";
     8  
     9  option (gogoproto.stable_marshaler_all) = true;
    10  // Enable custom Marshal method.
    11  option (gogoproto.marshaler_all) = true;
    12  // Enable custom Unmarshal method.
    13  option (gogoproto.unmarshaler_all) = true;
    14  // Enable custom Size method (Required by Marshal and Unmarshal).
    15  option (gogoproto.sizer_all) = true;
    16  // Enable registration with golang/protobuf for the grpc-gateway.
    17  option (gogoproto.goproto_registration) = true;
    18  // Enable generation of XXX_MessageName methods for grpc-go/status.
    19  option (gogoproto.messagename_all) = true;
    20  
    21  message AccountPermissions {
    22      optional BasePermissions Base = 1 [(gogoproto.nullable) = false];
    23      option (gogoproto.goproto_sizecache) = false;
    24      option (gogoproto.goproto_unkeyed) = false;
    25  
    26      repeated string Roles = 2;
    27  }
    28  
    29  message BasePermissions {
    30      option (gogoproto.goproto_stringer) = false;
    31      option (gogoproto.goproto_sizecache) = false;
    32      option (gogoproto.goproto_unkeyed) = false;
    33      optional uint64 Perms = 1 [(gogoproto.casttype) = "PermFlag", (gogoproto.nullable) = false];
    34      optional uint64 SetBit = 2 [(gogoproto.casttype) = "PermFlag", (gogoproto.nullable) = false];
    35  }
    36  
    37  message PermArgs {
    38      option (gogoproto.goproto_unrecognized) = false;
    39      option (gogoproto.goproto_stringer) = false;
    40      // The permission function
    41      optional uint64 Action = 1 [(gogoproto.casttype) = "PermFlag", (gogoproto.nullable) = false];
    42      // The target of the action
    43      optional bytes Target = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
    44      // Possible arguments
    45      optional uint64 Permission = 3 [(gogoproto.casttype) = "PermFlag"];
    46      optional string Role = 4;
    47      optional bool Value = 5;
    48  }