buffer

package
v0.0.0-...-a2b917b Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(in isolates.FunctionArgs) (*Buffer, error)

func (*Buffer) Buffer

func (b *Buffer) Buffer() *isolates.Value

func (*Buffer) Length

func (b *Buffer) Length(ctx context.Context) (int, error)

func (*Buffer) ReadUInt32BE

func (b *Buffer) ReadUInt32BE(ctx context.Context, offset int) (uint32, error)

func (*Buffer) Slice

func (b *Buffer) Slice(ctx context.Context, start *int, end *int) (*Buffer, error)

func (*Buffer) ToString

func (b *Buffer) ToString(ctx context.Context, encoding *BufferEncoding) (string, error)

func (*Buffer) V8Construct

func (b *Buffer) V8Construct(in isolates.FunctionArgs) (*Buffer, error)

func (*Buffer) V8FuncReadUInt32BE

func (b *Buffer) V8FuncReadUInt32BE(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Buffer) V8FuncSlice

func (b *Buffer) V8FuncSlice(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Buffer) V8FuncToString

func (b *Buffer) V8FuncToString(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Buffer) V8FuncWriteUInt32BE

func (b *Buffer) V8FuncWriteUInt32BE(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Buffer) V8GetBuffer

func (b *Buffer) V8GetBuffer(in isolates.GetterArgs) (*isolates.Value, error)

func (*Buffer) WriteUInt32BE

func (b *Buffer) WriteUInt32BE(ctx context.Context, value uint32, offset int) (*Buffer, error)

type BufferEncoding

type BufferEncoding string
const (
	Ascii  BufferEncoding = "ascii"
	Utf8   BufferEncoding = "utf8"
	Hex    BufferEncoding = "hex"
	Base64 BufferEncoding = "base64"
	Raw    BufferEncoding = "raw"
)

Jump to

Keyboard shortcuts

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