package script

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"
)

var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

const _ = proto.ProtoPackageIsVersion2 

type Command struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Dir                  string   `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty"`
	Args                 []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	Env                  []string `protobuf:"bytes,4,rep,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Command) Reset()         { *m = Command{} }
func (m *Command) String() string { return proto.CompactTextString(m) }
func (*Command) ProtoMessage()    {}
func (*Command) Descriptor() ([]byte, []int) {
	return fileDescriptor_script_65fe67a4ebec6db8, []int{0}
}
func (m *Command) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Command.Unmarshal(m, b)
}
func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Command.Marshal(b, m, deterministic)
}
func (dst *Command) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Command.Merge(dst, src)
}
func (m *Command) XXX_Size() int {
	return xxx_messageInfo_Command.Size(m)
}
func (m *Command) XXX_DiscardUnknown() {
	xxx_messageInfo_Command.DiscardUnknown(m)
}

var xxx_messageInfo_Command proto.InternalMessageInfo

func (m *Command) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *Command) GetDir() string {
	if m != nil {
		return m.Dir
	}
	return ""
}

func (m *Command) GetArgs() []string {
	if m != nil {
		return m.Args
	}
	return nil
}

func (m *Command) GetEnv() []string {
	if m != nil {
		return m.Env
	}
	return nil
}

type Output struct {
	Out                  []byte   `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Output) Reset()         { *m = Output{} }
func (m *Output) String() string { return proto.CompactTextString(m) }
func (*Output) ProtoMessage()    {}
func (*Output) Descriptor() ([]byte, []int) {
	return fileDescriptor_script_65fe67a4ebec6db8, []int{1}
}
func (m *Output) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Output.Unmarshal(m, b)
}
func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Output.Marshal(b, m, deterministic)
}
func (dst *Output) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Output.Merge(dst, src)
}
func (m *Output) XXX_Size() int {
	return xxx_messageInfo_Output.Size(m)
}
func (m *Output) XXX_DiscardUnknown() {
	xxx_messageInfo_Output.DiscardUnknown(m)
}

var xxx_messageInfo_Output proto.InternalMessageInfo

func (m *Output) GetOut() []byte {
	if m != nil {
		return m.Out
	}
	return nil
}

func init() {
	proto.RegisterType((*Command)(nil), "script.Command")
	proto.RegisterType((*Output)(nil), "script.Output")
}

var _ context.Context
var _ grpc.ClientConn

const _ = grpc.SupportPackageIsVersion4

type ScriptServiceClient interface {
	Exec(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Output, error)
}

type scriptServiceClient struct {
	cc *grpc.ClientConn
}

func NewScriptServiceClient(cc *grpc.ClientConn) ScriptServiceClient {
	return &scriptServiceClient{cc}
}

func (c *scriptServiceClient) Exec(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Output, error) {
	out := new(Output)
	err := c.cc.Invoke(ctx, "/script.ScriptService/Exec", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

type ScriptServiceServer interface {
	Exec(context.Context, *Command) (*Output, error)
}

func RegisterScriptServiceServer(s *grpc.Server, srv ScriptServiceServer) {
	s.RegisterService(&_ScriptService_serviceDesc, srv)
}

func _ScriptService_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ScriptServiceServer).Exec(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/script.ScriptService/Exec",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ScriptServiceServer).Exec(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

var _ScriptService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "script.ScriptService",
	HandlerType: (*ScriptServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Exec",
			Handler:    _ScriptService_Exec_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/script/script.proto",
}

func init() { proto.RegisterFile("api/script/script.proto", fileDescriptor_script_65fe67a4ebec6db8) }

var fileDescriptor_script_65fe67a4ebec6db8 = []byte{

	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0x2c, 0xc8, 0xd4,
	0x2f, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0x81, 0x52, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c,
	0x10, 0x9e, 0x52, 0x28, 0x17, 0xbb, 0x73, 0x7e, 0x6e, 0x6e, 0x62, 0x5e, 0x8a, 0x90, 0x10, 0x17,
	0x4b, 0x5e, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, 0x2d, 0x24, 0xc0,
	0xc5, 0x9c, 0x92, 0x59, 0x24, 0xc1, 0x04, 0x16, 0x02, 0x31, 0x41, 0xaa, 0x12, 0x8b, 0xd2, 0x8b,
	0x25, 0x98, 0x15, 0x98, 0x41, 0xaa, 0x40, 0x6c, 0x90, 0xaa, 0xd4, 0xbc, 0x32, 0x09, 0x16, 0xb0,
	0x10, 0x88, 0xa9, 0x24, 0xc5, 0xc5, 0xe6, 0x5f, 0x5a, 0x52, 0x50, 0x5a, 0x02, 0x92, 0xcb, 0x2f,
	0x2d, 0x01, 0x1b, 0xca, 0x13, 0x04, 0x62, 0x1a, 0x59, 0x71, 0xf1, 0x06, 0x83, 0x2d, 0x0f, 0x4e,
	0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x15, 0xd2, 0xe4, 0x62, 0x71, 0xad, 0x48, 0x4d, 0x16, 0xe2, 0xd7,
	0x83, 0x3a, 0x11, 0xea, 0x22, 0x29, 0x3e, 0x98, 0x00, 0xc4, 0x2c, 0x25, 0x86, 0x24, 0x36, 0xb0,
	0xeb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0xb7, 0xc2, 0xc2, 0xd8, 0x00, 0x00, 0x00,
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api/script/script.proto

package script

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 Command struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Dir                  string   `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty"`
	Args                 []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	Env                  []string `protobuf:"bytes,4,rep,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Command) Reset()         { *m = Command{} }
func (m *Command) String() string { return proto.CompactTextString(m) }
func (*Command) ProtoMessage()    {}
func (*Command) Descriptor() ([]byte, []int) {
	return fileDescriptor_script_65fe67a4ebec6db8, []int{0}
}
func (m *Command) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Command.Unmarshal(m, b)
}
func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Command.Marshal(b, m, deterministic)
}
func (dst *Command) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Command.Merge(dst, src)
}
func (m *Command) XXX_Size() int {
	return xxx_messageInfo_Command.Size(m)
}
func (m *Command) XXX_DiscardUnknown() {
	xxx_messageInfo_Command.DiscardUnknown(m)
}

var xxx_messageInfo_Command proto.InternalMessageInfo

func (m *Command) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *Command) GetDir() string {
	if m != nil {
		return m.Dir
	}
	return ""
}

func (m *Command) GetArgs() []string {
	if m != nil {
		return m.Args
	}
	return nil
}

func (m *Command) GetEnv() []string {
	if m != nil {
		return m.Env
	}
	return nil
}

type Output struct {
	Out                  []byte   `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Output) Reset()         { *m = Output{} }
func (m *Output) String() string { return proto.CompactTextString(m) }
func (*Output) ProtoMessage()    {}
func (*Output) Descriptor() ([]byte, []int) {
	return fileDescriptor_script_65fe67a4ebec6db8, []int{1}
}
func (m *Output) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Output.Unmarshal(m, b)
}
func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Output.Marshal(b, m, deterministic)
}
func (dst *Output) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Output.Merge(dst, src)
}
func (m *Output) XXX_Size() int {
	return xxx_messageInfo_Output.Size(m)
}
func (m *Output) XXX_DiscardUnknown() {
	xxx_messageInfo_Output.DiscardUnknown(m)
}

