common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Code_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCESS",
		2: "ILLEGAL_EXPIRE_TIME",
		3: "EXPIRE_TIME_EARLIER_THAN_NOW",
		4: "RETRY_MAX_TIMES",
	}
	Code_value = map[string]int32{
		"UNKNOWN":                      0,
		"SUCCESS":                      1,
		"ILLEGAL_EXPIRE_TIME":          2,
		"EXPIRE_TIME_EARLIER_THAN_NOW": 3,
		"RETRY_MAX_TIMES":              4,
	}
)

Enum value maps for Code.

View Source
var File_common_bytesmessage_proto protoreflect.FileDescriptor
View Source
var File_common_code_proto protoreflect.FileDescriptor
View Source
var File_common_expire_proto protoreflect.FileDescriptor
View Source
var File_common_target_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BytesMessage

type BytesMessage struct {

	// content 内容
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

BytesMessage 字节数组类型message,方便使用非pb进行数据传递

func (*BytesMessage) Descriptor deprecated

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

Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead.

func (*BytesMessage) GetContent

func (x *BytesMessage) GetContent() []byte

func (*BytesMessage) ProtoMessage

func (*BytesMessage) ProtoMessage()

func (*BytesMessage) ProtoReflect

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

func (*BytesMessage) Reset

func (x *BytesMessage) Reset()

func (*BytesMessage) String

func (x *BytesMessage) String() string

func (*BytesMessage) Validate

func (m *BytesMessage) Validate() error

Validate checks the field values on BytesMessage with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type BytesMessageValidationError

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

BytesMessageValidationError is the validation error returned by BytesMessage.Validate if the designated constraints aren't met.

func (BytesMessageValidationError) Cause

Cause function returns cause value.

func (BytesMessageValidationError) Error

Error satisfies the builtin error interface

func (BytesMessageValidationError) ErrorName

func (e BytesMessageValidationError) ErrorName() string

ErrorName returns error name.

func (BytesMessageValidationError) Field

Field function returns field value.

func (BytesMessageValidationError) Key

Key function returns key value.

func (BytesMessageValidationError) Reason

Reason function returns reason value.

type Code

type Code int32
const (
	// 未知状态
	Code_UNKNOWN Code = 0
	// 成功
	Code_SUCCESS Code = 1
	// 错误的过期时间
	Code_ILLEGAL_EXPIRE_TIME Code = 2
	// 过期时间早于当前时间
	Code_EXPIRE_TIME_EARLIER_THAN_NOW Code = 3
	// 已重试次数超过最大
	Code_RETRY_MAX_TIMES Code = 4
)

func (Code) Descriptor

func (Code) Descriptor() protoreflect.EnumDescriptor

func (Code) Enum

func (x Code) Enum() *Code

func (Code) EnumDescriptor deprecated

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

Deprecated: Use Code.Descriptor instead.

func (Code) Number

func (x Code) Number() protoreflect.EnumNumber

func (Code) String

func (x Code) String() string

func (Code) Type

func (Code) Type() protoreflect.EnumType

type Expire

type Expire struct {

	// Types that are assignable to Expire:
	//	*Expire_ExpireAt
	//	*Expire_ExpireDuration
	Expire isExpire_Expire `protobuf_oneof:"expire"`
	// contains filtered or unexported fields
}

Expire 过期时间

func (*Expire) Descriptor deprecated

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

Deprecated: Use Expire.ProtoReflect.Descriptor instead.

func (*Expire) GetExpire

func (m *Expire) GetExpire() isExpire_Expire

func (*Expire) GetExpireAt

func (x *Expire) GetExpireAt() *timestamp.Timestamp

func (*Expire) GetExpireDuration

func (x *Expire) GetExpireDuration() *duration.Duration

func (*Expire) ProtoMessage

func (*Expire) ProtoMessage()

func (*Expire) ProtoReflect

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

func (*Expire) Reset

func (x *Expire) Reset()

func (*Expire) String

func (x *Expire) String() string

func (*Expire) Validate

func (m *Expire) Validate() error

Validate checks the field values on Expire with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ExpireValidationError

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

ExpireValidationError is the validation error returned by Expire.Validate if the designated constraints aren't met.

func (ExpireValidationError) Cause

func (e ExpireValidationError) Cause() error

Cause function returns cause value.

func (ExpireValidationError) Error

func (e ExpireValidationError) Error() string

Error satisfies the builtin error interface

func (ExpireValidationError) ErrorName

func (e ExpireValidationError) ErrorName() string

ErrorName returns error name.

func (ExpireValidationError) Field

func (e ExpireValidationError) Field() string

Field function returns field value.

func (ExpireValidationError) Key

func (e ExpireValidationError) Key() bool

Key function returns key value.

func (ExpireValidationError) Reason

func (e ExpireValidationError) Reason() string

Reason function returns reason value.

type Expire_ExpireAt

type Expire_ExpireAt struct {
	// expire_at 绝对过期时间
	ExpireAt *timestamp.Timestamp `protobuf:"bytes,1,opt,name=expire_at,json=expireAt,proto3,oneof"`
}

type Expire_ExpireDuration

type Expire_ExpireDuration struct {
	// expire_duration 在固定时间后过期
	ExpireDuration *duration.Duration `protobuf:"bytes,2,opt,name=expire_duration,json=expireDuration,proto3,oneof"`
}

type GrpcTarget

type GrpcTarget struct {

	// grpc_url 任务触发时调用的远程地址,必须是grpc格式
	GrpcUrl string `protobuf:"bytes,2,opt,name=grpc_url,json=grpcUrl,proto3" json:"grpc_url,omitempty"`
	// contains filtered or unexported fields
}

func (*GrpcTarget) Descriptor deprecated

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

Deprecated: Use GrpcTarget.ProtoReflect.Descriptor instead.

func (*GrpcTarget) GetGrpcUrl

func (x *GrpcTarget) GetGrpcUrl() string

func (*GrpcTarget) ProtoMessage

func (*GrpcTarget) ProtoMessage()

func (*GrpcTarget) ProtoReflect

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

func (*GrpcTarget) Reset

func (x *GrpcTarget) Reset()

func (*GrpcTarget) String

func (x *GrpcTarget) String() string

func (*GrpcTarget) Validate

func (m *GrpcTarget) Validate() error

Validate checks the field values on GrpcTarget with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GrpcTargetValidationError

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

GrpcTargetValidationError is the validation error returned by GrpcTarget.Validate if the designated constraints aren't met.

func (GrpcTargetValidationError) Cause

func (e GrpcTargetValidationError) Cause() error

Cause function returns cause value.

func (GrpcTargetValidationError) Error

Error satisfies the builtin error interface

func (GrpcTargetValidationError) ErrorName

func (e GrpcTargetValidationError) ErrorName() string

ErrorName returns error name.

func (GrpcTargetValidationError) Field

Field function returns field value.

func (GrpcTargetValidationError) Key

Key function returns key value.

func (GrpcTargetValidationError) Reason

func (e GrpcTargetValidationError) Reason() string

Reason function returns reason value.

type HttpTarget

type HttpTarget struct {

	// http_url 任务触发时调用的远程地址,必须是http格式
	HttpUrl string `protobuf:"bytes,2,opt,name=http_url,json=httpUrl,proto3" json:"http_url,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpTarget) Descriptor deprecated

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

Deprecated: Use HttpTarget.ProtoReflect.Descriptor instead.

func (*HttpTarget) GetHttpUrl

func (x *HttpTarget) GetHttpUrl() string

func (*HttpTarget) ProtoMessage

func (*HttpTarget) ProtoMessage()

func (*HttpTarget) ProtoReflect

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

func (*HttpTarget) Reset

func (x *HttpTarget) Reset()

func (*HttpTarget) String

func (x *HttpTarget) String() string

func (*HttpTarget) Validate

func (m *HttpTarget) Validate() error

Validate checks the field values on HttpTarget with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type HttpTargetValidationError

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

HttpTargetValidationError is the validation error returned by HttpTarget.Validate if the designated constraints aren't met.

func (HttpTargetValidationError) Cause

func (e HttpTargetValidationError) Cause() error

Cause function returns cause value.

func (HttpTargetValidationError) Error

Error satisfies the builtin error interface

func (HttpTargetValidationError) ErrorName

func (e HttpTargetValidationError) ErrorName() string

ErrorName returns error name.

func (HttpTargetValidationError) Field

Field function returns field value.

func (HttpTargetValidationError) Key

Key function returns key value.

func (HttpTargetValidationError) Reason

func (e HttpTargetValidationError) Reason() string

Reason function returns reason value.

type Target

type Target struct {

	// target 目标
	//
	// Types that are assignable to Target:
	//	*Target_GrpcTarget
	//	*Target_HttpTarget
	Target isTarget_Target `protobuf_oneof:"target"`
	// contains filtered or unexported fields
}

func (*Target) Descriptor deprecated

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

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetGrpcTarget

func (x *Target) GetGrpcTarget() *GrpcTarget

func (*Target) GetHttpTarget

func (x *Target) GetHttpTarget() *HttpTarget

func (*Target) GetTarget

func (m *Target) GetTarget() isTarget_Target

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

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

func (*Target) Reset

func (x *Target) Reset()

func (*Target) String

func (x *Target) String() string

func (*Target) Validate

func (m *Target) Validate() error

Validate checks the field values on Target with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type TargetValidationError

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

TargetValidationError is the validation error returned by Target.Validate if the designated constraints aren't met.

func (TargetValidationError) Cause

func (e TargetValidationError) Cause() error

Cause function returns cause value.

func (TargetValidationError) Error

func (e TargetValidationError) Error() string

Error satisfies the builtin error interface

func (TargetValidationError) ErrorName

func (e TargetValidationError) ErrorName() string

ErrorName returns error name.

func (TargetValidationError) Field

func (e TargetValidationError) Field() string

Field function returns field value.

func (TargetValidationError) Key

func (e TargetValidationError) Key() bool

Key function returns key value.

func (TargetValidationError) Reason

func (e TargetValidationError) Reason() string

Reason function returns reason value.

type Target_GrpcTarget

type Target_GrpcTarget struct {
	// grpc_target grpc远程目标
	GrpcTarget *GrpcTarget `protobuf:"bytes,11,opt,name=grpc_target,json=grpcTarget,proto3,oneof"`
}

type Target_HttpTarget

type Target_HttpTarget struct {
	// http_target http远程目标
	HttpTarget *HttpTarget `protobuf:"bytes,12,opt,name=http_target,json=httpTarget,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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