Documentation
¶
Index ¶
- Constants
- Variables
- type APIClient
- type AppMode
- func (t AppMode) Description() string
- func (mode AppMode) IsAPIApp() bool
- func (t AppMode) IsBokehApp() bool
- func (t AppMode) IsDashApp() bool
- func (t AppMode) IsFastAPIApp() bool
- func (mode AppMode) IsPlumberAPI() bool
- func (mode AppMode) IsPyShinyApp() bool
- func (mode AppMode) IsPythonAPI() bool
- func (mode AppMode) IsPythonApp() bool
- func (t AppMode) IsPythonContent() bool
- func (t AppMode) IsQuartoContent() bool
- func (t AppMode) IsRContent() bool
- func (t AppMode) IsShinyApp() bool
- func (t AppMode) IsStaticContent() bool
- func (t AppMode) IsStaticJupyter() bool
- func (t AppMode) IsStaticReport() bool
- func (mode AppMode) IsStaticRmd() bool
- func (t AppMode) IsStreamlitApp() bool
- func (mode AppMode) IsVoilaApp() bool
- func (mode AppMode) IsWorkerApp() bool
- func (mode *AppMode) UnmarshalText(text []byte) error
- type AppRole
- type ConnectClient
- func (c *ConnectClient) CheckCapabilities(base util.AbsolutePath, cfg *config.Config, log logging.Logger) error
- func (c *ConnectClient) CreateDeployment(body *ConnectContent, log logging.Logger) (types.ContentID, error)
- func (c *ConnectClient) DeployBundle(contentId types.ContentID, bundleId types.BundleID, log logging.Logger) (types.TaskID, error)
- func (c *ConnectClient) SetEnvVars(contentID types.ContentID, env config.Environment, log logging.Logger) error
- func (c *ConnectClient) TestAuthentication(log logging.Logger) (*User, error)
- func (c *ConnectClient) UpdateDeployment(contentID types.ContentID, body *ConnectContent, log logging.Logger) error
- func (c *ConnectClient) UploadBundle(contentID types.ContentID, body io.Reader, log logging.Logger) (types.BundleID, error)
- func (c *ConnectClient) ValidateDeployment(contentID types.ContentID, log logging.Logger) error
- func (c *ConnectClient) WaitForTask(taskID types.TaskID, log logging.Logger) error
- type ConnectContent
- type MockClient
- func (m *MockClient) CheckCapabilities(base util.AbsolutePath, cfg *config.Config, log logging.Logger) error
- func (m *MockClient) CreateDeployment(s *ConnectContent, log logging.Logger) (types.ContentID, error)
- func (m *MockClient) DeployBundle(cid types.ContentID, bid types.BundleID, log logging.Logger) (types.TaskID, error)
- func (m *MockClient) Read(p []byte) (n int, err error)
- func (m *MockClient) SetEnvVars(id types.ContentID, env config.Environment, log logging.Logger) error
- func (m *MockClient) TestAuthentication(log logging.Logger) (*User, error)
- func (m *MockClient) UpdateDeployment(id types.ContentID, s *ConnectContent, log logging.Logger) error
- func (m *MockClient) UploadBundle(id types.ContentID, r io.Reader, log logging.Logger) (types.BundleID, error)
- func (m *MockClient) ValidateDeployment(id types.ContentID, log logging.Logger) error
- func (m *MockClient) WaitForTask(taskID types.TaskID, log logging.Logger) error
- type User
- type UserDTO
Constants ¶
const ( AuthRoleAdmin = "administrator" AuthRolePublisher = "publisher" AuthRoleViewer = "viewer" )
Variables ¶
var ErrTimedOut = errors.New("request timed out")
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface { TestAuthentication(logging.Logger) (*User, error) CreateDeployment(*ConnectContent, logging.Logger) (types.ContentID, error) UpdateDeployment(types.ContentID, *ConnectContent, logging.Logger) error SetEnvVars(types.ContentID, config.Environment, logging.Logger) error UploadBundle(types.ContentID, io.Reader, logging.Logger) (types.BundleID, error) DeployBundle(types.ContentID, types.BundleID, logging.Logger) (types.TaskID, error) WaitForTask(taskID types.TaskID, log logging.Logger) error ValidateDeployment(types.ContentID, logging.Logger) error CheckCapabilities(util.AbsolutePath, *config.Config, logging.Logger) error }
type AppMode ¶
type AppMode string
const ( UnknownMode AppMode = "" ShinyMode AppMode = "shiny" ShinyRmdMode AppMode = "rmd-shiny" StaticRmdMode AppMode = "rmd-static" StaticMode AppMode = "static" PlumberAPIMode AppMode = "api" StaticJupyterMode AppMode = "jupyter-static" PythonAPIMode AppMode = "python-api" PythonDashMode AppMode = "python-dash" PythonStreamlitMode AppMode = "python-streamlit" PythonBokehMode AppMode = "python-bokeh" PythonFastAPIMode AppMode = "python-fastapi" ShinyQuartoMode AppMode = "quarto-shiny" StaticQuartoMode AppMode = "quarto-static" PythonShinyMode AppMode = "python-shiny" JupyterVoilaMode AppMode = "jupyter-voila" )
These values are the strings that will appear in manifest.json.
func AppModeFromString ¶
AppModeFromString return the normalized string value corresponding to the provided string. UnknownMode and an error are returned if the string does not map to a known content type.
func AppModeFromType ¶
func AppModeFromType(t config.ContentType) AppMode
func (AppMode) Description ¶
func (AppMode) IsAPIApp ¶
IsAPIApp returns true for any API apps (currently, Plumber, Flask, or FastAPI).
func (AppMode) IsBokehApp ¶
IsBokehApp returns true for Python Bokeh applications
func (AppMode) IsFastAPIApp ¶
IsFastAPIApp returns true for Python FastAPI applications
func (AppMode) IsPlumberAPI ¶
IsPlumberAPI returns true for Plumber API applications.
func (AppMode) IsPyShinyApp ¶
IsPyShinyApp returns true for Python Shiny applications
func (AppMode) IsPythonAPI ¶
IsPythonAPI returns true for Python API applications.
func (AppMode) IsPythonApp ¶
IsPythonApp returns true for Python applications (Dash, Streamlit, Bokeh, Voila)
func (AppMode) IsPythonContent ¶
IsPythonContent returns true if Python is the primary interpreter for this content type.
func (AppMode) IsQuartoContent ¶
IsQuartoContent return true if Quarto is the primary driver of this content type.
func (AppMode) IsRContent ¶
IsRContent returns true if R is the primary interpreter for this content type.
func (AppMode) IsShinyApp ¶
IsShinyApp returns true for Shiny applications and interactive R Markdown documents.
func (AppMode) IsStaticContent ¶
IsStaticContent returns true for any static content (deployed without source).
func (AppMode) IsStaticJupyter ¶
IsStaticJupyter returns true for any non-interactive Jupyter content.
func (AppMode) IsStaticReport ¶
IsStaticReport returns true for any non-interactive R or Jupyter content.
func (AppMode) IsStaticRmd ¶
IsStaticRmd returns true for any non-interactive R Markdown content.
func (AppMode) IsStreamlitApp ¶
IsStreamlitApp returns true for Python Streamlit applications
func (AppMode) IsVoilaApp ¶
IsVoilaApp returns true for Python Voila interactive notebooks
func (AppMode) IsWorkerApp ¶
IsWorkerApp returns true for any content that is serviced by worker processes. This includes Shiny applications, interactive R Markdown documents, Plumber/Python (flask/fastapi) APIs, and Python apps (Dash, Streamlit, Bokeh, PyShiny, Voila).
func (*AppMode) UnmarshalText ¶
type ConnectClient ¶
type ConnectClient struct {
// contains filtered or unexported fields
}
func (*ConnectClient) CheckCapabilities ¶
func (c *ConnectClient) CheckCapabilities(base util.AbsolutePath, cfg *config.Config, log logging.Logger) error
func (*ConnectClient) CreateDeployment ¶
func (c *ConnectClient) CreateDeployment(body *ConnectContent, log logging.Logger) (types.ContentID, error)
func (*ConnectClient) DeployBundle ¶
func (*ConnectClient) SetEnvVars ¶
func (c *ConnectClient) SetEnvVars(contentID types.ContentID, env config.Environment, log logging.Logger) error
func (*ConnectClient) TestAuthentication ¶
func (c *ConnectClient) TestAuthentication(log logging.Logger) (*User, error)
func (*ConnectClient) UpdateDeployment ¶
func (c *ConnectClient) UpdateDeployment(contentID types.ContentID, body *ConnectContent, log logging.Logger) error
func (*ConnectClient) UploadBundle ¶
func (*ConnectClient) ValidateDeployment ¶
func (*ConnectClient) WaitForTask ¶
type ConnectContent ¶
type ConnectContent struct { Name types.ContentName `json:"name"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` AccessType string `json:"access_type,omitempty"` ConnectionTimeout *int32 `json:"connection_timeout,omitempty"` ReadTimeout *int32 `json:"read_timeout,omitempty"` InitTimeout *int32 `json:"init_timeout,omitempty"` IdleTimeout *int32 `json:"idle_timeout,omitempty"` MaxProcesses *int32 `json:"max_processes,omitempty"` MinProcesses *int32 `json:"min_processes,omitempty"` MaxConnsPerProcess *int32 `json:"max_conns_per_process,omitempty"` LoadFactor *float64 `json:"load_factor,omitempty"` RunAs string `json:"run_as,omitempty"` RunAsCurrentUser *bool `json:"run_as_current_user,omitempty"` MemoryRequest *int64 `json:"memory_request,omitempty"` MemoryLimit *int64 `json:"memory_limit,omitempty"` CPURequest *float64 `json:"cpu_request,omitempty"` CPULimit *float64 `json:"cpu_limit,omitempty"` AMDGPULimit *int64 `json:"amd_gpu_limit,omitempty"` NvidiaGPULimit *int64 `json:"nvidia_gpu_limit,omitempty"` ServiceAccountName string `json:"service_account_name,omitempty"` DefaultImageName string `json:"default_image_name,omitempty"` DefaultREnvironmentManagement *bool `json:"default_r_environment_management,omitempty"` DefaultPyEnvironmentManagement *bool `json:"default_py_environment_management,omitempty"` }
func ConnectContentFromConfig ¶
func ConnectContentFromConfig(cfg *config.Config) *ConnectContent
type MockClient ¶
func NewMockClient ¶
func NewMockClient() *MockClient
func (*MockClient) CheckCapabilities ¶
func (m *MockClient) CheckCapabilities(base util.AbsolutePath, cfg *config.Config, log logging.Logger) error
func (*MockClient) CreateDeployment ¶
func (m *MockClient) CreateDeployment(s *ConnectContent, log logging.Logger) (types.ContentID, error)
func (*MockClient) DeployBundle ¶
func (*MockClient) SetEnvVars ¶
func (m *MockClient) SetEnvVars(id types.ContentID, env config.Environment, log logging.Logger) error
func (*MockClient) TestAuthentication ¶
func (m *MockClient) TestAuthentication(log logging.Logger) (*User, error)
func (*MockClient) UpdateDeployment ¶
func (m *MockClient) UpdateDeployment(id types.ContentID, s *ConnectContent, log logging.Logger) error
func (*MockClient) UploadBundle ¶
func (*MockClient) ValidateDeployment ¶
func (*MockClient) WaitForTask ¶
type User ¶
type User struct { Id types.UserID `json:"id"` Username string `json:"username"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` }
Simplified user structure common to all servers
type UserDTO ¶
type UserDTO struct { Email string `json:"email"` Username string `json:"username"` FirstName string `json:"first_name"` LastName string `json:"last_name"` UserRole string `json:"user_role"` CreatedTime types.Time `json:"created_time"` UpdatedTime types.Time `json:"updated_time"` ActiveTime types.NullTime `json:"active_time"` Confirmed bool `json:"confirmed"` Locked bool `json:"locked"` GUID types.UserID `json:"guid"` }