Documentation
¶
Index ¶
- Constants
- type Book
- type BookIndex
- type BookProvider
- type Chapter
- type ChapterIndex
- type ChapterIndexPage
- type ChapterProvider
- func (p *ChapterProvider) Changed() (bool, error)
- func (p *ChapterProvider) Create() error
- func (p *ChapterProvider) Destroy() error
- func (p *ChapterProvider) Init(cfg htypes.Resource, l logger.Logger) error
- func (p *ChapterProvider) Lookup() ([]string, error)
- func (p *ChapterProvider) Refresh() error
- type Condition
- type Config
- type Docs
- type DocsConfig
- type DocsProvider
- type Logo
- type Page
- type Progress
- type ProgressCondition
- type State
- type Task
- type Validation
Constants ¶
View Source
const TypeBook string = "book"
View Source
const TypeChapter string = "chapter"
View Source
const TypeDocs string = "docs"
TypeDocs is the resource string for a Docs resource
View Source
const TypeTask string = "task"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { types.ResourceMetadata `hcl:",remain"` Title string `hcl:"title" json:"title"` Chapters []Chapter `hcl:"chapters" json:"chapters"` // Output parameters Index BookIndex `hcl:"index,optional" json:"index"` }
type BookIndex ¶ added in v0.5.40
type BookIndex struct { Title string `hcl:"title,optional" json:"title"` Chapters []ChapterIndex `hcl:"chapters,optional" json:"chapters"` }
type BookProvider ¶
type BookProvider struct {
// contains filtered or unexported fields
}
func (*BookProvider) Changed ¶
func (p *BookProvider) Changed() (bool, error)
func (*BookProvider) Create ¶
func (p *BookProvider) Create() error
func (*BookProvider) Destroy ¶
func (p *BookProvider) Destroy() error
func (*BookProvider) Lookup ¶
func (p *BookProvider) Lookup() ([]string, error)
func (*BookProvider) Refresh ¶
func (p *BookProvider) Refresh() error
type Chapter ¶
type Chapter struct { types.ResourceMetadata `hcl:",remain"` Prerequisites []string `hcl:"prerequisites,optional" json:"prerequisites"` Title string `hcl:"title,optional" json:"title,omitempty"` Pages []Page `hcl:"page,block" json:"pages"` Tasks map[string]Task `hcl:"tasks,optional" json:"tasks"` Index ChapterIndex `hcl:"index,optional" json:"index"` }
type ChapterIndex ¶ added in v0.5.40
type ChapterIndex struct { Title string `hcl:"title,optional" json:"title,omitempty"` Pages []ChapterIndexPage `hcl:"pages" json:"pages"` }
type ChapterIndexPage ¶ added in v0.5.40
type ChapterProvider ¶
type ChapterProvider struct {
// contains filtered or unexported fields
}
func (*ChapterProvider) Changed ¶
func (p *ChapterProvider) Changed() (bool, error)
func (*ChapterProvider) Create ¶
func (p *ChapterProvider) Create() error
func (*ChapterProvider) Destroy ¶
func (p *ChapterProvider) Destroy() error
func (*ChapterProvider) Lookup ¶
func (p *ChapterProvider) Lookup() ([]string, error)
func (*ChapterProvider) Refresh ¶
func (p *ChapterProvider) Refresh() error
type Condition ¶
type Condition struct { Name string `hcl:"id,label" json:"id"` Description string `hcl:"description" json:"description"` Checks []Validation `hcl:"check,block" json:"checks"` Solves []Validation `hcl:"solve,block" json:"solves,omitempty"` Setups []Validation `hcl:"setup,block" json:"setups,omitempty"` Cleanups []Validation `hcl:"cleanup,block" json:"cleanups,omitempty"` Status string `hcl:"status,optional" json:"status"` }
type Config ¶ added in v0.5.40
type Config struct { Timeout int `hcl:"timeout,optional" json:"timeout"` Target string `hcl:"target,optional" json:"target,omitempty"` User string `hcl:"user,optional" json:"user,omitempty"` Group string `hcl:"group,optional" json:"group,omitempty"` WorkingDirectory string `hcl:"working_directory,optional" json:"working_directory,omitempty"` }
type Docs ¶
type Docs struct { types.ResourceMetadata `hcl:",remain"` Networks ctypes.NetworkAttachments `hcl:"network,block" json:"networks,omitempty"` // Attach to the correct network // only when Image is specified Image *ctypes.Image `hcl:"image,block" json:"image,omitempty"` // image to use for the container Content []Book `hcl:"content" json:"content"` Port int `hcl:"port,optional" json:"port"` OpenInBrowser bool `hcl:"open_in_browser,optional" json:"open_in_browser"` // When a host port is defined open the location in a browser Logo Logo `hcl:"logo,optional" json:"logo,omitempty"` Assets string `hcl:"assets,optional" json:"assets,omitempty"` // ContainerName is the fully qualified resource name for the container, this can be used // to access the container from other sources ContainerName string `hcl:"fqdn,optional" json:"fqdn,omitempty"` }
Docs allows the running of a Docusaurus container which can be used for online tutorials or documentation
type DocsConfig ¶
type DocsProvider ¶
type DocsProvider struct {
// contains filtered or unexported fields
}
Docs defines a provider for creating documentation containers
func (*DocsProvider) Changed ¶
func (p *DocsProvider) Changed() (bool, error)
func (*DocsProvider) Create ¶
func (p *DocsProvider) Create() error
Create a new documentation container
func (*DocsProvider) Destroy ¶
func (p *DocsProvider) Destroy() error
Destroy the documentation container
func (*DocsProvider) Lookup ¶
func (p *DocsProvider) Lookup() ([]string, error)
Lookup the ID of the documentation container
func (*DocsProvider) Refresh ¶
func (p *DocsProvider) Refresh() error
type Progress ¶
type Progress struct { ID string `json:"id"` Prerequisites []string `json:"prerequisites"` Conditions []ProgressCondition `json:"conditions"` Status string `json:"status"` }
type ProgressCondition ¶
type State ¶ added in v0.5.40
type State struct { Index struct { Title string `json:"title"` Chapters []struct { Title string `json:"title,omitempty"` Pages []struct { Title string `json:"title"` URI string `json:"uri"` } `json:"pages"` } `json:"chapters"` } `json:"index"` Progress []struct { ID string `json:"id"` Prerequisites []string `json:"prerequisites"` Conditions []struct { ID string `json:"id"` Description string `json:"description"` Status string `json:"status"` } `json:"conditions"` Status string `json:"status"` } `json:"progress"` }
type Task ¶
type Task struct { types.ResourceMetadata `hcl:",remain"` Prerequisites []string `hcl:"prerequisites,optional" json:"prerequisites"` Config Config `hcl:"config,block" json:"config,omitempty"` Conditions []Condition `hcl:"condition,block" json:"conditions"` Status string `hcl:"status,optional" json:"status"` }
Click to show internal directories.
Click to hide internal directories.