idl

package
v0.0.0-...-1fa5987 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFile

func LoadFile(pkg *model.Package, filePath string)

Types

type Controller

type Controller struct {
	Name    string   `hcl:"name,label"`
	Doc     *string  `hcl:"doc"`
	Extends []string `hcl:"extends,optional"`
	Methods []Method `hcl:"method,block"`
}

type Field

type Field struct {
	Name     string  `hcl:"name,label"`
	Doc      *string `hcl:"doc"`
	Type     string  `hcl:"type,label"`
	Required *bool   `hcl:"required"`
	Nullable *bool   `hcl:"nullable"`
}

type Interface

type Interface struct {
	Name    string   `hcl:"name,label"`
	Doc     *string  `hcl:"doc"`
	Extends []string `hcl:"extends,optional"`
	Methods []Method `hcl:"method,block"`
}

type Method

type Method struct {
	Name    string  `hcl:"name,label"`
	Doc     *string `hcl:"doc"`
	Inputs  []Field `hcl:"input,block"`
	Outputs []Field `hcl:"output,block"`
}

type Package

type Package struct {
	Path string
	Unit
}

type Struct

type Struct struct {
	Name   string  `hcl:"name,label"`
	Doc    *string `hcl:"doc"`
	Fields []Field `hcl:"field,block"`
}

type Unit

type Unit struct {
	Interfaces []Interface `hcl:"interface,block"`
	Structs    []Struct    `hcl:"struct,block"`
}

func ParseFile

func ParseFile(filename string) (*Unit, error)

Jump to

Keyboard shortcuts

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