Documentation
¶
Index ¶
- func AddressOf(s string) string
- func Args2ProtoFields(args types.Args) []types.ProtoField
- func Decimal2String(s string) string
- func Error2String(s string) string
- func ErrorString(s string) string
- func Fields2ProtoFields(args []types.Field) []types.ProtoField
- func Go2ProtobufType(s string) string
- func Hex2Address(s string) string
- func Int2Int32(s string) string
- func Int322Int(s string) string
- func Interface2ExchangeStructs(iface types.Interface) []types.ExchangeStruct
- func Interface2ProtoService(iface types.Interface) types.ProtoService
- func NameEmptyArgsInInterface(iface *types.Interface)
- func NewDecoder(s string) string
- func NewEncoder(s string) string
- func NoOpConverter(s string) string
- func Proto2Time(s string) string
- func RenameArg(arg *types.Arg)
- func RenameArgsInInterface(iface types.Interface)
- func RenameEmpty(t types.Type) string
- func RenameExchangeStruct(exchangeStruct types.ExchangeStruct) types.ExchangeStruct
- func ServiceError(s string) string
- func String2Error(s string) string
- func StringMethod(s string) string
- func Struct2ProtoMessage(ctx *extract.Context, s types.Struct) types.ProtoMessage
- func TODOField(_ string) string
- func Time2Proto(s string) string
- func ToValue(s string) string
- func ValueOf(s string) string
- type Converter
- type ConverterCall
- type DepIndex
- type Dependency
- type FieldExpression
- type FieldExpressionFunc
- type InterfaceConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Args2ProtoFields ¶
func Args2ProtoFields(args types.Args) []types.ProtoField
func Decimal2String ¶ added in v0.1.0
func Error2String ¶ added in v0.1.0
func ErrorString ¶ added in v0.1.0
func Fields2ProtoFields ¶ added in v0.1.0
func Fields2ProtoFields(args []types.Field) []types.ProtoField
func Go2ProtobufType ¶
func Hex2Address ¶ added in v0.1.8
func Interface2ExchangeStructs ¶
func Interface2ExchangeStructs(iface types.Interface) []types.ExchangeStruct
func Interface2ProtoService ¶
func Interface2ProtoService(iface types.Interface) types.ProtoService
func NameEmptyArgsInInterface ¶ added in v0.1.1
func NewDecoder ¶ added in v0.1.0
func NewEncoder ¶ added in v0.1.0
func NoOpConverter ¶ added in v0.1.0
func Proto2Time ¶ added in v0.1.0
func RenameArgsInInterface ¶
func RenameEmpty ¶ added in v0.1.0
func RenameExchangeStruct ¶
func RenameExchangeStruct(exchangeStruct types.ExchangeStruct) types.ExchangeStruct
func ServiceError ¶ added in v0.1.0
func String2Error ¶ added in v0.1.0
func StringMethod ¶ added in v0.1.8
func Struct2ProtoMessage ¶
func Time2Proto ¶ added in v0.1.0
Types ¶
type Converter ¶ added in v0.1.0
type Converter struct {
Type types.Struct
Proto types.Struct
StructName string
Expressions map[types.Field]FieldExpression
ConverterCalls []ConverterCall
IsSlice bool
IsPointer bool
IsInterface bool
Deps map[DepIndex]Dependency
Imports utils.Set[types.Import]
InterfaceConverters map[struct {
// contains filtered or unexported fields
}]InterfaceConverter
ErrorHandler bool
}
func NewConverter ¶ added in v0.1.0
func Structs2ProtoDecoder ¶ added in v0.1.0
type ConverterCall ¶ added in v0.1.0
type ConverterCall struct {
FieldName string
ConverterName string
Converter FieldExpression
}
type Dependency ¶ added in v0.1.0
type FieldExpression ¶ added in v0.1.0
type FieldExpression struct {
FieldExpressions []FieldExpressionFunc
Field types.Field
}
func (FieldExpression) Render ¶ added in v0.1.0
func (c FieldExpression) Render() string
type FieldExpressionFunc ¶ added in v0.1.0
func AddressFactory ¶ added in v0.1.0
func AddressFactory(t, pb types.Type) FieldExpressionFunc
func DereferenceFactory ¶ added in v0.1.0
func DereferenceFactory(t, pb types.Type) FieldExpressionFunc
func EmbeddedStructFactory ¶ added in v0.1.0
func EmbeddedStructFactory(t types.Type) FieldExpressionFunc
func NewEncoderFactory ¶ added in v0.1.0
func NewEncoderFactory(from, to string) FieldExpressionFunc
func SelectorFactory ¶ added in v0.1.0
func SelectorFactory(sel string) FieldExpressionFunc
Click to show internal directories.
Click to hide internal directories.