Documentation ¶
Index ¶
- func GetPackageNameAndPath(plugin *protogen.Plugin) (string, string, string, error)
- type Enum
- type EnumEntry
- type Field
- func (f *Field) EnumPackage() (string, string, bool)
- func (f *Field) GetWrapperType() string
- func (f *Field) IsArray() bool
- func (f *Field) IsEnum() bool
- func (f *Field) IsMap() bool
- func (f *Field) IsMessage() bool
- func (f *Field) IsMessageFromPackage() bool
- func (f *Field) IsMessageTypeOf(typeOf string) bool
- func (f *Field) IsOptional() bool
- func (f *Field) IsProtoAny() bool
- func (f *Field) IsProtoStruct() bool
- func (f *Field) IsProtoValue() bool
- func (f *Field) IsProtobufWrapper() bool
- func (f *Field) IsTimestamp() bool
- func (f *Field) MapKeyType() string
- func (f *Field) MapValueType() string
- func (f *Field) MapValueTypeKind() protoreflect.Kind
- func (f *Field) MapValueTypeName() string
- func (f *Field) MessagePackage() (string, string, bool)
- func (f *Field) ModuleName() string
- func (f *Field) String() string
- type Message
- type Method
- type Name
- type ParseOptions
- type Protobuf
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Enum ¶
type Enum struct { Name string Prefix string Values []*EnumEntry Proto *descriptor.EnumDescriptorProto }
func ParseEnumsFromFile ¶
type EnumEntry ¶
type EnumEntry struct { ProtoName string Proto *descriptor.EnumValueDescriptorProto }
type Field ¶
type Field struct { Name string JsonName string GoName string TypeName string Type descriptor.FieldDescriptorProto_Type Schema *protogen.Field Proto *descriptor.FieldDescriptorProto // contains filtered or unexported fields }
func (*Field) GetWrapperType ¶
func (*Field) IsMessageFromPackage ¶
IsMessageFromPackage checks if the Field is a message, and it belongs to the current package or not.
func (*Field) IsMessageTypeOf ¶
IsMessageTypeOf checks if the Field is of a specific message type.
func (*Field) IsOptional ¶
IsOptional indicates if the Field is declared as optional or not.
func (*Field) IsProtoAny ¶
IsProtoAny checks if the Field is of 'google.protobuf.Any' type.
func (*Field) IsProtoStruct ¶
IsProtoStruct checks if the Field is of 'google.protobuf.Struct' type.
func (*Field) IsProtoValue ¶
IsProtoValue checks if the Field is of 'google.protobuf.Value' type.
func (*Field) IsProtobufWrapper ¶
func (*Field) IsTimestamp ¶
IsTimestamp checks if the Field is of 'google.protobuf.Timestamp' type.
func (*Field) MapKeyType ¶
func (*Field) MapValueType ¶
func (*Field) MapValueTypeKind ¶
func (f *Field) MapValueTypeKind() protoreflect.Kind
func (*Field) MapValueTypeName ¶
func (*Field) MessagePackage ¶
MessagePackage returns the message package name and a flag indicating if it belongs to the current package or not.
func (*Field) ModuleName ¶
type Message ¶
type Message struct { Name string Fields []*Field Schema *protogen.Message Proto *descriptor.DescriptorProto ModuleName string }
func ParseMessagesFromFile ¶
type Method ¶
type Method struct { Name string RequestType *Name ResponseType *Name HTTPMethod string Endpoint string Proto *descriptor.MethodDescriptorProto }
func (*Method) HasHTTPBody ¶
type ParseOptions ¶
Click to show internal directories.
Click to hide internal directories.