// Code generated by protoc-gen-go.
// source: feed.proto
// DO NOT EDIT!

/*
Package feed is a generated protocol buffer package.

It is generated from these files:
	feed.proto

It has these top-level messages:
	GetFeedsRequest
	GetFeedsResponse
	FeedRecord
	OkResponse
*/
package feed

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// 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 GetFeedsRequest struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	Size   int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
}

func (m *GetFeedsRequest) Reset()                    { *m = GetFeedsRequest{} }
func (m *GetFeedsRequest) String() string            { return proto.CompactTextString(m) }
func (*GetFeedsRequest) ProtoMessage()               {}
func (*GetFeedsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *GetFeedsRequest) GetUserId() int64 {
	if m != nil {
		return m.UserId
	}
	return 0
}

func (m *GetFeedsRequest) GetSize() int64 {
	if m != nil {
		return m.Size
	}
	return 0
}

type GetFeedsResponse struct {
	Feeds []*FeedRecord `protobuf:"bytes,1,rep,name=feeds" json:"feeds,omitempty"`
}

func (m *GetFeedsResponse) Reset()                    { *m = GetFeedsResponse{} }
func (m *GetFeedsResponse) String() string            { return proto.CompactTextString(m) }
func (*GetFeedsResponse) ProtoMessage()               {}
func (*GetFeedsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *GetFeedsResponse) GetFeeds() []*FeedRecord {
	if m != nil {
		return m.Feeds
	}
	return nil
}

type FeedRecord struct {
	Id      int64  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	UserId  int64  `protobuf:"varint,2,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	Content string `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"`
}

func (m *FeedRecord) Reset()                    { *m = FeedRecord{} }
func (m *FeedRecord) String() string            { return proto.CompactTextString(m) }
func (*FeedRecord) ProtoMessage()               {}
func (*FeedRecord) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *FeedRecord) GetId() int64 {
	if m != nil {
		return m.Id
	}
	return 0
}

func (m *FeedRecord) GetUserId() int64 {
	if m != nil {
		return m.UserId
	}
	return 0
}

func (m *FeedRecord) GetContent() string {
	if m != nil {
		return m.Content
	}
	return ""
}

type OkResponse struct {
}

func (m *OkResponse) Reset()                    { *m = OkResponse{} }
func (m *OkResponse) String() string            { return proto.CompactTextString(m) }
func (*OkResponse) ProtoMessage()               {}
func (*OkResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func init() {
	proto.RegisterType((*GetFeedsRequest)(nil), "feed.GetFeedsRequest")
	proto.RegisterType((*GetFeedsResponse)(nil), "feed.GetFeedsResponse")
	proto.RegisterType((*FeedRecord)(nil), "feed.FeedRecord")
	proto.RegisterType((*OkResponse)(nil), "feed.OkResponse")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for Feed service

type FeedClient interface {
	GetFeeds(ctx context.Context, in *GetFeedsRequest, opts ...grpc.CallOption) (*GetFeedsResponse, error)
	CreateFeed(ctx context.Context, in *FeedRecord, opts ...grpc.CallOption) (*OkResponse, error)
}

type feedClient struct {
	cc *grpc.ClientConn
}

func NewFeedClient(cc *grpc.ClientConn) FeedClient {
	return &feedClient{cc}
}

func (c *feedClient) GetFeeds(ctx context.Context, in *GetFeedsRequest, opts ...grpc.CallOption) (*GetFeedsResponse, error) {
	out := new(GetFeedsResponse)
	err := grpc.Invoke(ctx, "/feed.Feed/GetFeeds", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *feedClient) CreateFeed(ctx context.Context, in *FeedRecord, opts ...grpc.CallOption) (*OkResponse, error) {
	out := new(OkResponse)
	err := grpc.Invoke(ctx, "/feed.Feed/CreateFeed", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Feed service

type FeedServer interface {
	GetFeeds(context.Context, *GetFeedsRequest) (*GetFeedsResponse, error)
	CreateFeed(context.Context, *FeedRecord) (*OkResponse, error)
}

func RegisterFeedServer(s *grpc.Server, srv FeedServer) {
	s.RegisterService(&_Feed_serviceDesc, srv)
}

func _Feed_GetFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetFeedsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FeedServer).GetFeeds(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/feed.Feed/GetFeeds",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FeedServer).GetFeeds(ctx, req.(*GetFeedsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Feed_CreateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FeedRecord)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FeedServer).CreateFeed(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/feed.Feed/CreateFeed",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FeedServer).CreateFeed(ctx, req.(*FeedRecord))
	}
	return interceptor(ctx, in, info, handler)
}

var _Feed_serviceDesc = grpc.ServiceDesc{
	ServiceName: "feed.Feed",
	HandlerType: (*FeedServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFeeds",
			Handler:    _Feed_GetFeeds_Handler,
		},
		{
			MethodName: "CreateFeed",
			Handler:    _Feed_CreateFeed_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "feed.proto",
}

func init() { proto.RegisterFile("feed.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 232 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x90, 0x41, 0x4b, 0xc4, 0x30,
	0x10, 0x85, 0x77, 0xdb, 0xba, 0xab, 0x4f, 0xd1, 0x65, 0x40, 0x0d, 0x7b, 0x92, 0x1c, 0x64, 0x4f,
	0x7b, 0xa8, 0x37, 0x05, 0x2f, 0x82, 0xe2, 0x69, 0x21, 0x7f, 0x40, 0xb4, 0x19, 0xa1, 0x08, 0x4d,
	0x4d, 0x52, 0x04, 0x7f, 0xbd, 0x49, 0x6a, 0xad, 0xd6, 0xdb, 0x9b, 0x37, 0x99, 0x37, 0xdf, 0x04,
	0x78, 0x65, 0xd6, 0xdb, 0xd6, 0x1a, 0x6f, 0xa8, 0x88, 0x5a, 0xde, 0xe2, 0xe4, 0x81, 0xfd, 0x7d,
	0x90, 0x4e, 0xf1, 0x7b, 0xc7, 0xce, 0xd3, 0x39, 0x96, 0x9d, 0x63, 0xfb, 0x54, 0x6b, 0x31, 0xbf,
	0x98, 0x6f, 0x72, 0xb5, 0x88, 0xe5, 0xa3, 0x26, 0x42, 0xe1, 0xea, 0x4f, 0x16, 0x59, 0x72, 0x93,
	0x96, 0xd7, 0x58, 0x8d, 0xf3, 0xae, 0x35, 0x8d, 0x63, 0xba, 0xc4, 0x5e, 0xcc, 0x76, 0x61, 0x3c,
	0xdf, 0x1c, 0x96, 0xab, 0x6d, 0xda, 0x1a, 0xdf, 0x28, 0xae, 0x8c, 0xd5, 0xaa, 0x6f, 0xcb, 0x1d,
	0x30, 0x9a, 0x74, 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