v0.0.0-...-7271f6c Latest Latest

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

Go to latest
Published: Nov 10, 2015 License: MIT Imports: 8 Imported by: 3




This section is empty.


View Source
var ADDecryptionError = errors.New("ADDecryptionError: The payload of the Mail cannot be decrypted because the ADKey was not passed in correctly.")
View Source
var ADIncorrectParameterError = errors.New("ADIncorrectParameterError: One of the parameters of this function is out of bounds.")
View Source
var ADSigningError = errors.New("ADSigningError: Message is not properly signed.")
View Source
var ADTimeoutError = errors.New("ADTimeoutError: Operation was not able to be completed in the timeout period")
View Source
var ADTrackerListQueryError = errors.New("ADTrackerListQueryError: The address queried for could not be located in the tracker list provided.")
View Source
var ADTrackerVerificationError = errors.New("ADTrackerVerificationError: Could not verify the tracker is who you should be talking to.")
View Source
var ADUnexpectedMessageTypeError = errors.New("ADUnexpectedMessageTypeError: Received a different type of message than expected.")
View Source
var ADUnmarshallingError = errors.New("ADUnmarshallingError: Message could not be unmarshalled.")


func CheckConnectionForError

func CheckConnectionForError(conn net.Conn) error


type Code

type Code uint32

These constants declare different Error Codes

const (
	InvalidSignature Code = 1
	NoMessages       Code = 2
	NotAuthorized    Code = 3
	AddressNotFound  Code = 4
	MessageNotFound  Code = 5
	UnexpectedError  Code = 6
	InternalError    Code = 7

type Error

type Error struct {
	Code        uint32
	Description string
	// contains filtered or unexported fields

func CreateError

func CreateError(code Code, description string, from *identity.Address) *Error

func CreateErrorFromBytes

func CreateErrorFromBytes(by []byte, h message.Header) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Header

func (e *Error) Header() message.Header

func (*Error) Prepare

func (e *Error) Prepare(from *identity.Address)

func (*Error) Send

func (e *Error) Send(from *identity.Identity, conn net.Conn) error

func (*Error) ToBytes

func (e *Error) ToBytes() []byte

func (*Error) Type

func (e *Error) Type() string

Jump to

Keyboard shortcuts

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