Documentation ¶
Index ¶
- Constants
- func ConvertSystemError(err error) error
- func IsAccessDenied(e error) bool
- func IsAlreadyExists(e error) bool
- func IsBadParameter(e error) bool
- func IsCompareFailed(e error) bool
- func IsConnectionProblem(e error) bool
- func IsLimitExceeded(e error) bool
- func IsMissingParameter(e error) bool
- func IsNotFound(e error) bool
- func IsReadonly(e error) bool
- func IsSystemError(e error) bool
- type AccessDeniedError
- type AlreadyAcquiredError
- type AlreadyExistsError
- type BadParameterError
- type CompareFailedError
- type ConnectionProblemError
- type LimitExceededError
- type MissingParameterError
- type NotFoundError
- type ReadonlyError
- type Role
- type SystemError
Constants ¶
const ( // BoltBackendType is a BoltDB backend BoltBackendType = "bolt" // ETCDBackendType is etcd backend ETCDBackendType = "etcd" // Component indicates a component of teleport, used for logging Component = "component" // ComponentFields stores component-specific fields ComponentFields = "fields" // ComponentReverseTunnel is reverse tunnel agent and server // that together establish a bi-directional SSH revers tunnel // to bypass firewall restrictions ComponentReverseTunnel = "reversetunnel" // ComponentNode is SSH node (SSH server serving requests) ComponentNode = "node" // ComponentProxy is SSH proxy (SSH server forwarding connections) ComponentProxy = "proxy" // ComponentTunClient is a tunnel client ComponentTunClient = "tunclient" // DefaultTimeout sets read and wrie timeouts for SSH server ops DefaultTimeout time.Duration = 30 * time.Second // DebugOutputEnvVar tells tests to use verbose debug output DebugOutputEnvVar = "TELEPORT_DEBUG_TESTS" )
const ForeverTTL time.Duration = 0
ForeverTTL means that object TTL will not expire unless deleted
Variables ¶
This section is empty.
Functions ¶
func ConvertSystemError ¶
ConvertSystemError converts system error to appropriate teleport error if it is possible, otherwise, returns original error
func IsAccessDenied ¶
IsAccessDenied detects if this error is of AccessDeniedError
func IsAlreadyExists ¶
IsAlreadyExists returns if this is error indicating that object already exists
func IsBadParameter ¶
IsBadParameter detects if this error is of BadParameter kind
func IsCompareFailed ¶
IsCompareFailed detects if this error is of CompareFailed kind
func IsConnectionProblem ¶
IsConnectionProblem detects if this error is of ConnectionProblemError
func IsLimitExceeded ¶
IsLimitExceeded detects if this error is of LimitExceededError
func IsMissingParameter ¶
IsMissingParameter detects if this error is of MissingParameter kind
func IsNotFound ¶
IsNotFound returns whether this error indicates that the object is not found
func IsReadonly ¶
IsReadonly detects if this error is of ReadonlyError
func IsSystemError ¶
IsSystemError returns if this is a system error
Types ¶
type AccessDeniedError ¶
AccessDeniedError indicates denied access
func AccessDenied ¶
func AccessDenied(message string) *AccessDeniedError
AccessDenied returns new access denied error
func (*AccessDeniedError) Error ¶
func (e *AccessDeniedError) Error() string
Error is debug - friendly error message
func (*AccessDeniedError) IsAccessDeniedError ¶
func (e *AccessDeniedError) IsAccessDeniedError() bool
IsAccessDeniedError indicates that this error is of AccessDenied type
func (*AccessDeniedError) OrigError ¶
func (e *AccessDeniedError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type AlreadyAcquiredError ¶
AlreadyAcquiredError is returned when lock has been acquired
func (*AlreadyAcquiredError) Error ¶
func (e *AlreadyAcquiredError) Error() string
Error returns log friendly description
func (*AlreadyAcquiredError) IsAlreadyAcquiredError ¶
func (e *AlreadyAcquiredError) IsAlreadyAcquiredError() bool
IsAlreadyAcquiredError returns true to indicate that this is AlreadyAcquiredError
func (*AlreadyAcquiredError) OrigError ¶
func (e *AlreadyAcquiredError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type AlreadyExistsError ¶
type AlreadyExistsError struct { trace.Traces `json:"traces"` // Message is user-friendly error message Message string `json:"message"` }
AlreadyExistsError indicates that there's a duplicate object that already exists in the storage/system
func AlreadyExists ¶
func AlreadyExists(message string) *AlreadyExistsError
AlreadyExists returns new AlreadyExists error
func (*AlreadyExistsError) Error ¶
func (n *AlreadyExistsError) Error() string
Error returns log-friendly error description
func (AlreadyExistsError) IsAlreadyExistsError ¶
func (AlreadyExistsError) IsAlreadyExistsError() bool
IsAlreadyExistsError indicates that this error is of AlreadyExists kind
func (*AlreadyExistsError) OrigError ¶
func (e *AlreadyExistsError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type BadParameterError ¶
type BadParameterError struct { trace.Traces Param string `json:"param"` Err string `json:"message"` }
BadParameterError indicates that something is wrong with passed parameter to API method
func BadParameter ¶
func BadParameter(name, message string) *BadParameterError
BadParameter returns a new instance of BadParameterError
func (*BadParameterError) Error ¶
func (b *BadParameterError) Error() string
Error returrns debug friendly message
func (*BadParameterError) IsBadParameterError ¶
func (b *BadParameterError) IsBadParameterError() bool
IsBadParameterError indicates that error is of bad parameter type
func (*BadParameterError) OrigError ¶
func (b *BadParameterError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type CompareFailedError ¶
type CompareFailedError struct { trace.Traces // Message is user-friendly error message Message string `json:"message"` }
CompareFailedError indicates that compare failed (e.g wrong password or hash)
func (*CompareFailedError) Error ¶
func (e *CompareFailedError) Error() string
Error is debug - friendly message
func (*CompareFailedError) IsCompareFailedError ¶
func (e *CompareFailedError) IsCompareFailedError() bool
IsCompareFailedError indicates that this is compare failed error
func (*CompareFailedError) OrigError ¶
func (e *CompareFailedError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type ConnectionProblemError ¶
type ConnectionProblemError struct { trace.Traces Message string `json:"message"` Err error `json:"-"` }
ConnectionProblemError indicates any network error that has occured
func ConnectionProblem ¶
func ConnectionProblem(message string, err error) *ConnectionProblemError
ConnectionProblem returns ConnectionProblem
func (*ConnectionProblemError) Error ¶
func (c *ConnectionProblemError) Error() string
Error is debug - friendly error message
func (*ConnectionProblemError) IsConnectionProblemError ¶
func (c *ConnectionProblemError) IsConnectionProblemError() bool
IsConnectionProblemError indicates that this error is of ConnectionProblem
func (*ConnectionProblemError) OrigError ¶
func (c *ConnectionProblemError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type LimitExceededError ¶
LimitExceededError indicates rate limit or connection limit problem
func LimitExceeded ¶
func LimitExceeded(message string) *LimitExceededError
LimitExceeded returns new limit exceeded error
func (*LimitExceededError) Error ¶
func (c *LimitExceededError) Error() string
Error is debug - friendly error message
func (*LimitExceededError) IsLimitExceededError ¶
func (c *LimitExceededError) IsLimitExceededError() bool
IsLimitExceededError indicates that this error is of ConnectionProblem
func (*LimitExceededError) OrigError ¶
func (c *LimitExceededError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type MissingParameterError ¶
type MissingParameterError struct { trace.Traces `json:"traces"` // Param is the name of the missing parameter Param string }
MissingParameterError indicates that one of the parameters was missing
func (*MissingParameterError) Error ¶
func (m *MissingParameterError) Error() string
Error returns log-friendly description of the error
func (*MissingParameterError) IsMissingParameterError ¶
func (m *MissingParameterError) IsMissingParameterError() bool
IsMissingParameterError indicates that this error is of MissingParameter type
func (*MissingParameterError) OrigError ¶
func (e *MissingParameterError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type NotFoundError ¶
NotFoundError indicates that object has not been found
func NotFound ¶
func NotFound(message string) *NotFoundError
NotFound returns new instance of not found error
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error returns log friendly description of an error
func (*NotFoundError) IsNotFoundError ¶
func (e *NotFoundError) IsNotFoundError() bool
IsNotFoundError returns true to indicate that is NotFoundError
func (*NotFoundError) OrigError ¶
func (e *NotFoundError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type ReadonlyError ¶
ReadonlyError indicates that some backend can only read, not write
func (*ReadonlyError) Error ¶
func (e *ReadonlyError) Error() string
Error is debug - friendly error message
func (*ReadonlyError) IsReadonlyError ¶
func (e *ReadonlyError) IsReadonlyError() bool
IsReadonlyError indicates that this error is of Readonly type
func (*ReadonlyError) OrigError ¶
func (e *ReadonlyError) OrigError() error
OrigError returns original error (in this case this is the error itself)
type Role ¶ added in v1.0.0
type Role string
Role identifies the role of SSH server connection
const ( // RoleAuth is for teleport auth server (authority, authentication and authorization) RoleAuth Role = "Auth" // RoleUser is a role for teleport SSH user RoleUser Role = "User" // RoleWeb is for web access users RoleWeb Role = "Web" // RoleNode is a role for SSH node in the cluster RoleNode Role = "Node" // RoleProxy is a role for SSH proxy in the cluster RoleProxy Role = "Proxy" // RoleAdmin is admin role RoleAdmin Role = "Admin" // RoleProvisionToken is a role for nodes authenticated using provisioning tokens RoleProvisionToken Role = "ProvisionToken" // RoleSignup is for first time signing up users RoleSignup Role = "Signup" )
type SystemError ¶
type SystemError struct { trace.Traces `json:"traces"` // Message is user-friendly error message Message string `json:"message"` Code syscall.Errno `json:"code"` }
SystemError is the error raised by Operating system usually contains error code returned by linux API
func NewSystemError ¶
func NewSystemError(code syscall.Errno, message string) *SystemError
NewSystemError returns a new system error
func (*SystemError) Error ¶
func (s *SystemError) Error() string
Error returns log-friendly error description
func (SystemError) IsSystemError ¶
func (SystemError) IsSystemError() bool
IsSystemError indicates that this error is of system error kind
func (*SystemError) OrigError ¶
func (s *SystemError) OrigError() error
OrigError returns original error (in this case this is the error itself)
Directories ¶
Path | Synopsis |
---|---|
lib
|
|
backend
Package backend represents interface for accessing local or remote storage Copyright 2015 Gravitational, Inc.
|
Package backend represents interface for accessing local or remote storage Copyright 2015 Gravitational, Inc. |
backend/boltbk
Package boltbk implements BoltDB backed backend for standalone instances and test mode, you should use Etcd in production Copyright 2015 Gravitational, Inc.
|
Package boltbk implements BoltDB backed backend for standalone instances and test mode, you should use Etcd in production Copyright 2015 Gravitational, Inc. |
backend/etcdbk
Package etcdbk implements Etcd powered backend
|
Package etcdbk implements Etcd powered backend |
backend/test
Package test contains a backend acceptance test suite that is backend implementation independant each backend will use the suite to test itself
|
Package test contains a backend acceptance test suite that is backend implementation independant each backend will use the suite to test itself |
defaults
Package defaults contains default constants set in various parts of teleport codebase
|
Package defaults contains default constants set in various parts of teleport codebase |
events
Package events contains structured events emitted by various parts of teleport, they are collected by auth server for audit purposes Package events implements stored event log used for audit and other purposes
|
Package events contains structured events emitted by various parts of teleport, they are collected by auth server for audit purposes Package events implements stored event log used for audit and other purposes |
events/test
Package test contains a log backend acceptance test suite that is implementation independant each backend will use the suite to test itself
|
Package test contains a log backend acceptance test suite that is implementation independant each backend will use the suite to test itself |
httplib
Package httplib implements common utility functions for writing classic HTTP handlers
|
Package httplib implements common utility functions for writing classic HTTP handlers |
limiter
Package limiter implements connection and rate limiters for teleport
|
Package limiter implements connection and rate limiters for teleport |
recorder
Package recorder implements session recorder - it captures all the output that can be later replayed in terminals
|
Package recorder implements session recorder - it captures all the output that can be later replayed in terminals |
reversetunnel
Package reversetunnel sets up persistent reverse tunnel between remote site and teleport proxy, when site agents dial to teleport proxy's socket and teleport proxy can connect to any server through this tunnel.
|
Package reversetunnel sets up persistent reverse tunnel between remote site and teleport proxy, when site agents dial to teleport proxy's socket and teleport proxy can connect to any server through this tunnel. |
service
Package service implements teleport running service, takes care of initialization, cleanup and shutdown procedures Copyright 2015 Gravitational, Inc.
|
Package service implements teleport running service, takes care of initialization, cleanup and shutdown procedures Copyright 2015 Gravitational, Inc. |
services
Package services implements statefule services provided by teleport, like certificate authority management, user and web sessions, events and logs Copyright 2015 Gravitational, Inc.
|
Package services implements statefule services provided by teleport, like certificate authority management, user and web sessions, events and logs Copyright 2015 Gravitational, Inc. |
session
Package session is used for bookeeping of SSH interactive sessions that happen in realtime across the teleport cluster
|
Package session is used for bookeeping of SSH interactive sessions that happen in realtime across the teleport cluster |
sshutils/scp
Package scp handles file uploads and downloads via scp command
|
Package scp handles file uploads and downloads via scp command |
web
Package web implements web proxy handler that provides web interface to view and connect to teleport nodes
|
Package web implements web proxy handler that provides web interface to view and connect to teleport nodes |
tool
|
|