github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/reset.go (about) 1 // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler) 2 // Input file: avdl/keybase1/reset.avdl 3 4 package keybase1 5 6 import ( 7 "fmt" 8 "github.com/keybase/go-framed-msgpack-rpc/rpc" 9 ) 10 11 type SHA512 []byte 12 13 func (o SHA512) DeepCopy() SHA512 { 14 return (func(x []byte) []byte { 15 if x == nil { 16 return nil 17 } 18 return append([]byte{}, x...) 19 })(o) 20 } 21 22 type ResetType int 23 24 const ( 25 ResetType_NONE ResetType = 0 26 ResetType_RESET ResetType = 1 27 ResetType_DELETE ResetType = 2 28 ) 29 30 func (o ResetType) DeepCopy() ResetType { return o } 31 32 var ResetTypeMap = map[string]ResetType{ 33 "NONE": 0, 34 "RESET": 1, 35 "DELETE": 2, 36 } 37 38 var ResetTypeRevMap = map[ResetType]string{ 39 0: "NONE", 40 1: "RESET", 41 2: "DELETE", 42 } 43 44 func (e ResetType) String() string { 45 if v, ok := ResetTypeRevMap[e]; ok { 46 return v 47 } 48 return fmt.Sprintf("%v", int(e)) 49 } 50 51 type ResetMerkleRoot struct { 52 HashMeta HashMeta `codec:"hashMeta" json:"hash_meta"` 53 Seqno Seqno `codec:"seqno" json:"seqno"` 54 } 55 56 func (o ResetMerkleRoot) DeepCopy() ResetMerkleRoot { 57 return ResetMerkleRoot{ 58 HashMeta: o.HashMeta.DeepCopy(), 59 Seqno: o.Seqno.DeepCopy(), 60 } 61 } 62 63 type ResetPrev struct { 64 EldestKID *KID `codec:"eldestKID,omitempty" json:"eldest_kid,omitempty"` 65 LastSeqno Seqno `codec:"lastSeqno" json:"public_seqno"` 66 Reset SHA512 `codec:"reset" json:"reset"` 67 } 68 69 func (o ResetPrev) DeepCopy() ResetPrev { 70 return ResetPrev{ 71 EldestKID: (func(x *KID) *KID { 72 if x == nil { 73 return nil 74 } 75 tmp := (*x).DeepCopy() 76 return &tmp 77 })(o.EldestKID), 78 LastSeqno: o.LastSeqno.DeepCopy(), 79 Reset: o.Reset.DeepCopy(), 80 } 81 } 82 83 type ResetLink struct { 84 Ctime UnixTime `codec:"ctime" json:"ctime"` 85 MerkleRoot ResetMerkleRoot `codec:"merkleRoot" json:"merkle_root"` 86 Prev ResetPrev `codec:"prev" json:"prev"` 87 ResetSeqno Seqno `codec:"resetSeqno" json:"reset_seqno"` 88 Type ResetType `codec:"type" json:"type"` 89 Uid UID `codec:"uid" json:"uid"` 90 } 91 92 func (o ResetLink) DeepCopy() ResetLink { 93 return ResetLink{ 94 Ctime: o.Ctime.DeepCopy(), 95 MerkleRoot: o.MerkleRoot.DeepCopy(), 96 Prev: o.Prev.DeepCopy(), 97 ResetSeqno: o.ResetSeqno.DeepCopy(), 98 Type: o.Type.DeepCopy(), 99 Uid: o.Uid.DeepCopy(), 100 } 101 } 102 103 type ResetSummary struct { 104 Ctime UnixTime `codec:"ctime" json:"ctime"` 105 MerkleRoot ResetMerkleRoot `codec:"merkleRoot" json:"merkleRoot"` 106 ResetSeqno Seqno `codec:"resetSeqno" json:"resetSeqno"` 107 EldestSeqno Seqno `codec:"eldestSeqno" json:"eldestSeqno"` 108 Type ResetType `codec:"type" json:"type"` 109 } 110 111 func (o ResetSummary) DeepCopy() ResetSummary { 112 return ResetSummary{ 113 Ctime: o.Ctime.DeepCopy(), 114 MerkleRoot: o.MerkleRoot.DeepCopy(), 115 ResetSeqno: o.ResetSeqno.DeepCopy(), 116 EldestSeqno: o.EldestSeqno.DeepCopy(), 117 Type: o.Type.DeepCopy(), 118 } 119 } 120 121 type ResetInterface interface { 122 } 123 124 func ResetProtocol(i ResetInterface) rpc.Protocol { 125 return rpc.Protocol{ 126 Name: "keybase.1.Reset", 127 Methods: map[string]rpc.ServeHandlerDescription{}, 128 } 129 } 130 131 type ResetClient struct { 132 Cli rpc.GenericClient 133 }