Documentation ¶
Overview ¶
Package pubsubinfo provides a mixin for ent that allows for adding annotations to fields required for message publishing
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // PubSubInfoTemplate adds support for generating pubsub fields PubSubInfoTemplate = parseT("template/pubsub.tmpl") // TemplateFuncs contains the extra template functions used by entx. TemplateFuncs = template.FuncMap{ "contains": strings.Contains, } // MixinTemplates includes all templates for extending ent to support entx mixins. MixinTemplates = []*gen.Template{ PubSubInfoTemplate, } )
var AnnotationName = "INFRA9_PUBSUBHOOK"
AnnotationName is the value of the annotation when read during ent compilation
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
Annotation provides a ent.Annotaion spec
func AdditionalSubject ¶
func AdditionalSubject() *Annotation
AdditionalSubject marks this field as a field to return as an additional subject
func (Annotation) Name ¶
func (a Annotation) Name() string
Name implements the ent Annotation interface.
type Extension ¶
type Extension struct { entc.DefaultExtension // contains filtered or unexported fields }
Extension is an implementation of entc.Extension that adds all the templates that entx needs.
func NewExtension ¶
func NewExtension(opts ...ExtensionOption) (*Extension, error)
NewExtension returns an entc Extension that allows the entx package to generate the schema changes and templates needed to function
type ExtensionOption ¶
ExtensionOption allow for control over the behavior of the generator