Documentation
¶
Index ¶
- func ContentTypeFromAppMode(a AppMode) contenttypes.ContentType
- 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 (t AppMode) IsGradioApp() bool
- func (t AppMode) IsPanelApp() 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 AuthorizationRequest
- type AuthorizationResponse
- type ConnectOptions
- type ContentAccess
- type ContentRequestBase
- type ContentResponse
- type ContentType
- type CreateContentRequest
- type PublishResult
- type RequestRevision
- type Revision
- type Secret
- type UpdateContentRequest
- type UserAccountRole
- type UserAccountRoleAccount
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentTypeFromAppMode ¶
func ContentTypeFromAppMode(a AppMode) contenttypes.ContentType
Types ¶
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" PythonGradioMode AppMode = "python-gradio" PythonPanelMode AppMode = "python-panel" 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 contenttypes.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) IsGradioApp ¶
IsGradioApp returns true for Python Gradio applications
func (AppMode) IsPanelApp ¶ added in v1.26.0
IsPanelApp returns true for Python Panel 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, Gradio, Panel).
func (*AppMode) UnmarshalText ¶
type AuthorizationRequest ¶
type AuthorizationRequest struct {
ResourceType string `json:"resource_type"`
ResourceID string `json:"resource_id"`
Permission string `json:"permission"`
}
AuthorizationRequest represents a request to authorize access to a resource.
type AuthorizationResponse ¶
type AuthorizationResponse struct {
Authorized bool `json:"authorized"`
Token string `json:"token,omitempty"`
}
AuthorizationResponse represents a response from an authorization request.
type ConnectOptions ¶ added in v1.22.0
type ConnectOptions struct {
ClientReconnectTimeout *int32 `json:"client_reconnect_timeout,omitempty"`
ConnTimeout *int32 `json:"conn_timeout,omitempty"`
DisconnectDelay *int32 `json:"disconnect_delay,omitempty"`
HeartbeatDelay *int32 `json:"heartbeat_delay,omitempty"`
IdleTimeout *int32 `json:"idle_timeout,omitempty"`
InitTimeout *int32 `json:"init_timeout,omitempty"`
ReadTimeout *int32 `json:"read_timeout,omitempty"`
SchedLoadFactor *float64 `json:"sched_load_factor,omitempty"`
SchedMaxConns *int32 `json:"sched_max_conns,omitempty"`
SchedMaxProc *int32 `json:"sched_max_proc,omitempty"`
SchedMinProc *int32 `json:"sched_min_proc,omitempty"`
ShinyIsolation *bool `json:"shiny_isolation,omitempty"`
ShinyStaleWorkerRedirects *bool `json:"shiny_stale_worker_redirects,omitempty"`
}
type ContentAccess ¶
type ContentAccess string
ContentAccess represents the access control settings for a content item.
const ( // ViewPrivateEditPrivate means the content is only visible and editable by the owner. ViewPrivateEditPrivate ContentAccess = "view_private_edit_private" // ViewTeamEditPrivate means the content is visible to team members but only editable by the owner. ViewTeamEditPrivate ContentAccess = "view_team_edit_private" // ViewTeamEditTeam means the content is visible and editable by team members. ViewTeamEditTeam ContentAccess = "view_team_edit_team" // ViewPublicEditPrivate means the content is publicly visible but only editable by the owner. ViewPublicEditPrivate ContentAccess = "view_public_edit_private" // ViewPublicEditTeam means the content is publicly visible and editable by team members. ViewPublicEditTeam ContentAccess = "view_public_edit_team" )
type ContentRequestBase ¶
type ContentRequestBase struct {
Title string `json:"title"`
Description string `json:"description,omitempty"`
NextRevision *RequestRevision `json:"next_revision,omitempty"`
RevisionOverrides *RequestRevision `json:"revision_overrides,omitempty"`
Access ContentAccess `json:"access,omitempty"`
Secrets []Secret `json:"secrets,omitempty"`
VanityName string `json:"vanity_name,omitempty"`
AppMode AppMode `json:"app_mode"`
ContentType ContentType `json:"content_type"`
}
ContentRequestBase contains common fields for content creation and update requests.
type ContentResponse ¶
type ContentResponse struct {
ID types.ContentID `json:"id"`
NextRevision *Revision `json:"next_revision,omitempty"`
Access ContentAccess `json:"access"`
}
ContentResponse represents a response from creating or updating a content item.
type ContentType ¶
type ContentType string
ContentType represents the type of content being created.
const ( // ContentTypeBokeh represents a Bokeh application. ContentTypeBokeh ContentType = "bokeh" // ContentTypeDash represents a Dash application. ContentTypeDash ContentType = "dash" // ContentTypeJupyter represents a Jupyter notebook. ContentTypeJupyter ContentType = "jupyter" // ContentTypeQuarto represents a Quarto document. ContentTypeQuarto ContentType = "quarto" // ContentTypeShiny represents a Shiny application. ContentTypeShiny ContentType = "shiny" // ContentTypeStreamlit represents a Streamlit application. ContentTypeStreamlit ContentType = "streamlit" // ContentTypeRMarkdown represents an R Markdown document. ContentTypeRMarkdown ContentType = "rmarkdown" // ContentTypeStatic represents static content. ContentTypeStatic ContentType = "static" )
func CloudContentTypeFromPublisherType ¶
func CloudContentTypeFromPublisherType(contentType contenttypes.ContentType) (ContentType, error)
CloudContentTypeFromPublisherType converts publisher content types to cloud client content types
type CreateContentRequest ¶
type CreateContentRequest struct {
ContentRequestBase
AccountID string `json:"account_id"`
}
CreateContentRequest represents a request to create a new content item.
type PublishResult ¶
type PublishResult string
const ( PublishResultSuccess PublishResult = "success" PublishResultFailure PublishResult = "failure" )
type RequestRevision ¶
type RequestRevision struct {
SourceType string `json:"source_type"`
RVersion string `json:"r_version,omitempty"`
PythonVersion string `json:"python_version,omitempty"`
ContentType ContentType `json:"content_type,omitempty"`
AppMode AppMode `json:"app_mode,omitempty"`
PrimaryFile string `json:"primary_file,omitempty"`
ConnectOptions *ConnectOptions `json:"connect_options,omitempty"`
}
RequestRevision represents the configuration for the next content revision.
type Revision ¶
type Revision struct {
ID string `json:"id"`
PublishLogChannel string `json:"publish_log_channel"`
PublishResult PublishResult `json:"publish_result"`
PublishErrorCode string `json:"publish_error_code,omitempty"`
PublishErrorArgs map[string]interface{} `json:"publish_error_args,omitempty"`
SourceBundleID string `json:"source_bundle_id"`
SourceBundleUploadURL string `json:"source_bundle_upload_url"`
PublishError string `json:"publish_error,omitempty"`
PublishErrorDetails string `json:"publish_error_details,omitempty"`
}
Revision represents a content revision.
type UpdateContentRequest ¶
type UpdateContentRequest struct {
ContentRequestBase
ContentID types.ContentID `json:"-"` // Not sent in the request body, used for the URL
}
UpdateContentRequest represents a request to update an existing content item.
type UserAccountRole ¶
type UserAccountRole struct {
Role string `json:"role"`
Account UserAccountRoleAccount `json:"account"`
}
UserAccountRole represents a user's role in an account.
type UserAccountRoleAccount ¶
type UserAccountRoleAccount struct {
Name string `json:"name"`
}
UserAccountRoleAccount represents an account in a user account role.
type UserResponse ¶
type UserResponse struct {
AccountRoles map[string]UserAccountRole `json:"account_roles"`
}
UserResponse represents a response from the Connect Cloud user endpoint.