1// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler) 2// Input file: ../client/protocol/avdl/gregor1/incoming.avdl 3 4package gregor1 5 6type SyncResult struct { 7 Msgs []InBandMessage `codec:"msgs" json:"msgs"` 8 Hash []byte `codec:"hash" json:"hash"` 9} 10 11func (o SyncResult) DeepCopy() SyncResult { 12 return SyncResult{ 13 Msgs: (func(x []InBandMessage) []InBandMessage { 14 if x == nil { 15 return nil 16 } 17 ret := make([]InBandMessage, len(x)) 18 for i, v := range x { 19 vCopy := v.DeepCopy() 20 ret[i] = vCopy 21 } 22 return ret 23 })(o.Msgs), 24 Hash: (func(x []byte) []byte { 25 if x == nil { 26 return nil 27 } 28 return append([]byte{}, x...) 29 })(o.Hash), 30 } 31} 32 33// DescribeConnectedUsers will take a list of users, and return the list of users 34// which are connected to any Gregor in the cluster, and what devices (and device type) 35// those users are connected with. 36type ConnectedDevice struct { 37 DeviceID DeviceID `codec:"deviceID" json:"deviceID"` 38 DeviceType string `codec:"deviceType" json:"deviceType"` 39 DevicePlatform string `codec:"devicePlatform" json:"devicePlatform"` 40 UserAgent string `codec:"userAgent" json:"userAgent"` 41} 42 43func (o ConnectedDevice) DeepCopy() ConnectedDevice { 44 return ConnectedDevice{ 45 DeviceID: o.DeviceID.DeepCopy(), 46 DeviceType: o.DeviceType, 47 DevicePlatform: o.DevicePlatform, 48 UserAgent: o.UserAgent, 49 } 50} 51 52type ConnectedUser struct { 53 Uid UID `codec:"uid" json:"uid"` 54 Devices []ConnectedDevice `codec:"devices" json:"devices"` 55} 56 57func (o ConnectedUser) DeepCopy() ConnectedUser { 58 return ConnectedUser{ 59 Uid: o.Uid.DeepCopy(), 60 Devices: (func(x []ConnectedDevice) []ConnectedDevice { 61 if x == nil { 62 return nil 63 } 64 ret := make([]ConnectedDevice, len(x)) 65 for i, v := range x { 66 vCopy := v.DeepCopy() 67 ret[i] = vCopy 68 } 69 return ret 70 })(o.Devices), 71 } 72} 73