detectors

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPyShinyDetector

func NewPyShinyDetector() *pyShinyDetector

Types

type ContentTypeDetector

type ContentTypeDetector struct {
	// contains filtered or unexported fields
}

func NewContentTypeDetector

func NewContentTypeDetector(log logging.Logger) *ContentTypeDetector

func (*ContentTypeDetector) InferType

func (t *ContentTypeDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type ContentTypeDetectorFactory added in v1.8.0

type ContentTypeDetectorFactory func(log logging.Logger) *ContentTypeDetector

type ContentTypeInferer

type ContentTypeInferer interface {
	InferType(path util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)
}

ContentTypeInferer infers as much as possible about the provided content. If inference is succcessful, InferType returns a partially filled Config. If it's not successful, it returns (nil, nil), i.e. failing inference is not an error. If there's an error during inferences, it returns (nil, err).

type NotebookDetector

type NotebookDetector struct {
	// contains filtered or unexported fields
}

func NewNotebookDetector

func NewNotebookDetector() *NotebookDetector

func (*NotebookDetector) InferType

func (d *NotebookDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type PlumberDetector

type PlumberDetector struct {
	// contains filtered or unexported fields
}

func NewPlumberDetector

func NewPlumberDetector() *PlumberDetector

func (*PlumberDetector) InferType

func (d *PlumberDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type PythonAppDetector

type PythonAppDetector struct {
	// contains filtered or unexported fields
}

func NewBokehDetector

func NewBokehDetector() *PythonAppDetector

func NewDashDetector

func NewDashDetector() *PythonAppDetector

func NewFastAPIDetector

func NewFastAPIDetector() *PythonAppDetector

func NewFlaskDetector

func NewFlaskDetector() *PythonAppDetector

func NewGradioDetector added in v1.10.0

func NewGradioDetector() *PythonAppDetector

func NewPythonAppDetector

func NewPythonAppDetector(contentType config.ContentType, imports []string) *PythonAppDetector

func NewStreamlitDetector

func NewStreamlitDetector() *PythonAppDetector

func (*PythonAppDetector) InferType

func (d *PythonAppDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type QuartoDetector

type QuartoDetector struct {
	// contains filtered or unexported fields
}

func NewQuartoDetector

func NewQuartoDetector(log logging.Logger) *QuartoDetector

func (*QuartoDetector) InferType

func (d *QuartoDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type RMarkdownDetector

type RMarkdownDetector struct {
	// contains filtered or unexported fields
}

func NewRMarkdownDetector

func NewRMarkdownDetector(log logging.Logger) *RMarkdownDetector

func (*RMarkdownDetector) InferType

func (d *RMarkdownDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type RMarkdownMetadata

type RMarkdownMetadata struct {
	// Only	the	fields we need are defined here
	Title   string         `yaml:"title"`
	Runtime string         `yaml:"runtime"`
	Params  map[string]any `yaml:"params"`
	Server  any            `yaml:"server"` // string or a map
}

type RShinyDetector

type RShinyDetector struct {
	// contains filtered or unexported fields
}

func NewRShinyDetector

func NewRShinyDetector() *RShinyDetector

func (*RShinyDetector) InferType

func (d *RShinyDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

type StaticHTMLDetector

type StaticHTMLDetector struct {
	// contains filtered or unexported fields
}

func NewStaticHTMLDetector

func NewStaticHTMLDetector() *StaticHTMLDetector

func (*StaticHTMLDetector) InferType

func (d *StaticHTMLDetector) InferType(base util.AbsolutePath, entrypoint util.RelativePath) ([]*config.Config, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL