Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvKeyDocsDir string = "DW_DOCS_DIR" // Docs directory environment key. EnvKeyAssetsDir string = "DW_ASSETS_DIR" // Assets directory environment key. EnvKeyRoutePrefix string = "DW_ROUTE_PREFIX" // Route prefix environment key. EnvKeyAssetsRoutePrefix string = "DW_ASSETS_ROUTE_PREFIX" // Assets route prefix environment key. EnvKeySourcesFile string = "DW_SOURCES_FILE" // Sources file environment key. EnvKeyShowLogs string = "DW_SHOW_LOGS" // Show logs environment key. )
Variables ¶
This section is empty.
Functions ¶
func GetAssetsDir ¶
func GetAssetsDir() string
GetAssetsDir returns configured assets directory. env key: DW_ASSETS_DIR
func GetAssetsRoutePrefix ¶
func GetAssetsRoutePrefix() string
GetAssetsRoutePrefix returns configured assets route prefix. env key: DW_ASSETS_ROUTE_PREFIX
func GetRoutePrefix ¶
func GetRoutePrefix() string
GetRoutePrefix returns configured documentation route prefix. env key: DW_ROUTE_PREFIX
func GetSourcesFilePath ¶
func GetSourcesFilePath() string
GetSourcesFilePath returns configured sources file path. env key: DW_SOURCES_FILE
Types ¶
type DocHandler ¶
type DocHandler interface {
GetDocsDir() string
}
type Product ¶
type ProductRepository ¶
type ProductRepository interface { Cleaner FindAllProducts() ([]Product, error) FindProduct(productName string) (*Product, error) GetDir() string GetPage(productName, version, pagePath string) (*Page, error) GetIndex(productName string) (*Page, error) ListProductKeys() ([]string, error) }
func GetRepository ¶
func GetRepository(dir string) ProductRepository
type Updater ¶
type Updater interface { DocHandler Update(productKeys ...string) UpdateAll() }
type UpdaterPublisher ¶
UpdaterPublisher is a hybrid publisher/publisher.
func GetPublisher ¶
func GetPublisher() UpdaterPublisher
GetPublisher returns the default instance of UpdaterPublisher.
func GetPublisherWithDocsDir ¶
func GetPublisherWithDocsDir(docsDir string) UpdaterPublisher
GetPublisherWithDocsDir returns an instance of UpdaterPublisher with the provided [dir].
Source Files
¶
Click to show internal directories.
Click to hide internal directories.