Suharsh Sivakumar | 51afaa3 | 2015-01-05 15:36:10 -0800 | [diff] [blame] | 1 | // This file was auto-generated by the veyron vdl tool. |
| 2 | // Source: types.vdl |
| 3 | |
| 4 | package serialization |
| 5 | |
| 6 | import ( |
| 7 | "v.io/core/veyron2/security" |
| 8 | |
| 9 | // The non-user imports are prefixed with "__" to prevent collisions. |
| 10 | __vdl "v.io/core/veyron2/vdl" |
| 11 | ) |
| 12 | |
| 13 | type SignedHeader struct { |
| 14 | ChunkSizeBytes int64 |
| 15 | } |
| 16 | |
| 17 | func (SignedHeader) __VDLReflect(struct { |
| 18 | Name string "v.io/core/veyron/security/serialization.SignedHeader" |
| 19 | }) { |
| 20 | } |
| 21 | |
| 22 | type ( |
| 23 | // SignedData represents any single field of the SignedData union type. |
| 24 | // |
| 25 | // SignedData describes the information sent by a SigningWriter and read by VerifiyingReader. |
| 26 | SignedData interface { |
| 27 | // Index returns the field index. |
| 28 | Index() int |
| 29 | // Interface returns the field value as an interface. |
| 30 | Interface() interface{} |
| 31 | // Name returns the field name. |
| 32 | Name() string |
| 33 | // __VDLReflect describes the SignedData union type. |
| 34 | __VDLReflect(__SignedDataReflect) |
| 35 | } |
| 36 | // SignedDataSignature represents field Signature of the SignedData union type. |
| 37 | SignedDataSignature struct{ Value security.Signature } |
| 38 | // SignedDataHash represents field Hash of the SignedData union type. |
| 39 | SignedDataHash struct{ Value [32]byte } |
| 40 | // __SignedDataReflect describes the SignedData union type. |
| 41 | __SignedDataReflect struct { |
| 42 | Name string "v.io/core/veyron/security/serialization.SignedData" |
| 43 | Type SignedData |
| 44 | Union struct { |
| 45 | Signature SignedDataSignature |
| 46 | Hash SignedDataHash |
| 47 | } |
| 48 | } |
| 49 | ) |
| 50 | |
| 51 | func (x SignedDataSignature) Index() int { return 0 } |
| 52 | func (x SignedDataSignature) Interface() interface{} { return x.Value } |
| 53 | func (x SignedDataSignature) Name() string { return "Signature" } |
| 54 | func (x SignedDataSignature) __VDLReflect(__SignedDataReflect) {} |
| 55 | |
| 56 | func (x SignedDataHash) Index() int { return 1 } |
| 57 | func (x SignedDataHash) Interface() interface{} { return x.Value } |
| 58 | func (x SignedDataHash) Name() string { return "Hash" } |
| 59 | func (x SignedDataHash) __VDLReflect(__SignedDataReflect) {} |
| 60 | |
| 61 | func init() { |
| 62 | __vdl.Register(SignedHeader{}) |
| 63 | __vdl.Register(SignedData(SignedDataSignature{security.Signature{}})) |
| 64 | } |