messages

package
v0.0.0-...-8072013 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 1 Imported by: 4

Documentation

Overview

Package messages contains structs that represent the messages that get sent using the Bolt protocol

Index

Constants

View Source
const (
	// AckFailureMessageSignature is the signature byte for the ACK_FAILURE message
	AckFailureMessageSignature = 0x0E
)
View Source
const (
	// DiscardAllMessageSignature is the signature byte for the DISCARD_ALL message
	DiscardAllMessageSignature = 0x2F
)
View Source
const (
	// FailureMessageSignature is the signature byte for the FAILURE message
	FailureMessageSignature = 0x7F
)
View Source
const (
	// IgnoredMessageSignature is the signature byte for the IGNORED message
	IgnoredMessageSignature = 0x7E
)
View Source
const (
	// InitMessageSignature is the signature byte for the INIT message
	InitMessageSignature = 0x01
)
View Source
const (
	// PullAllMessageSignature is the signature byte for the PULL_ALL message
	PullAllMessageSignature = 0x3F
)
View Source
const (
	// RecordMessageSignature is the signature byte for the RECORD message
	RecordMessageSignature = 0x71
)
View Source
const (
	// ResetMessageSignature is the signature byte for the RESET message
	ResetMessageSignature = 0x0F
)
View Source
const (
	// RunMessageSignature is the signature byte for the RUN message
	RunMessageSignature = 0x10
)
View Source
const (
	// SuccessMessageSignature is the signature byte for the SUCCESS message
	SuccessMessageSignature = 0x70
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AckFailureMessage

type AckFailureMessage struct{}

AckFailureMessage Represents an ACK_FAILURE message

func NewAckFailureMessage

func NewAckFailureMessage() AckFailureMessage

NewAckFailureMessage Gets a new AckFailureMessage struct

func (AckFailureMessage) AllFields

func (i AckFailureMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (AckFailureMessage) Signature

func (i AckFailureMessage) Signature() int

Signature gets the signature byte for the struct

type DiscardAllMessage

type DiscardAllMessage struct{}

DiscardAllMessage Represents an DISCARD_ALL message

func NewDiscardAllMessage

func NewDiscardAllMessage() DiscardAllMessage

NewDiscardAllMessage Gets a new DiscardAllMessage struct

func (DiscardAllMessage) AllFields

func (i DiscardAllMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (DiscardAllMessage) Signature

func (i DiscardAllMessage) Signature() int

Signature gets the signature byte for the struct

type FailureMessage

type FailureMessage struct {
	Metadata map[string]interface{}
}

FailureMessage Represents an FAILURE message

func NewFailureMessage

func NewFailureMessage(metadata map[string]interface{}) FailureMessage

NewFailureMessage Gets a new FailureMessage struct

func (FailureMessage) AllFields

func (i FailureMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (FailureMessage) Error

func (i FailureMessage) Error() string

Error is the implementation of the Golang error interface so a failure message can be treated like a normal error

func (FailureMessage) Signature

func (i FailureMessage) Signature() int

Signature gets the signature byte for the struct

type IgnoredMessage

type IgnoredMessage struct{}

IgnoredMessage Represents an IGNORED message

func NewIgnoredMessage

func NewIgnoredMessage() IgnoredMessage

NewIgnoredMessage Gets a new IgnoredMessage struct

func (IgnoredMessage) AllFields

func (i IgnoredMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (IgnoredMessage) Signature

func (i IgnoredMessage) Signature() int

Signature gets the signature byte for the struct

type InitMessage

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

InitMessage Represents an INIT message

func NewInitMessage

func NewInitMessage(clientName string, user string, password string) InitMessage

NewInitMessage Gets a new InitMessage struct

func (InitMessage) AllFields

func (i InitMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (InitMessage) Signature

func (i InitMessage) Signature() int

Signature gets the signature byte for the struct

type PullAllMessage

type PullAllMessage struct{}

PullAllMessage Represents an PULL_ALL message

func NewPullAllMessage

func NewPullAllMessage() PullAllMessage

NewPullAllMessage Gets a new PullAllMessage struct

func (PullAllMessage) AllFields

func (i PullAllMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (PullAllMessage) Signature

func (i PullAllMessage) Signature() int

Signature gets the signature byte for the struct

type RecordMessage

type RecordMessage struct {
	Fields []interface{}
}

RecordMessage Represents an RECORD message

func NewRecordMessage

func NewRecordMessage(fields []interface{}) RecordMessage

NewRecordMessage Gets a new RecordMessage struct

func (RecordMessage) AllFields

func (i RecordMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (RecordMessage) Signature

func (i RecordMessage) Signature() int

Signature gets the signature byte for the struct

type ResetMessage

type ResetMessage struct{}

ResetMessage Represents an RESET message

func NewResetMessage

func NewResetMessage() ResetMessage

NewResetMessage Gets a new ResetMessage struct

func (ResetMessage) AllFields

func (i ResetMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (ResetMessage) Signature

func (i ResetMessage) Signature() int

Signature gets the signature byte for the struct

type RunMessage

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

RunMessage Represents an RUN message

func NewRunMessage

func NewRunMessage(statement string, parameters map[string]interface{}) RunMessage

NewRunMessage Gets a new RunMessage struct

func (RunMessage) AllFields

func (i RunMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (RunMessage) Signature

func (i RunMessage) Signature() int

Signature gets the signature byte for the struct

type SuccessMessage

type SuccessMessage struct {
	Metadata map[string]interface{}
}

SuccessMessage Represents an SUCCESS message

func NewSuccessMessage

func NewSuccessMessage(metadata map[string]interface{}) SuccessMessage

NewSuccessMessage Gets a new SuccessMessage struct

func (SuccessMessage) AllFields

func (i SuccessMessage) AllFields() []interface{}

AllFields gets the fields to encode for the struct

func (SuccessMessage) Signature

func (i SuccessMessage) Signature() int

Signature gets the signature byte for the struct

Jump to

Keyboard shortcuts

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