converters

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtoTypeToGoType

func ProtoTypeToGoType(protobufType protoreflect.Kind, messageType, moduleName string) string

func TrimPackageName

func TrimPackageName(name, packageName string) string

Types

type Database

type Database struct {
	Kind DatabaseKind
	// contains filtered or unexported fields
}

func (*Database) FieldName

func (d *Database) FieldName(name string) string

func (*Database) Tag

func (d *Database) Tag(name string) string

type DatabaseKind

type DatabaseKind int
const (
	MongoDB DatabaseKind = iota
)

type Field

type Field struct {
	// contains filtered or unexported fields
}

func NewField

func NewField(options FieldOptions) (*Field, error)

func (*Field) ConvertDomainTypeToArrayWireType

func (f *Field) ConvertDomainTypeToArrayWireType(receiver string, wireInput bool) string

func (*Field) ConvertDomainTypeToMapWireType

func (f *Field) ConvertDomainTypeToMapWireType(receiver string, wireInput bool) string

func (*Field) ConvertToWireType

func (f *Field) ConvertToWireType(wireInput bool) string

func (*Field) ConvertWireOutputToArrayOutbound

func (f *Field) ConvertWireOutputToArrayOutbound(receiver string) string

func (*Field) ConvertWireOutputToMapOutbound

func (f *Field) ConvertWireOutputToMapOutbound(receiver string) string

func (*Field) ConvertWireOutputToOutbound

func (f *Field) ConvertWireOutputToOutbound(receiver string) string

func (*Field) DomainName

func (f *Field) DomainName() string

func (*Field) DomainTag

func (f *Field) DomainTag() string

func (*Field) DomainType

func (f *Field) DomainType(isPointer bool) string

DomainType returns the current field type for the domain.

func (*Field) DomainTypeForTest

func (f *Field) DomainTypeForTest(isPointer bool) string

func (*Field) InboundName

func (f *Field) InboundName() string

func (*Field) InboundTag

func (f *Field) InboundTag() string

func (*Field) OutboundJsonTagFieldName

func (f *Field) OutboundJsonTagFieldName() string

func (*Field) OutboundName

func (f *Field) OutboundName() string

func (*Field) OutboundTag

func (f *Field) OutboundTag() string

func (*Field) OutboundType

func (f *Field) OutboundType(isPointer bool) string

OutboundType returns the current field type for the outbound response.

func (*Field) ValidationCall

func (f *Field) ValidationCall() string

func (*Field) ValidationName

func (f *Field) ValidationName(receiver string) string

func (*Field) WireType

func (f *Field) WireType(isPointer bool) string

WireType returns the current field type corresponding to the wire type.

type FieldOptions

type FieldOptions struct {
	IsHTTPService bool
	Receiver      string
	ProtoField    *protobuf.Field
	Message       *Message
	ProtoMessage  *protobuf.Message
	Settings      *settings.Settings
}

type Message

type Message struct {
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(options MessageOptions) *Message

func (*Message) Kind

func (m *Message) Kind(name string) MessageKind

func (*Message) WireName

func (m *Message) WireName(name string) string

func (*Message) WireOutputToOutbound

func (m *Message) WireOutputToOutbound(name string) string

func (*Message) WireToDomain

func (m *Message) WireToDomain(name string) string

func (*Message) WireToDomainMapValueType

func (m *Message) WireToDomainMapValueType(name string) string

type MessageKind

type MessageKind int
const (
	UnknownMessageKind MessageKind = iota
	WireMessage
	WireInputMessage
	WireOutputMessage
)

func (MessageKind) String

func (k MessageKind) String() string

type MessageOptions

type MessageOptions struct {
	Settings *settings.Settings
}

Jump to

Keyboard shortcuts

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