auth

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2014 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WriterUser = `w`
	ReaderUser = `r`
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(user, address string, privateKey []byte) (*client, error)

func NewServer

func NewServer(b backend.Backend, c crypto.Crypter, hostKey ssh.Signer) *server

func NotAnAuthority

func NotAnAuthority(auth ssh.PublicKey) bool

NotAuthority is intended to be used in conjunction with an SSH CertChecker in order to indicate that we are not accepting any certificate as an authority.

func SerializeKey

func SerializeKey(key ssh.PublicKey) string

func UnpackMessage

func UnpackMessage(message []byte) ([]string, error)

Types

type Client

type Client interface {
	Run(command string) (string, error)
	Close() error
}

type Server

type Server interface {
	AddReadKey(key ssh.PublicKey)
	AddWriteKey(key ssh.PublicKey)
	ListenAndServe(address string) error
	Stop() error
}

type ServerError

type ServerError struct {
	Err string
}

func (ServerError) Error

func (e ServerError) Error() string

Jump to

Keyboard shortcuts

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