mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
refactor: add field to
This commit is contained in:
@@ -1 +1,9 @@
|
||||
package keeper
|
||||
|
||||
// deriveAccount is used to derive a wallet account using bip32
|
||||
func (k Keeper) deriveAccount() {
|
||||
}
|
||||
|
||||
// insertAccount places an Account into the did module orm as a Delegation
|
||||
func (k Keeper) insertAccount() {
|
||||
}
|
||||
|
||||
+150
-412
@@ -23,88 +23,6 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// Aliases represents the `alsoKnownAs` property associated with a DID Controller
|
||||
type Aliases struct {
|
||||
// The unique identifier of the alias
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// Origin is the Alias provider
|
||||
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// Subject is the user defined alias
|
||||
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
// Controller of the alias
|
||||
Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
// Expiration of the alias
|
||||
Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Aliases) Reset() { *m = Aliases{} }
|
||||
func (m *Aliases) String() string { return proto.CompactTextString(m) }
|
||||
func (*Aliases) ProtoMessage() {}
|
||||
func (*Aliases) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{0}
|
||||
}
|
||||
func (m *Aliases) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Aliases) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Aliases.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *Aliases) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Aliases.Merge(m, src)
|
||||
}
|
||||
func (m *Aliases) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *Aliases) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Aliases.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Aliases proto.InternalMessageInfo
|
||||
|
||||
func (m *Aliases) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Aliases) GetOrigin() string {
|
||||
if m != nil {
|
||||
return m.Origin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Aliases) GetSubject() string {
|
||||
if m != nil {
|
||||
return m.Subject
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Aliases) GetController() string {
|
||||
if m != nil {
|
||||
return m.Controller
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Aliases) GetExpiration() uint64 {
|
||||
if m != nil {
|
||||
return m.Expiration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave)
|
||||
type Assertion struct {
|
||||
// The unique identifier of the attestation
|
||||
@@ -123,7 +41,7 @@ func (m *Assertion) Reset() { *m = Assertion{} }
|
||||
func (m *Assertion) String() string { return proto.CompactTextString(m) }
|
||||
func (*Assertion) ProtoMessage() {}
|
||||
func (*Assertion) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{1}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{0}
|
||||
}
|
||||
func (m *Assertion) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -195,15 +113,19 @@ type Attestation struct {
|
||||
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
// The value of the linked identifier
|
||||
PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||
// The origin of the attestation
|
||||
Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// The subject of the attestation
|
||||
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
// The controller of the attestation
|
||||
Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Attestation) Reset() { *m = Attestation{} }
|
||||
func (m *Attestation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Attestation) ProtoMessage() {}
|
||||
func (*Attestation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{2}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{1}
|
||||
}
|
||||
func (m *Attestation) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -253,6 +175,20 @@ func (m *Attestation) GetPublicKey() *PubKey {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Attestation) GetOrigin() string {
|
||||
if m != nil {
|
||||
return m.Origin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Attestation) GetSubject() string {
|
||||
if m != nil {
|
||||
return m.Subject
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Attestation) GetMetadata() *Metadata {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
@@ -276,7 +212,7 @@ func (m *Controller) Reset() { *m = Controller{} }
|
||||
func (m *Controller) String() string { return proto.CompactTextString(m) }
|
||||
func (*Controller) ProtoMessage() {}
|
||||
func (*Controller) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{3}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{2}
|
||||
}
|
||||
func (m *Controller) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -349,7 +285,7 @@ func (m *Delegation) Reset() { *m = Delegation{} }
|
||||
func (m *Delegation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Delegation) ProtoMessage() {}
|
||||
func (*Delegation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{4}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{3}
|
||||
}
|
||||
func (m *Delegation) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -426,7 +362,7 @@ func (m *Service) Reset() { *m = Service{} }
|
||||
func (m *Service) String() string { return proto.CompactTextString(m) }
|
||||
func (*Service) ProtoMessage() {}
|
||||
func (*Service) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{5}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{4}
|
||||
}
|
||||
func (m *Service) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -498,7 +434,6 @@ func (m *Service) GetPermissions() *Permissions {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Aliases)(nil), "did.v1.Aliases")
|
||||
proto.RegisterType((*Assertion)(nil), "did.v1.Assertion")
|
||||
proto.RegisterType((*Attestation)(nil), "did.v1.Attestation")
|
||||
proto.RegisterType((*Controller)(nil), "did.v1.Controller")
|
||||
@@ -510,104 +445,46 @@ func init() {
|
||||
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
|
||||
|
||||
var fileDescriptor_f44bb702879c34b4 = []byte{
|
||||
// 645 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6e, 0xd3, 0x4a,
|
||||
0x14, 0xc6, 0x3b, 0xf9, 0xdb, 0x1c, 0x37, 0x51, 0xee, 0xb4, 0xf7, 0xd6, 0xea, 0x55, 0xad, 0x62,
|
||||
0x54, 0xa9, 0x0b, 0x88, 0xd5, 0x22, 0x24, 0x54, 0xb1, 0x29, 0x6d, 0x17, 0x55, 0x85, 0x84, 0x0c,
|
||||
0x6c, 0xd8, 0x58, 0x8e, 0x67, 0x9a, 0x0e, 0xd8, 0x33, 0xd6, 0xcc, 0x38, 0xd4, 0x2f, 0x81, 0x10,
|
||||
0x0f, 0x00, 0x7b, 0x9e, 0x84, 0x0d, 0x52, 0x25, 0x36, 0x2c, 0x51, 0xfa, 0x06, 0x3c, 0x01, 0xf2,
|
||||
0xbf, 0x24, 0xa4, 0x48, 0xa8, 0x2c, 0x58, 0x25, 0xe7, 0x3b, 0x5f, 0x72, 0x7e, 0xe7, 0xb3, 0x67,
|
||||
0x00, 0x13, 0x46, 0x9c, 0xf1, 0xae, 0xa3, 0xb4, 0xaf, 0xe9, 0x20, 0x96, 0x42, 0x0b, 0xdc, 0x22,
|
||||
0x8c, 0x0c, 0xc6, 0xbb, 0x1b, 0xeb, 0x81, 0x50, 0x91, 0x50, 0x8e, 0x90, 0x51, 0x66, 0x11, 0x32,
|
||||
0x2a, 0x0c, 0x1b, 0x6b, 0xe5, 0x8f, 0x46, 0x94, 0x53, 0xc5, 0x54, 0xa9, 0xae, 0x96, 0x6a, 0x24,
|
||||
0x08, 0x0d, 0x4b, 0xd1, 0xfe, 0x88, 0xa0, 0x7d, 0x10, 0x32, 0x5f, 0x51, 0x85, 0x7b, 0x50, 0x63,
|
||||
0xc4, 0x44, 0x5b, 0x68, 0xa7, 0xe3, 0xd6, 0x18, 0xc1, 0xff, 0x41, 0x4b, 0x48, 0x36, 0x62, 0xdc,
|
||||
0xac, 0xe5, 0x5a, 0x59, 0x61, 0x13, 0xda, 0x2a, 0x19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38, 0x9c, 0xcd, 0x5e, 0x64, 0x35, 0xa1, 0xed, 0x13, 0x22, 0xa9,
|
||||
0x52, 0x25, 0x68, 0x55, 0x2e, 0x50, 0x36, 0x7e, 0x47, 0xf9, 0x3f, 0x74, 0xc6, 0x7e, 0x12, 0x6a,
|
||||
0x2f, 0x60, 0x24, 0xcf, 0xb4, 0xe3, 0x2e, 0xe7, 0xc2, 0x21, 0x23, 0x0b, 0x50, 0x0d, 0xfb, 0x03,
|
||||
0x02, 0x38, 0xa2, 0x21, 0x1d, 0xfd, 0x59, 0x80, 0x36, 0x74, 0x83, 0x73, 0x9f, 0x71, 0x8f, 0xf1,
|
||||
0x33, 0x91, 0x3d, 0xe3, 0xe2, 0x7d, 0x36, 0x72, 0xf1, 0x84, 0x9f, 0x89, 0x13, 0x72, 0x43, 0xfc,
|
||||
0x05, 0xc2, 0xa6, 0x3d, 0xa9, 0x41, 0xfb, 0x29, 0x95, 0x63, 0x16, 0xd0, 0x6b, 0x78, 0xb7, 0x60,
|
||||
0x45, 0x15, 0x2d, 0x4f, 0xa7, 0x31, 0x2d, 0x01, 0x8d, 0x52, 0x7b, 0x96, 0xc6, 0x14, 0x6f, 0x43,
|
||||
0x6f, 0xc6, 0xeb, 0x91, 0x29, 0x62, 0x77, 0xa6, 0x1e, 0x31, 0x82, 0x37, 0x01, 0x8a, 0xc3, 0xe9,
|
||||
0x25, 0x92, 0x95, 0x07, 0xaf, 0x53, 0x28, 0xcf, 0x25, 0xc3, 0x2e, 0xfc, 0x53, 0x0d, 0xa2, 0x9c,
|
||||
0xc4, 0x82, 0x71, 0xad, 0xcc, 0xe6, 0x56, 0x7d, 0xc7, 0xd8, 0xdb, 0xae, 0x56, 0x29, 0x21, 0xab,
|
||||
0xcf, 0xe3, 0xca, 0x77, 0xcc, 0xb5, 0x4c, 0xdd, 0xbe, 0x5a, 0x90, 0xf1, 0x7d, 0x30, 0x62, 0x2a,
|
||||
0x23, 0xa6, 0x14, 0x13, 0x5c, 0x99, 0xad, 0x3c, 0x98, 0xd5, 0x69, 0x30, 0xb3, 0x96, 0x3b, 0xef,
|
||||
0xdb, 0x38, 0x84, 0x7f, 0x7f, 0x39, 0x01, 0xf7, 0xa1, 0x9e, 0x05, 0x5c, 0xa4, 0x93, 0x7d, 0xc5,
|
||||
0x6b, 0xd0, 0x1c, 0xfb, 0x61, 0x52, 0xe5, 0x52, 0x14, 0xfb, 0xb5, 0x07, 0x68, 0x21, 0xe4, 0xd6,
|
||||
0xa3, 0x87, 0x9f, 0x26, 0x16, 0xba, 0x9c, 0x58, 0xe8, 0xdb, 0xc4, 0x42, 0x6f, 0xaf, 0xac, 0xa5,
|
||||
0xcb, 0x2b, 0x6b, 0xe9, 0xeb, 0x95, 0xb5, 0xf4, 0xc2, 0x1e, 0x31, 0x7d, 0x9e, 0x0c, 0x07, 0x81,
|
||||
0x88, 0x1c, 0xc1, 0x95, 0xe0, 0xd2, 0x39, 0x7f, 0xed, 0xa7, 0xce, 0x85, 0x93, 0xdd, 0x86, 0x59,
|
||||
0xea, 0x6a, 0xd8, 0xca, 0xaf, 0xc2, 0x7b, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x4a, 0x67,
|
||||
0x3c, 0x6c, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Aliases) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *Aliases) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Aliases) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Expiration != 0 {
|
||||
i = encodeVarintState(dAtA, i, uint64(m.Expiration))
|
||||
i--
|
||||
dAtA[i] = 0x28
|
||||
}
|
||||
if len(m.Controller) > 0 {
|
||||
i -= len(m.Controller)
|
||||
copy(dAtA[i:], m.Controller)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.Subject) > 0 {
|
||||
i -= len(m.Subject)
|
||||
copy(dAtA[i:], m.Subject)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Subject)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Origin) > 0 {
|
||||
i -= len(m.Origin)
|
||||
copy(dAtA[i:], m.Origin)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Origin)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Id) > 0 {
|
||||
i -= len(m.Id)
|
||||
copy(dAtA[i:], m.Id)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Id)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
// 613 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4f, 0x6b, 0xd4, 0x40,
|
||||
0x18, 0xc6, 0x3b, 0xfb, 0xaf, 0xcd, 0xbb, 0xed, 0xb2, 0x4e, 0xab, 0x86, 0x8a, 0x61, 0x8d, 0x16,
|
||||
0xf6, 0x50, 0x37, 0xb4, 0x22, 0x48, 0xf1, 0x52, 0xdb, 0x1e, 0x4a, 0x11, 0x24, 0xea, 0xc5, 0x4b,
|
||||
0xc8, 0x66, 0xa6, 0xdb, 0xd1, 0x64, 0x66, 0x99, 0x99, 0xac, 0xe6, 0x4b, 0x88, 0xf8, 0x01, 0xf4,
|
||||
0xeb, 0x78, 0x11, 0x0a, 0x5e, 0x3c, 0xca, 0xf6, 0x1b, 0xf4, 0x13, 0x48, 0x92, 0x49, 0xb7, 0xae,
|
||||
0x42, 0xd1, 0x83, 0xa7, 0xdd, 0xf7, 0xc9, 0x93, 0x99, 0xe7, 0xf7, 0xcc, 0x10, 0xc0, 0x84, 0x11,
|
||||
0x6f, 0xb2, 0xe5, 0x29, 0x1d, 0x6a, 0x3a, 0x18, 0x4b, 0xa1, 0x05, 0x6e, 0x11, 0x46, 0x06, 0x93,
|
||||
0xad, 0xf5, 0x9b, 0x91, 0x50, 0x89, 0x50, 0x9e, 0x90, 0x49, 0x6e, 0x11, 0x32, 0x29, 0x0d, 0xeb,
|
||||
0x6b, 0xe6, 0xa5, 0x11, 0xe5, 0x54, 0x31, 0x65, 0xd4, 0x55, 0xa3, 0x26, 0x82, 0xd0, 0xd8, 0x88,
|
||||
0xee, 0x57, 0x04, 0xd6, 0xae, 0x52, 0x54, 0x6a, 0x26, 0x38, 0xee, 0x40, 0x8d, 0x11, 0x1b, 0xf5,
|
||||
0x50, 0xdf, 0xf2, 0x6b, 0x8c, 0x60, 0x07, 0x20, 0x12, 0x5c, 0x4b, 0x11, 0xc7, 0x54, 0xda, 0xb5,
|
||||
0x42, 0xbf, 0xa4, 0xe0, 0xfb, 0x00, 0xe3, 0x74, 0x18, 0xb3, 0x28, 0x78, 0x43, 0x33, 0xbb, 0xde,
|
||||
0x43, 0xfd, 0xf6, 0x76, 0x67, 0x50, 0xc6, 0x1b, 0x3c, 0x4b, 0x87, 0x47, 0x34, 0xf3, 0xad, 0xd2,
|
||||
0x71, 0x44, 0x33, 0x7c, 0x17, 0x56, 0x22, 0x49, 0x09, 0xe5, 0x9a, 0x85, 0x71, 0xc0, 0x88, 0xdd,
|
||||
0xe8, 0xa1, 0xfe, 0xb2, 0xbf, 0x3c, 0x13, 0x0f, 0x09, 0xde, 0x84, 0xa5, 0x84, 0xea, 0x90, 0x84,
|
||||
0x3a, 0xb4, 0x9b, 0xc5, 0x8a, 0xdd, 0x6a, 0xc5, 0xa7, 0x46, 0xf7, 0x2f, 0x1c, 0x3b, 0x9d, 0xf3,
|
||||
0x4f, 0xdf, 0xde, 0xd7, 0x97, 0xa0, 0x51, 0x26, 0x77, 0xcf, 0x11, 0xb4, 0x77, 0xb5, 0xa6, 0x79,
|
||||
0x5f, 0xff, 0x81, 0xe8, 0x06, 0xb4, 0x84, 0x64, 0x23, 0xc6, 0x0b, 0x14, 0xcb, 0x37, 0x13, 0xb6,
|
||||
0x61, 0x51, 0xa5, 0xc3, 0xd7, 0x34, 0xd2, 0x05, 0x83, 0xe5, 0x57, 0xe3, 0x2f, 0x78, 0xad, 0x2b,
|
||||
0xf1, 0xee, 0x15, 0x78, 0x4e, 0x89, 0x87, 0xd7, 0xa0, 0x63, 0x96, 0xd9, 0x2c, 0xf7, 0xe9, 0x22,
|
||||
0x1b, 0xd9, 0x35, 0xf7, 0x23, 0x02, 0xd8, 0x9b, 0x31, 0xcc, 0x33, 0xdb, 0xb0, 0x18, 0x12, 0x22,
|
||||
0xa9, 0x52, 0x06, 0xb8, 0x1a, 0xe7, 0x68, 0x1b, 0x57, 0xd1, 0xde, 0x02, 0x6b, 0x12, 0xa6, 0xb1,
|
||||
0x0e, 0x22, 0x46, 0x0c, 0xd7, 0x52, 0x21, 0xec, 0x31, 0x32, 0x77, 0x12, 0x75, 0xf7, 0x33, 0x02,
|
||||
0xd8, 0xa7, 0x31, 0x1d, 0xfd, 0xdb, 0x41, 0xb8, 0xb0, 0x12, 0x9d, 0x84, 0x8c, 0x07, 0x8c, 0x1f,
|
||||
0x8b, 0xfc, 0xae, 0xd4, 0x0b, 0x4b, 0xbb, 0x10, 0x0f, 0xf9, 0xb1, 0x38, 0x24, 0x7f, 0x19, 0x7f,
|
||||
0x2e, 0x61, 0xc3, 0x9d, 0xd6, 0x60, 0xf1, 0x39, 0x95, 0x13, 0x16, 0xd1, 0xdf, 0xe2, 0xdd, 0x81,
|
||||
0x65, 0x55, 0x3e, 0x0a, 0x74, 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3, 0x56, 0xf1, 0x95, 0x7a, 0xf0, 0x33, 0x00, 0x00, 0xff, 0xff, 0x13, 0xa6, 0x96,
|
||||
0x2c, 0x07, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Assertion) Marshal() (dAtA []byte, err error) {
|
||||
@@ -708,6 +585,20 @@ func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i = encodeVarintState(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if len(m.Subject) > 0 {
|
||||
i -= len(m.Subject)
|
||||
copy(dAtA[i:], m.Subject)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Subject)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.Origin) > 0 {
|
||||
i -= len(m.Origin)
|
||||
copy(dAtA[i:], m.Origin)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Origin)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if m.PublicKey != nil {
|
||||
@@ -944,34 +835,6 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *Aliases) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Id)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.Origin)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.Subject)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.Controller)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
if m.Expiration != 0 {
|
||||
n += 1 + sovState(uint64(m.Expiration))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Assertion) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -1019,6 +882,14 @@ func (m *Attestation) Size() (n int) {
|
||||
l = m.PublicKey.Size()
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.Origin)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.Subject)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
if m.Metadata != nil {
|
||||
l = m.Metadata.Size()
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
@@ -1119,203 +990,6 @@ func sovState(x uint64) (n int) {
|
||||
func sozState(x uint64) (n int) {
|
||||
return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *Aliases) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: Aliases: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Aliases: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Id = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Origin = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Subject = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Controller = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType)
|
||||
}
|
||||
m.Expiration = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Expiration |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipState(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *Assertion) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -1666,6 +1340,70 @@ func (m *Attestation) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Origin = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Subject = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user