Last active
April 10, 2017 04:03
-
-
Save pokstad/b11abf039a0d72a1072b54ead61010ba to your computer and use it in GitHub Desktop.
Protobuf and generate Go code for protobuf definition demonstrating any.Any usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by protoc-gen-go. | |
// source: anything.proto | |
// DO NOT EDIT! | |
/* | |
Package anything is a generated protocol buffer package. | |
It is generated from these files: | |
anything.proto | |
It has these top-level messages: | |
AnythingForYou | |
*/ | |
package anything | |
import proto "github.com/golang/protobuf/proto" | |
import fmt "fmt" | |
import math "math" | |
import google_protobuf "github.com/golang/protobuf/ptypes/any" | |
// Reference imports to suppress errors if they are not otherwise used. | |
var _ = proto.Marshal | |
var _ = fmt.Errorf | |
var _ = math.Inf | |
// This is a compile-time assertion to ensure that this generated file | |
// is compatible with the proto package it is being compiled against. | |
// A compilation error at this line likely means your copy of the | |
// proto package needs to be updated. | |
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
type AnythingForYou struct { | |
Anything *google_protobuf.Any `protobuf:"bytes,1,opt,name=anything" json:"anything,omitempty"` | |
} | |
func (m *AnythingForYou) Reset() { *m = AnythingForYou{} } | |
func (m *AnythingForYou) String() string { return proto.CompactTextString(m) } | |
func (*AnythingForYou) ProtoMessage() {} | |
func (*AnythingForYou) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } | |
func (m *AnythingForYou) GetAnything() *google_protobuf.Any { | |
if m != nil { | |
return m.Anything | |
} | |
return nil | |
} | |
func init() { | |
proto.RegisterType((*AnythingForYou)(nil), "anything.AnythingForYou") | |
} | |
func init() { proto.RegisterFile("anything.proto", fileDescriptor0) } | |
var fileDescriptor0 = []byte{ | |
// 108 bytes of a gzipped FileDescriptorProto | |
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcc, 0xab, 0x2c, | |
0xc9, 0xc8, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x24, | |
0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xe2, 0x49, 0xa5, 0x69, 0xfa, 0x89, 0x79, 0x95, | |
0x10, 0x45, 0x4a, 0x4e, 0x5c, 0x7c, 0x8e, 0x50, 0x65, 0x6e, 0xf9, 0x45, 0x91, 0xf9, 0xa5, 0x42, | |
0x06, 0x5c, 0x70, 0x8d, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x22, 0x7a, 0x10, 0xfd, 0x7a, | |
0x30, 0xfd, 0x7a, 0x8e, 0x79, 0x95, 0x41, 0x70, 0x55, 0x49, 0x6c, 0x60, 0x71, 0x63, 0x40, 0x00, | |
0x00, 0x00, 0xff, 0xff, 0x37, 0x4c, 0x93, 0x5d, 0x81, 0x00, 0x00, 0x00, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment