config

package
v0.0.0-...-f43bd78 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: ISC Imports: 8 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 {
	// Sections is a list of section available.
	Sections map[string]Section
}

Config is the configuration of protoc-gen-doc.

func Load

func Load(folderPath string, r io.Reader) (*Config, error)

Load loads the configuration, assuming that paths are relative to the provided folderPath.

func LoadFile

func LoadFile(file string) (*Config, error)

LoadFile loads the configuration at the specified path.

type Section

type Section struct {
	// DisplayName is the name to display on the documentation tag like a
	// header.
	DisplayName string
	// Packages is the list of packages to include for the section.
	Packages []string
	// PreambleContent is the content to display before the struct and endpoint
	// definitions.
	PreambleContent string
	// Weight is an arbitrary number defining the order of the sections. Lower
	// numbers should be placed nearer to the front.
	Weight int
}

Section is a part of the documentation as defined. Each section will output a separate tag.

Jump to

Keyboard shortcuts

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