generate

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package generate provides the core functionality of EasyP generate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Deps          []string
	Plugins       []Plugin
	ModuleReflect *modulereflect.ModuleReflect
}

Config is the configuration for EasyP generate.

type Generator

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

Generator is the core functionality of EasyP generate.

func New

func New(cfg Config) *Generator

New creates a new Lint.

example

protoc \
 -I . \
 -I /usr/local/include \
 --go_out=. \
 --go_opt=paths=source_relative \
 --go-grpc_out=. \
 --go-grpc_opt=paths=source_relative \
 proto/hello.proto

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, root, directory string) error

Generate generates files.

type Plugin

type Plugin struct {
	Name    string
	Out     string
	Options map[string]string
}

Plugin is a plugin for gRPC generator.

type Query

type Query struct {
	Compiler string
	Imports  []string
	Plugins  []Plugin
	Files    []string
}

Query is a query for making sh command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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