Documentation ¶
Index ¶
- Constants
- Variables
- func BlockToA(ident, name string, level int, content func(int) string) string
- func EnumToA(e *parser.Enum, level int) string
- func FieldToA(f *parser.Field, level int) string
- func Indentation(level int) string
- func LineOptionsToA(opts map[string]string) string
- func LineToA(mod, typ, name, number string, opts map[string]string, level int) string
- func MapToA(m *parser.MapField, level int) string
- func MessageToA(m *parser.Message, level int) string
- func MessageToAction(m *parser.Message, level int) string
- func MessageToFlag(m *parser.Message, level int, prefix string, required bool) (string, error)
- func MetaToAction(r *Resource, level int) string
- func MetaToFlag(r *Resource, level int) string
- func OneofToA(o *parser.Oneof, level int) string
- func OperationsToA(name string, ops []string) string
- func OptionToA(o *parser.Option, level int) string
- func PbToGoType(t string) string
- func PrefixName(prefix, name string) string
- func ResourceToAction(r *Resource, level int) string
- func ResourceToFlag(r *Resource, level int) string
- func WriteRune(b *strings.Builder, r rune)
- func WriteString(b *strings.Builder, s string)
- type Entry
- type Proto
- type Resource
- type ResourceEntries
- type Service
Constants ¶
View Source
const ( TypeEnum = iota TypeMessage )
Variables ¶
View Source
var ( // https://developers.google.com/protocol-buffers/docs/proto3#scalar PbGoTypes = map[string]string{ "double": "float64", "float": "float32", "int32": "int32", "int64": "int64", "uint32": "uint32", "uint64": "uint64", "sint32": "int32", "sint64": "int64", "fixed32": "uint32", "fixed64": "uint64", "sfixed32": "int32", "sfixed64": "int64", "bool": "bool", "string": "string", "bytes": "[]byte", } )
Functions ¶
func Indentation ¶
func LineOptionsToA ¶
func MessageToFlag ¶
TODO change MessageToFlag > MessageToEntry
func MetaToAction ¶
func MetaToFlag ¶
TODO change MetaToFlag > MetaToEntry
func OperationsToA ¶
func PbToGoType ¶
func PrefixName ¶
func ResourceToAction ¶
func ResourceToFlag ¶
TODO change ResourceToFlag > ResourceToEntry
func WriteString ¶
Types ¶
type Entry ¶
func FieldToEntry ¶
type Proto ¶
type Resource ¶
type Resource struct { Name string Meta *parser.Message Enums []*parser.Enum Fields []*parser.Field Maps []*parser.MapField Messages []*parser.Message Options []*parser.Option Oneofs []*parser.Oneof Operations []string Types map[string]int }
func (*Resource) MessageString ¶
func (*Resource) OperationString ¶
func (*Resource) SetOperations ¶
type ResourceEntries ¶
Click to show internal directories.
Click to hide internal directories.