Documentation
¶
Index ¶
- Constants
- func NewBundler(path util.AbsolutePath, manifest *Manifest, filePatterns []string, ...) (*bundler, error)
- type Bundler
- type Environment
- type Jupyter
- type Manifest
- func (manifest *Manifest) AddFile(path string, fileMD5 []byte)
- func (manifest *Manifest) Clone() (*Manifest, error)
- func (manifest *Manifest) GetFilenames() []string
- func (manifest *Manifest) ToJSON() ([]byte, error)
- func (m *Manifest) WriteManifest(w io.Writer) error
- func (m *Manifest) WriteManifestFile(path util.Path) error
- type ManifestFile
- type ManifestFileMap
- type Metadata
- type Package
- type PackageMap
- type Python
- type PythonPackageManager
- type Quarto
Constants ¶
const ManifestFilename = "manifest.json"
ManifestFilename is the well-known manifest.json filename contained within deployment bundles.
const PythonRequirementsFilename = "requirements.txt"
PythonRequirementsFilename is the well-known filename for the Python pip package dependency list.
Variables ¶
This section is empty.
Functions ¶
func NewBundler ¶
func NewBundler(path util.AbsolutePath, manifest *Manifest, filePatterns []string, log logging.Logger) (*bundler, error)
NewBundler creates a bundler that will archive the directory specified by `path`, or the containing directory if `path` is a file. The provided manifest should contain the metadata for the app, such as the entrypoint, Python version, R package dependencies, etc. The bundler will fill in the `files` section and include the manifest.json in the bundler.
Types ¶
type Environment ¶
type Manifest ¶
type Manifest struct { Version int `json:"version"` // Manifest version (always 1) Locale string `json:"locale,omitempty"` // User's locale. Currently unused. Platform string `json:"platform,omitempty" name:"r-version"` // Client R version Metadata Metadata `json:"metadata"` // Properties about this deployment. Ignored by shinyapps.io Python *Python `json:"python,omitempty"` // If non-null, specifies the Python version and dependencies Jupyter *Jupyter `json:"jupyter,omitempty"` // If non-null, specifies the Jupyter options Quarto *Quarto `json:"quarto,omitempty"` // If non-null, specifies the Quarto version and engines Environment *Environment `json:"environment,omitempty"` // Information about the execution environment Packages PackageMap `json:"packages"` // Map of R package name to package details Files ManifestFileMap `json:"files"` // List of file paths contained in the bundle }
Manifest contains details about a specific deployment specified in the manifest.json file.
The manifest describes the type of content (its dependencies, how its environment can be recreated (if needed) and how it is served/executed).
func NewManifest ¶
func NewManifest() *Manifest
func NewManifestFromConfig ¶
func ReadManifest ¶
ReadManifest reads and parses the manifest.
func ReadManifestFile ¶
ReadManifest reads and parses the manifest file stored at path.
func (*Manifest) GetFilenames ¶
func (*Manifest) WriteManifest ¶
WriteManifest writes the manifest in JSON format.
type ManifestFile ¶
type ManifestFile struct {
Checksum string `json:"checksum"`
}
func NewManifestFile ¶
func NewManifestFile() ManifestFile
type ManifestFileMap ¶
type ManifestFileMap map[string]ManifestFile
func NewManifestFileMap ¶
func NewManifestFileMap() ManifestFileMap
type Metadata ¶
type Metadata struct { AppMode connect.AppMode `json:"appmode"` // Selects the runtime for this content. ContentCategory string `json:"content_category,omitempty"` // A refinement of the AppMode used by plots and sites Entrypoint string `json:"entrypoint,omitempty"` // The main file being deployed. PrimaryRmd string `json:"primary_rmd,omitempty"` // The rendering target for Rmd deployments. PrimaryHtml string `json:"primary_html,omitempty"` // The default document for static deployments. HasParameters bool `json:"has_parameters,omitempty"` // True if this is content allows parameter customization. }
Metadata contains details about this deployment (type, etc).
type Package ¶
type Package struct { Source string `json:",omitempty"` // Symbolic name describing where this package originated. e.g. "CRAN". Repository string `json:",omitempty"` // URL to the source repository Description dcf.Record `json:"description"` // A collection of key:value fields from the DESCRIPTION file }
Package describes a single R package.
type PackageMap ¶
type Python ¶
type Python struct { Version string `json:"version"` // The Python version PackageManager PythonPackageManager `json:"package_manager"` }