Documentation ¶
Index ¶
- func AutocompleteHost(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func CertToKeyStore(cert *x509.Certificate, key *rsa.PrivateKey) (ks keystore.KeyStore, pass []byte, err error)
- func ClientTokenFile(homedir string) string
- func EnterDBName(inputDBName, suggestedDBname string) (enteredDBName string, err error)
- func ExecCommand(name string, arg ...string) error
- func FetchCertAndReturnPaths(hostname string) (crtPath, keyPath string, socketPort int, err error)
- func FetchResource(token string, name string) (resource models.ClientResource, err error)
- func FetchResources(token string, filteredTypes ...string) (resources models.ClientResources, err error)
- func GetClientToken(homeDir string) (string, error)
- func GetOrgCert(hostname string) (*x509.Certificate, *rsa.PrivateKey, string, string, int, error)
- func GetSocketPort(name string, token string) (socketPort int, err error)
- func IsClientCertValid() (crtPath, keyPath string, valid bool)
- func IsExistingClientTokenValid(homeDir string) (valid bool, token, email string, err error)
- func Launch(url string, listener net.Listener) string
- func Login(orgID string) (token string, claims jwt.MapClaims, err error)
- func MTLSLogin(hostname string) (string, jwt.MapClaims, error)
- func MTLSTokenFile() string
- func MonWinCh(session *ssh.Session, fd uintptr)
- func OnInterruptDo(action func())
- func OrgIDFromToken() (orgID string)
- func PickHost(inputHost string, socketTypes ...string) (models.ClientResource, error)
- func PickResourceTypes(inputFilter string) (pickedTypes []string, err error)
- func ReadOrgCert(orgID string) (cert *x509.Certificate, key *rsa.PrivateKey, crtPath string, keyPath string, ...)
- func ReadTokenOrAskToLogIn() (token string, err error)
- func TermSize(fd uintptr) []byte
- func ValidateClientToken(token string) (email string, claims jwt.MapClaims, err error)
- func WriteCertToFile(cert *CertificateResponse, socketDNS string) (crtPath, keyPath string, err error)
- func WriteKeyStore(ks keystore.KeyStore, filename string, password []byte)
- func Zeroing(buf []byte)
- type CertificateResponse
- type CertificateSigningRequest
- type SSHSignRequest
- type SSHSignResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutocompleteHost ¶
func CertToKeyStore ¶
func CertToKeyStore(cert *x509.Certificate, key *rsa.PrivateKey) (ks keystore.KeyStore, pass []byte, err error)
func ClientTokenFile ¶
func EnterDBName ¶
func ExecCommand ¶
func FetchCertAndReturnPaths ¶
func FetchResource ¶
func FetchResource(token string, name string) (resource models.ClientResource, err error)
func FetchResources ¶
func FetchResources(token string, filteredTypes ...string) (resources models.ClientResources, err error)
func GetClientToken ¶
func GetOrgCert ¶
func GetOrgCert(hostname string) (*x509.Certificate, *rsa.PrivateKey, string, string, int, error)
func IsClientCertValid ¶
func MTLSTokenFile ¶
func MTLSTokenFile() string
func MonWinCh ¶
MonWinCh watches for the system to signal a window resize and requests a window-change from the server.
func OnInterruptDo ¶
func OnInterruptDo(action func())
func OrgIDFromToken ¶
func OrgIDFromToken() (orgID string)
func PickHost ¶
func PickHost(inputHost string, socketTypes ...string) (models.ClientResource, error)
func PickResourceTypes ¶
func ReadOrgCert ¶
func ReadOrgCert(orgID string) (cert *x509.Certificate, key *rsa.PrivateKey, crtPath string, keyPath string, err error)
func ReadTokenOrAskToLogIn ¶
func TermSize ¶
TermSize gets the current window size and returns it in a window-change friendly format.
func ValidateClientToken ¶
func WriteCertToFile ¶
func WriteCertToFile(cert *CertificateResponse, socketDNS string) (crtPath, keyPath string, err error)
func WriteKeyStore ¶
Types ¶
type CertificateResponse ¶
type CertificateResponse struct { PrivateKey string `json:"client_private_key,omitempty"` Certificate string `json:"client_certificate,omitempty"` }
func GetCert ¶
func GetCert(token string, email string) *CertificateResponse
type CertificateSigningRequest ¶
type CertificateSigningRequest struct {
Csr string `json:"csr"`
}
type SSHSignRequest ¶
type SSHSignRequest struct {
SSHPublicKey string `json:"ssh_public_key"`
}
type SSHSignResponse ¶
type SSHSignResponse struct {
SSHCertSigned string `json:"signed_ssh_cert"`
}
func GenSSHKey ¶
func GenSSHKey(token, orgID, hostname string) (*SSHSignResponse, error)
Click to show internal directories.
Click to hide internal directories.