Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
376 lines (332 sloc) 13.5 KB
// Code generated by protoc-gen-go.
// source: timetrack.proto
// DO NOT EDIT!
package timetrack
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gengo/grpc-gateway/third_party/googleapis/google/api"
import google_protobuf1 "go.pedge.io/pb/go/google/protobuf"
import pb_time "go.pedge.io/pb/go/pb/time"
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 Task struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (m *Task) Reset() { *m = Task{} }
func (m *Task) String() string { return proto.CompactTextString(m) }
func (*Task) ProtoMessage() {}
func (*Task) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type Tasks struct {
Task []*Task `protobuf:"bytes,1,rep,name=task" json:"task,omitempty"`
}
func (m *Tasks) Reset() { *m = Tasks{} }
func (m *Tasks) String() string { return proto.CompactTextString(m) }
func (*Tasks) ProtoMessage() {}
func (*Tasks) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Tasks) GetTask() []*Task {
if m != nil {
return m.Task
}
return nil
}
type Range struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId" json:"task_id,omitempty"`
Id uint64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"`
TimestampRange *pb_time.TimestampRange `protobuf:"bytes,3,opt,name=timestamp_range,json=timestampRange" json:"timestamp_range,omitempty"`
}
func (m *Range) Reset() { *m = Range{} }
func (m *Range) String() string { return proto.CompactTextString(m) }
func (*Range) ProtoMessage() {}
func (*Range) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Range) GetTimestampRange() *pb_time.TimestampRange {
if m != nil {
return m.TimestampRange
}
return nil
}
type Ranges struct {
Range []*Range `protobuf:"bytes,1,rep,name=Range,json=range" json:"Range,omitempty"`
}
func (m *Ranges) Reset() { *m = Ranges{} }
func (m *Ranges) String() string { return proto.CompactTextString(m) }
func (*Ranges) ProtoMessage() {}
func (*Ranges) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Ranges) GetRange() []*Range {
if m != nil {
return m.Range
}
return nil
}
type RangeReference struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId" json:"task_id,omitempty"`
Id uint64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"`
}
func (m *RangeReference) Reset() { *m = RangeReference{} }
func (m *RangeReference) String() string { return proto.CompactTextString(m) }
func (*RangeReference) ProtoMessage() {}
func (*RangeReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func init() {
proto.RegisterType((*Task)(nil), "pedge.timetrack.Task")
proto.RegisterType((*Tasks)(nil), "pedge.timetrack.Tasks")
proto.RegisterType((*Range)(nil), "pedge.timetrack.Range")
proto.RegisterType((*Ranges)(nil), "pedge.timetrack.Ranges")
proto.RegisterType((*RangeReference)(nil), "pedge.timetrack.RangeReference")
}
// 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.SupportPackageIsVersion3
// Client API for API service
type APIClient interface {
Create(ctx context.Context, in *Task, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Start(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Range, error)
Stop(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Range, error)
List(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Ranges, error)
Delete(ctx context.Context, in *Task, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
DeleteRange(ctx context.Context, in *RangeReference, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
}
type aPIClient struct {
cc *grpc.ClientConn
}
func NewAPIClient(cc *grpc.ClientConn) APIClient {
return &aPIClient{cc}
}
func (c *aPIClient) Create(ctx context.Context, in *Task, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
out := new(google_protobuf1.Empty)
err := grpc.Invoke(ctx, "/pedge.timetrack.API/Create", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Start(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Range, error) {
out := new(Range)
err := grpc.Invoke(ctx, "/pedge.timetrack.API/Start", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Stop(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Range, error) {
out := new(Range)
err := grpc.Invoke(ctx, "/pedge.timetrack.API/Stop", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) List(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Ranges, error) {
out := new(Ranges)
err := grpc.Invoke(ctx, "/pedge.timetrack.API/List", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Delete(ctx context.Context, in *Task, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
out := new(google_protobuf1.Empty)
err := grpc.Invoke(ctx, "/pedge.timetrack.API/Delete", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) DeleteRange(ctx context.Context, in *RangeReference, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
out := new(google_protobuf1.Empty)
err := grpc.Invoke(ctx, "/pedge.timetrack.API/DeleteRange", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for API service
type APIServer interface {
Create(context.Context, *Task) (*google_protobuf1.Empty, error)
Start(context.Context, *Task) (*Range, error)
Stop(context.Context, *Task) (*Range, error)
List(context.Context, *Task) (*Ranges, error)
Delete(context.Context, *Task) (*google_protobuf1.Empty, error)
DeleteRange(context.Context, *RangeReference) (*google_protobuf1.Empty, error)
}
func RegisterAPIServer(s *grpc.Server, srv APIServer) {
s.RegisterService(&_API_serviceDesc, srv)
}
func _API_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pedge.timetrack.API/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Create(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _API_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Start(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pedge.timetrack.API/Start",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Start(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _API_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Stop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pedge.timetrack.API/Stop",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Stop(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _API_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pedge.timetrack.API/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).List(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _API_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Task)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pedge.timetrack.API/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Delete(ctx, req.(*Task))
}
return interceptor(ctx, in, info, handler)
}
func _API_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RangeReference)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).DeleteRange(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pedge.timetrack.API/DeleteRange",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).DeleteRange(ctx, req.(*RangeReference))
}
return interceptor(ctx, in, info, handler)
}
var _API_serviceDesc = grpc.ServiceDesc{
ServiceName: "pedge.timetrack.API",
HandlerType: (*APIServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _API_Create_Handler,
},
{
MethodName: "Start",
Handler: _API_Start_Handler,
},
{
MethodName: "Stop",
Handler: _API_Stop_Handler,
},
{
MethodName: "List",
Handler: _API_List_Handler,
},
{
MethodName: "Delete",
Handler: _API_Delete_Handler,
},
{
MethodName: "DeleteRange",
Handler: _API_DeleteRange_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0,
}
func init() { proto.RegisterFile("timetrack.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 428 bytes of a gzipped F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