feat: add enums.pulsar.go file for PermissionScope enum

This commit is contained in:
Prad Nukala
2024-08-09 21:00:38 -04:00
committed by Prad Nukala (aider)
parent 5b1aeabc4e
commit 7e700cdfee
7 changed files with 443 additions and 44 deletions
+123
View File
@@ -0,0 +1,123 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: did/v1/enums.proto
package types
import (
fmt "fmt"
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// PermissionScope define the Capabilities Controllers can grant for Services
type PermissionScope int32
const (
PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0
PermissionScope_PERMISSION_SCOPE_PROFILE_NAME PermissionScope = 1
PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL PermissionScope = 2
PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE PermissionScope = 3
PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_ENS PermissionScope = 4
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 5
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 6
PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 7
PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 8
PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 9
PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 10
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 11
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 12
PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 13
PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 14
)
var PermissionScope_name = map[int32]string{
0: "PERMISSION_SCOPE_UNSPECIFIED",
1: "PERMISSION_SCOPE_PROFILE_NAME",
2: "PERMISSION_SCOPE_IDENTIFIERS_EMAIL",
3: "PERMISSION_SCOPE_IDENTIFIERS_PHONE",
4: "PERMISSION_SCOPE_IDENTIFIERS_ENS",
5: "PERMISSION_SCOPE_TRANSACTIONS_READ",
6: "PERMISSION_SCOPE_TRANSACTIONS_WRITE",
7: "PERMISSION_SCOPE_WALLETS_READ",
8: "PERMISSION_SCOPE_WALLETS_CREATE",
9: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE",
10: "PERMISSION_SCOPE_WALLETS_UPDATE",
11: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY",
12: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST",
13: "PERMISSION_SCOPE_ADMIN_USER",
14: "PERMISSION_SCOPE_ADMIN_VALIDATOR",
}
var PermissionScope_value = map[string]int32{
"PERMISSION_SCOPE_UNSPECIFIED": 0,
"PERMISSION_SCOPE_PROFILE_NAME": 1,
"PERMISSION_SCOPE_IDENTIFIERS_EMAIL": 2,
"PERMISSION_SCOPE_IDENTIFIERS_PHONE": 3,
"PERMISSION_SCOPE_IDENTIFIERS_ENS": 4,
"PERMISSION_SCOPE_TRANSACTIONS_READ": 5,
"PERMISSION_SCOPE_TRANSACTIONS_WRITE": 6,
"PERMISSION_SCOPE_WALLETS_READ": 7,
"PERMISSION_SCOPE_WALLETS_CREATE": 8,
"PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 9,
"PERMISSION_SCOPE_WALLETS_UPDATE": 10,
"PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 11,
"PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 12,
"PERMISSION_SCOPE_ADMIN_USER": 13,
"PERMISSION_SCOPE_ADMIN_VALIDATOR": 14,
}
func (x PermissionScope) String() string {
return proto.EnumName(PermissionScope_name, int32(x))
}
func (PermissionScope) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_001c58538597e328, []int{0}
}
func init() {
proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value)
}
func init() { proto.RegisterFile("did/v1/enums.proto", fileDescriptor_001c58538597e328) }
var fileDescriptor_001c58538597e328 = []byte{
// 393 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x6f, 0xd3, 0x30,
0x18, 0xc6, 0x13, 0x18, 0x05, 0xcc, 0x3f, 0x63, 0x71, 0x1a, 0x90, 0x8d, 0x6d, 0x62, 0x08, 0xa4,
0x5a, 0x13, 0x57, 0x2e, 0x4e, 0xf2, 0x56, 0x58, 0x4a, 0x9c, 0xc8, 0x76, 0x36, 0xc1, 0x25, 0xda,
0x9a, 0xa8, 0xcd, 0x21, 0x71, 0xd5, 0xb4, 0x85, 0x7e, 0x0b, 0x3e, 0x16, 0xc7, 0x1e, 0x39, 0xa2,
0xf6, 0x8b, 0xa0, 0xb4, 0x70, 0x6a, 0xc8, 0x2e, 0x96, 0xf5, 0xfa, 0xa7, 0x9f, 0x1e, 0xeb, 0x7d,
0x10, 0xc9, 0x8a, 0x8c, 0x2e, 0x2e, 0x68, 0x5e, 0xcd, 0xcb, 0xba, 0x3f, 0x99, 0x9a, 0x99, 0x21,
0xbd, 0xac, 0xc8, 0xfa, 0x8b, 0x8b, 0xc3, 0x17, 0x23, 0x33, 0x32, 0xdb, 0x11, 0x6d, 0x6e, 0xbb,
0xd7, 0xc3, 0xe7, 0xd7, 0x65, 0x51, 0x19, 0xba, 0x3d, 0x77, 0xa3, 0xf7, 0xab, 0x03, 0xf4, 0x2c,
0xce, 0xa7, 0x65, 0x51, 0xd7, 0x85, 0xa9, 0xd4, 0xd0, 0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0x9f, 0xba, 0x9f, 0x7e, 0xae, 0x1d, 0x7b, 0xb5, 0x76, 0xec, 0xdf, 0x6b, 0xc7, 0xfe,
0xb1, 0x71, 0xac, 0xd5, 0xc6, 0xb1, 0x7e, 0x6d, 0x1c, 0xeb, 0xeb, 0xc9, 0xa8, 0x98, 0x8d, 0xe7,
0x37, 0xfd, 0xa1, 0x29, 0xa9, 0xa9, 0x6a, 0x53, 0x4d, 0xe9, 0xf8, 0xdb, 0xf5, 0x92, 0x7e, 0xa7,
0x4d, 0x95, 0x67, 0xcb, 0x49, 0x5e, 0xdf, 0xf4, 0xb6, 0xbd, 0xfc, 0xf8, 0x27, 0x00, 0x00, 0xff,
0xff, 0x74, 0x06, 0x5b, 0x2d, 0xde, 0x02, 0x00, 0x00,
}
+6 -44
View File
@@ -6,21 +6,18 @@ package types
import (
encoding_binary "encoding/binary"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = proto.Marshal
_ = fmt.Errorf
_ = math.Inf
)
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
@@ -40,11 +37,9 @@ func (*GenesisState) ProtoMessage() {}
func (*GenesisState) Descriptor() ([]byte, []int) {
return fileDescriptor_fda181cae44f7c00, []int{0}
}
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
@@ -57,15 +52,12 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return b[:n], nil
}
}
func (m *GenesisState) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenesisState.Merge(m, src)
}
func (m *GenesisState) XXX_Size() int {
return m.Size()
}
func (m *GenesisState) XXX_DiscardUnknown() {
xxx_messageInfo_GenesisState.DiscardUnknown(m)
}
@@ -92,11 +84,9 @@ func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_fda181cae44f7c00, []int{1}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Params.Marshal(b, m, deterministic)
@@ -109,15 +99,12 @@ func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return b[:n], nil
}
}
func (m *Params) XXX_Merge(src proto.Message) {
xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
xxx_messageInfo_Params.DiscardUnknown(m)
}
@@ -149,11 +136,9 @@ func (*Meta) ProtoMessage() {}
func (*Meta) Descriptor() ([]byte, []int) {
return fileDescriptor_fda181cae44f7c00, []int{2}
}
func (m *Meta) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Meta.Marshal(b, m, deterministic)
@@ -166,15 +151,12 @@ func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return b[:n], nil
}
}
func (m *Meta) XXX_Merge(src proto.Message) {
xxx_messageInfo_Meta.Merge(m, src)
}
func (m *Meta) XXX_Size() int {
return m.Size()
}
func (m *Meta) XXX_DiscardUnknown() {
xxx_messageInfo_Meta.DiscardUnknown(m)
}
@@ -212,11 +194,9 @@ func (*AssetInfo) ProtoMessage() {}
func (*AssetInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_fda181cae44f7c00, []int{3}
}
func (m *AssetInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AssetInfo.Marshal(b, m, deterministic)
@@ -229,15 +209,12 @@ func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return b[:n], nil
}
}
func (m *AssetInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_AssetInfo.Merge(m, src)
}
func (m *AssetInfo) XXX_Size() int {
return m.Size()
}
func (m *AssetInfo) XXX_DiscardUnknown() {
xxx_messageInfo_AssetInfo.DiscardUnknown(m)
}
@@ -373,11 +350,9 @@ func (*ChainInfo) ProtoMessage() {}
func (*ChainInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_fda181cae44f7c00, []int{4}
}
func (m *ChainInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ChainInfo.Marshal(b, m, deterministic)
@@ -390,15 +365,12 @@ func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return b[:n], nil
}
}
func (m *ChainInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChainInfo.Merge(m, src)
}
func (m *ChainInfo) XXX_Size() int {
return m.Size()
}
func (m *ChainInfo) XXX_DiscardUnknown() {
xxx_messageInfo_ChainInfo.DiscardUnknown(m)
}
@@ -616,7 +588,6 @@ func (this *Params) Equal(that interface{}) bool {
}
return true
}
func (this *Meta) Equal(that interface{}) bool {
if that == nil {
return this == nil
@@ -646,7 +617,6 @@ func (this *Meta) Equal(that interface{}) bool {
}
return true
}
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -1074,7 +1044,6 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
func (m *GenesisState) Size() (n int) {
if m == nil {
return 0
@@ -1268,11 +1237,9 @@ func (m *ChainInfo) Size() (n int) {
func sovGenesis(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGenesis(x uint64) (n int) {
return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GenesisState) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -1356,7 +1323,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *Params) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -1475,7 +1441,6 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *Meta) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -1653,7 +1618,6 @@ func (m *Meta) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *AssetInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -2163,7 +2127,6 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *ChainInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -2658,7 +2621,6 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error {
}
return nil
}
func skipGenesis(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
+42
View File
@@ -0,0 +1,42 @@
package types
import "gopkg.in/macaroon-bakery.v2/bakery/checkers"
var (
PermissionScope_PERMISSION_SCOPEStrings = [...]string{
"profile.name",
"identifiers.email",
"identifiers.phone",
"identifiers.ens",
"transactions.read",
"transactions.write",
"wallets.read",
"wallets.create",
"wallets.subscribe",
"wallets.update",
"transactions.verify",
"transactions.broadcast",
"admin.user",
"admin.validator",
}
StringToPermissionScope_PERMISSION_SCOPE = map[string]PermissionScope{
"PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED,
"PERMISSION_SCOPE_PROFILE_NAME": PermissionScope_PERMISSION_SCOPE_PROFILE_NAME,
"PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL,
"PERMISSION_SCOPE_IDENTIFIERS_PHONE": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE,
"PERMISSION_SCOPE_IDENTIFIERS_ENS": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_ENS,
"PERMISSION_SCOPE_TRANSACTIONS_READ": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ,
"PERMISSION_SCOPE_TRANSACTIONS_WRITE": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE,
"PERMISSION_SCOPE_WALLETS_READ": PermissionScope_PERMISSION_SCOPE_WALLETS_READ,
"PERMISSION_SCOPE_WALLETS_CREATE": PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE,
"PERMISSION_SCOPE_WALLETS_SUBSCRIBE": PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE,
"PERMISSION_SCOPE_WALLETS_UPDATE": PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE,
"PERMISSION_SCOPE_TRANSACTIONS_VERIFY": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY,
"PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST,
"PERMISSION_SCOPE_ADMIN_USER": PermissionScope_PERMISSION_SCOPE_ADMIN_USER,
"PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR,
}
PermissionNamespace *checkers.Namespace
)