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

/*
Package grpc is a generated protocol buffer package.

It is generated from these files:
	grpc.proto

It has these top-level messages:
	ChangeSet
	ReadRequest
	ReadResponse
	WatchRequest
	WatchResponse
*/
package grpc

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

import (
	context "golang.org/x/net/context"
	grpc1 "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 ChangeSet struct {
	Data      []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Checksum  string `protobuf:"bytes,2,opt,name=checksum" json:"checksum,omitempty"`
	Format    string `protobuf:"bytes,3,opt,name=format" json:"format,omitempty"`
	Source    string `protobuf:"bytes,4,opt,name=source" json:"source,omitempty"`
	Timestamp int64  `protobuf:"varint,5,opt,name=timestamp" json:"timestamp,omitempty"`
}

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

func (m *ChangeSet) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

func (m *ChangeSet) GetChecksum() string {
	if m != nil {
		return m.Checksum
	}
	return ""
}

func (m *ChangeSet) GetFormat() string {
	if m != nil {
		return m.Format
	}
	return ""
}

func (m *ChangeSet) GetSource() string {
	if m != nil {
		return m.Source
	}
	return ""
}

func (m *ChangeSet) GetTimestamp() int64 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

type ReadRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
}

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

func (m *ReadRequest) GetPath() string {
	if m != nil {
		return m.Path
	}
	return ""
}

type ReadResponse struct {
	ChangeSet *ChangeSet `protobuf:"bytes,1,opt,name=change_set,json=changeSet" json:"change_set,omitempty"`
}

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

func (m *ReadResponse) GetChangeSet() *ChangeSet {
	if m != nil {
		return m.ChangeSet
	}
	return nil
}

type WatchRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
}

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

func (m *WatchRequest) GetPath() string {
	if m != nil {
		return m.Path
	}
	return ""
}

type WatchResponse struct {
	ChangeSet *ChangeSet `protobuf:"bytes,1,opt,name=change_set,json=changeSet" json:"change_set,omitempty"`
}

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

func (m *WatchResponse) GetChangeSet() *ChangeSet {
	if m != nil {
		return m.ChangeSet
	}
	return nil
}

func init() {
	proto.RegisterType((*ChangeSet)(nil), "ChangeSet")
	proto.RegisterType((*ReadRequest)(nil), "ReadRequest")
	proto.RegisterType((*ReadResponse)(nil), "ReadResponse")
	proto.RegisterType((*WatchRequest)(nil), "WatchRequest")
	proto.RegisterType((*WatchResponse)(nil), "WatchResponse")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc1.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 _ = grpc1.SupportPackageIsVersion4

// Client API for Source service

type SourceClient interface {
	Read(ctx context.Context, in *ReadRequest, opts ...grpc1.CallOption) (*ReadResponse, error)
	Watch(ctx context.Context, in *WatchRequest, opts ...grpc1.CallOption) (Source_WatchClient, error)
}

type sourceClient struct {
	cc *grpc1.ClientConn
}

func NewSourceClient(cc *grpc1.ClientConn) SourceClient {
	return &sourceClient{cc}
}

func (c *sourceClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc1.CallOption) (*ReadResponse, error) {
	out := new(ReadResponse)
	err := grpc1.Invoke(ctx, "/Source/Read", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sourceClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc1.CallOption) (Source_WatchClient, error) {
	stream, err := grpc1.NewClientStream(ctx, &_Source_serviceDesc.Streams[0], c.cc, "/Source/Watch", opts...)
	if err != nil {
		return nil, err
	}
	x := &sourceWatchClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type Source_WatchClient interface {
	Recv() (*WatchResponse, error)
	grpc1.ClientStream
}

type sourceWatchClient struct {
	grpc1.ClientStream
}

func (x *sourceWatchClient) Recv() (*WatchResponse, error) {
	m := new(WatchResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for Source service

type SourceServer interface {
	Read(context.Context, *ReadRequest) (*ReadResponse, error)
	Watch(*WatchRequest, Source_WatchServer) error
}

func RegisterSourceServer(s *grpc1.Server, srv SourceServer) {
	s.RegisterService(&_Source_serviceDesc, srv)
}

func _Source_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReadRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SourceServer).Read(ctx, in)
	}
	info := &grpc1.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Source/Read",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SourceServer).Read(ctx, req.(*ReadRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Source_Watch_Handler(srv interface{}, stream grpc1.ServerStream) error {
	m := new(WatchRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(SourceServer).Watch(m, &sourceWatchServer{stream})
}

type Source_WatchServer interface {
	Send(*WatchResponse) error
	grpc1.ServerStream
}

type sourceWatchServer struct {
	grpc1.ServerStream
}

func (x *sourceWatchServer) Send(m *WatchResponse) error {
	return x.ServerStream.SendMsg(m)
}

var _Source_serviceDesc = grpc1.ServiceDesc{
	ServiceName: "Source",
	HandlerType: (*SourceServer)(nil),
	Methods: []grpc1.MethodDesc{
		{
			MethodName: "Read",
			Handler:    _Source_Read_Handler,
		},
	},
	Streams: []grpc1.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _Source_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "grpc.proto",
}

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

var fileDescriptor0 = []byte{
	// 262 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xb1, 0x4e, 0xf3, 0x30,
	0x14, 0x85, 0xeb, 0xbf, 0x69, 0xf4, 0xfb, 0x36, 0x61, 0xf0, 0x80, 0xac, 0x88, 0x21, 0x58, 0x42,
	0x0a, 0x0c, 0x16, 0x2a, 0x13, 0xac, 0xbc, 0x81, 0x3b, 0x30, 0x30, 0x20, 0xe3, 0x5e, 0x1a, 0x84,
	0x52, 0x9b, 0xd8, 0x79, 0x08, 0xde, 0x1a, 0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