Documentation
¶
Index ¶
- Constants
- func BadRequest(w http.ResponseWriter, req *http.Request, log logging.Logger, err error)
- func DeleteConfigurationHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func DeleteCredentialHandlerFunc(log logging.Logger) http.HandlerFunc
- func DeleteDeploymentHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func DeleteIntegrationRequestFuncHandler(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetAccountHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
- func GetAccountsHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
- func GetActiveInterpretersHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetConfigFilesHandlerFunc(base util.AbsolutePath, filesService files.FilesService, log logging.Logger) http.HandlerFunc
- func GetConfigSecretsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetConfigurationHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetConfigurationsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetConnectCloudAccountsFunc(log logging.Logger) http.HandlerFunc
- func GetCredentialHandlerFunc(log logging.Logger) http.HandlerFunc
- func GetCredentialsHandlerFunc(log logging.Logger, credserviceFactory credentials.CredServiceFactory) http.HandlerFunc
- func GetDeploymentEnvironmentHandlerFunc(base util.AbsolutePath, log logging.Logger, accountList accounts.AccountList) http.HandlerFunc
- func GetDeploymentHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetDeploymentsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetEntrypointsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetFileHandlerFunc(base util.AbsolutePath, filesService files.FilesService, ...) http.HandlerFunc
- func GetIntegrationRequestsFuncHandler(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func GetIntegrationsHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
- func GetServerSettingsHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
- func GetSnowflakeConnectionsHandlerFunc(log logging.Logger, connections snowflake.Connections) http.HandlerFunc
- func InternalError(w http.ResponseWriter, req *http.Request, log logging.Logger, err error)
- func InterpretersFromRequest(base util.AbsolutePath, w http.ResponseWriter, req *http.Request, ...) (interpreters.RInterpreter, interpreters.PythonInterpreter, error)
- func JsonResult(w http.ResponseWriter, status int, result any)
- func NewGetConfigPythonPackagesHandler(base util.AbsolutePath, log logging.Logger) *getConfigPythonPackagesHandler
- func NewGetConfigRPackagesHandler(base util.AbsolutePath, log logging.Logger) *getConfigRPackagesHandler
- func NotFound(w http.ResponseWriter, log logging.Logger, err error)
- func PatchDeploymentHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func PostAccountVerifyHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
- func PostConfigFilesHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func PostConfigSecretsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func PostConnectCloudDeviceAuthHandlerFunc(log logging.Logger) http.HandlerFunc
- func PostConnectCloudOAuthTokenHandlerFunc(log logging.Logger) http.HandlerFunc
- func PostConnectTokenHandlerFunc(log logging.Logger) http.HandlerFunc
- func PostConnectTokenUserHandlerFunc(log logging.Logger) http.HandlerFunc
- func PostCredentialFuncHandler(log logging.Logger) http.HandlerFunc
- func PostDeploymentCancelHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func PostDeploymentHandlerFunc(base util.AbsolutePath, log logging.Logger, accountList accounts.AccountList, ...) http.HandlerFunc
- func PostDeploymentsHandlerFunc(base util.AbsolutePath, log logging.Logger, accountList accounts.AccountList) http.HandlerFunc
- func PostInspectHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func PostIntegrationRequestFuncHandler(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func PostTestCredentialsHandlerFunc(log logging.Logger) http.HandlerFunc
- func ProjectDirFromRequest(base util.AbsolutePath, w http.ResponseWriter, req *http.Request, ...) (util.AbsolutePath, util.RelativePath, error)
- func PutConfigurationHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
- func ResetCredentialsHandlerFunc(log logging.Logger, credserviceFactory credentials.CredServiceFactory) http.HandlerFunc
- func RouterHandlerFunc(base util.AbsolutePath, lister accounts.AccountList, log logging.Logger, ...) http.HandlerFunc
- func ToPath(elements ...string) string
- type DeleteIntegrationRequestRequest
- type GetIntegrationRequestsResponse
- type MockFilesService
- type MockPathsService
- type PatchDeploymentRequestBody
- type PostAccountVerifyResponse
- type PostConnectTokenRequest
- type PostConnectTokenResponse
- type PostCredentialsRequest
- type PostCredentialsResponse
- type PostDeploymentRequestBody
- type PostDeploymentsReponse
- type PostDeploymentsRequestBody
- type PostIntegrationRequestRequest
- type PostIntegrationRequestResponse
- type PostPackagesPythonScanHandler
- type PostPackagesPythonScanRequest
- type PostPackagesPythonScanResponse
- type PostPackagesRScanHandler
- type PostPackagesRScanRequest
- type PostTestCredentialsRequestBody
- type PostTestCredentialsResponseBody
- type Service
Constants ¶
const APIPrefix string = "api"
const DefaultTimeout = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func DeleteConfigurationHandlerFunc ¶
func DeleteConfigurationHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func DeleteCredentialHandlerFunc ¶
func DeleteCredentialHandlerFunc(log logging.Logger) http.HandlerFunc
func DeleteDeploymentHandlerFunc ¶
func DeleteDeploymentHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func DeleteIntegrationRequestFuncHandler ¶ added in v1.22.0
func DeleteIntegrationRequestFuncHandler(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetAccountHandlerFunc ¶
func GetAccountHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
GetAccountHandlerFunc returns a handler for the Get Account (by name) endpoint.
func GetAccountsHandlerFunc ¶
func GetAccountsHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
GetAccountsHandlerFunc returns a handler for the account list.
func GetActiveInterpretersHandlerFunc ¶ added in v1.12.0
func GetActiveInterpretersHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetConfigFilesHandlerFunc ¶
func GetConfigFilesHandlerFunc(base util.AbsolutePath, filesService files.FilesService, log logging.Logger) http.HandlerFunc
func GetConfigSecretsHandlerFunc ¶ added in v1.1.7
func GetConfigSecretsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetConfigurationHandlerFunc ¶
func GetConfigurationHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetConfigurationsHandlerFunc ¶
func GetConfigurationsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetConnectCloudAccountsFunc ¶ added in v1.18.1
func GetConnectCloudAccountsFunc(log logging.Logger) http.HandlerFunc
func GetCredentialHandlerFunc ¶
func GetCredentialHandlerFunc(log logging.Logger) http.HandlerFunc
func GetCredentialsHandlerFunc ¶
func GetCredentialsHandlerFunc(log logging.Logger, credserviceFactory credentials.CredServiceFactory) http.HandlerFunc
func GetDeploymentEnvironmentHandlerFunc ¶ added in v1.4.0
func GetDeploymentEnvironmentHandlerFunc(base util.AbsolutePath, log logging.Logger, accountList accounts.AccountList) http.HandlerFunc
func GetDeploymentHandlerFunc ¶
func GetDeploymentHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetDeploymentsHandlerFunc ¶
func GetDeploymentsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetEntrypointsHandlerFunc ¶ added in v1.1.5
func GetEntrypointsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetFileHandlerFunc ¶
func GetFileHandlerFunc(base util.AbsolutePath, filesService files.FilesService, pathsService paths.PathsService, log logging.Logger) http.HandlerFunc
func GetIntegrationRequestsFuncHandler ¶ added in v1.22.0
func GetIntegrationRequestsFuncHandler(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func GetIntegrationsHandlerFunc ¶ added in v1.22.0
func GetIntegrationsHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
func GetServerSettingsHandlerFunc ¶ added in v1.22.0
func GetServerSettingsHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
func GetSnowflakeConnectionsHandlerFunc ¶ added in v1.16.0
func GetSnowflakeConnectionsHandlerFunc(log logging.Logger, connections snowflake.Connections) http.HandlerFunc
GetSnowflakeConnectionsHandlerFunc responds with a list of Snowflake connections, derived from configuration files and environment variables, that can successfully authenticate to `serverUrl`.
A connection includes a name and a validated server URL.
func InternalError ¶
func InterpretersFromRequest ¶ added in v1.12.0
func InterpretersFromRequest( base util.AbsolutePath, w http.ResponseWriter, req *http.Request, log logging.Logger, ) ( interpreters.RInterpreter, interpreters.PythonInterpreter, error, )
func JsonResult ¶ added in v1.1.7
func JsonResult(w http.ResponseWriter, status int, result any)
func NewGetConfigPythonPackagesHandler ¶
func NewGetConfigPythonPackagesHandler(base util.AbsolutePath, log logging.Logger) *getConfigPythonPackagesHandler
func NewGetConfigRPackagesHandler ¶
func NewGetConfigRPackagesHandler(base util.AbsolutePath, log logging.Logger) *getConfigRPackagesHandler
func PatchDeploymentHandlerFunc ¶
func PatchDeploymentHandlerFunc( base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func PostAccountVerifyHandlerFunc ¶
func PostAccountVerifyHandlerFunc(lister accounts.AccountList, log logging.Logger) http.HandlerFunc
func PostConfigFilesHandlerFunc ¶
func PostConfigFilesHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func PostConfigSecretsHandlerFunc ¶ added in v1.1.7
func PostConfigSecretsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func PostConnectCloudDeviceAuthHandlerFunc ¶ added in v1.18.1
func PostConnectCloudDeviceAuthHandlerFunc(log logging.Logger) http.HandlerFunc
func PostConnectCloudOAuthTokenHandlerFunc ¶ added in v1.18.1
func PostConnectCloudOAuthTokenHandlerFunc(log logging.Logger) http.HandlerFunc
func PostConnectTokenHandlerFunc ¶ added in v1.19.0
func PostConnectTokenHandlerFunc(log logging.Logger) http.HandlerFunc
PostConnectTokenHandlerFunc creates a handler for the POST /api/connect/token endpoint This endpoint generates a new token for Connect authentication and returns the token along with a claim URL for browser-based authentication
func PostConnectTokenUserHandlerFunc ¶ added in v1.19.0
func PostConnectTokenUserHandlerFunc(log logging.Logger) http.HandlerFunc
PostConnectTokenUserHandlerFunc creates a handler for the POST /api/connect/token/user endpoint This endpoint checks if a token has been claimed and returns the user information
func PostCredentialFuncHandler ¶
func PostCredentialFuncHandler(log logging.Logger) http.HandlerFunc
func PostDeploymentCancelHandlerFunc ¶ added in v1.10.0
func PostDeploymentCancelHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func PostDeploymentHandlerFunc ¶
func PostDeploymentHandlerFunc( base util.AbsolutePath, log logging.Logger, accountList accounts.AccountList, emitter events.Emitter) http.HandlerFunc
func PostDeploymentsHandlerFunc ¶
func PostDeploymentsHandlerFunc( base util.AbsolutePath, log logging.Logger, accountList accounts.AccountList) http.HandlerFunc
func PostInspectHandlerFunc ¶
func PostInspectHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func PostIntegrationRequestFuncHandler ¶ added in v1.22.0
func PostIntegrationRequestFuncHandler(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func PostTestCredentialsHandlerFunc ¶
func PostTestCredentialsHandlerFunc(log logging.Logger) http.HandlerFunc
func ProjectDirFromRequest ¶
func ProjectDirFromRequest(base util.AbsolutePath, w http.ResponseWriter, req *http.Request, log logging.Logger) (util.AbsolutePath, util.RelativePath, error)
ProjectDirFromRequest returns the project directory from the request query parameter "dir". If the directory does not exist, it returns a 404. If the directory is not a subdirectory of the base directory, it returns a 400. Other errors return a 500.
func PutConfigurationHandlerFunc ¶
func PutConfigurationHandlerFunc(base util.AbsolutePath, log logging.Logger) http.HandlerFunc
func ResetCredentialsHandlerFunc ¶ added in v1.8.0
func ResetCredentialsHandlerFunc(log logging.Logger, credserviceFactory credentials.CredServiceFactory) http.HandlerFunc
func RouterHandlerFunc ¶
func RouterHandlerFunc(base util.AbsolutePath, lister accounts.AccountList, log logging.Logger, eventServer *sse.Server, emitter events.Emitter) http.HandlerFunc
Types ¶
type DeleteIntegrationRequestRequest ¶ added in v1.22.0
type DeleteIntegrationRequestRequest = config.IntegrationRequest
type GetIntegrationRequestsResponse ¶ added in v1.22.0
type GetIntegrationRequestsResponse = config.IntegrationRequest
type MockFilesService ¶
type MockFilesService struct { mock.Mock files.FilesService }
func (*MockFilesService) GetFile ¶
func (m *MockFilesService) GetFile(p util.AbsolutePath, matchList matcher.MatchList) (*files.File, error)
type MockPathsService ¶
type MockPathsService struct { mock.Mock paths.PathsService }
func (*MockPathsService) IsSafe ¶
func (m *MockPathsService) IsSafe(p util.AbsolutePath) (bool, error)
type PostConnectTokenRequest ¶ added in v1.19.0
type PostConnectTokenRequest struct {
ServerURL string `json:"serverUrl"`
}
type PostConnectTokenResponse ¶ added in v1.19.0
type PostCredentialsRequest ¶
type PostCredentialsRequest struct { Name string `json:"name"` URL string `json:"url"` ServerType server_type.ServerType `json:"serverType"` // Connect fields ApiKey string `json:"apiKey"` // Snowflake fields SnowflakeConnection string `json:"snowflakeConnection"` // Connect Cloud fields AccountID string `json:"accountId"` AccountName string `json:"accountName"` RefreshToken string `json:"refreshToken"` AccessToken types.CloudAuthToken `json:"accessToken"` // Token authentication fields Token string `json:"token"` PrivateKey string `json:"privateKey"` }
type PostCredentialsResponse ¶
type PostCredentialsResponse = credentials.Credential
type PostDeploymentRequestBody ¶
type PostDeploymentRequestBody struct { AccountName string `json:"account"` ConfigName string `json:"config"` Secrets map[string]string `json:"secrets,omitempty"` Insecure bool `json:"insecure"` R string `json:"r"` Python string `json:"python"` Positron *positronSettings `json:"positron,omitempty"` }
type PostDeploymentsReponse ¶
type PostDeploymentsReponse struct {
LocalID state.LocalDeploymentID `json:"localId"` // Unique ID of this publishing operation. Only valid for this run of the agent.
}
type PostIntegrationRequestRequest ¶ added in v1.22.0
type PostIntegrationRequestRequest = config.IntegrationRequest
type PostIntegrationRequestResponse ¶ added in v1.22.0
type PostIntegrationRequestResponse = config.IntegrationRequest
type PostPackagesPythonScanHandler ¶
type PostPackagesPythonScanHandler struct {
// contains filtered or unexported fields
}
func NewPostPackagesPythonScanHandler ¶
func NewPostPackagesPythonScanHandler(base util.AbsolutePath, log logging.Logger) *PostPackagesPythonScanHandler
func (*PostPackagesPythonScanHandler) ServeHTTP ¶
func (h *PostPackagesPythonScanHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type PostPackagesPythonScanRequest ¶
type PostPackagesPythonScanRequest struct {
SaveName string `json:"saveName"`
}
type PostPackagesPythonScanResponse ¶ added in v1.1.6
type PostPackagesRScanHandler ¶
type PostPackagesRScanHandler struct {
// contains filtered or unexported fields
}
func NewPostPackagesRScanHandler ¶
func NewPostPackagesRScanHandler( base util.AbsolutePath, log logging.Logger, ) *PostPackagesRScanHandler
func (*PostPackagesRScanHandler) ServeHTTP ¶
func (h *PostPackagesRScanHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type PostTestCredentialsResponseBody ¶
type PostTestCredentialsResponseBody struct { User *connect.User `json:"user"` URL string `json:"url"` ServerType server_type.ServerType `json:"serverType"` Error *types.AgentError `json:"error"` }
Source Files
¶
- api_helpers.go
- api_service.go
- delete_configuration.go
- delete_credentials.go
- delete_deployment.go
- delete_integration_request.go
- deployment_dto.go
- get_account.go
- get_accounts.go
- get_config_files.go
- get_config_python_packages.go
- get_config_r_packages.go
- get_config_secrets.go
- get_configuration.go
- get_configurations.go
- get_connect_cloud_accounts.go
- get_credential.go
- get_credentials.go
- get_deployment.go
- get_deployment_env.go
- get_deployments.go
- get_entrypoints.go
- get_file.go
- get_integration_requests.go
- get_integrations.go
- get_interpreters.go
- get_server_settings.go
- get_snowflake_connections.go
- http_service.go
- patch_deployment.go
- positron_settings.go
- post_account_verify.go
- post_config_files.go
- post_config_secrets.go
- post_connect_cloud_device_auth.go
- post_connect_cloud_oauth_token.go
- post_connect_token.go
- post_connect_token_user.go
- post_credentials.go
- post_deployment.go
- post_deployment_cancel.go
- post_deployments.go
- post_inspect.go
- post_integration_request.go
- post_packages_python_scan.go
- post_packages_r_scan.go
- post_test_credentials.go
- put_configuration.go
- reset_credentials.go
- test.go