protocgenvalibot

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 6 Imported by: 0

README

protoc-gen-valibot

Documentation

Index

Constants

View Source
const PkgLookup = ":lookup:"

Variables

This section is empty.

Functions

func Generate

func Generate(file *protogen.File, code *File) error

func Walk

func Walk(n Node, f func(Node))

Types

type Array

type Array struct {
	Elements []Node
}

func (Array) String

func (a Array) String() string

type Callable

type Callable struct {
	Name    string
	Pkg     string
	PkgFile string
	Args    []Node
}

func (Callable) String

func (m Callable) String() string

type Declaration

type Declaration interface {
	GetName() string
	String() string
	GetImportMap() ImportMap
}

type ExportVar

type ExportVar struct {
	Name    string
	Value   Node
	Comment string
}

func (ExportVar) GetImportMap

func (v ExportVar) GetImportMap() ImportMap

GetImportMap implements Declaration.

func (ExportVar) GetName

func (v ExportVar) GetName() string

GetName implements Declaration.

func (ExportVar) String

func (v ExportVar) String() string

String implements Declaration.

type File

type File struct {
	Content []Declaration
}

func (File) GetImportMap

func (c File) GetImportMap() ImportMap

type Import

type Import struct {
	Pkg   string
	Names []string
}

func (Import) String

func (i Import) String() string

type ImportMap

type ImportMap map[string]map[string]ImportMapDetail

func MergeImportMap

func MergeImportMap(a, b ImportMap) ImportMap

type ImportMapDetail

type ImportMapDetail struct {
	FullName string
}

type Node

type Node interface {
	String() string
}

type Number

type Number struct {
	Value int
}

func (Number) String

func (n Number) String() string

type Object

type Object struct {
	Fields []ObjectField
}

func (Object) String

func (o Object) String() string

type ObjectField

type ObjectField struct {
	Key   string
	Value Node
}

type String

type String struct {
	Value string
}

func (String) String

func (s String) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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