Version: v2.1.0+incompatible Latest Latest

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 8 Imported by: 9




View Source
const (
	MechPlain = "PLAIN"

SASL mechanism tokens


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

Common SASL errors.


This section is empty.


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)

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL