Documentation ¶
Index ¶
- type Arg
- type BlobArg
- type JSONArg
- type Message
- func (m *Message) Inspect() string
- func (m *Message) Pop() Arg
- func (m *Message) Push(arg Arg) []Arg
- func (m *Message) PushBlob(b []byte) []Arg
- func (m *Message) PushJSON(v interface{}) ([]Arg, error)
- func (m *Message) PushString(s string) []Arg
- func (m *Message) Shift() Arg
- func (m *Message) ToBytes() []byte
- func (m *Message) Unshift(arg Arg) []Arg
- func (m *Message) UnshiftBlob(b []byte) []Arg
- func (m *Message) UnshiftJSON(v interface{}) ([]Arg, error)
- func (m *Message) UnshiftString(s string) []Arg
- type StringArg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobArg ¶
type BlobArg []byte
BlobArg is a Blob Arg
func NewBlobArg ¶
NewBlobArg simply returns the same byte array given to it
type JSONArg ¶
type JSONArg []byte
JSONArg is a JSON Arg
func NewJSONArg ¶
NewJSONArg will return a new instance of JSONArg from marshalled json
type Message ¶
type Message struct {
Args []Arg
}
Message is a high level AMP message
func NewFromBytes ¶
NewFromBytes will return a AMP Message from the provided args as encoded bytes
func (*Message) PushBlob ¶
PushBlob will push a BlobArg given a byte array onto the tail of a Message
func (*Message) PushString ¶
PushString will push a StringArg given a string onto the tail of a Message
func (*Message) UnshiftBlob ¶
UnshiftBlob will unshift a BlobArg given a byte array onto the head of a Message
func (*Message) UnshiftJSON ¶
UnshiftJSON will unshift a JSONArg given a string onto the head of a Message
func (*Message) UnshiftString ¶
UnshiftString will unshift a StringArg given a string onto the head of a Message
type StringArg ¶
type StringArg []byte
StringArg is a String Arg
func NewStringArg ¶
NewStringArg will return a new instance of StringArg from a string