noise

package module
v0.0.0-...-fa48a8f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 4 Imported by: 0

README

Noise

GoDoc Discord MIT licensed Build Status Go Report Card Coverage Statusd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Host      string
	Protocols []Protocol
}

func NewCredentials

func NewCredentials(host string, protocols ...Protocol) *Credentials

func (*Credentials) ClientHandshake

func (c *Credentials) ClientHandshake(
	ctx context.Context, authority string, conn net.Conn,
) (net.Conn, credentials.AuthInfo, error)

func (*Credentials) Clone

func (*Credentials) Info

func (*Credentials) OverrideServerName

func (c *Credentials) OverrideServerName(host string) error

func (*Credentials) ServerHandshake

func (c *Credentials) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error)

type Info

type Info map[string]interface{}

func InfoFromPeer

func InfoFromPeer(peer *peer.Peer) Info

func (Info) AuthType

func (Info) AuthType() string

func (Info) Bytes

func (i Info) Bytes(key string) []byte

func (Info) Get

func (i Info) Get(key string) interface{}

func (Info) Put

func (i Info) Put(key string, val interface{})

func (Info) PutBytes

func (i Info) PutBytes(key string, val []byte)

func (Info) PutString

func (i Info) PutString(key, val string)

func (Info) String

func (i Info) String(key string) string

type Protocol

type Protocol interface {
	Client(Info, context.Context, string, net.Conn) (net.Conn, error)
	Server(Info, net.Conn) (net.Conn, error)
}

Directories

Path Synopsis
Package ed25519 implements the Ed25519 signature algorithm.
Package ed25519 implements the Ed25519 signature algorithm.
examples

Jump to

Keyboard shortcuts

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