Documentation ¶
Index ¶
- Constants
- func CanRoleReadTeam(role keybase1.TeamRole) bool
- func ExpandPathWithTilde(path string) string
- func GenerateAckRequest(username string) string
- func GenerateAckResponse(ackRequest string) string
- func GeneratePingRequest(username string) string
- func GeneratePingResponse(username string) string
- func GetAllTeams(api *kbchat.API) (teams []string, err error)
- func IsAckRequest(msg string) bool
- func IsAckResponse(msg string) bool
- func IsPingRequest(msg, botUsername string) bool
- func IsPingResponse(msg, localUsername string) bool
- func KeyPathToCert(keyPath string) string
- func KeyPathToPubKey(keyPath string) string
- func PubKeyPathToKeyPath(pubKeyPath string) string
- type SignatureRequest
- type SignatureResponse
Constants ¶
const AckRequestPrefix = "AckRequest--"
const SSHCAConfigKey = "kssh_config"
The name of the KV store entry key for the kssh client config
const SSHCANamespace = "__sshca"
The name of the KV store namespace for all bot-sshca-related data
const SignatureRequestPreamble = "Signature_Request:"
The preamble used at the start of signature request messages
const SignatureResponsePreamble = "Signature_Response:"
The preamble used at the start of signature response messages
Variables ¶
This section is empty.
Functions ¶
func CanRoleReadTeam ¶
CanRoleReadTeam checks if given role can access team data. User has to be an actual team member (not implicit admin) to be able to access data, and cannot be a RESTRICTED BOT.
func ExpandPathWithTilde ¶
Expand out a path that starts with a tilde to be an absolute path
func GenerateAckRequest ¶
Generate an AckRequest for the given username
func GenerateAckResponse ¶
Generate an AckResponse in response to the given ack request
func GeneratePingRequest ¶
Generate a ping request message
func GeneratePingResponse ¶
Generate a ping response message
func GetAllTeams ¶
GetAllTeams makes an API call and returns list of team names readable for current user.
func IsAckRequest ¶
Returns whether the given message is an ack request
func IsAckResponse ¶
Returns whether the given message is an ack response
func IsPingRequest ¶
Returns whether the given message is a ping request
func IsPingResponse ¶
Returns whether the given message is a ping response
func KeyPathToCert ¶
Returns the location of the signature associated with the given private key
func KeyPathToPubKey ¶
Returns the location of the public key associated with the given private key
func PubKeyPathToKeyPath ¶
Returns the location of the private key associated with the given public key
Types ¶
type SignatureRequest ¶
type SignatureRequest struct { SSHPublicKey string `json:"ssh_public_key"` UUID string `json:"uuid"` Username string `json:"-"` DeviceName string `json:"-"` }
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 ¶
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