Help us shape the future of Go! Take the 2026 Go Developer Survey

importers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Importer

type Importer struct {
	MasterFile     *builder.FileBuilder
	MasterFileName string
	ProtoconfPath  string
	Files          map[string]*builder.FileBuilder
}

Importer will be used as an API to import config structs as proto files

func NewImporter

func NewImporter(masterFileName, protoconfPath string) *Importer

NewImporter returns a new ImporterInstance

func (Importer) FilterFiles

func (i Importer) FilterFiles(fileName, msgName string) map[string]*builder.FileBuilder

FilterFiles filter out files which are not required by the top config struct

func (Importer) FilterFilesAndMessages

func (i Importer) FilterFilesAndMessages(fileName, msgName string) map[string]*builder.FileBuilder

FilterFilesAndMessages filter out messages which are not requird by the top config strunt

func (*Importer) GetMessageFromFile

func (i *Importer) GetMessageFromFile(fileName, msgName string) *builder.MessageBuilder

GetMessageFromFile returns a message from Files

func (*Importer) RegisterFile

func (i *Importer) RegisterFile(f *builder.FileBuilder)

RegisterFile will add a file to fileRegistry

func (*Importer) SaveAll

func (i *Importer) SaveAll() error

SaveAll will write all the proto files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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