generator

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package generator implements the code generator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldOptions

func FieldOptions(f *protogen.Field) *ddbv1.FieldOptions

FieldOptions returns our plugin specific options for a field. If the field has no options it returns nil.

Types

type Config

type Config struct{}

Config for configuring the generator

type Generator

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

Generator generates DynamoDB helper functions

func NewGenerator

func NewGenerator(logs *zap.Logger, opts Config) (g *Generator, err error)

NewGenerator inits the generator

func (Generator) CreateTarget

func (g Generator) CreateTarget(pf *protogen.File, ddbimport string) *Target

CreateTarget inits a target for a generator

type Target

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

Target facilitates generation from a single protobuf file

func (*Target) GenerateMessageLogic added in v0.2.4

func (tg *Target) GenerateMessageLogic(w io.Writer) error

GenerateMessageLogic peforms the actual code generation

func (*Target) GeneratePathBuilding added in v0.2.4

func (tg *Target) GeneratePathBuilding(w io.Writer, pkgSuffix string) error

GeneratePathBuilding generates code for type-safe document pathing building

Jump to

Keyboard shortcuts

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