Documentation
¶
Index ¶
- type ArgumentsSection
- type AttributesSection
- type CheckArgumentsSectionOptions
- type CheckAttributesSectionOptions
- type CheckExamplesSectionOptions
- type CheckImportSectionOptions
- type CheckOptions
- type CheckSignatureSectionOptions
- type CheckTimeoutsSectionOptions
- type CheckTitleSectionOptions
- type Document
- type ExampleSection
- type ImportSection
- type SchemaAttributeList
- type SchemaAttributeListItem
- type SchemaAttributeListItemByName
- type SchemaAttributeSection
- type SectionRequirement
- type Sections
- type SignatureSection
- type TimeoutsSection
- type TitleSection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentsSection ¶
type ArgumentsSection SchemaAttributeSection
ArgumentsSection represents a resource arguments section.
type AttributesSection ¶
type AttributesSection SchemaAttributeSection
AttributesSection represents a resource attributes section.
type CheckAttributesSectionOptions ¶
type CheckAttributesSectionOptions struct {
RequireSchemaOrdering bool
RequireSection SectionRequirement
}
type CheckExamplesSectionOptions ¶
type CheckExamplesSectionOptions struct {
ExpectedCodeBlockLanguage string
}
type CheckImportSectionOptions ¶ added in v0.23.0
type CheckImportSectionOptions struct {
RequireSection SectionRequirement
}
type CheckOptions ¶
type CheckOptions struct {
ArgumentsSection *CheckArgumentsSectionOptions
AttributesSection *CheckAttributesSectionOptions
ExamplesSection *CheckExamplesSectionOptions
TimeoutsSection *CheckTimeoutsSectionOptions
ImportSection *CheckImportSectionOptions
TitleSection *CheckTitleSectionOptions
SignatureSection *CheckSignatureSectionOptions
DisallowAttributesSection bool
AttributesSectionDisallowedMessage string
DisallowImportSection bool
ImportSectionDisallowedMessage string
}
type CheckSignatureSectionOptions ¶ added in v0.23.0
type CheckSignatureSectionOptions struct {
RequireSection SectionRequirement
AllowedHeadingTexts []string
RequireCodeBlock bool
}
type CheckTimeoutsSectionOptions ¶ added in v0.23.0
type CheckTimeoutsSectionOptions struct {
RequireSection SectionRequirement
}
type CheckTitleSectionOptions ¶ added in v0.23.0
type CheckTitleSectionOptions struct {
AllowedPrefixes []string
}
type Document ¶
type Document struct {
CheckOptions *CheckOptions
ProviderName string
ResourceName string
Sections *Sections
// contains filtered or unexported fields
}
func NewDocument ¶
func (*Document) Check ¶
func (d *Document) Check(opts *CheckOptions) error
type ExampleSection ¶
type ExampleSection struct {
// Children contains further nested sections below this section
Children []*ExampleSection
FencedCodeBlocks []*ast.FencedCodeBlock
Heading *ast.Heading
Paragraphs []*ast.Paragraph
}
ExampleSection represents a resource example code section.
type ImportSection ¶
type ImportSection struct {
FencedCodeBlocks []*ast.FencedCodeBlock
Heading *ast.Heading
Paragraphs []*ast.Paragraph
}
ImportSection represents a resource import section.
type SchemaAttributeList ¶
type SchemaAttributeList struct {
Items []*SchemaAttributeListItem
}
SchemaAttributeList represents a schema attribute list
This may represent root or nested lists of arguments or attributes
type SchemaAttributeListItem ¶
type SchemaAttributeListItem struct {
Description string
ForceNew bool
Name string
Optional bool
Required bool
Type string
}
SchemaAttributeListItem represents a schema attribute list item
This may represent root or nested lists of arguments or attributes
type SchemaAttributeListItemByName ¶
type SchemaAttributeListItemByName []*SchemaAttributeListItem
func (SchemaAttributeListItemByName) Len ¶
func (item SchemaAttributeListItemByName) Len() int
func (SchemaAttributeListItemByName) Less ¶
func (item SchemaAttributeListItemByName) Less(i, j int) bool
func (SchemaAttributeListItemByName) Swap ¶
func (item SchemaAttributeListItemByName) Swap(i, j int)
type SchemaAttributeSection ¶
type SchemaAttributeSection struct {
// Children contains further nested sections below this section
Children []*SchemaAttributeSection
// FencedCodeBlocks contains any found code blocks
FencedCodeBlocks []*ast.FencedCodeBlock
// Heading is the root/nested heading for the section
Heading *ast.Heading
// Lists is the groupings of per-attribute documentation
//
// Some sections may be split these based on Optional versus Required
Lists []*ast.List
// SchemaAttributeLists is the groupings of per-attribute documentation
//
// Some sections may be split these based on Optional versus Required
SchemaAttributeLists []*SchemaAttributeList
// Paragraphs is typically the byline(s) of per-attribute documentation
//
// Some sections may be split these based on Optional versus Required
Paragraphs []*ast.Paragraph
}
SchemaAttributeSection represents a schema attribute section
This may represent root or nested lists of arguments or attributes
type SectionRequirement ¶ added in v0.23.0
type SectionRequirement int
const ( Optional SectionRequirement = iota Required Forbidden )
type Sections ¶
type Sections struct {
Attributes *AttributesSection
Arguments *ArgumentsSection
Example *ExampleSection
Import *ImportSection
Timeouts *TimeoutsSection
Signature *SignatureSection
Title *TitleSection
}
Sections represents all expected sections of a resource documentation page
type SignatureSection ¶ added in v0.23.0
type SignatureSection struct {
FencedCodeBlocks []*ast.FencedCodeBlock
Heading *ast.Heading
Paragraphs []*ast.Paragraph
}
SignatureSection represents a function signature section.
type TimeoutsSection ¶
type TimeoutsSection struct {
FencedCodeBlocks []*ast.FencedCodeBlock
Heading *ast.Heading
Lists []*ast.List
Paragraphs []*ast.Paragraph
}
TimeoutsSection represents a resource timeouts section.
type TitleSection ¶
type TitleSection struct {
FencedCodeBlocks []*ast.FencedCodeBlock
Heading *ast.Heading
Paragraphs []*ast.Paragraph
}
TitleSection represents the top documentation section