protos

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

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

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

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

Functions

This section is empty.

Types

type ArrayConvertExampleProto

type ArrayConvertExampleProto struct {
	ID     string
	Values [3]int32
}

ArrayConvertExampleProto demonstrates a fixed-size array of converted elements

type ArrayExampleProto

type ArrayExampleProto struct {
	ID   string
	Data [4]byte
	Name string
}

ArrayExampleProto demonstrates fixed-size array support

type CustomConvertExampleProto

type CustomConvertExampleProto struct {
	ID        string
	Value     string
	Timestamp string
}

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetBody

func (x *Data) GetBody() []byte

func (*Data) GetContentType

func (x *Data) GetContentType() string

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

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

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type DetailProto

type DetailProto struct {
	Note   string
	Weight int32
}

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetMsg

func (x *Error) GetMsg() string

func (*Error) GetRetryable

func (x *Error) GetRetryable() bool

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type EventDraftProto

type EventDraftProto struct {
	ID   string
	Note *string
}

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 ItemProto

type ItemProto struct {
	Name  string
	Count int32
}

ItemProto is the element of a repeated field

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

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetCreatedAt

func (x *Job) GetCreatedAt() *timestamppb.Timestamp

func (*Job) GetExternalId

func (x *Job) GetExternalId() string

func (*Job) GetGroup

func (x *Job) GetGroup() string

func (*Job) GetId

func (x *Job) GetId() string

func (*Job) GetPayload

func (x *Job) GetPayload() *Data

func (*Job) GetQueue

func (x *Job) GetQueue() string

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

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type Level

type Level uint8

Level is a numbered enum narrower than the model's plain int

const (
	LevelInfo Level = iota
	LevelWarn
)

type NamedSliceExampleProto

type NamedSliceExampleProto struct {
	ID    string
	Items []string
}

NamedSliceExampleProto demonstrates named slice type support

type OptionalExampleProto

type OptionalExampleProto struct {
	ID     string
	Detail *DetailProto
	Item   *ItemProto
}

OptionalExampleProto demonstrates optional nested messages

type OrderProto

type OrderProto struct {
	ID           string
	CustomerName string
}

OrderProto flattens a field reached through an edge

type PointerSliceExampleProto

type PointerSliceExampleProto struct {
	ID    string
	Items []*ItemProto
}

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetPayload

func (x *Result) GetPayload() *Data

func (*Result) GetStatus

func (x *Result) GetStatus() Result_Status

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

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) 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 (Result_Status) String

func (x Result_Status) String() string

func (Result_Status) Type

type SnapshotExampleProto

type SnapshotExampleProto struct {
	ID      string
	Summary string
	Digest  string
}

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

const (
	TaskPhase_TASK_PHASE_UNSPECIFIED TaskPhase = 0
	TaskPhase_TASK_PHASE_RUNNING     TaskPhase = 1
	TaskPhase_TASK_PHASE_DONE        TaskPhase = 2
)

func (TaskPhase) Enum

func (x TaskPhase) Enum() *TaskPhase

Enum is the method protoc generates, which marks the type as a protobuf enum

type TaskProto

type TaskProto struct {
	ID    string
	Phase TaskPhase
}

TaskProto demonstrates a numbered enum mapped onto a string one

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) Enum

func (Transition_State) EnumDescriptor deprecated

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

Deprecated: Use Transition_State.Descriptor instead.

func (Transition_State) Number

func (Transition_State) String

func (x Transition_State) String() string

func (Transition_State) Type

type UserProto

type UserProto struct {
	ID        string
	Name      string
	Email     string
	Age       int32
	CreatedAt string
}

UserProto demonstrates basic struct mapping

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
)

Jump to

Keyboard shortcuts

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