parser

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagSection  = "docs:section"
	TagIgnore   = "docs:ignore"
	TagType     = "docs:type"
	TagDefault  = "docs:default"
	TagProperty = "docs:property"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	heuristics.CommentBlock
	Tags tags
}

type Document

type Document struct {
	Sections []Section
}

func Load

func Load(filename string) (*Document, error)

type Node

type Node struct {
	Path         paths.Path
	HeadComments []Comment
	FootComment  []Comment
	RawNode      *yaml.Node
}

type Property

type Property struct {
	Path        paths.Path
	Description Comment
	Type        Type
	Default     string
}

type Section

type Section struct {
	Name        string
	Description Comment
	Properties  []Property
}

type Type

type Type string
const (
	TypeUnknown   Type = "unknown"
	TypeString    Type = "string"
	TypeNumber    Type = "number"
	TypeBool      Type = "bool"
	TypeTimestamp Type = "timestamp"
	TypeArray     Type = "array"
	TypeObject    Type = "object"
)

func (Type) SchemaString

func (t Type) SchemaString() string

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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