shared

package
v0.0.0-...-e70d3af Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AckRequestPrefix = "AckRequest--"
View Source
const BoundedParallelismLimit = 50

The maximum number of goroutines to create when doing parallel operations

View Source
const ConfigFilename = "kssh-client.config"

The name of the kssh client config file that is stored in KBFS

View Source
const SignatureRequestPreamble = "Signature_Request:"

The preamble used at the start of signature request messages

View Source
const SignatureResponsePreamble = "Signature_Response:"

The preamble used at the start of signature response messages

Variables

This section is empty.

Functions

func ExpandPathWithTilde

func ExpandPathWithTilde(path string) string

Expand out a path that starts with a tilde to be an absolute path

func GenerateAckRequest

func GenerateAckRequest(username string) string

Generate an AckRequest for the given username

func GenerateAckResponse

func GenerateAckResponse(ackRequest string) string

Generate an AckResponse in response to the given ack request

func IsAckRequest

func IsAckRequest(msg string) bool

Returns whether the given message is an ack request

func IsAckResponse

func IsAckResponse(msg string) bool

Returns whether the given message is an ack response

func KeyPathToCert

func KeyPathToCert(keyPath string) string

Returns the location of the signature associated with the given private key

func KeyPathToPubKey

func KeyPathToPubKey(keyPath string) string

Returns the location of the public key associated with the given private key

func PubKeyPathToKeyPath

func PubKeyPathToKeyPath(pubKeyPath string) string

Returns the location of the private key associated with the given public key

Types

type KBFSOperation

type KBFSOperation struct {
	KeybaseBinaryPath string
}

func (*KBFSOperation) KBFSDelete

func (ko *KBFSOperation) KBFSDelete(filename string) error

Delete the specified KBFS file

func (*KBFSOperation) KBFSFileExists

func (ko *KBFSOperation) KBFSFileExists(kbfsFilename string) (bool, error)

Returns whether the given KBFS file exists

func (*KBFSOperation) KBFSList

func (ko *KBFSOperation) KBFSList(path string) ([]string, error)

List KBFS files in the given KBFS path

func (*KBFSOperation) KBFSRead

func (ko *KBFSOperation) KBFSRead(kbfsFilename string) ([]byte, error)

Reads the specified KBFS file into a byte array

func (*KBFSOperation) KBFSWrite

func (ko *KBFSOperation) KBFSWrite(filename string, contents string, appendToFile bool) error

Write contents to the specified KBFS file. If appendToFile, appends onto the end of the file. Otherwise, overwrites and truncates the file.

type SignatureRequest

type SignatureRequest struct {
	SSHPublicKey     string `json:"ssh_public_key"`
	UUID             string `json:"uuid"`
	Username         string `json:"-"`
	DeviceName       string `json:"-"`
	RequestedAddress string `json:"requested_address"`
}

The body of signature request messages sent over KB chat

func ParseSignatureRequest

func ParseSignatureRequest(body string) (SignatureRequest, error)

Parse the given string as a serialized SignatureRequest

type SignatureResponse

type SignatureResponse struct {
	SignedKey string `json:"signed_key"`
	UUID      string `json:"uuid"`
}

The body of signature response messages sent over KB chat

func ParseSignatureResponse

func ParseSignatureResponse(body string) (SignatureResponse, error)

Parse the given string as a serialized SignatureResponse

Jump to

Keyboard shortcuts

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