common

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptMessagePayload

func DecryptMessagePayload(message *messagepb.Message, keyManager *keymanager.EncryptionKeyManager) error

DecryptMessagePayload decrypts the payload on a message metadata in place.

func DecryptSchedulePayload

func DecryptSchedulePayload(schedule *schedulepb.Schedule, keyManager *keymanager.EncryptionKeyManager) error

DecryptSchedulePayload decrypts the payload on a schedule metadata in place.

func EncryptMessagePayload

func EncryptMessagePayload(message *messagepb.Message, keyManager *keymanager.EncryptionKeyManager) error

EncryptMessagePayload encrypts the payload on a message metadata in place.

func EncryptSchedulePayload

func EncryptSchedulePayload(schedule *schedulepb.Schedule, keyManager *keymanager.EncryptionKeyManager) error

EncryptSchedulePayload encrypts the payload on a schedule metadata in place.

Types

type ProtoSerializer

type ProtoSerializer struct{}

ProtoSerializer handles protobuf serialization/deserialization for ChronoQueue entities. This provides a centralized way to marshal/unmarshal protobufs across all storage backends.

func NewProtoSerializer

func NewProtoSerializer() *ProtoSerializer

NewProtoSerializer creates a new ProtoSerializer instance

func (*ProtoSerializer) MarshalMessage

func (s *ProtoSerializer) MarshalMessage(msg *messagepb.Message) ([]byte, error)

MarshalMessage marshals a complete Message object

func (*ProtoSerializer) MarshalMessageMetadata

func (s *ProtoSerializer) MarshalMessageMetadata(meta *messagepb.Message_Metadata) ([]byte, error)

func (*ProtoSerializer) MarshalQueue

func (s *ProtoSerializer) MarshalQueue(queue *queuepb.Queue) ([]byte, error)

MarshalQueue marshals a complete Queue object

func (*ProtoSerializer) MarshalQueueMetadata

func (s *ProtoSerializer) MarshalQueueMetadata(meta *queuepb.QueueMetadata) ([]byte, error)

func (*ProtoSerializer) MarshalSchedule

func (s *ProtoSerializer) MarshalSchedule(schedule *schedulepb.Schedule) ([]byte, error)

MarshalSchedule marshals a complete Schedule object

func (*ProtoSerializer) MarshalScheduleMetadata

func (s *ProtoSerializer) MarshalScheduleMetadata(meta *schedulepb.Schedule_Metadata) ([]byte, error)

func (*ProtoSerializer) UnmarshalMessage

func (s *ProtoSerializer) UnmarshalMessage(data []byte) (*messagepb.Message, error)

UnmarshalMessage unmarshals a complete Message object

func (*ProtoSerializer) UnmarshalMessageMetadata

func (s *ProtoSerializer) UnmarshalMessageMetadata(data []byte) (*messagepb.Message_Metadata, error)

func (*ProtoSerializer) UnmarshalQueue

func (s *ProtoSerializer) UnmarshalQueue(data []byte) (*queuepb.Queue, error)

UnmarshalQueue unmarshals a complete Queue object

func (*ProtoSerializer) UnmarshalQueueMetadata

func (s *ProtoSerializer) UnmarshalQueueMetadata(data []byte) (*queuepb.QueueMetadata, error)

func (*ProtoSerializer) UnmarshalSchedule

func (s *ProtoSerializer) UnmarshalSchedule(data []byte) (*schedulepb.Schedule, error)

UnmarshalSchedule unmarshals a complete Schedule object

func (*ProtoSerializer) UnmarshalScheduleMetadata

func (s *ProtoSerializer) UnmarshalScheduleMetadata(data []byte) (*schedulepb.Schedule_Metadata, error)

type StateValidator

type StateValidator struct{}

StateValidator provides common validation logic for message states

func NewStateValidator

func NewStateValidator() *StateValidator

NewStateValidator creates a new StateValidator instance

func (*StateValidator) ValidateStateTransition

func (v *StateValidator) ValidateStateTransition(from, to messagepb.Message_Metadata_State) error

ValidateStateTransition checks if a state transition is valid

Jump to

Keyboard shortcuts

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