/
ownership.pb.go
174 lines (156 loc) · 7.14 KB
/
ownership.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: ownership.proto
package ownership
import (
bytes "bytes"
fmt "fmt"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
github_com_mesg_foundation_engine_hash "github.com/mesg-foundation/engine/hash"
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
type Ownership_Resource int32
const (
Ownership_None Ownership_Resource = 0
Ownership_Service Ownership_Resource = 1
Ownership_Process Ownership_Resource = 2
Ownership_Runner Ownership_Resource = 3
)
var Ownership_Resource_name = map[int32]string{
0: "None",
1: "Service",
2: "Process",
3: "Runner",
}
var Ownership_Resource_value = map[string]int32{
"None": 0,
"Service": 1,
"Process": 2,
"Runner": 3,
}
func (x Ownership_Resource) String() string {
return proto.EnumName(Ownership_Resource_name, int32(x))
}
func (Ownership_Resource) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_21ae26e0dccf9d04, []int{0, 0}
}
// Ownership is a ownership relation between one owner and a resource.
type Ownership struct {
// Service's hash.
Hash github_com_mesg_foundation_engine_hash.Hash `protobuf:"bytes,1,opt,name=hash,proto3,casttype=github.com/mesg-foundation/engine/hash.Hash" json:"hash,omitempty" hash:"-" validate:"required,hash"`
// The owner of the resource.
// TODO: to transform to accAddress
Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty" hash:"name:2" validate:"required"`
// Resource's hash.
ResourceHash github_com_mesg_foundation_engine_hash.Hash `protobuf:"bytes,3,opt,name=resourceHash,proto3,casttype=github.com/mesg-foundation/engine/hash.Hash" json:"resourceHash,omitempty" hash:"name:3" validate:"required,hash"`
// Resource's type.
Resource Ownership_Resource `protobuf:"varint,4,opt,name=resource,proto3,enum=mesg.types.Ownership_Resource" json:"resource,omitempty" validate:"required"`
// The address of the resource.
ResourceAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=resourceAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"resourceAddress,omitempty" hash:"-" validate:"required,accaddress"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Ownership) Reset() { *m = Ownership{} }
func (m *Ownership) String() string { return proto.CompactTextString(m) }
func (*Ownership) ProtoMessage() {}
func (*Ownership) Descriptor() ([]byte, []int) {
return fileDescriptor_21ae26e0dccf9d04, []int{0}
}
func (m *Ownership) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Ownership.Unmarshal(m, b)
}
func (m *Ownership) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Ownership.Marshal(b, m, deterministic)
}
func (m *Ownership) XXX_Merge(src proto.Message) {
xxx_messageInfo_Ownership.Merge(m, src)
}
func (m *Ownership) XXX_Size() int {
return xxx_messageInfo_Ownership.Size(m)
}
func (m *Ownership) XXX_DiscardUnknown() {
xxx_messageInfo_Ownership.DiscardUnknown(m)
}
var xxx_messageInfo_Ownership proto.InternalMessageInfo
func init() {
proto.RegisterEnum("mesg.types.Ownership_Resource", Ownership_Resource_name, Ownership_Resource_value)
proto.RegisterType((*Ownership)(nil), "mesg.types.Ownership")
}
func init() { proto.RegisterFile("ownership.proto", fileDescriptor_21ae26e0dccf9d04) }
var fileDescriptor_21ae26e0dccf9d04 = []byte{
// 400 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x3f, 0x8f, 0xd3, 0x30,
0x14, 0xbf, 0xdc, 0xe5, 0x8e, 0x9e, 0x39, 0x71, 0x91, 0x19, 0x88, 0x18, 0x9a, 0x60, 0x09, 0xa8,
0x04, 0x49, 0xa4, 0xab, 0x58, 0xc2, 0xd4, 0x4c, 0x4c, 0x80, 0x52, 0x16, 0x10, 0x8b, 0xeb, 0xbc,
0x26, 0x11, 0xc4, 0x2e, 0x76, 0x52, 0xc4, 0xc0, 0xca, 0x67, 0xe1, 0xa3, 0x20, 0xf1, 0x1d, 0x22,
0xc1, 0x47, 0xc8, 0xc8, 0x84, 0xec, 0x34, 0x6d, 0x41, 0x15, 0x62, 0xb8, 0x29, 0xf9, 0xd9, 0xef,
0xfd, 0xfe, 0x3c, 0x3f, 0x74, 0x29, 0x3e, 0x72, 0x90, 0xaa, 0x28, 0x57, 0xe1, 0x4a, 0x8a, 0x5a,
0x60, 0x54, 0x81, 0xca, 0xc3, 0xfa, 0xd3, 0x0a, 0xd4, 0x5d, 0x92, 0x8b, 0x5c, 0x44, 0xe6, 0x7c,
0xd1, 0x2c, 0x23, 0x8d, 0x0c, 0x30, 0x7f, 0x7d, 0x3d, 0xf9, 0x6e, 0xa3, 0xf3, 0x17, 0x03, 0x07,
0x2e, 0x90, 0x5d, 0x50, 0x55, 0xb8, 0x96, 0x6f, 0x4d, 0x2e, 0x92, 0x57, 0x5d,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, 0x2d, 0x4a, 0x62, 0x34, 0x1a, 0x7c, 0xe3, 0x11, 0xb2, 0x9f, 0x0b,
0x0e, 0xce, 0x11, 0xbe, 0x89, 0x6e, 0xcc, 0x41, 0xae, 0x4b, 0x06, 0x8e, 0xa5, 0xc1, 0x4b, 0x29,
0x18, 0x28, 0xe5, 0x1c, 0x63, 0x84, 0xce, 0xd2, 0x86, 0x73, 0x90, 0xce, 0x49, 0xf2, 0xe4, 0xdb,
0x8f, 0xf1, 0xd1, 0xd7, 0x9f, 0x63, 0xeb, 0xcd, 0x7f, 0x8c, 0x77, 0xbb, 0xba, 0x8b, 0x33, 0xb3,
0x8b, 0xd3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x54, 0xea, 0xef, 0x74, 0xce, 0x02, 0x00, 0x00,
}
func (this *Ownership) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Ownership)
if !ok {
that2, ok := that.(Ownership)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !bytes.Equal(this.Hash, that1.Hash) {
return false
}
if this.Owner != that1.Owner {
return false
}
if !bytes.Equal(this.ResourceHash, that1.ResourceHash) {
return false
}
if this.Resource != that1.Resource {
return false
}
if !bytes.Equal(this.ResourceAddress, that1.ResourceAddress) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}