Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCrontabServiceServer(s grpc.ServiceRegistrar, srv CrontabServiceServer)
- type CreateTaskReq
- func (*CreateTaskReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTaskReq) GetDescribe() string
- func (x *CreateTaskReq) GetKind() Kind
- func (x *CreateTaskReq) GetSecretID() int64
- func (x *CreateTaskReq) GetSpec() string
- func (x *CreateTaskReq) GetUserID() int64
- func (*CreateTaskReq) ProtoMessage()
- func (x *CreateTaskReq) ProtoReflect() protoreflect.Message
- func (x *CreateTaskReq) Reset()
- func (x *CreateTaskReq) String() string
- type CreateTaskRsp
- type CrontabServiceClient
- type CrontabServiceServer
- type DeleteTaskReq
- type Domain
- type GetTasksReq
- type GetTasksRsp
- type Kind
- type Stage
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetDescribe() string
- func (x *Task) GetKind() Kind
- func (x *Task) GetSecretID() int64
- func (x *Task) GetSpec() string
- func (x *Task) GetTaskID() int64
- func (x *Task) GetUserID() int64
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type UnimplementedCrontabServiceServer
- func (UnimplementedCrontabServiceServer) CreateTask(context.Context, *CreateTaskReq) (*CreateTaskRsp, error)
- func (UnimplementedCrontabServiceServer) DeleteTask(context.Context, *DeleteTaskReq) (*emptypb.Empty, error)
- func (UnimplementedCrontabServiceServer) GetTasks(context.Context, *GetTasksReq) (*GetTasksRsp, error)
- type UnsafeCrontabServiceServer
Constants ¶
const (
ServiceName = "crontab"
)
Variables ¶
var ( Domain_name = map[int32]string{ 0: "UnknownDomain", 101: "BILI", 201: "HPI", 301: "STG", 401: "V2EX", 501: "Evo", } Domain_value = map[string]int32{ "UnknownDomain": 0, "BILI": 101, "HPI": 201, "STG": 301, "V2EX": 401, "Evo": 501, } )
Enum value maps for Domain.
var ( Kind_name = map[int32]string{ 0: "UnknownKind", 102: "BILISignIn", 103: "BILIBCount", 202: "HPISign", 302: "STGSign", 402: "V2EXSign", 502: "Raphael", } Kind_value = map[string]int32{ "UnknownKind": 0, "BILISignIn": 102, "BILIBCount": 103, "HPISign": 202, "STGSign": 302, "V2EXSign": 402, "Raphael": 502, } )
Enum value maps for Kind.
var ( Stage_name = map[int32]string{ 0: "UnknownStage", 1: "Auth", 2: "SignIn", 3: "Query", 4: "Verify", } Stage_value = map[string]int32{ "UnknownStage": 0, "Auth": 1, "SignIn": 2, "Query": 3, "Verify": 4, } )
Enum value maps for Stage.
var CrontabService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "CrontabService", HandlerType: (*CrontabServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateTask", Handler: _CrontabService_CreateTask_Handler, }, { MethodName: "GetTasks", Handler: _CrontabService_GetTasks_Handler, }, { MethodName: "DeleteTask", Handler: _CrontabService_DeleteTask_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "crontab/crontab.proto", }
CrontabService_ServiceDesc is the grpc.ServiceDesc for CrontabService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_crontab_crontab_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCrontabServiceServer ¶
func RegisterCrontabServiceServer(s grpc.ServiceRegistrar, srv CrontabServiceServer)
Types ¶
type CreateTaskReq ¶
type CreateTaskReq struct { UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` Describe string `protobuf:"bytes,2,opt,name=Describe,proto3" json:"Describe,omitempty"` Kind Kind `protobuf:"varint,3,opt,name=Kind,proto3,enum=Kind" json:"Kind,omitempty"` Spec string `protobuf:"bytes,4,opt,name=Spec,proto3" json:"Spec,omitempty"` SecretID int64 `protobuf:"varint,5,opt,name=SecretID,proto3" json:"SecretID,omitempty"` // contains filtered or unexported fields }
func (*CreateTaskReq) Descriptor
deprecated
func (*CreateTaskReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateTaskReq.ProtoReflect.Descriptor instead.
func (*CreateTaskReq) GetDescribe ¶
func (x *CreateTaskReq) GetDescribe() string
func (*CreateTaskReq) GetKind ¶
func (x *CreateTaskReq) GetKind() Kind
func (*CreateTaskReq) GetSecretID ¶
func (x *CreateTaskReq) GetSecretID() int64
func (*CreateTaskReq) GetSpec ¶
func (x *CreateTaskReq) GetSpec() string
func (*CreateTaskReq) GetUserID ¶
func (x *CreateTaskReq) GetUserID() int64
func (*CreateTaskReq) ProtoMessage ¶
func (*CreateTaskReq) ProtoMessage()
func (*CreateTaskReq) ProtoReflect ¶
func (x *CreateTaskReq) ProtoReflect() protoreflect.Message
func (*CreateTaskReq) Reset ¶
func (x *CreateTaskReq) Reset()
func (*CreateTaskReq) String ¶
func (x *CreateTaskReq) String() string
type CreateTaskRsp ¶
type CreateTaskRsp struct { TaskID int64 `protobuf:"varint,1,opt,name=TaskID,proto3" json:"TaskID,omitempty"` // contains filtered or unexported fields }
func (*CreateTaskRsp) Descriptor
deprecated
func (*CreateTaskRsp) Descriptor() ([]byte, []int)
Deprecated: Use CreateTaskRsp.ProtoReflect.Descriptor instead.
func (*CreateTaskRsp) GetTaskID ¶
func (x *CreateTaskRsp) GetTaskID() int64
func (*CreateTaskRsp) ProtoMessage ¶
func (*CreateTaskRsp) ProtoMessage()
func (*CreateTaskRsp) ProtoReflect ¶
func (x *CreateTaskRsp) ProtoReflect() protoreflect.Message
func (*CreateTaskRsp) Reset ¶
func (x *CreateTaskRsp) Reset()
func (*CreateTaskRsp) String ¶
func (x *CreateTaskRsp) String() string
type CrontabServiceClient ¶
type CrontabServiceClient interface { CreateTask(ctx context.Context, in *CreateTaskReq, opts ...grpc.CallOption) (*CreateTaskRsp, error) GetTasks(ctx context.Context, in *GetTasksReq, opts ...grpc.CallOption) (*GetTasksRsp, error) DeleteTask(ctx context.Context, in *DeleteTaskReq, opts ...grpc.CallOption) (*emptypb.Empty, error) }
CrontabServiceClient is the client API for CrontabService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCrontabServiceClient ¶
func NewCrontabServiceClient(cc grpc.ClientConnInterface) CrontabServiceClient
type CrontabServiceServer ¶
type CrontabServiceServer interface { CreateTask(context.Context, *CreateTaskReq) (*CreateTaskRsp, error) GetTasks(context.Context, *GetTasksReq) (*GetTasksRsp, error) DeleteTask(context.Context, *DeleteTaskReq) (*emptypb.Empty, error) // contains filtered or unexported methods }
CrontabServiceServer is the server API for CrontabService service. All implementations must embed UnimplementedCrontabServiceServer for forward compatibility
type DeleteTaskReq ¶
type DeleteTaskReq struct { TaskID int64 `protobuf:"varint,1,opt,name=TaskID,proto3" json:"TaskID,omitempty"` // contains filtered or unexported fields }
func (*DeleteTaskReq) Descriptor
deprecated
func (*DeleteTaskReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTaskReq.ProtoReflect.Descriptor instead.
func (*DeleteTaskReq) GetTaskID ¶
func (x *DeleteTaskReq) GetTaskID() int64
func (*DeleteTaskReq) ProtoMessage ¶
func (*DeleteTaskReq) ProtoMessage()
func (*DeleteTaskReq) ProtoReflect ¶
func (x *DeleteTaskReq) ProtoReflect() protoreflect.Message
func (*DeleteTaskReq) Reset ¶
func (x *DeleteTaskReq) Reset()
func (*DeleteTaskReq) String ¶
func (x *DeleteTaskReq) String() string
type Domain ¶
type Domain int32
func (Domain) Descriptor ¶
func (Domain) Descriptor() protoreflect.EnumDescriptor
func (Domain) EnumDescriptor
deprecated
func (Domain) Number ¶
func (x Domain) Number() protoreflect.EnumNumber
func (Domain) Type ¶
func (Domain) Type() protoreflect.EnumType
type GetTasksReq ¶
type GetTasksReq struct { UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` // contains filtered or unexported fields }
func (*GetTasksReq) Descriptor
deprecated
func (*GetTasksReq) Descriptor() ([]byte, []int)
Deprecated: Use GetTasksReq.ProtoReflect.Descriptor instead.
func (*GetTasksReq) GetUserID ¶
func (x *GetTasksReq) GetUserID() int64
func (*GetTasksReq) ProtoMessage ¶
func (*GetTasksReq) ProtoMessage()
func (*GetTasksReq) ProtoReflect ¶
func (x *GetTasksReq) ProtoReflect() protoreflect.Message
func (*GetTasksReq) Reset ¶
func (x *GetTasksReq) Reset()
func (*GetTasksReq) String ¶
func (x *GetTasksReq) String() string
type GetTasksRsp ¶
type GetTasksRsp struct { List []*Task `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"` // contains filtered or unexported fields }
func (*GetTasksRsp) Descriptor
deprecated
func (*GetTasksRsp) Descriptor() ([]byte, []int)
Deprecated: Use GetTasksRsp.ProtoReflect.Descriptor instead.
func (*GetTasksRsp) GetList ¶
func (x *GetTasksRsp) GetList() []*Task
func (*GetTasksRsp) ProtoMessage ¶
func (*GetTasksRsp) ProtoMessage()
func (*GetTasksRsp) ProtoReflect ¶
func (x *GetTasksRsp) ProtoReflect() protoreflect.Message
func (*GetTasksRsp) Reset ¶
func (x *GetTasksRsp) Reset()
func (*GetTasksRsp) String ¶
func (x *GetTasksRsp) String() string
type Kind ¶
type Kind int32
func (Kind) Descriptor ¶
func (Kind) Descriptor() protoreflect.EnumDescriptor
func (Kind) EnumDescriptor
deprecated
func (Kind) Number ¶
func (x Kind) Number() protoreflect.EnumNumber
func (Kind) Type ¶
func (Kind) Type() protoreflect.EnumType
type Stage ¶
type Stage int32
func (Stage) Descriptor ¶
func (Stage) Descriptor() protoreflect.EnumDescriptor
func (Stage) EnumDescriptor
deprecated
func (Stage) Number ¶
func (x Stage) Number() protoreflect.EnumNumber
func (Stage) Type ¶
func (Stage) Type() protoreflect.EnumType
type Task ¶
type Task struct { TaskID int64 `protobuf:"varint,1,opt,name=TaskID,proto3" json:"TaskID,omitempty"` UserID int64 `protobuf:"varint,2,opt,name=UserID,proto3" json:"UserID,omitempty"` Describe string `protobuf:"bytes,3,opt,name=Describe,proto3" json:"Describe,omitempty"` Kind Kind `protobuf:"varint,4,opt,name=Kind,proto3,enum=Kind" json:"Kind,omitempty"` Spec string `protobuf:"bytes,5,opt,name=Spec,proto3" json:"Spec,omitempty"` SecretID int64 `protobuf:"varint,6,opt,name=SecretID,proto3" json:"SecretID,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetDescribe ¶
func (*Task) GetSecretID ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type UnimplementedCrontabServiceServer ¶
type UnimplementedCrontabServiceServer struct { }
UnimplementedCrontabServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCrontabServiceServer) CreateTask ¶
func (UnimplementedCrontabServiceServer) CreateTask(context.Context, *CreateTaskReq) (*CreateTaskRsp, error)
func (UnimplementedCrontabServiceServer) DeleteTask ¶
func (UnimplementedCrontabServiceServer) DeleteTask(context.Context, *DeleteTaskReq) (*emptypb.Empty, error)
func (UnimplementedCrontabServiceServer) GetTasks ¶
func (UnimplementedCrontabServiceServer) GetTasks(context.Context, *GetTasksReq) (*GetTasksRsp, error)
type UnsafeCrontabServiceServer ¶
type UnsafeCrontabServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCrontabServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CrontabServiceServer will result in compilation errors.