asciitree

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AscTypeArray  = "[ ] "
	AscTypeObject = "{ } "
	AscTypeMap    = "M<s>"
	AscTypeInt    = "int "
	AscTypeBool   = "bool"
	AscTypeString = "str "
	AscTypeEnum   = "enum"
)
View Source
const (
	FlagFirst int = iota
	FlagMiddle
	FlagLast
)

Variables

This section is empty.

Functions

func Components2AscTree

func Components2AscTree(oa *oasmodel.OpenAPI, f io.Writer, root string)

Components2Proto : generate proto file from Parsed OpenAPI definition

func DrawLine

func DrawLine(w io.Writer, symbol string, name string, desc string, indent string, flag int) string

Types

type Array

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

Array : array of Prototype

func (*Array) Tree

func (t *Array) Tree(w io.Writer, name string, desc string, indent string, flag int)

Tree : ProtoType interface realization

type Enum

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

Enum simple type or reference (by-name)

func (*Enum) Tree

func (t *Enum) Tree(w io.Writer, name string, desc string, indent string, flag int)

type Map

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

Map object, used to represents AdditionalProperties

func (*Map) Tree

func (t *Map) Tree(w io.Writer, name string, desc string, indent string, flag int)

Tree : ProtoType interface realization

type Object

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

Object structure

func (*Object) Tree

func (t *Object) Tree(w io.Writer, name string, desc string, indent string, flag int)

Tree : ProtoType interface realization

type ObjectMembers

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

MessageMembers Message Field definition

func (*ObjectMembers) Tree

func (t *ObjectMembers) Tree(w io.Writer, indent string, flag int)

Tree : Message Member declaration

type ProtoType

type ProtoType interface {
	Tree(w io.Writer, name string, desc string, indent string, flag int)
}

ProtoType Field Type protocol buffer interface

func CreateType

func CreateType(schema *oasmodel.Schema) ProtoType

CreateType : convert OAS Schema to internal ProtoType

type TypeName

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

TypeRef simple type or reference (by-name)

func (*TypeName) Tree

func (t *TypeName) Tree(w io.Writer, name string, desc string, indent string, flag int)

Tree : ProtoType interface realization

Jump to

Keyboard shortcuts

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