-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstream.go
35 lines (34 loc) · 1013 Bytes
/
stream.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package io
//Stream represents a message stream
type Stream interface {
//Put puts bytes
Put(bs []byte)
//Put puts a byte
PutByte(b byte)
//PutObject put stream encoded objects
PutObject(key string, object Encoder)
//PutObjects put objects
PutObjects(key string, objects []Encoder)
//Put puts string
PutString(key, value string)
//PutNonEmptyString puts non empty string
PutNonEmptyString(key, value string)
//PutB64EncodedBytes puts base64 encoded byte
PutB64EncodedBytes(key string, bytes []byte)
//PutStrings puts string slice
PutStrings(key string, values []string)
//PutInts puts ints slice
PutInts(key string, values []int)
//PutUInts puts uint slice
PutUInts(key string, values []uint64)
//PutInt puts int
PutInt(key string, value int)
//PutFloat puts float
PutFloat(key string, value float64)
//PutFloat64s puts uint slice
PutFloats(key string, values []float64)
//PutBool puts bool
PutBool(key string, value bool)
//PutBools puts bool
PutBools(key string, value []bool)
}