envelope

package
v0.0.0-...-3b037d6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package envelope is a generated protocol buffer package.

It is generated from these files:

envelope/command.proto

It has these top-level messages:

Command

Package envelope is a generated protocol buffer package.

It is generated from these files:

envelope/event.proto

It has these top-level messages:

Event

Package envelope is a generated protocol buffer package.

It is generated from these files:

envelope/reply.proto

It has these top-level messages:

Reply

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCommand = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommand   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthReply = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReply   = fmt.Errorf("proto: integer overflow")
)

Functions

func DefaultMarshalCommand

func DefaultMarshalCommand(command *Command) (bytes []byte, err error)

func DefaultMarshalEvent

func DefaultMarshalEvent(event *Event) (bytes []byte, err error)

func DefaultMarshalReply

func DefaultMarshalReply(r *Reply) (bytes []byte, err error)

func Err2str

func Err2str(err error) string

func Str2err

func Str2err(s string) error

func UnmakeCommand

func UnmakeCommand(ctx context.Context, codec es.CommandCoder, command *Command) (*es.Command, error)

func UnmakeEvent

func UnmakeEvent(ctx context.Context, codec es.EventCoder, event *Event) (es.Event, error)

func UnmakeReply

func UnmakeReply(ctx context.Context, codec es.CommandCoder, r *Reply) (*es.Reply, error)

Types

type Command

type Command struct {
	StreamId    string            `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	StreamType  string            `protobuf:"bytes,4,opt,name=stream_type,json=streamType,proto3" json:"stream_type,omitempty"`
	CommandType string            `protobuf:"bytes,8,opt,name=command_type,json=commandType,proto3" json:"command_type,omitempty"`
	Payload     []byte            `protobuf:"bytes,12,opt,name=payload,proto3" json:"payload,omitempty"`
	Header      map[string]string `` /* 147-byte string literal not displayed */
}

func DefaultUnmarshalCommand

func DefaultUnmarshalCommand(bytes []byte) (*Command, error)

func MakeCommand

func MakeCommand(ctx context.Context, codec es.CommandCoder, replyTo string, command *es.Command) (*Command, error)

func (*Command) Descriptor

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

func (*Command) GetCommandType

func (m *Command) GetCommandType() string

func (*Command) GetHeader

func (m *Command) GetHeader() map[string]string

func (*Command) GetPayload

func (m *Command) GetPayload() []byte

func (*Command) GetStreamId

func (m *Command) GetStreamId() string

func (*Command) GetStreamType

func (m *Command) GetStreamType() string

func (*Command) Marshal

func (m *Command) Marshal() (dAtA []byte, err error)

func (*Command) MarshalTo

func (m *Command) MarshalTo(dAtA []byte) (int, error)

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) Size

func (m *Command) Size() (n int)

func (*Command) String

func (m *Command) String() string

func (*Command) Unmarshal

func (m *Command) Unmarshal(dAtA []byte) error

type Event

type Event struct {
	StreamId   string                     `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	StreamType string                     `protobuf:"bytes,2,opt,name=stream_type,json=streamType,proto3" json:"stream_type,omitempty"`
	EventType  string                     `protobuf:"bytes,3,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"`
	Payload    []byte                     `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	Version    int64                      `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
	Context    map[string]string          `` /* 148-byte string literal not displayed */
	CreatedAt  *google_protobuf.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
}

func DefaultUnmarshalEvent

func DefaultUnmarshalEvent(bytes []byte) (*Event, error)

func MakeEvent

func MakeEvent(ctx context.Context, codec es.EventCoder, event es.Event) (*Event, error)

func (*Event) Descriptor

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

func (*Event) GetContext

func (m *Event) GetContext() map[string]string

func (*Event) GetCreatedAt

func (m *Event) GetCreatedAt() *google_protobuf.Timestamp

func (*Event) GetEventType

func (m *Event) GetEventType() string

func (*Event) GetPayload

func (m *Event) GetPayload() []byte

func (*Event) GetStreamId

func (m *Event) GetStreamId() string

func (*Event) GetStreamType

func (m *Event) GetStreamType() string

func (*Event) GetVersion

func (m *Event) GetVersion() int64

func (*Event) Marshal

func (m *Event) Marshal() (dAtA []byte, err error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(dAtA []byte) (int, error)

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (m *Event) String() string

func (*Event) Unmarshal

func (m *Event) Unmarshal(dAtA []byte) error

type MarshalCommand

type MarshalCommand func(command *Command) (bytes []byte, err error)

type MarshalEvent

type MarshalEvent func(event *Event) (bytes []byte, err error)

type MarshalReply

type MarshalReply func(reply *Reply) (bytes []byte, err error)

type Reply

type Reply struct {
	CorrelationId string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	StreamType    string `protobuf:"bytes,4,opt,name=stream_type,json=streamType,proto3" json:"stream_type,omitempty"`
	StreamId      string `protobuf:"bytes,8,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	ReplyType     string `protobuf:"bytes,12,opt,name=reply_type,json=replyType,proto3" json:"reply_type,omitempty"`
	CommandType   string `protobuf:"bytes,13,opt,name=command_type,json=commandType,proto3" json:"command_type,omitempty"`
	Payload       []byte `protobuf:"bytes,16,opt,name=payload,proto3" json:"payload,omitempty"`
	Error         string `protobuf:"bytes,20,opt,name=error,proto3" json:"error,omitempty"`
	Version       int64  `protobuf:"varint,24,opt,name=version,proto3" json:"version,omitempty"`
}

func DefaultUnmarshalReply

func DefaultUnmarshalReply(bytes []byte) (*Reply, error)

func MakeReply

func MakeReply(ctx context.Context, codec es.CommandCoder, reply *es.Reply) (*Reply, error)

func (*Reply) Descriptor

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

func (*Reply) GetCommandType

func (m *Reply) GetCommandType() string

func (*Reply) GetCorrelationId

func (m *Reply) GetCorrelationId() string

func (*Reply) GetError

func (m *Reply) GetError() string

func (*Reply) GetPayload

func (m *Reply) GetPayload() []byte

func (*Reply) GetReplyType

func (m *Reply) GetReplyType() string

func (*Reply) GetStreamId

func (m *Reply) GetStreamId() string

func (*Reply) GetStreamType

func (m *Reply) GetStreamType() string

func (*Reply) GetVersion

func (m *Reply) GetVersion() int64

func (*Reply) Marshal

func (m *Reply) Marshal() (dAtA []byte, err error)

func (*Reply) MarshalTo

func (m *Reply) MarshalTo(dAtA []byte) (int, error)

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) Size

func (m *Reply) Size() (n int)

func (*Reply) String

func (m *Reply) String() string

func (*Reply) Unmarshal

func (m *Reply) Unmarshal(dAtA []byte) error

type UnmarshalCommand

type UnmarshalCommand func(bytes []byte) (*Command, error)

type UnmarshalEvent

type UnmarshalEvent func(bytes []byte) (*Event, error)

type UnmarshalReply

type UnmarshalReply func(bytes []byte) (*Reply, error)

Jump to

Keyboard shortcuts

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