Lines Matching defs:byte

43 func AppendType(dst []byte, t bsontype.Type) []byte { return append(dst, byte(t)) }
46 func AppendKey(dst []byte, key string) []byte { return append(dst, key+string(0x00)...) }
50 func AppendHeader(dst []byte, t bsontype.Type, key string) []byte {
62 func ReadType(src []byte) (bsontype.Type, []byte, bool) {
72 func ReadKey(src []byte) (string, []byte, bool) { return readcstring(src) }
77 func ReadKeyBytes(src []byte) ([]byte, []byte, bool) { return readcstringbytes(src) }
81 func ReadHeader(src []byte) (t bsontype.Type, key string, rem []byte, ok bool) {
96 func ReadHeaderBytes(src []byte) (header []byte, rem []byte, ok bool) {
109 func ReadElement(src []byte) (Element, []byte, bool) {
133 func AppendValueElement(dst []byte, key string, value Value) []byte {
141 func ReadValue(src []byte, t bsontype.Type) (Value, []byte, bool) {
150 func AppendDouble(dst []byte, f float64) []byte {
156 func AppendDoubleElement(dst []byte, key string, f float64) []byte {
162 func ReadDouble(src []byte) (float64, []byte, bool) {
171 func AppendString(dst []byte, s string) []byte {
177 func AppendStringElement(dst []byte, key, val string) []byte {
183 func ReadString(src []byte) (string, []byte, bool) {
194 func AppendDocumentStart(dst []byte) (index int32, b []byte) { return ReserveLength(dst) }
198 func AppendDocumentStartInline(dst []byte, index *int32) []byte {
205 func AppendDocumentElementStart(dst []byte, key string) (index int32, b []byte) {
211 func AppendDocumentEnd(dst []byte, index int32) ([]byte, error) {
221 func AppendDocument(dst []byte, doc []byte) []byte { return append(dst, doc...) }
225 func AppendDocumentElement(dst []byte, key string, doc []byte) []byte {
231 func BuildDocument(dst []byte, elems ...[]byte) []byte {
242 func BuildDocumentValue(elems ...[]byte) Value {
248 func BuildDocumentElement(dst []byte, key string, elems ...[]byte) []byte {
257 func ReadDocument(src []byte) (doc Document, rem []byte, ok bool) { return readLengthBytes(src) }
261 func AppendArrayStart(dst []byte) (index int32, b []byte) { return ReserveLength(dst) }
265 func AppendArrayElementStart(dst []byte, key string) (index int32, b []byte) {
271 func AppendArrayEnd(dst []byte, index int32) ([]byte, error) { return AppendDocumentEnd(dst, index)…
274 func AppendArray(dst []byte, arr []byte) []byte { return append(dst, arr...) }
278 func AppendArrayElement(dst []byte, key string, arr []byte) []byte {
283 func BuildArray(dst []byte, values ...Value) []byte {
294 func BuildArrayElement(dst []byte, key string, values ...Value) []byte {
300 func ReadArray(src []byte) (arr Document, rem []byte, ok bool) { return readLengthBytes(src) }
303 func AppendBinary(dst []byte, subtype byte, b []byte) []byte {
313 func AppendBinaryElement(dst []byte, key string, subtype byte, b []byte) []byte {
319 func ReadBinary(src []byte) (subtype byte, bin []byte, rem []byte, ok bool) {
345 func AppendUndefinedElement(dst []byte, key string) []byte {
350 func AppendObjectID(dst []byte, oid primitive.ObjectID) []byte { return append(dst, oid[:]...) }
354 func AppendObjectIDElement(dst []byte, key string, oid primitive.ObjectID) []byte {
360 func ReadObjectID(src []byte) (primitive.ObjectID, []byte, bool) {
370 func AppendBoolean(dst []byte, b bool) []byte {
379 func AppendBooleanElement(dst []byte, key string, b bool) []byte {
385 func ReadBoolean(src []byte) (bool, []byte, bool) {
394 func AppendDateTime(dst []byte, dt int64) []byte { return appendi64(dst, dt) }
398 func AppendDateTimeElement(dst []byte, key string, dt int64) []byte {
404 func ReadDateTime(src []byte) (int64, []byte, bool) { return readi64(src) }
407 func AppendTime(dst []byte, t time.Time) []byte {
413 func AppendTimeElement(dst []byte, key string, t time.Time) []byte {
419 func ReadTime(src []byte) (time.Time, []byte, bool) {
426 func AppendNullElement(dst []byte, key string) []byte { return AppendHeader(dst, bsontype.Null, key…
429 func AppendRegex(dst []byte, pattern, options string) []byte {
435 func AppendRegexElement(dst []byte, key, pattern, options string) []byte {
441 func ReadRegex(src []byte) (pattern, options string, rem []byte, ok bool) {
454 func AppendDBPointer(dst []byte, ns string, oid primitive.ObjectID) []byte {
460 func AppendDBPointerElement(dst []byte, key, ns string, oid primitive.ObjectID) []byte {
466 func ReadDBPointer(src []byte) (ns string, oid primitive.ObjectID, rem []byte, ok bool) {
479 func AppendJavaScript(dst []byte, js string) []byte { return appendstring(dst, js) }
483 func AppendJavaScriptElement(dst []byte, key, js string) []byte {
489 func ReadJavaScript(src []byte) (js string, rem []byte, ok bool) { return readstring(src) }
492 func AppendSymbol(dst []byte, symbol string) []byte { return appendstring(dst, symbol) }
496 func AppendSymbolElement(dst []byte, key, symbol string) []byte {
502 func ReadSymbol(src []byte) (symbol string, rem []byte, ok bool) { return readstring(src) }
505 func AppendCodeWithScope(dst []byte, code string, scope []byte) []byte {
515 func AppendCodeWithScopeElement(dst []byte, key, code string, scope []byte) []byte {
521 func ReadCodeWithScope(src []byte) (code string, scope []byte, rem []byte, ok bool) {
540 func AppendInt32(dst []byte, i32 int32) []byte { return appendi32(dst, i32) }
544 func AppendInt32Element(dst []byte, key string, i32 int32) []byte {
550 func ReadInt32(src []byte) (int32, []byte, bool) { return readi32(src) }
553 func AppendTimestamp(dst []byte, t, i uint32) []byte {
559 func AppendTimestampElement(dst []byte, key string, t, i uint32) []byte {
565 func ReadTimestamp(src []byte) (t, i uint32, rem []byte, ok bool) {
578 func AppendInt64(dst []byte, i64 int64) []byte { return appendi64(dst, i64) }
582 func AppendInt64Element(dst []byte, key string, i64 int64) []byte {
588 func ReadInt64(src []byte) (int64, []byte, bool) { return readi64(src) }
591 func AppendDecimal128(dst []byte, d128 primitive.Decimal128) []byte {
598 func AppendDecimal128Element(dst []byte, key string, d128 primitive.Decimal128) []byte {
604 func ReadDecimal128(src []byte) (primitive.Decimal128, []byte, bool) {
620 func AppendMaxKeyElement(dst []byte, key string) []byte {
626 func AppendMinKeyElement(dst []byte, key string) []byte {
631 func EqualValue(t1, t2 bsontype.Type, v1, v2 []byte) bool {
649 func valueLength(src []byte, t bsontype.Type) (int32, bool) {
695 func readValue(src []byte, t bsontype.Type) ([]byte, []byte, bool) {
706 func ReserveLength(dst []byte) (int32, []byte) {
712 func UpdateLength(dst []byte, index, length int32) []byte {
720 func appendLength(dst []byte, l int32) []byte { return appendi32(dst, l) }
722 func appendi32(dst []byte, i32 int32) []byte {
729 func ReadLength(src []byte) (int32, []byte, bool) {
737 func readi32(src []byte) (int32, []byte, bool) {
744 func appendi64(dst []byte, i64 int64) []byte {
751 func readi64(src []byte) (int64, []byte, bool) {
760 func appendu32(dst []byte, u32 uint32) []byte {
764 func readu32(src []byte) (uint32, []byte, bool) {
772 func appendu64(dst []byte, u64 uint64) []byte {
779 func readu64(src []byte) (uint64, []byte, bool) {
789 func readcstring(src []byte) (string, []byte, bool) {
798 func readcstringbytes(src []byte) ([]byte, []byte, bool) {
806 func appendstring(dst []byte, s string) []byte {
813 func readstring(src []byte) (string, []byte, bool) {
827 func readLengthBytes(src []byte) ([]byte, []byte, bool) {
838 func appendBinarySubtype2(dst []byte, subtype byte, b []byte) []byte {