Documentation ¶
Index ¶
- type APILabels
- type Config
- type Handler
- func (s *Handler) AddCluster(ctx context.Context, req *api.AddClusterRequest) (*api.Cluster, error)
- func (s *Handler) AssumeRole(ctx context.Context, req *api.AssumeRoleRequest) (*api.EmptyResponse, error)
- func (s *Handler) CreateAccessRequest(ctx context.Context, req *api.CreateAccessRequestRequest) (*api.CreateAccessRequestResponse, error)
- func (s *Handler) CreateGateway(ctx context.Context, req *api.CreateGatewayRequest) (*api.Gateway, error)
- func (s *Handler) DeleteAccessRequest(ctx context.Context, req *api.DeleteAccessRequestRequest) (*api.EmptyResponse, error)
- func (s *Handler) GetAccessRequest(ctx context.Context, req *api.GetAccessRequestRequest) (*api.GetAccessRequestResponse, error)
- func (s *Handler) GetAccessRequests(ctx context.Context, req *api.GetAccessRequestsRequest) (*api.GetAccessRequestsResponse, error)
- func (s *Handler) GetAllDatabases(ctx context.Context, req *api.GetAllDatabasesRequest) (*api.GetAllDatabasesResponse, error)
- func (s *Handler) GetAllKubes(ctx context.Context, req *api.GetAllKubesRequest) (*api.GetAllKubesResponse, error)
- func (s *Handler) GetAllServers(ctx context.Context, req *api.GetAllServersRequest) (*api.GetAllServersResponse, error)
- func (s *Handler) GetAuthSettings(ctx context.Context, req *api.GetAuthSettingsRequest) (*api.AuthSettings, error)
- func (s *Handler) GetCluster(ctx context.Context, req *api.GetClusterRequest) (*api.Cluster, error)
- func (s *Handler) GetDatabases(ctx context.Context, req *api.GetDatabasesRequest) (*api.GetDatabasesResponse, error)
- func (s *Handler) GetKubes(ctx context.Context, req *api.GetKubesRequest) (*api.GetKubesResponse, error)
- func (s *Handler) GetRequestableRoles(ctx context.Context, req *api.GetRequestableRolesRequest) (*api.GetRequestableRolesResponse, error)
- func (s *Handler) GetServers(ctx context.Context, req *api.GetServersRequest) (*api.GetServersResponse, error)
- func (s *Handler) ListApps(ctx context.Context, req *api.ListAppsRequest) (*api.ListAppsResponse, error)
- func (s *Handler) ListDatabaseUsers(ctx context.Context, req *api.ListDatabaseUsersRequest) (*api.ListDatabaseUsersResponse, error)
- func (s *Handler) ListGateways(ctx context.Context, req *api.ListGatewaysRequest) (*api.ListGatewaysResponse, error)
- func (s *Handler) ListLeafClusters(ctx context.Context, req *api.ListLeafClustersRequest) (*api.ListClustersResponse, error)
- func (s *Handler) ListRootClusters(ctx context.Context, r *api.ListClustersRequest) (*api.ListClustersResponse, error)
- func (s *Handler) Login(ctx context.Context, req *api.LoginRequest) (*api.EmptyResponse, error)
- func (s *Handler) LoginPasswordless(stream api.TerminalService_LoginPasswordlessServer) error
- func (s *Handler) Logout(ctx context.Context, req *api.LogoutRequest) (*api.EmptyResponse, error)
- func (s *Handler) RemoveCluster(ctx context.Context, req *api.RemoveClusterRequest) (*api.EmptyResponse, error)
- func (s *Handler) RemoveGateway(ctx context.Context, req *api.RemoveGatewayRequest) (*api.EmptyResponse, error)
- func (s *Handler) RestartGateway(ctx context.Context, req *api.RestartGatewayRequest) (*api.EmptyResponse, error)
- func (s *Handler) ReviewAccessRequest(ctx context.Context, req *api.ReviewAccessRequestRequest) (*api.ReviewAccessRequestResponse, error)
- func (s *Handler) SetGatewayLocalPort(ctx context.Context, req *api.SetGatewayLocalPortRequest) (*api.Gateway, error)
- func (s *Handler) SetGatewayTargetSubresourceName(ctx context.Context, req *api.SetGatewayTargetSubresourceNameRequest) (*api.Gateway, error)
- func (s *Handler) TransferFile(request *api.FileTransferRequest, ...) error
- func (h *Handler) UpdateTshdEventsServerAddress(ctx context.Context, req *api.UpdateTshdEventsServerAddressRequest) (*api.UpdateTshdEventsServerAddressResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DaemonService is the instance of daemon service DaemonService *daemon.Service }
Config is the terminal service configuration
func (*Config) CheckAndSetDefaults ¶
CheckAndSetDefaults checks and sets the defaults
type Handler ¶
type Handler struct { // Config is the service config Config }
Handler implements teleterm api service
func (*Handler) AddCluster ¶
AddCluster creates a new cluster
func (*Handler) AssumeRole ¶
func (s *Handler) AssumeRole(ctx context.Context, req *api.AssumeRoleRequest) (*api.EmptyResponse, error)
AssumeRole reissues a certificate. This can include new RequestIds and RequestIds to drop from the cert at the same time.
func (*Handler) CreateAccessRequest ¶
func (s *Handler) CreateAccessRequest(ctx context.Context, req *api.CreateAccessRequestRequest) (*api.CreateAccessRequestResponse, error)
CreateAccessRequest creates an Access Request.
func (*Handler) CreateGateway ¶
func (s *Handler) CreateGateway(ctx context.Context, req *api.CreateGatewayRequest) (*api.Gateway, error)
CreateGateway creates a gateway
func (*Handler) DeleteAccessRequest ¶
func (s *Handler) DeleteAccessRequest(ctx context.Context, req *api.DeleteAccessRequestRequest) (*api.EmptyResponse, error)
DeleteAccessRequest deletes an Access Request.
func (*Handler) GetAccessRequest ¶
func (s *Handler) GetAccessRequest(ctx context.Context, req *api.GetAccessRequestRequest) (*api.GetAccessRequestResponse, error)
GetAccessRequest returns a single access request by id.
func (*Handler) GetAccessRequests ¶
func (s *Handler) GetAccessRequests(ctx context.Context, req *api.GetAccessRequestsRequest) (*api.GetAccessRequestsResponse, error)
GetAccessRequests returns a list of all available access requests the user can view.
func (*Handler) GetAllDatabases ¶
func (s *Handler) GetAllDatabases(ctx context.Context, req *api.GetAllDatabasesRequest) (*api.GetAllDatabasesResponse, error)
GetAllDatabases gets all databases with no pagination
func (*Handler) GetAllKubes ¶
func (s *Handler) GetAllKubes(ctx context.Context, req *api.GetAllKubesRequest) (*api.GetAllKubesResponse, error)
GetAllKubes lists kubernetes clusters
func (*Handler) GetAllServers ¶
func (s *Handler) GetAllServers(ctx context.Context, req *api.GetAllServersRequest) (*api.GetAllServersResponse, error)
GetAllServers returns a full list of nodes without pagination or sorting.
func (*Handler) GetAuthSettings ¶
func (s *Handler) GetAuthSettings(ctx context.Context, req *api.GetAuthSettingsRequest) (*api.AuthSettings, error)
GetAuthSettings returns cluster auth preferences
func (*Handler) GetCluster ¶
GetCluster returns a cluster
func (*Handler) GetDatabases ¶
func (s *Handler) GetDatabases(ctx context.Context, req *api.GetDatabasesRequest) (*api.GetDatabasesResponse, error)
GetDatabases gets databses with filters and returns paginated results
func (*Handler) GetKubes ¶
func (s *Handler) GetKubes(ctx context.Context, req *api.GetKubesRequest) (*api.GetKubesResponse, error)
GetKubes accepts parameterized input to enable searching, sorting, and pagination
func (*Handler) GetRequestableRoles ¶
func (s *Handler) GetRequestableRoles(ctx context.Context, req *api.GetRequestableRolesRequest) (*api.GetRequestableRolesResponse, error)
func (*Handler) GetServers ¶
func (s *Handler) GetServers(ctx context.Context, req *api.GetServersRequest) (*api.GetServersResponse, error)
GetServers accepts parameterized input to enable searching, sorting, and pagination
func (*Handler) ListApps ¶
func (s *Handler) ListApps(ctx context.Context, req *api.ListAppsRequest) (*api.ListAppsResponse, error)
ListApps lists cluster applications
func (*Handler) ListDatabaseUsers ¶
func (s *Handler) ListDatabaseUsers(ctx context.Context, req *api.ListDatabaseUsersRequest) (*api.ListDatabaseUsersResponse, error)
ListDatabaseUsers is used to list database user suggestions when the user is attempting to establish a connection to a database through Teleterm.
The list is based on whatever we can deduce from the role set, so it's similar to the behavior of `tsh db ls -v`, with the exception that Teleterm is interested only in the allowed usernames.
func (*Handler) ListGateways ¶
func (s *Handler) ListGateways(ctx context.Context, req *api.ListGatewaysRequest) (*api.ListGatewaysResponse, error)
ListGateways lists all gateways
func (*Handler) ListLeafClusters ¶
func (s *Handler) ListLeafClusters(ctx context.Context, req *api.ListLeafClustersRequest) (*api.ListClustersResponse, error)
ListLeafClusters lists leaf clusters
func (*Handler) ListRootClusters ¶
func (s *Handler) ListRootClusters(ctx context.Context, r *api.ListClustersRequest) (*api.ListClustersResponse, error)
ListRootClusters lists root clusters
func (*Handler) Login ¶
func (s *Handler) Login(ctx context.Context, req *api.LoginRequest) (*api.EmptyResponse, error)
Login logs in a user to a cluster
func (*Handler) LoginPasswordless ¶
func (s *Handler) LoginPasswordless(stream api.TerminalService_LoginPasswordlessServer) error
LoginPasswordless logs in a user to a cluster passwordlessly.
func (*Handler) Logout ¶
func (s *Handler) Logout(ctx context.Context, req *api.LogoutRequest) (*api.EmptyResponse, error)
Logout logs a user out from a cluster
func (*Handler) RemoveCluster ¶
func (s *Handler) RemoveCluster(ctx context.Context, req *api.RemoveClusterRequest) (*api.EmptyResponse, error)
RemoveCluster removes a cluster from local system
func (*Handler) RemoveGateway ¶
func (s *Handler) RemoveGateway(ctx context.Context, req *api.RemoveGatewayRequest) (*api.EmptyResponse, error)
RemoveGateway removes cluster gateway
func (*Handler) RestartGateway ¶
func (s *Handler) RestartGateway(ctx context.Context, req *api.RestartGatewayRequest) (*api.EmptyResponse, error)
RestartGateway stops a gateway and starts a new with identical parameters but fresh certs, keeping the original URI.
func (*Handler) ReviewAccessRequest ¶
func (s *Handler) ReviewAccessRequest(ctx context.Context, req *api.ReviewAccessRequestRequest) (*api.ReviewAccessRequestResponse, error)
ReviewAccessRequest creates a new AccessRequestReview for a given RequestId.
func (*Handler) SetGatewayLocalPort ¶
func (s *Handler) SetGatewayLocalPort(ctx context.Context, req *api.SetGatewayLocalPortRequest) (*api.Gateway, error)
SetGatewayLocalPort restarts the gateway under the new port without fetching new certs.
func (*Handler) SetGatewayTargetSubresourceName ¶
func (s *Handler) SetGatewayTargetSubresourceName(ctx context.Context, req *api.SetGatewayTargetSubresourceNameRequest) (*api.Gateway, error)
SetGatewayTargetSubresourceName changes the TargetSubresourceName field of gateway.Gateway and returns the updated version of gateway.Gateway.
In Connect this is used to update the db name of a db connection along with the CLI command.
func (*Handler) TransferFile ¶
func (s *Handler) TransferFile(request *api.FileTransferRequest, server api.TerminalService_TransferFileServer) error
func (*Handler) UpdateTshdEventsServerAddress ¶
func (h *Handler) UpdateTshdEventsServerAddress(ctx context.Context, req *api.UpdateTshdEventsServerAddressRequest) (*api.UpdateTshdEventsServerAddressResponse, error)