task

package
v0.14.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const C_Bool uint64 = 4534064899579445248
View Source
const C_CreateRequest uint64 = 10493574150349585346
View Source
const C_DeleteRequest uint64 = 10494993965644118978
View Source
const C_GetRequest uint64 = 8186060648624618456
View Source
const C_ListRequest uint64 = 7093628900773919704
View Source
const C_Task uint64 = 4245896359682506752
View Source
const C_TaskManagerCreate uint64 = 1839902125832275141
View Source
const C_TaskManagerDelete uint64 = 1839900699382256837
View Source
const C_TaskManagerGet uint64 = 17769144489935692573
View Source
const C_TaskManagerList uint64 = 4130508813138998499
View Source
const C_TaskView uint64 = 6751698197337109566
View Source
const C_TaskViewMany uint64 = 3239358944681056701

Variables

View Source
var File_model_proto protoreflect.FileDescriptor
View Source
var PoolBool = poolBool{}
View Source
var PoolCreateRequest = poolCreateRequest{}
View Source
var PoolDeleteRequest = poolDeleteRequest{}
View Source
var PoolGetRequest = poolGetRequest{}
View Source
var PoolListRequest = poolListRequest{}
View Source
var PoolTask = poolTask{}
View Source
var PoolTaskView = poolTaskView{}
View Source
var PoolTaskViewMany = poolTaskViewMany{}

Functions

func RegisterTaskManager

func RegisterTaskManager(h ITaskManager, e *edge.Server, preHandlers ...edge.Handler)

func RegisterTaskManagerCli

func RegisterTaskManagerCli(h ITaskManagerCli, c edgec.Client, rootCmd *cobra.Command)

func RegisterTaskManagerWithFunc

func RegisterTaskManagerWithFunc(h ITaskManager, e *edge.Server, handlerFunc func(c uint64) []edge.Handler)

func TunnelRequestTaskManagerCreate added in v0.12.32

func TunnelRequestTaskManagerCreate(ctx *edge.RequestCtx, replicaSet uint64, req *CreateRequest, res *TaskView, kvs ...*rony.KeyValue) error

func TunnelRequestTaskManagerDelete added in v0.12.32

func TunnelRequestTaskManagerDelete(ctx *edge.RequestCtx, replicaSet uint64, req *DeleteRequest, res *Bool, kvs ...*rony.KeyValue) error

func TunnelRequestTaskManagerGet added in v0.12.32

func TunnelRequestTaskManagerGet(ctx *edge.RequestCtx, replicaSet uint64, req *GetRequest, res *TaskView, kvs ...*rony.KeyValue) error

func TunnelRequestTaskManagerList added in v0.12.32

func TunnelRequestTaskManagerList(ctx *edge.RequestCtx, replicaSet uint64, req *ListRequest, res *TaskViewMany, kvs ...*rony.KeyValue) error

Types

type Bool

type Bool struct {
	Result bool `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"`
	// contains filtered or unexported fields
}

func (*Bool) Clone

func (x *Bool) Clone() *Bool

func (*Bool) DeepCopy

func (x *Bool) DeepCopy(z *Bool)

func (*Bool) Descriptor deprecated

func (*Bool) Descriptor() ([]byte, []int)

Deprecated: Use Bool.ProtoReflect.Descriptor instead.

func (*Bool) GetResult

func (x *Bool) GetResult() bool

func (*Bool) Marshal

func (x *Bool) Marshal() ([]byte, error)

func (*Bool) MarshalJSON

func (x *Bool) MarshalJSON() ([]byte, error)

func (*Bool) ProtoMessage

func (*Bool) ProtoMessage()

func (*Bool) ProtoReflect

func (x *Bool) ProtoReflect() protoreflect.Message

func (*Bool) PushToContext

func (x *Bool) PushToContext(ctx *edge.RequestCtx)

func (*Bool) Reset

func (x *Bool) Reset()

func (*Bool) String

func (x *Bool) String() string

func (*Bool) Unmarshal

func (x *Bool) Unmarshal(b []byte) error

func (*Bool) UnmarshalJSON

func (x *Bool) UnmarshalJSON(b []byte) error

type CreateRequest

