docs

package
v0.0.0-...-7ae29b8 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MPL-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default string

type Details

type Details struct {
	Description string
	Example     string

	Input  string
	Output string

	Mappers []Mapper
}

type DocOption

type DocOption interface {
	// contains filtered or unexported methods
}

type Documentation

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

func New

func New(opts ...Option) (*Documentation, error)

func (*Documentation) AddMapper

func (d *Documentation) AddMapper(input, output, description string)

func (*Documentation) Description

func (d *Documentation) Description(x string)

func (*Documentation) Details

func (d *Documentation) Details() *Details

func (*Documentation) Example

func (d *Documentation) Example(x string)

func (*Documentation) Fields

func (d *Documentation) Fields() []*FieldDocs

func (*Documentation) Input

func (d *Documentation) Input(x string)

func (*Documentation) Output

func (d *Documentation) Output(x string)

func (*Documentation) OverrideField

func (d *Documentation) OverrideField(f *FieldDocs) error

func (*Documentation) SetField

func (d *Documentation) SetField(name, synposis string, opts ...DocOption) error

type EnvVar

type EnvVar string

type FieldDocs

type FieldDocs struct {
	Field    string
	Type     string
	Synopsis string
	Summary  string

	Optional bool
	Default  string
	EnvVar   string
}

type Mapper

type Mapper struct {
	Input       string
	Output      string
	Description string
}

type Option

type Option func(*Documentation) error

func FromConfig

func FromConfig(v interface{}) Option

type SummaryString

type SummaryString string

func Summary

func Summary(in ...string) SummaryString

Jump to

Keyboard shortcuts

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