github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/crypto/internal/pb/crypto.pb.go (about) 1 // Code generated by protoc-gen-gogo. 2 // source: crypto.proto 3 // DO NOT EDIT! 4 5 /* 6 Package crypto_pb is a generated protocol buffer package. 7 8 It is generated from these files: 9 crypto.proto 10 11 It has these top-level messages: 12 PublicKey 13 PrivateKey 14 */ 15 package crypto_pb 16 17 import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/proto" 18 import math "math" 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = math.Inf 23 24 type KeyType int32 25 26 const ( 27 KeyType_RSA KeyType = 0 28 ) 29 30 var KeyType_name = map[int32]string{ 31 0: "RSA", 32 } 33 var KeyType_value = map[string]int32{ 34 "RSA": 0, 35 } 36 37 func (x KeyType) Enum() *KeyType { 38 p := new(KeyType) 39 *p = x 40 return p 41 } 42 func (x KeyType) String() string { 43 return proto.EnumName(KeyType_name, int32(x)) 44 } 45 func (x *KeyType) UnmarshalJSON(data []byte) error { 46 value, err := proto.UnmarshalJSONEnum(KeyType_value, data, "KeyType") 47 if err != nil { 48 return err 49 } 50 *x = KeyType(value) 51 return nil 52 } 53 54 type PublicKey struct { 55 Type *KeyType `protobuf:"varint,1,req,enum=crypto.pb.KeyType" json:"Type,omitempty"` 56 Data []byte `protobuf:"bytes,2,req" json:"Data,omitempty"` 57 XXX_unrecognized []byte `json:"-"` 58 } 59 60 func (m *PublicKey) Reset() { *m = PublicKey{} } 61 func (m *PublicKey) String() string { return proto.CompactTextString(m) } 62 func (*PublicKey) ProtoMessage() {} 63 64 func (m *PublicKey) GetType() KeyType { 65 if m != nil && m.Type != nil { 66 return *m.Type 67 } 68 return KeyType_RSA 69 } 70 71 func (m *PublicKey) GetData() []byte { 72 if m != nil { 73 return m.Data 74 } 75 return nil 76 } 77 78 type PrivateKey struct { 79 Type *KeyType `protobuf:"varint,1,req,enum=crypto.pb.KeyType" json:"Type,omitempty"` 80 Data []byte `protobuf:"bytes,2,req" json:"Data,omitempty"` 81 XXX_unrecognized []byte `json:"-"` 82 } 83 84 func (m *PrivateKey) Reset() { *m = PrivateKey{} } 85 func (m *PrivateKey) String() string { return proto.CompactTextString(m) } 86 func (*PrivateKey) ProtoMessage() {} 87 88 func (m *PrivateKey) GetType() KeyType { 89 if m != nil && m.Type != nil { 90 return *m.Type 91 } 92 return KeyType_RSA 93 } 94 95 func (m *PrivateKey) GetData() []byte { 96 if m != nil { 97 return m.Data 98 } 99 return nil 100 } 101 102 func init() { 103 proto.RegisterEnum("crypto.pb.KeyType", KeyType_name, KeyType_value) 104 }