Documentation
¶
Index ¶
- Variables
- type ArrayConvertExampleProto
- type ArrayExampleProto
- type CustomConvertExampleProto
- type Data
- type DetailProto
- type EnumExampleProto
- type Error
- type EventDraftProto
- type EventProto
- type ItemProto
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetCreatedAt() *timestamppb.Timestamp
- func (x *Job) GetExternalId() string
- func (x *Job) GetGroup() string
- func (x *Job) GetId() string
- func (x *Job) GetPayload() *Data
- func (x *Job) GetQueue() string
- func (x *Job) GetRunAt() *timestamppb.Timestamp
- func (x *Job) GetTransitions() []*Transition
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type Level
- type NamedSliceExampleProto
- type OptionalExampleProto
- type OrderProto
- type PointerSliceExampleProto
- type Result
- type Result_Status
- func (Result_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Result_Status) Enum() *Result_Status
- func (Result_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Result_Status) Number() protoreflect.EnumNumber
- func (x Result_Status) String() string
- func (Result_Status) Type() protoreflect.EnumType
- type SnapshotExampleProto
- type StatusProto
- type TaskPhase
- type TaskProto
- type Transition
- func (*Transition) Descriptor() ([]byte, []int)deprecated
- func (x *Transition) GetAttempts() int32
- func (x *Transition) GetRetryAt() *timestamppb.Timestamp
- func (x *Transition) GetState() Transition_State
- func (x *Transition) GetTime() *timestamppb.Timestamp
- func (*Transition) ProtoMessage()
- func (x *Transition) ProtoReflect() protoreflect.Message
- func (x *Transition) Reset()
- func (x *Transition) String() string
- type Transition_State
- func (Transition_State) Descriptor() protoreflect.EnumDescriptor
- func (x Transition_State) Enum() *Transition_State
- func (Transition_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Transition_State) Number() protoreflect.EnumNumber
- func (x Transition_State) String() string
- func (Transition_State) Type() protoreflect.EnumType
- type UserProto
- type UserWithRolesProto
- type VisibilityProto
Constants ¶
This section is empty.
Variables ¶
var ( TaskPhase_name = map[int32]string{ 0: "TASK_PHASE_UNSPECIFIED", 1: "TASK_PHASE_RUNNING", 2: "TASK_PHASE_DONE", } TaskPhase_value = map[string]int32{ "TASK_PHASE_UNSPECIFIED": 0, "TASK_PHASE_RUNNING": 1, "TASK_PHASE_DONE": 2, } )
TaskPhase_name and TaskPhase_value are the lookup tables protoc emits for an enum
var ( Result_Status_name = map[int32]string{ 0: "none", 1: "succeeded", 2: "failed", } Result_Status_value = map[string]int32{ "none": 0, "succeeded": 1, "failed": 2, } )
Enum value maps for Result_Status.
var ( Transition_State_name = map[int32]string{ 0: "none", 1: "queued", 2: "awaiting_execution", 3: "executing", 4: "awaiting_retry", 5: "finished", } Transition_State_value = map[string]int32{ "none": 0, "queued": 1, "awaiting_execution": 2, "executing": 3, "awaiting_retry": 4, "finished": 5, } )
Enum value maps for Transition_State.
var File_job_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ArrayConvertExampleProto ¶
ArrayConvertExampleProto demonstrates a fixed-size array of converted elements
type ArrayExampleProto ¶
ArrayExampleProto demonstrates fixed-size array support
type CustomConvertExampleProto ¶
CustomConvertExampleProto demonstrates the using: directive
type Data ¶
type Data struct {
ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
func (*Data) Descriptor
deprecated
func (*Data) GetContentType ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶
func (x *Data) ProtoReflect() protoreflect.Message
type DetailProto ¶
DetailProto is an optional nested message
type EnumExampleProto ¶
type EnumExampleProto struct {
ID string
Status StatusProto
Visibility VisibilityProto
}
EnumExampleProto demonstrates enum mapping
type Error ¶
type Error struct {
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
Retryable bool `protobuf:"varint,2,opt,name=retryable,proto3" json:"retryable,omitempty"`
// contains filtered or unexported fields
}
func (*Error) Descriptor
deprecated
func (*Error) GetRetryable ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type EventDraftProto ¶
EventDraftProto carries an optional column as a pointer
type EventProto ¶
type EventProto struct {
ID string
AtNs int64
Owner []byte
OwnerId int64
Level Level
RetiredAtNs int64
Deadline *timestamppb.Timestamp
Note string
}
EventProto demonstrates derived conversions onto bytes and a named integer type
type Job ¶
type Job struct {
// Id needs to be an id that is lexicographically sortable
// to ensure strict ordering for items with identical timestamps
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
RunAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=run_at,json=runAt,proto3" json:"run_at,omitempty"`
Payload *Data `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
Queue string `protobuf:"bytes,5,opt,name=queue,proto3" json:"queue,omitempty"`
Transitions []*Transition `protobuf:"bytes,6,rep,name=transitions,proto3" json:"transitions,omitempty"`
Group string `protobuf:"bytes,7,opt,name=group,proto3" json:"group,omitempty"`
ExternalId string `protobuf:"bytes,8,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
// contains filtered or unexported fields
}
func (*Job) Descriptor
deprecated
func (*Job) GetCreatedAt ¶
func (x *Job) GetCreatedAt() *timestamppb.Timestamp
func (*Job) GetExternalId ¶
func (*Job) GetPayload ¶
func (*Job) GetRunAt ¶
func (x *Job) GetRunAt() *timestamppb.Timestamp
func (*Job) GetTransitions ¶
func (x *Job) GetTransitions() []*Transition
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type NamedSliceExampleProto ¶
NamedSliceExampleProto demonstrates named slice type support
type OptionalExampleProto ¶
type OptionalExampleProto struct {
ID string
Detail *DetailProto
Item *ItemProto
}
OptionalExampleProto demonstrates optional nested messages
type OrderProto ¶
OrderProto flattens a field reached through an edge
type PointerSliceExampleProto ¶
PointerSliceExampleProto demonstrates a repeated message field
type Result ¶
type Result struct {
Status Result_Status `protobuf:"varint,1,opt,name=status,proto3,enum=example.Result_Status" json:"status,omitempty"`
Payload *Data `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// contains filtered or unexported fields
}
func (*Result) Descriptor
deprecated
func (*Result) GetPayload ¶
func (*Result) GetStatus ¶
func (x *Result) GetStatus() Result_Status
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type Result_Status ¶
type Result_Status int32
const ( Result_none Result_Status = 0 Result_succeeded Result_Status = 1 Result_failed Result_Status = 2 )
func (Result_Status) Descriptor ¶
func (Result_Status) Descriptor() protoreflect.EnumDescriptor
func (Result_Status) Enum ¶
func (x Result_Status) Enum() *Result_Status
func (Result_Status) EnumDescriptor
deprecated
func (Result_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Result_Status.Descriptor instead.
func (Result_Status) Number ¶
func (x Result_Status) Number() protoreflect.EnumNumber
func (Result_Status) String ¶
func (x Result_Status) String() string
func (Result_Status) Type ¶
func (Result_Status) Type() protoreflect.EnumType
type SnapshotExampleProto ¶
SnapshotExampleProto demonstrates using: with a converter over a named struct
type StatusProto ¶
type StatusProto string
StatusProto declares the same values as models.Status
const ( StatusProtoActive StatusProto = "active" StatusProtoInactive StatusProto = "inactive" )
type TaskPhase ¶
type TaskPhase int32
TaskPhase is numbered and named the way protoc names an enum's values
type Transition ¶
type Transition struct {
State Transition_State `protobuf:"varint,1,opt,name=state,proto3,enum=example.Transition_State" json:"state,omitempty"`
Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
RetryAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=retry_at,json=retryAt,proto3" json:"retry_at,omitempty"`
Attempts int32 `protobuf:"varint,4,opt,name=attempts,proto3" json:"attempts,omitempty"`
// contains filtered or unexported fields
}
func (*Transition) Descriptor
deprecated
func (*Transition) Descriptor() ([]byte, []int)
Deprecated: Use Transition.ProtoReflect.Descriptor instead.
func (*Transition) GetAttempts ¶
func (x *Transition) GetAttempts() int32
func (*Transition) GetRetryAt ¶
func (x *Transition) GetRetryAt() *timestamppb.Timestamp
func (*Transition) GetState ¶
func (x *Transition) GetState() Transition_State
func (*Transition) GetTime ¶
func (x *Transition) GetTime() *timestamppb.Timestamp
func (*Transition) ProtoMessage ¶
func (*Transition) ProtoMessage()
func (*Transition) ProtoReflect ¶
func (x *Transition) ProtoReflect() protoreflect.Message
func (*Transition) Reset ¶
func (x *Transition) Reset()
func (*Transition) String ¶
func (x *Transition) String() string
type Transition_State ¶
type Transition_State int32
const ( Transition_none Transition_State = 0 // The Job lives in the in-memory priority queue Transition_queued Transition_State = 1 // The Job is waiting for execution by a worker Transition_awaiting_execution Transition_State = 2 // The Job was claimed by a worker and is currently executing Transition_executing Transition_State = 3 // The Job failed and is waiting to be retried Transition_awaiting_retry Transition_State = 4 // The job has finished executing Transition_finished Transition_State = 5 )
func (Transition_State) Descriptor ¶
func (Transition_State) Descriptor() protoreflect.EnumDescriptor
func (Transition_State) Enum ¶
func (x Transition_State) Enum() *Transition_State
func (Transition_State) EnumDescriptor
deprecated
func (Transition_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Transition_State.Descriptor instead.
func (Transition_State) Number ¶
func (x Transition_State) Number() protoreflect.EnumNumber
func (Transition_State) String ¶
func (x Transition_State) String() string
func (Transition_State) Type ¶
func (Transition_State) Type() protoreflect.EnumType
type UserWithRolesProto ¶
type UserWithRolesProto struct {
ID string
Name string
Roles []string
Tags map[string]string
Scores []int32
Metadata map[string]int64
}
UserWithRolesProto demonstrates slice and map fields
type VisibilityProto ¶
type VisibilityProto int32
VisibilityProto is numbered rather than named like models.Visibility
const ( VisibilityProtoUnspecified VisibilityProto = 0 VisibilityProtoPublic VisibilityProto = 1 VisibilityProtoPrivate VisibilityProto = 2 )