local

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RootDirectory string `json:"rootDirectory"`
}

Config is the structure of the configuration for the local file system provider.

type Provider

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

Provider implements the Provider interface.

func New

func New(config Config) (*Provider, error)

New returns a new local provider. The local provider can be used to access TechDocs from the local file system.

func (*Provider) GetFile

func (p *Provider) GetFile(ctx context.Context, service, path string) ([]byte, error)

GetFile returns a single file.

func (*Provider) GetIndex

func (p *Provider) GetIndex(ctx context.Context, service string) (*shared.Index, error)

GetIndex returns a single index for a service.

func (*Provider) GetIndexes

func (p *Provider) GetIndexes(ctx context.Context) ([]shared.Index, error)

GetIndexes returns a list indexes for all services.

func (*Provider) GetMarkdown

func (p *Provider) GetMarkdown(ctx context.Context, service, path string) (string, error)

GetMarkdown returns a single markdown file.

Jump to

Keyboard shortcuts

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