Documentation ¶
Overview ¶
Package cmds is sort of like ast for oapenapi commands. Its sole purpose is to given package and command recognize what it is and what arguments are available.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCommentGroup ¶
func ParseCommentGroup(gg *ast.CommentGroup) []string
ParseCommentGroup will take ast comment group and returns parsed comments as a strings.
Types ¶
type Args ¶
type Args []string
Args are aguements to commands
type CmdBase ¶
type CmdBase struct {
// contains filtered or unexported fields
}
CmdBase is base command
type CmdRoot ¶
type CmdRoot struct {
CmdBase
}
CmdRoot root command parses the syntax '//openapi ....'. Dummy schema for now.
type CmdSchema ¶
CmdSchema is command responsible for allowing schema exports to be possible. It has simple syntax: //oapi:schema <uri>, causing schema to be exported at root of document usually components.*.
type Commander ¶
Commander interface allows to unite and cast given comments at need.
func NewCmdSchema ¶
NewCmdSchema creates new command schema
type Scanner ¶
type Scanner struct {
Commands Map
}
Scanner allow to scan go code for commands. Commands are specific comments allowing to alter behaviour of scanner.
func (*Scanner) ExportedComponents ¶
ExportedComponents will provide exported components in a form of resolver.Exports.