jsonshim

package
v1.11.4-bzc.6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const FileNameSuffix = "_json.gen.go"

FileNameSuffix is the suffix added to files generated by jsonshim

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	*generator.Generator
	generator.PluginImports
	// contains filtered or unexported fields
}

Plugin is a protoc-gen-gogo plugin that creates MarshalJSON() and UnmarshalJSON() functions for protobuf types.

func NewPlugin

func NewPlugin() *Plugin

NewPlugin returns a new instance of the Plugin

func (*Plugin) FilesWritten

func (p *Plugin) FilesWritten() map[string]interface{}

FilesWritten returns a list of the names of files for which output was generated

func (*Plugin) Generate

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

Generate our content

func (*Plugin) Init

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

Init initializes our plugin with the active generator

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns the name of this plugin

Jump to

Keyboard shortcuts

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