plugin

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Package       string
	GoPackageName string
	GoType        string
}

used to store all messages in case of proto imports

type Method

type Method struct {
	MethodName      string
	ServiceName     string
	MapperName      string
	RequestName     string
	ResponseName    string
	SqlTemplateName string
	QueryType       string
}

RPC Method, corresponding to a single sql statement

type Server

type Server struct {
	ServiceName string
	MapperNames map[string]bool
}

RPC Method, corresponding to a single sql statement

type SqlPlugin

type SqlPlugin struct {
	*generator.Generator

	SqlTemplates    string
	SqlTemplateName string
	Pkg             map[alias]bool
	EnumValueMaps   map[string]map[string]int32
	// contains filtered or unexported fields
}

func New

func New() (*SqlPlugin, error)

func (*SqlPlugin) Error

func (g *SqlPlugin) Error(errorMsg string)

func (*SqlPlugin) Generate

func (p *SqlPlugin) Generate(file *generator.FileDescriptor)

Generates mapper file

func (*SqlPlugin) GenerateImports

func (p *SqlPlugin) GenerateImports(file *generator.FileDescriptor)

func (*SqlPlugin) GenerateSQLTemplates

func (p *SqlPlugin) GenerateSQLTemplates() error

func (*SqlPlugin) GetSQLTemplates

func (p *SqlPlugin) GetSQLTemplates() error

func (*SqlPlugin) Init

func (p *SqlPlugin) Init(g *generator.Generator)

func (*SqlPlugin) Name

func (p *SqlPlugin) Name() string

func (*SqlPlugin) PrintSQLTemplates

func (p *SqlPlugin) PrintSQLTemplates(file *generator.FileDescriptor) error

Generate sql template only in the first protofile

func (*SqlPlugin) TestSQLTemplates

func (p *SqlPlugin) TestSQLTemplates(g *generator.Generator)

Jump to

Keyboard shortcuts

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