Documentation ¶
Index ¶
- Constants
- func AddLog(logs []*pb.Log, Level pb.Log_Level, msg string, args ...interface{}) []*pb.Log
- func CreateConfirm(id, processid string, status int32, text string, params ...interface{}) (*pb.Confirm, error)
- func PrintLogs(logger *log.Logger, logs []*pb.Log)
- type AttachmentProcessor
- type InboundPlugin
- type Lister
- type MessageProcessor
- type OutboundPlugin
- type Processor
Constants ¶
View Source
const ( StatusOK int32 = 200 StatusDuplicate = 409 StatusMsgSizeToBig = 413 StatusInternalError = 500 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttachmentProcessor ¶
AttachmentProcessor describes a function which takes an attachment and transmits it.
type InboundPlugin ¶
type InboundPlugin interface { Processor }
InboundPlugin describes a plugin which processes received messages and attachments.
type Lister ¶
type Lister interface { // ListMessages lists all found messages. ListMessages(ctx context.Context) ([]*pb.Message, error) // ListAttachments lists all found attachments. ListAttachments(ctx context.Context) ([]*pb.Attachment, error) }
Lister is the interface implemented by an Plugin that supports listing messages and attachments.
type MessageProcessor ¶
MessageProcessor describes a function which takes an message and transmits it.
type OutboundPlugin ¶
OutboundPlugin is the interface that groups the basic List and Process methods.
type Processor ¶
type Processor interface { // ProcessMessage processes an message. ProcessMessage(context.Context, *pb.Message) (*pb.Confirm, error) // ProcessAttachmetn processes an attachment. ProcessAttachment(context.Context, *pb.Attachment) (*pb.Confirm, error) }
Processor is the interface implemented by an Plugin that supports processing messages and attachments.
Click to show internal directories.
Click to hide internal directories.