apidocs

package
Version: v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ExternalConfigName = "apidocs"

ExternalConfigName is the external config name of apidocs.

Variables

This section is empty.

Functions

func Default

func Default() nirvana.Configurer

Default Configurer does nothing but ensure default config was set.

func Disable

func Disable() nirvana.Configurer

Disable returns a configurer to disable current plugin for a certain nirvana server.

func Files

func Files(files map[string]string) nirvana.Configurer

Files Configurer sets apidocs files config.

func Path

func Path(path string) nirvana.Configurer

Path returns a configurer to set apidocs path.

Types

type Option

type Option struct {
	Path  string `desc:"Path to list information of all API docs"`
	Files string `desc:"Comma separated of apidocsVersion:apidocsPath, it can be v1:./apis/api.v1.json,v2:./apis/api.v2.json"`
}

Option contains basic configurations of apidocs.

func NewDefaultOption

func NewDefaultOption() *Option

NewDefaultOption creates default option.

func (*Option) Configure

func (p *Option) Configure(cfg *nirvana.Config) error

Configure configures nirvana config via current options.

func (*Option) Name

func (p *Option) Name() string

Name returns plugin name.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL