request

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Flag for BatchQuery. Values will have its names.
	WithNamesForValues = 0x40
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	Username string
	Password string
}

AuthResponse currently only supports login and password authentication, so it stores them instead of token for convenience. Spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L311

func (*AuthResponse) OpCode

func (*AuthResponse) OpCode() frame.OpCode

func (*AuthResponse) WriteTo

func (a *AuthResponse) WriteTo(b *frame.Buffer)

type Batch

type Batch struct {
	Type              frame.BatchTypeFlag
	Flags             frame.QueryFlags
	Queries           []BatchQuery
	Consistency       frame.Consistency
	SerialConsistency frame.Consistency
	Timestamp         frame.Long
}

Batch spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L414

func (*Batch) OpCode

func (*Batch) OpCode() frame.OpCode

func (*Batch) WriteTo

func (q *Batch) WriteTo(b *frame.Buffer)

WriteTo writes Batch body into bytes.Buffer.

type BatchQuery

type BatchQuery struct {
	Kind     frame.BatchQueryKind
	Query    string
	Prepared frame.Bytes
	Names    frame.StringList
	Values   []frame.Value
}

BatchQuery spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L452

func (*BatchQuery) WriteTo

func (q *BatchQuery) WriteTo(b *frame.Buffer, name bool)

type Execute

type Execute struct {
	ID          frame.Bytes
	Consistency frame.Consistency
	Options     frame.QueryOptions
}

Execute spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L403

func (*Execute) OpCode

func (*Execute) OpCode() frame.OpCode

func (*Execute) WriteTo

func (e *Execute) WriteTo(b *frame.Buffer)

type Options

type Options struct{}

Options spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L330

func (*Options) OpCode

func (*Options) OpCode() frame.OpCode

func (*Options) WriteTo

func (*Options) WriteTo(_ *frame.Buffer)

type Prepare

type Prepare struct {
	Query string
}

Prepare spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L394

func (*Prepare) OpCode

func (*Prepare) OpCode() frame.OpCode

func (*Prepare) WriteTo

func (p *Prepare) WriteTo(b *frame.Buffer)

type Query

type Query struct {
	Query       string
	Consistency frame.Consistency
	Options     frame.QueryOptions
}

Query spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L337

func (*Query) OpCode

func (*Query) OpCode() frame.OpCode

func (*Query) WriteTo

func (q *Query) WriteTo(b *frame.Buffer)

type Register

type Register struct {
	EventTypes []frame.EventType
}

Register spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L477

func (*Register) OpCode

func (*Register) OpCode() frame.OpCode

func (*Register) WriteTo

func (r *Register) WriteTo(b *frame.Buffer)

type Startup

type Startup struct {
	Options frame.StartupOptions
}

Startup spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L285

func (*Startup) OpCode

func (*Startup) OpCode() frame.OpCode

func (*Startup) WriteTo

func (s *Startup) WriteTo(b *frame.Buffer)

Jump to

Keyboard shortcuts

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