crontab

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceName = "crontab"
)

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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)

View Source
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.

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
const (
	Domain_UnknownDomain Domain = 0
	Domain_BILI          Domain = 101
	Domain_HPI           Domain = 201
	Domain_STG           Domain = 301
	Domain_V2EX          Domain = 401
	Domain_Evo           Domain = 501
)

func (Domain) Descriptor

func (Domain) Descriptor() protoreflect.EnumDescriptor

func (Domain) Enum

func (x Domain) Enum() *Domain

func (Domain) EnumDescriptor deprecated

func (Domain) EnumDescriptor() ([]byte, []int)

Deprecated: Use Domain.Descriptor instead.

func (Domain) Number

func (x Domain) Number() protoreflect.EnumNumber

func (Domain) String

func (x Domain) String() string

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
const (
	Kind_UnknownKind Kind = 0
	// bili
	Kind_BILISignIn Kind = 102
	Kind_BILIBCount Kind = 103
	// 黑客派
	Kind_HPISign Kind = 202
	// Go语言中文网
	Kind_STGSign Kind = 302
	// V2ex
	Kind_V2EXSign Kind = 402
	// Evolution X
	Kind_Raphael Kind = 502
)

func (Kind) Descriptor

func (Kind) Descriptor() protoreflect.EnumDescriptor

func (Kind) Enum

func (x Kind) Enum() *Kind

func (Kind) EnumDescriptor deprecated

func (Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Kind.Descriptor instead.

func (Kind) Number

func (x Kind) Number() protoreflect.EnumNumber

func (Kind) String

func (x Kind) String() string

func (Kind) Type

func (Kind) Type() protoreflect.EnumType

type Stage

type Stage int32
const (
	Stage_UnknownStage Stage = 0
	Stage_Auth         Stage = 1
	Stage_SignIn       Stage = 2
	Stage_Query        Stage = 3
	Stage_Verify       Stage = 4
)

func (Stage) Descriptor

func (Stage) Descriptor() protoreflect.EnumDescriptor

func (Stage) Enum

func (x Stage) Enum() *Stage

func (Stage) EnumDescriptor deprecated

func (Stage) EnumDescriptor() ([]byte, []int)

Deprecated: Use Stage.Descriptor instead.

func (Stage) Number

func (x Stage) Number() protoreflect.EnumNumber

func (Stage) String

func (x Stage) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetDescribe

func (x *Task) GetDescribe() string

func (*Task) GetKind

func (x *Task) GetKind() Kind

func (*Task) GetSecretID

func (x *Task) GetSecretID() int64

func (*Task) GetSpec

func (x *Task) GetSpec() string

func (*Task) GetTaskID

func (x *Task) GetTaskID() int64

func (*Task) GetUserID

func (x *Task) GetUserID() int64

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type UnimplementedCrontabServiceServer

type UnimplementedCrontabServiceServer struct {
}

UnimplementedCrontabServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCrontabServiceServer) CreateTask

func (UnimplementedCrontabServiceServer) DeleteTask

func (UnimplementedCrontabServiceServer) GetTasks

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.

Jump to

Keyboard shortcuts

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