type CreateRequest struct {
	Title   string   `protobuf:"bytes,1,opt,name=Title,proto3" json:"Title,omitempty"`
	TODOs   []string `protobuf:"bytes,2,rep,name=TODOs,proto3" json:"TODOs,omitempty"`
	DueDate int64    `protobuf:"varint,3,opt,name=DueDate,proto3" json:"DueDate,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Clone

func (x *CreateRequest) Clone() *CreateRequest

func (*CreateRequest) DeepCopy

func (x *CreateRequest) DeepCopy(z *CreateRequest)

func (*CreateRequest) Descriptor deprecated

func (*CreateRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetDueDate

func (x *CreateRequest) GetDueDate() int64

func (*CreateRequest) GetTODOs

func (x *CreateRequest) GetTODOs() []string

func (*CreateRequest) GetTitle

func (x *CreateRequest) GetTitle() string

func (*CreateRequest) Marshal

func (x *CreateRequest) Marshal() ([]byte, error)

func (*CreateRequest) MarshalJSON

func (x *CreateRequest) MarshalJSON() ([]byte, error)

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) PushToContext

func (x *CreateRequest) PushToContext(ctx *edge.RequestCtx)

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

func (*CreateRequest) Unmarshal

func (x *CreateRequest) Unmarshal(b []byte) error

func (*CreateRequest) UnmarshalJSON

func (x *CreateRequest) UnmarshalJSON(b []byte) error

type DeleteRequest

type DeleteRequest struct {
	TaskID int64 `protobuf:"varint,1,opt,name=TaskID,proto3" json:"TaskID,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Clone

func (x *DeleteRequest) Clone() *DeleteRequest

func (*DeleteRequest) DeepCopy

func (x *DeleteRequest) DeepCopy(z *DeleteRequest)

func (*DeleteRequest) Descriptor deprecated

func (*DeleteRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetTaskID

func (x *DeleteRequest) GetTaskID() int64

func (*DeleteRequest) Marshal

func (x *DeleteRequest) Marshal() ([]byte, error)

func (*DeleteRequest) MarshalJSON

func (x *DeleteRequest) MarshalJSON() ([]byte, error)

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) PushToContext

func (x *DeleteRequest) PushToContext(ctx *edge.RequestCtx)

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

func (*DeleteRequest) Unmarshal

func (x *DeleteRequest) Unmarshal(b []byte) error

func (*DeleteRequest) UnmarshalJSON

func (x *DeleteRequest) UnmarshalJSON(b []byte) error

type GetRequest

type GetRequest struct {
	TaskID int64 `protobuf:"varint,1,opt,name=TaskID,proto3" json:"TaskID,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Clone

func (x *GetRequest) Clone() *GetRequest

func (*GetRequest) DeepCopy

func (x *GetRequest) DeepCopy(z *GetRequest)

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetTaskID

func (x *GetRequest) GetTaskID() int64

func (*GetRequest) Marshal

func (x *GetRequest) Marshal() ([]byte, error)

func (*GetRequest) MarshalJSON

func (x *GetRequest) MarshalJSON() ([]byte, error)

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) PushToContext

func (x *GetRequest) PushToContext(ctx *edge.RequestCtx)

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

func (*GetRequest) Unmarshal

func (x *GetRequest) Unmarshal(b []byte) error

func (*GetRequest) UnmarshalJSON

func (x *GetRequest) UnmarshalJSON(b []byte) error

type ITaskManager

type ITaskManager interface {
	Create(ctx *edge.RequestCtx, req *CreateRequest, res *TaskView) *rony.Error
	Get(ctx *edge.RequestCtx, req *GetRequest, res *TaskView) *rony.Error
	Delete(ctx *edge.RequestCtx, req *DeleteRequest, res *Bool) *rony.Error
	List(ctx *edge.RequestCtx, req *ListRequest, res *TaskViewMany) *rony.Error
}

type ITaskManagerCli

type ITaskManagerCli interface {
	Create(cli *TaskManagerClient, cmd *cobra.Command, args []string) error
	Get(cli *TaskManagerClient, cmd *cobra.Command, args []string) error
	Delete(cli *TaskManagerClient, cmd *cobra.Command, args []string) error
	List(cli *TaskManagerClient, cmd *cobra.Command, args []string) error
}

type ListRequest

type ListRequest struct {
	Offset int32 `protobuf:"varint,1,opt,name=Offset,proto3" json:"Offset,omitempty"`
	Limit  int32 `protobuf:"varint,2,opt,name=Limit,proto3" json:"Limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Clone

func (x *ListRequest) Clone() *ListRequest

func (*ListRequest) DeepCopy

func (x *ListRequest) DeepCopy(z *ListRequest)

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetLimit

func (x *ListRequest) GetLimit() int32

func (*ListRequest) GetOffset

func (x *ListRequest) GetOffset() int32

func (*ListRequest) Marshal

func (x *ListRequest) Marshal() ([]byte, error)

func (*ListRequest) MarshalJSON

func (x *ListRequest) MarshalJSON() ([]byte, error)

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) PushToContext

func (x *ListRequest) PushToContext(ctx *edge.RequestCtx)

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

func (*ListRequest) Unmarshal

func (x *ListRequest) Unmarshal(b []byte) error

func (*ListRequest) UnmarshalJSON

func (x *ListRequest) UnmarshalJSON(b []byte) error

type LocalRepos

type LocalRepos struct {
	Task *TaskLocalRepo
}

type ModuleBase

type ModuleBase struct {
	// contains filtered or unexported fields
}

func New

func New(store *store.Store) ModuleBase

func (ModuleBase) L

func (m ModuleBase) L() LocalRepos

func (ModuleBase) Local

func (m ModuleBase) Local() LocalRepos

type Task

type Task struct {
	ID       int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Title    string   `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"`
	TODOs    []string `protobuf:"bytes,3,rep,name=TODOs,proto3" json:"TODOs,omitempty"`
	DueDate  int64    `protobuf:"varint,4,opt,name=DueDate,proto3" json:"DueDate,omitempty"`
	Username string   `protobuf:"bytes,5,opt,name=Username,proto3" json:"Username,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Clone

func (x *Task) Clone() *Task

func (*Task) DeepCopy

func (x *Task) DeepCopy(z *Task)

func (*Task) Descriptor deprecated

func (*Task) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetDueDate

func (x *Task) GetDueDate() int64

func (*Task) GetID

func (x *Task) GetID() int64

func (*Task) GetTODOs

func (x *Task) GetTODOs() []string

func (*Task) GetTitle

func (x *Task) GetTitle() string

func (*Task) GetUsername

func (x *Task) GetUsername() string

func (*Task) HasTODO

func (x *Task) HasTODO(xx string) bool

func (*Task) Marshal

func (x *Task) Marshal() ([]byte, error)

func (*Task) MarshalJSON

func (x *Task) MarshalJSON() ([]byte, error)

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) PushToContext

func (x *Task) PushToContext(ctx *edge.RequestCtx)

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

func (*Task) Unmarshal

func (x *Task) Unmarshal(b []byte) error

func (*Task) UnmarshalJSON

func (x *Task) UnmarshalJSON(b []byte) error

type TaskLocalRepo

type TaskLocalRepo struct {
	// contains filtered or unexported fields
}

func NewTaskLocalRepo

func NewTaskLocalRepo(s *store.Store) *TaskLocalRepo

func (*TaskLocalRepo) Create

func (r *TaskLocalRepo) Create(m *Task) error

func (*TaskLocalRepo) CreateWithTxn

func (r *TaskLocalRepo) CreateWithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Task) (err error)

func (*TaskLocalRepo) Delete

func (r *TaskLocalRepo) Delete(id int64) error

func (*TaskLocalRepo) DeleteWithTxn

func (r *TaskLocalRepo) DeleteWithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int64) error

func (*TaskLocalRepo) Iter

func (r *TaskLocalRepo) Iter(
	pk TaskPrimaryKey, ito *store.IterOption, cb func(m *Task) bool,
) error

func (*TaskLocalRepo) IterWithTxn

func (r *TaskLocalRepo) IterWithTxn(
	txn *rony.StoreTxn, alloc *tools.Allocator, offset TaskPrimaryKey, ito *store.IterOption, cb func(m *Task) bool,
) error

func (*TaskLocalRepo) List

func (r *TaskLocalRepo) List(
	pk TaskPrimaryKey, lo *store.ListOption, cond func(m *Task) bool,
) ([]*Task, error)

func (*TaskLocalRepo) ListByUsername

func (r *TaskLocalRepo) ListByUsername(username string, lo *store.ListOption, cond func(*Task) bool) ([]*Task, error)

func (*TaskLocalRepo) ListWithTxn

func (r *TaskLocalRepo) ListWithTxn(
	txn *rony.StoreTxn, alloc *tools.Allocator, offset TaskPrimaryKey, lo *store.ListOption, cond func(m *Task) bool,
) ([]*Task, error)

func (*TaskLocalRepo) Read

func (r *TaskLocalRepo) Read(id int64, m *Task) (*Task, error)

func (*TaskLocalRepo) ReadWithTxn

func (r *TaskLocalRepo) ReadWithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, id int64, m *Task) (*Task, error)

func (*TaskLocalRepo) Save

func (r *TaskLocalRepo) Save(m *Task) error

func (*TaskLocalRepo) SaveWithTxn

func (r *TaskLocalRepo) SaveWithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Task) (err error)

func (*TaskLocalRepo) Update

func (r *TaskLocalRepo) Update(id int64, m *Task) error

func (*TaskLocalRepo) UpdateWithTxn

func (r *TaskLocalRepo) UpdateWithTxn(txn *rony.StoreTxn, alloc *tools.Allocator, m *Task) error

type TaskManagerClient

type TaskManagerClient struct {
	// contains filtered or unexported fields
}

func NewTaskManagerClient

func NewTaskManagerClient(ec edgec.Client) *TaskManagerClient

func (*TaskManagerClient) Create

func (c *TaskManagerClient) Create(req *CreateRequest, kvs ...*rony.KeyValue) (*TaskView, error)

func (*TaskManagerClient) Delete

func (c *TaskManagerClient) Delete(req *DeleteRequest, kvs ...*rony.KeyValue) (*Bool, error)

func (*TaskManagerClient) Get

func (c *TaskManagerClient) Get(req *GetRequest, kvs ...*rony.KeyValue) (*TaskView, error)

func (*TaskManagerClient) List

func (c *TaskManagerClient) List(req *ListRequest, kvs ...*rony.KeyValue) (*TaskViewMany, error)

type TaskPK

type TaskPK struct {
	ID int64
}

type TaskPrimaryKey

type TaskPrimaryKey interface {
	// contains filtered or unexported methods
}

type TaskView

type TaskView struct {
	ID      int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Title   string   `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"`
	TODOs   []string `protobuf:"bytes,3,rep,name=TODOs,proto3" json:"TODOs,omitempty"`
	DueDate int64    `protobuf:"varint,4,opt,name=DueDate,proto3" json:"DueDate,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskView) Clone

func (x *TaskView) Clone() *TaskView

func (*TaskView) DeepCopy

func (x *TaskView) DeepCopy(z *TaskView)

func (*TaskView) Descriptor deprecated

func (*TaskView) Descriptor() ([]byte, []int)

Deprecated: Use TaskView.ProtoReflect.Descriptor instead.

func (*TaskView) GetDueDate

func (x *TaskView) GetDueDate() int64

func (*TaskView) GetID

func (x *TaskView) GetID() int64

func (*TaskView) GetTODOs

func (x *TaskView) GetTODOs() []string

func (*TaskView) GetTitle

func (x *TaskView) GetTitle() string

func (*TaskView) Marshal

func (x *TaskView) Marshal() ([]byte, error)

func (*TaskView) MarshalJSON

func (x *TaskView) MarshalJSON() ([]byte, error)

func (*TaskView) ProtoMessage

func (*TaskView) ProtoMessage()

func (*TaskView) ProtoReflect

func (x *TaskView) ProtoReflect() protoreflect.Message

func (*TaskView) PushToContext

func (x *TaskView) PushToContext(ctx *edge.RequestCtx)

func (*TaskView) Reset

func (x *TaskView) Reset()

func (*TaskView) String

func (x *TaskView) String() string

func (*TaskView) Unmarshal

func (x *TaskView) Unmarshal(b []byte) error

func (*TaskView) UnmarshalJSON

func (x *TaskView) UnmarshalJSON(b []byte) error

type TaskViewMany

type TaskViewMany struct {
	Tasks []*TaskView `protobuf:"bytes,1,rep,name=Tasks,proto3" json:"Tasks,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskViewMany) Clone

func (x *TaskViewMany) Clone() *TaskViewMany

func (*TaskViewMany) DeepCopy

func (x *TaskViewMany) DeepCopy(z *TaskViewMany)

func (*TaskViewMany) Descriptor deprecated

func (*TaskViewMany) Descriptor() ([]byte, []int)

Deprecated: Use TaskViewMany.ProtoReflect.Descriptor instead.

func (*TaskViewMany) GetTasks

func (x *TaskViewMany) GetTasks() []*TaskView

func (*TaskViewMany) Marshal

func (x *TaskViewMany) Marshal() ([]byte, error)

func (*TaskViewMany) MarshalJSON

func (x *TaskViewMany) MarshalJSON() ([]byte, error)

func (*TaskViewMany) ProtoMessage

func (*TaskViewMany) ProtoMessage()

func (*TaskViewMany) ProtoReflect

func (x *TaskViewMany) ProtoReflect() protoreflect.Message

func (*TaskViewMany) PushToContext

func (x *TaskViewMany) PushToContext(ctx *edge.RequestCtx)

func (*TaskViewMany) Reset

func (x *TaskViewMany) Reset()

func (*TaskViewMany) String

func (x *TaskViewMany) String() string

func (*TaskViewMany) Unmarshal

func (x *TaskViewMany) Unmarshal(b []byte) error

func (*TaskViewMany) UnmarshalJSON

func (x *TaskViewMany) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL