instance

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: 3 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 {
	Name        string           `json:"name"`
	DisplayName string           `json:"displayName"`
	Description string           `json:"description"`
	Home        bool             `json:"home"`
	Provider    providers.Config `json:"provider"`
}

Config is the structure of the configuration for a single TechDocs instance.

type Instance

type Instance struct {
	Name string
	// contains filtered or unexported fields
}

Instance represents a single TechDocs instance, which can be added via the configuration file.

func New

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

New returns a new Elasticsearch instance for the given configuration.

func (*Instance) GetFile

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

GetFile returns the content of a file.

func (*Instance) GetIndex

func (i *Instance) GetIndex(ctx context.Context, service string) (*shared.Index, error)

GetIndex returns a single index for a service.

func (*Instance) GetIndexes

func (i *Instance) GetIndexes(ctx context.Context) ([]shared.Index, error)

GetIndexes returns a list of indexes.

func (*Instance) GetMarkdown

func (i *Instance) GetMarkdown(ctx context.Context, service, path string) (*shared.Markdown, error)

GetMarkdown returns the content of a markdown file.

Jump to

Keyboard shortcuts

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