var xxx_messageInfo_Output proto.InternalMessageInfo

func (m *Output) GetOut() []byte {
	if m != nil {
		return m.Out
	}
	return nil
}

func init() {
	proto.RegisterType((*Command)(nil), "script.Command")
	proto.RegisterType((*Output)(nil), "script.Output")
}

// 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

// ScriptServiceClient is the client API for ScriptService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ScriptServiceClient interface {
	Exec(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Output, error)
}

type scriptServiceClient struct {
	cc *grpc.ClientConn
}

func NewScriptServiceClient(cc *grpc.ClientConn) ScriptServiceClient {
	return &scriptServiceClient{cc}
}

func (c *scriptServiceClient) Exec(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Output, error) {
	out := new(Output)
	err := c.cc.Invoke(ctx, "/script.ScriptService/Exec", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ScriptServiceServer is the server API for ScriptService service.
type ScriptServiceServer interface {
	Exec(context.Context, *Command) (*Output, error)
}

func RegisterScriptServiceServer(s *grpc.Server, srv ScriptServiceServer) {
	s.RegisterService(&_ScriptService_serviceDesc, srv)
}

func _ScriptService_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ScriptServiceServer).Exec(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/script.ScriptService/Exec",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ScriptServiceServer).Exec(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

var _ScriptService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "script.ScriptService",
	HandlerType: (*ScriptServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Exec",
			Handler:    _ScriptService_Exec_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/script/script.proto",
}

func init() { proto.RegisterFile("api/script/script.proto", fileDescriptor_script_65fe67a4ebec6db8) }

var fileDescriptor_script_65fe67a4ebec6db8 = []byte{
	// 176 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0x2c, 0xc8, 0xd4,
	0x2f, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0x81, 0x52, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c,
	0x10, 0x9e, 0x52, 0x28, 0x17, 0xbb, 0x73, 0x7e, 0x6e, 0x6e, 0x62, 0x5e, 0x8a, 0x90, 0x10, 0x17,
	0x4b, 0x5e, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, 0x2d, 0x24, 0xc0,
	0xc5, 0x9c, 0x92, 0x59, 0x24, 0xc1, 0x04, 0x16, 0x02, 0x31, 0x41, 0xaa, 0x12, 0x8b, 0xd2, 0x8b,
	0x25, 0x98, 0x15, 0x98, 0x41, 0xaa, 0x40, 0x6c, 0x90, 0xaa, 0xd4, 0xbc, 0x32, 0x09, 0x16, 0xb0,
	0x10, 0x88, 0xa9, 0x24, 0xc5, 0xc5, 0xe6, 0x5f, 0x5a, 0x52, 0x50, 0x5a, 0x02, 0x92, 0xcb, 0x2f,
	0x2d, 0x01, 0x1b, 0xca, 0x13, 0x04, 0x62, 0x1a, 0x59, 0x71, 0xf1, 0x06, 0x83, 0x2d, 0x0f, 0x4e,
	0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x15, 0xd2, 0xe4, 0x62, 0x71, 0xad, 0x48, 0x4d, 0x16, 0xe2, 0xd7,
	0x83, 0x3a, 0x11, 0xea, 0x22, 0x29, 0x3e, 0x98, 0x00, 0xc4, 0x2c, 0x25, 0x86, 0x24, 0x36, 0xb0,
	0xeb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0xb7, 0xc2, 0xc2, 0xd8, 0x00, 0x00, 0x00,
}
