diff --git a/Makefile b/Makefile index db6a2a57..24c15447 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,7 @@ proto: \ plugin/types/types.pb.go \ builtin/types/coin/coin.pb.go \ builtin/types/dpos/dpos.pb.go \ + builtin/types/cron/cron.pb.go \ testdata/test.pb.go \ examples/types/types.pb.go \ examples/plugins/lottery/lottery.pb.go \ diff --git a/builtin/types/cron/cron.pb.go b/builtin/types/cron/cron.pb.go new file mode 100644 index 00000000..0a8b80c4 --- /dev/null +++ b/builtin/types/cron/cron.pb.go @@ -0,0 +1,180 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: github.com/loomnetwork/go-loom/builtin/types/cron/cron.proto + +/* +Package cron is a generated protocol buffer package. + +It is generated from these files: + github.com/loomnetwork/go-loom/builtin/types/cron/cron.proto + +It has these top-level messages: + CronJob + InitCronRequest + AddCronRequest + AddCronResponse + ListCronRequest + ListCronResponse +*/ +package cron + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import types "github.com/loomnetwork/go-loom/types" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type CronJob struct { + Owner *types.Address `protobuf:"bytes,1,opt,name=owner" json:"owner,omitempty"` + Interval string `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` +} + +func (m *CronJob) Reset() { *m = CronJob{} } +func (m *CronJob) String() string { return proto.CompactTextString(m) } +func (*CronJob) ProtoMessage() {} +func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorCron, []int{0} } + +func (m *CronJob) GetOwner() *types.Address { + if m != nil { + return m.Owner + } + return nil +} + +func (m *CronJob) GetInterval() string { + if m != nil { + return m.Interval + } + return "" +} + +type InitCronRequest struct { + Cronjob []*CronJob `protobuf:"bytes,1,rep,name=cronjob" json:"cronjob,omitempty"` +} + +func (m *InitCronRequest) Reset() { *m = InitCronRequest{} } +func (m *InitCronRequest) String() string { return proto.CompactTextString(m) } +func (*InitCronRequest) ProtoMessage() {} +func (*InitCronRequest) Descriptor() ([]byte, []int) { return fileDescriptorCron, []int{1} } + +func (m *InitCronRequest) GetCronjob() []*CronJob { + if m != nil { + return m.Cronjob + } + return nil +} + +type AddCronRequest struct { + Cronjob *CronJob `protobuf:"bytes,1,opt,name=cronjob" json:"cronjob,omitempty"` +} + +func (m *AddCronRequest) Reset() { *m = AddCronRequest{} } +func (m *AddCronRequest) String() string { return proto.CompactTextString(m) } +func (*AddCronRequest) ProtoMessage() {} +func (*AddCronRequest) Descriptor() ([]byte, []int) { return fileDescriptorCron, []int{2} } + +func (m *AddCronRequest) GetCronjob() *CronJob { + if m != nil { + return m.Cronjob + } + return nil +} + +type AddCronResponse struct { + CronID uint32 `protobuf:"varint,1,opt,name=CronID,proto3" json:"CronID,omitempty"` + Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` +} + +func (m *AddCronResponse) Reset() { *m = AddCronResponse{} } +func (m *AddCronResponse) String() string { return proto.CompactTextString(m) } +func (*AddCronResponse) ProtoMessage() {} +func (*AddCronResponse) Descriptor() ([]byte, []int) { return fileDescriptorCron, []int{3} } + +func (m *AddCronResponse) GetCronID() uint32 { + if m != nil { + return m.CronID + } + return 0 +} + +func (m *AddCronResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +type ListCronRequest struct { + Owner *types.Address `protobuf:"bytes,1,opt,name=owner" json:"owner,omitempty"` +} + +func (m *ListCronRequest) Reset() { *m = ListCronRequest{} } +func (m *ListCronRequest) String() string { return proto.CompactTextString(m) } +func (*ListCronRequest) ProtoMessage() {} +func (*ListCronRequest) Descriptor() ([]byte, []int) { return fileDescriptorCron, []int{4} } + +func (m *ListCronRequest) GetOwner() *types.Address { + if m != nil { + return m.Owner + } + return nil +} + +type ListCronResponse struct { + Cronjob []*CronJob `protobuf:"bytes,1,rep,name=cronjob" json:"cronjob,omitempty"` +} + +func (m *ListCronResponse) Reset() { *m = ListCronResponse{} } +func (m *ListCronResponse) String() string { return proto.CompactTextString(m) } +func (*ListCronResponse) ProtoMessage() {} +func (*ListCronResponse) Descriptor() ([]byte, []int) { return fileDescriptorCron, []int{5} } + +func (m *ListCronResponse) GetCronjob() []*CronJob { + if m != nil { + return m.Cronjob + } + return nil +} + +func init() { + proto.RegisterType((*CronJob)(nil), "CronJob") + proto.RegisterType((*InitCronRequest)(nil), "InitCronRequest") + proto.RegisterType((*AddCronRequest)(nil), "AddCronRequest") + proto.RegisterType((*AddCronResponse)(nil), "AddCronResponse") + proto.RegisterType((*ListCronRequest)(nil), "ListCronRequest") + proto.RegisterType((*ListCronResponse)(nil), "ListCronResponse") +} + +func init() { + proto.RegisterFile("github.com/loomnetwork/go-loom/builtin/types/cron/cron.proto", fileDescriptorCron) +} + +var fileDescriptorCron = []byte{ + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x4d, 0x4b, 0x03, 0x31, + 0x10, 0x86, 0x89, 0xd2, 0x0f, 0x47, 0x74, 0x25, 0x88, 0x2c, 0x3d, 0xc8, 0x92, 0x53, 0x2f, 0x6e, + 0xfc, 0x3e, 0x09, 0x52, 0xb4, 0x87, 0x8a, 0xa7, 0xfc, 0x03, 0xd3, 0x0d, 0x35, 0xba, 0xcd, 0xac, + 0x93, 0xac, 0xc5, 0x7f, 0x2f, 0x9b, 0x5d, 0x2b, 0x82, 0x52, 0x2f, 0x03, 0x4f, 0xc2, 0x33, 0xf3, + 0xce, 0xc0, 0xcd, 0xc2, 0x86, 0xe7, 0x5a, 0xe7, 0x73, 0x5c, 0xca, 0x12, 0x71, 0xe9, 0x4c, 0x58, + 0x21, 0xbd, 0xca, 0x05, 0x9e, 0x34, 0x28, 0x75, 0x6d, 0xcb, 0x60, 0x9d, 0x0c, 0x1f, 0x95, 0xf1, + 0x72, 0x4e, 0xe8, 0x62, 0xc9, 0x2b, 0xc2, 0x80, 0xa3, 0xd3, 0x0d, 0x76, 0x6b, 0xc5, 0xda, 0x1a, + 0x62, 0x0a, 0x83, 0x3b, 0x42, 0xf7, 0x80, 0x9a, 0x1f, 0x43, 0x0f, 0x57, 0xce, 0x50, 0xca, 0x32, + 0x36, 0xde, 0x3d, 0x1f, 0xe6, 0x93, 0xa2, 0x20, 0xe3, 0xbd, 0x6a, 0x9f, 0xf9, 0x08, 0x86, 0xd6, + 0x05, 0x43, 0xef, 0x4f, 0x65, 0xba, 0x95, 0xb1, 0xf1, 0x8e, 0x5a, 0xb3, 0xb8, 0x82, 0x64, 0xe6, + 0x6c, 0x68, 0x5a, 0x29, 0xf3, 0x56, 0x1b, 0x1f, 0xb8, 0x80, 0x41, 0x93, 0xec, 0x05, 0x75, 0xca, + 0xb2, 0xed, 0xd8, 0xb0, 0x9b, 0xa4, 0xbe, 0x3e, 0xc4, 0x25, 0xec, 0x4f, 0x8a, 0xe2, 0x4f, 0x8b, + 0xfd, 0x6e, 0xdd, 0x42, 0xb2, 0xb6, 0x7c, 0x85, 0xce, 0x1b, 0x7e, 0x04, 0xfd, 0x86, 0x67, 0xf7, + 0xd1, 0xda, 0x53, 0x1d, 0xf1, 0x43, 0xe8, 0x4d, 0x89, 0x90, 0xba, 0xc0, 0x2d, 0x88, 0x33, 0x48, + 0x1e, 0xad, 0xff, 0x91, 0x76, 0xc3, 0xf2, 0xe2, 0x1a, 0x0e, 0xbe, 0x95, 0x6e, 0xe8, 0x3f, 0x36, + 0xd4, 0xfd, 0x78, 0xe6, 0x8b, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x85, 0xb8, 0x11, 0x8a, 0xd8, + 0x01, 0x00, 0x00, +} diff --git a/builtin/types/cron/cron.proto b/builtin/types/cron/cron.proto new file mode 100644 index 00000000..63ca06ee --- /dev/null +++ b/builtin/types/cron/cron.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +import "github.com/loomnetwork/go-loom/types/types.proto"; + + +message CronJob { + Address owner = 1; + string interval = 2; +} + +message InitCronRequest { + repeated CronJob cronjob = 1; +} + +message AddCronRequest { + CronJob cronjob = 1; +} + +message AddCronResponse { + uint32 CronID = 1; + string Error = 2; +} + + + +message ListCronRequest { + Address owner = 1; +} + +message ListCronResponse { + repeated CronJob cronjob = 1; +}