def

package
v0.0.0-...-90797dc Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	ID      JobID    `bson:"_id,omitempty" json:"id,omitempty"`
	Topic   string   `bson:"topic" json:"topic"`
	Payload *Payload `bson:"payload" json:"payload"`
	Tag     []string `bson:"tag,omitempty" json:"tag,omitempty"`
}

func (*Job) Scan

func (j *Job) Scan(value interface{}) error

func (Job) Value

func (j Job) Value() (driver.Value, error)

func (*Job) Verify

func (j *Job) Verify() *errors.Error

type JobID

type JobID string

func NewJobID

func NewJobID() JobID

type Payload

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

func NewPayload

func NewPayload() *Payload

func PayloadOf

func PayloadOf(bData []byte) (*Payload, *errors.Error)

func (*Payload) GetBoolean

func (p *Payload) GetBoolean(k string) (bool, *errors.Error)

func (*Payload) GetInt64

func (p *Payload) GetInt64(k string) (int64, *errors.Error)

func (*Payload) GetString

func (p *Payload) GetString(k string) (string, *errors.Error)

func (*Payload) Set

func (p *Payload) Set(k string, v string) *Payload

func (*Payload) ToBytes

func (p *Payload) ToBytes() ([]byte, *errors.Error)

Jump to

Keyboard shortcuts

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