internal

package
v0.0.0-...-c71d033 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDirForComments

func ParseDirForComments(directory string) (comments []string)

Types

type Component

type Component struct {
	Types map[string]SwagifyComment
}

func ParseSwagifyComment

func ParseSwagifyComment(comments []string) Component

this will return something like this: { map[parameter]: {map[<name>]: [line1, line2, ...], map[<name>]: [line1, line2, ...]} map[schema]: {map[<name>]: [line1, line2, ...], map[<name>]: [line1, line2, ...]} }

type MyField

type MyField struct {
	Name string
	Type string
	Tag  string
}

type MyStruct

type MyStruct struct {
	Name   string
	Fields []MyField
}

func ParseDirForStructs

func ParseDirForStructs(directory string, comments SwagifyComment) (myStructs []MyStruct)

this will take a list of "marked" (through comments) to parse and create a MyStruct structure based on the struct's content, used by "schema", see internal/schema/schema.go

type SwagifyComment

type SwagifyComment struct {
	Comments map[string][][]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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