Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsStrField ¶
func IsStrField(md *desc.MessageDescriptor, path ...string) bool
Types ¶
type Config ¶
type Config struct {
Proto struct {
Files []string `yaml:"files"`
ImportPath []string `yaml:"import_path"`
} `yaml:"proto"`
Sheet struct {
CommentRows []int `yaml:"comment_rows"`
MetaRow int `yaml:"meta_row"`
DataRowStart int `yaml:"data_row_start"`
TypeSuffix string `yaml:"type_suffix"`
ListFieldName string `yaml:"list_field_name"`
RowTypeSuffix string `yaml:"row_type_suffix"`
} `yaml:"sheet"`
Output struct {
Dir string `yaml:"dir"`
WriteJSON bool `yaml:"write_json"`
JSONIndent string `yaml:"json_indent"`
WriteBytes bool `yaml:"write_bytes"`
} `yaml:"output"`
}
func ConfigFromFile ¶
type Parameter ¶
type Parameter struct {
*Config
// contains filtered or unexported fields
}
func NewParameter ¶
func NewParameter(cfg *Config, tp TypeProvidor) *Parameter
func (*Parameter) IsStrField ¶
type TypeProvidor ¶
type TypeProvidor interface {
MessageByName(string) *desc.MessageDescriptor
}
func LoadProtoFiles ¶
func LoadProtoFiles(importPaths []string, fileNames ...string) (tp TypeProvidor, err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
