Documentation ¶
Overview ¶
Package updoc package implements updoc, the tool for publishing official provider docs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketIndex ¶
type BucketIndex struct { Items []Item `json:"tableOfContents"` Meta map[string]string `json:"metadata"` }
BucketIndex represents an index file in the storage bucket.
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
Indexer indexes docs.
func NewIndexer ¶
func NewIndexer(root string, opts ...IndexerOpt) *Indexer
NewIndexer constructs an indexer at the specified root.
type Item ¶
Item represents an item that will ultimately be represented in the uploaded table of contents.
type Options ¶
type Options struct { Generate struct { DocsDir string `name:"docs-dir" required:"" help:"Root directory to crawl for documents."` } `kong:"cmd"` Upload UploadOptions `kong:"cmd"` }
Options represents the available subcommands of updoc: "generate" and "upload".
type Sortable ¶
type Sortable interface {
// contains filtered or unexported methods
}
Sortable represents a sortable document section, like the title or a section of a document.
type UploadManager ¶
type UploadManager struct {
// contains filtered or unexported fields
}
UploadManager represents a document uploader capable of uploading contents of the specified io.Reader under the specified name.
func (*UploadManager) ProcessIndex ¶
func (u *UploadManager) ProcessIndex(opts UploadOptions, afs afero.Fs) error
ProcessIndex processes the index documents and uploads them to the storage.
type UploadOptions ¶
type UploadOptions struct { DocsDir string `name:"docs-dir" required:"" help:"Root directory to crawl for documents."` Name string `name:"name" required:"" help:"The name of the provider being processed."` Version string `name:"version" required:"" help:"The major and minor version number of the provider branch."` BucketName string `name:"bucket-name" required:"" help:"Bucket to put documentation in."` CDNDomain string `name:"cdn-domain" required:"" help:"CDN name to prefix processed urls with."` }
UploadOptions represents the options for the upload subcommand