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) CreateConnectMyComputerNodeToken(ctx context.Context, req *api.CreateConnectMyComputerNodeTokenRequest) (*api.CreateConnectMyComputerNodeTokenResponse, error)
- func (s *Handler) CreateConnectMyComputerRole(ctx context.Context, req *api.CreateConnectMyComputerRoleRequest) (*api.CreateConnectMyComputerRoleResponse, 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) DeleteConnectMyComputerNode(ctx context.Context, req *api.DeleteConnectMyComputerNodeRequest) (*api.DeleteConnectMyComputerNodeResponse, 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) GetApps(ctx context.Context, req *api.GetAppsRequest) (*api.GetAppsResponse, 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) GetConnectMyComputerNodeName(ctx context.Context, req *api.GetConnectMyComputerNodeNameRequest) (*api.GetConnectMyComputerNodeNameResponse, 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) GetSuggestedAccessLists(ctx context.Context, req *api.GetSuggestedAccessListsRequest) (*api.GetSuggestedAccessListsResponse, error)
- func (s *Handler) GetUserPreferences(ctx context.Context, req *api.GetUserPreferencesRequest) (*api.GetUserPreferencesResponse, 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) ListUnifiedResources(ctx context.Context, req *api.ListUnifiedResourcesRequest) (*api.ListUnifiedResourcesResponse, 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) PromoteAccessRequest(ctx context.Context, req *api.PromoteAccessRequestRequest) (*api.PromoteAccessRequestResponse, 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 (h *Handler) ReportUsageEvent(ctx context.Context, req *api.ReportUsageEventRequest) (*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 (s *Handler) UpdateHeadlessAuthenticationState(ctx context.Context, req *api.UpdateHeadlessAuthenticationStateRequest) (*api.UpdateHeadlessAuthenticationStateResponse, error)
- func (h *Handler) UpdateTshdEventsServerAddress(ctx context.Context, req *api.UpdateTshdEventsServerAddressRequest) (*api.UpdateTshdEventsServerAddressResponse, error)
- func (s *Handler) UpdateUserPreferences(ctx context.Context, req *api.UpdateUserPreferencesRequest) (*api.UpdateUserPreferencesResponse, error)
- func (s *Handler) WaitForConnectMyComputerNodeJoin(ctx context.Context, req *api.WaitForConnectMyComputerNodeJoinRequest) (*api.WaitForConnectMyComputerNodeJoinResponse, 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 { api.UnimplementedTerminalServiceServer // 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) CreateConnectMyComputerNodeToken ¶
func (s *Handler) CreateConnectMyComputerNodeToken(ctx context.Context, req *api.CreateConnectMyComputerNodeTokenRequest) (*api.CreateConnectMyComputerNodeTokenResponse, error)
func (*Handler) CreateConnectMyComputerRole ¶
func (s *Handler) CreateConnectMyComputerRole(ctx context.Context, req *api.CreateConnectMyComputerRoleRequest) (*api.CreateConnectMyComputerRoleResponse, error)
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) DeleteConnectMyComputerNode ¶
func (s *Handler) DeleteConnectMyComputerNode(ctx context.Context, req *api.DeleteConnectMyComputerNodeRequest) (*api.DeleteConnectMyComputerNodeResponse, error)
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) GetApps ¶
func (s *Handler) GetApps(ctx context.Context, req *api.GetAppsRequest) (*api.GetAppsResponse, error)
GetApps gets apps with filters and returns paginated results
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) GetConnectMyComputerNodeName ¶
func (s *Handler) GetConnectMyComputerNodeName(ctx context.Context, req *api.GetConnectMyComputerNodeNameRequest) (*api.GetConnectMyComputerNodeNameResponse, error)
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) GetSuggestedAccessLists ¶
func (s *Handler) GetSuggestedAccessLists(ctx context.Context, req *api.GetSuggestedAccessListsRequest) (*api.GetSuggestedAccessListsResponse, error)
GetSuggestedAccessLists returns suggested access lists for an access request.
func (*Handler) GetUserPreferences ¶
func (s *Handler) GetUserPreferences(ctx context.Context, req *api.GetUserPreferencesRequest) (*api.GetUserPreferencesResponse, error)
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) ListUnifiedResources ¶
func (s *Handler) ListUnifiedResources(ctx context.Context, req *api.ListUnifiedResourcesRequest) (*api.ListUnifiedResourcesResponse, error)
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) PromoteAccessRequest ¶
func (s *Handler) PromoteAccessRequest(ctx context.Context, req *api.PromoteAccessRequestRequest) (*api.PromoteAccessRequestResponse, error)
PromoteAccessRequest promotes an access request to an access list.
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) ReportUsageEvent ¶
func (h *Handler) ReportUsageEvent(ctx context.Context, req *api.ReportUsageEventRequest) (*api.EmptyResponse, error)
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) UpdateHeadlessAuthenticationState ¶
func (s *Handler) UpdateHeadlessAuthenticationState(ctx context.Context, req *api.UpdateHeadlessAuthenticationStateRequest) (*api.UpdateHeadlessAuthenticationStateResponse, error)
UpdateHeadlessAuthenticationState logs in a user to a cluster
func (*Handler) UpdateTshdEventsServerAddress ¶
func (h *Handler) UpdateTshdEventsServerAddress(ctx context.Context, req *api.UpdateTshdEventsServerAddressRequest) (*api.UpdateTshdEventsServerAddressResponse, error)
func (*Handler) UpdateUserPreferences ¶
func (s *Handler) UpdateUserPreferences(ctx context.Context, req *api.UpdateUserPreferencesRequest) (*api.UpdateUserPreferencesResponse, error)
func (*Handler) WaitForConnectMyComputerNodeJoin ¶
func (s *Handler) WaitForConnectMyComputerNodeJoin(ctx context.Context, req *api.WaitForConnectMyComputerNodeJoinRequest) (*api.WaitForConnectMyComputerNodeJoinResponse, error)
Source Files ¶
- handler.go
- handler_access_requests.go
- handler_apps.go
- handler_auth.go
- handler_clusters.go
- handler_connectmycomputer.go
- handler_databases.go
- handler_file_transfer.go
- handler_gateways.go
- handler_headless.go
- handler_kubes.go
- handler_servers.go
- handler_tshd_events.go
- handler_unified_resources.go
- handler_usage_events.go
- handler_user_preferences.go