sasl

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MechPlain = "PLAIN"
)

SASL mechanism tokens

Variables

View Source
var (
	ErrUnexpectedClientResponse  = errors.New("sasl: unexpected client response")
	ErrUnexpectedServerChallenge = errors.New("sasl: unexpected server challenge")
)

Common SASL errors.

Functions

This section is empty.

Types

type Client

type Client interface {
	Start(mechlist []string) (mech string, initial []byte, done bool, err error)
	Step(challenge []byte) (response []byte, done bool, err error)
	Free()
}

Client is SASL client

func NewClient

func NewClient(opts *Options) Client

NewClient created new sasl client

type Mech

type Mech string

Mech is SASL mechanism token

type Options

type Options struct {
	Service  string
	Host     string
	Username string
	Password string
}

Options contains data related to SASL negotiation

type Status

type Status byte

Status is SASL negotiation status

const (
	StatusStart    Status = 1
	StatusOK       Status = 2
	StatusBad      Status = 3
	StatusError    Status = 4
	StatusComplete Status = 5
)

SASL negotiation statuses

type TSaslTransport

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

func NewTSaslTransport

func NewTSaslTransport(t thrift.TTransport, opts *Options) (*TSaslTransport, error)

func (*TSaslTransport) Close

func (t *TSaslTransport) Close() error

func (*TSaslTransport) Flush

func (t *TSaslTransport) Flush(ctx context.Context) error

func (*TSaslTransport) IsOpen

func (t *TSaslTransport) IsOpen() bool

func (*TSaslTransport) Open

func (t *TSaslTransport) Open() error

func (*TSaslTransport) Read

func (t *TSaslTransport) Read(buf []byte) (int, error)

func (*TSaslTransport) RemainingBytes

func (t *TSaslTransport) RemainingBytes() (num_bytes uint64)

func (*TSaslTransport) Write

func (t *TSaslTransport) Write(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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