Documentation ¶
Index ¶
- type BuildContextOptions
- type Context
- func (c *Context) AddonContext(addonName string) interface{}
- func (c *Context) AddonIntoOutboundExtensionContent(msg *Message, receiver string) string
- func (c *Context) CustomApiExtensions() []*Message
- func (c *Context) DomainMessages() []*Message
- func (c *Context) Extension() string
- func (c *Context) GetAddonTemplateImports(addonName, tplName string) []*templateImport
- func (c *Context) GetTemplateImports(name string) []*templateImport
- func (c *Context) GetTemplateValidator(name template.Name, _ interface{}) (template.ValidateForExecution, bool)
- func (c *Context) HasAddonImportFor(addonName, tplName string) bool
- func (c *Context) HasAddonIntoOutboundExtensionContent(msg *Message) bool
- func (c *Context) HasImportFor(name string) bool
- func (c *Context) HasRequiredBody() bool
- func (c *Context) HasValidatableMessage() bool
- func (c *Context) IsHTTPService() bool
- func (c *Context) OutboundHasBitflagField() bool
- func (c *Context) OutboundMessages() []*Message
- func (c *Context) ServiceName() string
- func (c *Context) UseCommonConverters() bool
- func (c *Context) ValidatableMessages() []*Message
- func (c *Context) WireInputMessages() []*Message
- type CustomCode
- type Endpoint
- type Enum
- type EnumEntry
- type Field
- func (f *Field) ConvertDomainTypeToArrayWireInputType(receiver string) string
- func (f *Field) ConvertDomainTypeToArrayWireType(receiver string) string
- func (f *Field) ConvertDomainTypeToMapWireInputType(receiver string) string
- func (f *Field) ConvertDomainTypeToMapWireType(receiver string) string
- func (f *Field) ConvertDomainTypeToWireInputType() string
- func (f *Field) ConvertDomainTypeToWireType() string
- func (f *Field) ConvertWireOutputToArrayOutbound(receiver string) string
- func (f *Field) ConvertWireOutputToMapOutbound(receiver string) string
- func (f *Field) ConvertWireOutputToOutbound(receiver string) string
- func (f *Field) DomainType() string
- func (f *Field) IsBindable() bool
- func (f *Field) IsOutboundBitflag() bool
- func (f *Field) IsPointer() bool
- func (f *Field) IsProtobufValue() bool
- func (f *Field) IsScalar() bool
- func (f *Field) IsValidatable() bool
- func (f *Field) OutboundHide() bool
- func (f *Field) OutboundType() string
- func (f *Field) TestingValueBinding() string
- func (f *Field) TestingValueCall() string
- func (f *Field) Validate() error
- func (f *Field) ValidationCall() string
- func (f *Field) ValidationName(receiver string) string
- func (f *Field) WireType() string
- type FieldLocation
- type HttpRule
- type LoadFieldOptions
- type LoadMessagesOptions
- type Message
- func (m *Message) ArrayFields() []*Field
- func (m *Message) BindableFields(templateName string) []*Field
- func (m *Message) CustomApiCode() []*CustomCode
- func (m *Message) DomainExport() bool
- func (m *Message) GetFields(templateName string) []*Field
- func (m *Message) GetReceiverName() string
- func (m *Message) HasArrayField() bool
- func (m *Message) HasBitflagField() bool
- func (m *Message) HasCustomApiCodeExtension() bool
- func (m *Message) HasMapField() bool
- func (m *Message) HasValidatableField() bool
- func (m *Message) IsWireInputKind() bool
- func (m *Message) MapFields() []*Field
- func (m *Message) OutboundExport() bool
- func (m *Message) ValidatableFields() []*Field
- func (m *Message) ValidationNeedsCustomRuleOptions() bool
- type Method
- func (m *Method) AuthModeKey() string
- func (m *Method) AuthModeValue() string
- func (m *Method) Endpoint() string
- func (m *Method) HTTPMethod() string
- func (m *Method) HasAuth() bool
- func (m *Method) HasHeaderArguments() bool
- func (m *Method) HasQueryArguments() bool
- func (m *Method) HasRequiredBody() bool
- func (m *Method) Validate() error
- type MethodField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildContextOptions ¶
type Context ¶
type Context struct { PluginName string ModuleName string Enums []*Enum Methods []*Method Package *protobuf.Protobuf // contains filtered or unexported fields }
func BuildContext ¶
func BuildContext(opt BuildContextOptions) (*Context, error)
func (*Context) AddonContext ¶
func (*Context) AddonIntoOutboundExtensionContent ¶
func (*Context) CustomApiExtensions ¶ added in v0.2.0
func (*Context) DomainMessages ¶
func (*Context) GetAddonTemplateImports ¶
func (*Context) GetTemplateImports ¶
func (*Context) GetTemplateValidator ¶
func (*Context) HasAddonImportFor ¶
func (*Context) HasAddonIntoOutboundExtensionContent ¶
func (*Context) HasImportFor ¶
func (*Context) HasRequiredBody ¶
func (*Context) HasValidatableMessage ¶
func (*Context) IsHTTPService ¶
func (*Context) OutboundHasBitflagField ¶
func (*Context) OutboundMessages ¶
func (*Context) ServiceName ¶
func (*Context) UseCommonConverters ¶
func (*Context) ValidatableMessages ¶
func (*Context) WireInputMessages ¶
type CustomCode ¶
type Endpoint ¶
type Endpoint struct { Body string Path string Method string Parameters []string HttpExtensions *extensions.HttpMethodExtensions }
type Enum ¶
type Enum struct { IsBitflagKind bool IsErrorCode bool Name string Prefix string Entries []*EnumEntry ProtoEnum *protobuf.Enum }
func (*Enum) HasEntryDefinition ¶
type Field ¶
type Field struct { IsMessage bool IsMap bool IsArray bool IsProtoOptional bool Type descriptor.FieldDescriptorProto_Type GoType string GoName string JsonName string ProtoName string DomainName string DomainTag string InboundTag string OutboundName string OutboundTag string OutboundJsonTagFieldName string MessageReceiver string Location FieldLocation ProtoField *protobuf.Field // contains filtered or unexported fields }
func (*Field) ConvertDomainTypeToArrayWireInputType ¶
func (*Field) ConvertDomainTypeToArrayWireType ¶
func (*Field) ConvertDomainTypeToMapWireInputType ¶
func (*Field) ConvertDomainTypeToMapWireType ¶
func (*Field) ConvertDomainTypeToWireInputType ¶
func (*Field) ConvertDomainTypeToWireType ¶
func (*Field) ConvertWireOutputToArrayOutbound ¶
func (*Field) ConvertWireOutputToMapOutbound ¶
func (*Field) ConvertWireOutputToOutbound ¶
func (*Field) DomainType ¶
func (*Field) IsBindable ¶
func (*Field) IsOutboundBitflag ¶
func (*Field) IsProtobufValue ¶
func (*Field) IsValidatable ¶
func (*Field) OutboundHide ¶
func (*Field) OutboundType ¶
func (*Field) TestingValueBinding ¶
func (*Field) TestingValueCall ¶
func (*Field) ValidationCall ¶
func (*Field) ValidationName ¶
type FieldLocation ¶
type FieldLocation int32
const ( FieldLocation_Unknown FieldLocation = iota FieldLocation_Body FieldLocation_Query FieldLocation_Path FieldLocation_Header )
func (FieldLocation) String ¶
func (l FieldLocation) String() string
type LoadFieldOptions ¶
type LoadMessagesOptions ¶
type Message ¶
type Message struct { Name string DomainName string WireName string OutboundName string Type converters.MessageKind Fields []*Field ProtoMessage *protobuf.Message // contains filtered or unexported fields }
func (*Message) ArrayFields ¶
func (*Message) BindableFields ¶
func (*Message) CustomApiCode ¶ added in v0.2.0
func (m *Message) CustomApiCode() []*CustomCode
func (*Message) DomainExport ¶
func (*Message) GetReceiverName ¶
func (*Message) HasArrayField ¶
func (*Message) HasBitflagField ¶
func (*Message) HasCustomApiCodeExtension ¶ added in v0.2.0
func (*Message) HasMapField ¶
func (*Message) HasValidatableField ¶
func (*Message) IsWireInputKind ¶
func (*Message) OutboundExport ¶
func (*Message) ValidatableFields ¶
func (*Message) ValidationNeedsCustomRuleOptions ¶
type Method ¶
type Method struct { Name string AdditionalHTTPMethods []HttpRule Request *Message PathArguments []*MethodField QueryArguments []*MethodField HeaderArguments []*MethodField // contains filtered or unexported fields }
func (*Method) AuthModeKey ¶
func (*Method) AuthModeValue ¶
func (*Method) HTTPMethod ¶
func (*Method) HasHeaderArguments ¶
func (*Method) HasQueryArguments ¶
func (*Method) HasRequiredBody ¶
type MethodField ¶
Click to show internal directories.
Click to hide internal directories.