bytesvalue

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

type Bytes []byte

func NewBytes

func NewBytes(src any, encoder ...EncoderType) Bytes

func NewBytesBuffer

func NewBytesBuffer(size int) (b Bytes)

func (Bytes) Append

func (b Bytes) Append(data []byte) Bytes

func (Bytes) Clear

func (b Bytes) Clear()

func (Bytes) Contains

func (b Bytes) Contains(f []byte) (ok bool)

func (Bytes) Empty

func (b Bytes) Empty() bool

func (Bytes) Encode

func (b Bytes) Encode(v any) (r Bytes, err error)

func (Bytes) Find

func (b Bytes) Find(value []byte) (start, end int, extract []byte)

func (Bytes) Float

func (v Bytes) Float(i ...float64) (val Float)

func (Bytes) GoString

func (b Bytes) GoString() string

func (Bytes) Humanize

func (b Bytes) Humanize() string

func (Bytes) Int

func (v Bytes) Int(i ...int) (val Int)

func (Bytes) IsJSON

func (b Bytes) IsJSON() bool

func (Bytes) Join

func (b Bytes) Join(src []Bytes, delim ...rune) (r Bytes)

func (Bytes) ReadFrom

func (b Bytes) ReadFrom(r io.Reader) (int, error)

func (Bytes) Size

func (b Bytes) Size() int

func (Bytes) Slice

func (b Bytes) Slice(pos int, length ...int) (data []byte)

func (Bytes) Split

func (b Bytes) Split(delim ...rune) (r []Bytes)

func (Bytes) String

func (b Bytes) String() string

func (Bytes) UiInt64

func (v Bytes) UiInt64(i ...uint64) (val uint64)

func (Bytes) Uint16

func (v Bytes) Uint16(i ...uint16) (val uint16)

func (Bytes) Uint32

func (v Bytes) Uint32(i ...uint32) (val uint32)

func (Bytes) UnsafeString

func (b Bytes) UnsafeString() string

func (Bytes) Write

func (b Bytes) Write(value []byte) int

func (Bytes) WriteRune

func (b Bytes) WriteRune(r []rune) int

func (Bytes) WriteString

func (b Bytes) WriteString(s string) int

func (Bytes) WriteTo

func (b Bytes) WriteTo(w io.Writer) (int, error)

type EncoderType

type EncoderType uint8
const (
	AUTO EncoderType = iota
	JSON
	MSGPACK
)

type Float

type Float float64

func (Float) Bytes

func (i Float) Bytes() []byte

func (Float) F32

func (i Float) F32() float32

func (Float) FromBytes

func (i Float) FromBytes(v []byte) Float

func (Float) String

func (i Float) String() string

type Int

type Int int64

func (Int) Bytes

func (i Int) Bytes() []byte

func (Int) From

func (i Int) From(value int) (r Int)

func (Int) FromBytes

func (i Int) FromBytes(v []byte) Int

func (Int) I16

func (i Int) I16() int16

func (Int) I32

func (i Int) I32() int32

func (Int) I64

func (i Int) I64() int64

func (Int) I8

func (i Int) I8() int8

func (Int) String

func (i Int) String() string

Jump to

Keyboard shortcuts

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