metadata

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Args          string
	GoModule      string
	Packages      []*Package
	MigrationPath string
}

func (*Definition) Database

func (d *Definition) Database() string

func (*Definition) SqlPackage added in v0.1.6

func (d *Definition) SqlPackage() string

type Field

type Field struct {
	Name                string
	Type                string
	CustomProtoComments []string
	CustomProtoOptions  []string
}

func (*Field) Proto

func (f *Field) Proto(tag int) string

type Message

type Message struct {
	Name                string
	Fields              []*Field
	IsArray             bool
	ElementType         string
	CustomProtoComments []string
	CustomProtoOptions  []string
}

func (*Message) AdapterToGo

func (m *Message) AdapterToGo(src, dst string) []string

func (*Message) AdapterToProto

func (m *Message) AdapterToProto(src, dst string) []string

func (*Message) HasComplexAttribute

func (m *Message) HasComplexAttribute() bool

func (*Message) ProtoAttributes

func (m *Message) ProtoAttributes() string

func (*Message) ProtoName

func (m *Message) ProtoName() string

type Package

type Package struct {
	Engine                     string
	Package                    string
	GoModule                   string
	SchemaPath                 string
	SrcPath                    string
	SqlPackage                 string
	Services                   []*Service
	Messages                   map[string]*Message
	OutputAdapters             []*Message
	EmitInterface              bool
	EmitParamsPointers         bool
	EmitResultPointers         bool
	EmitDbArgument             bool
	CustomProtoOptions         []string
	CustomProtoImports         []string
	CustomServiceProtoComments []string
	CustomServiceProtoOptions  []string
	HasExecResult              bool
}

func ParsePackage

func ParsePackage(opts PackageOpts, queriesToIgnore []*regexp.Regexp) (*Package, error)

func (*Package) LoadOptions

func (p *Package) LoadOptions(protoFile string)

func (*Package) ProtoImports

func (p *Package) ProtoImports() []string

type PackageOpts

type PackageOpts struct {
	Path               string
	EmitInterface      bool
	EmitParamsPointers bool
	EmitResultPointers bool
	EmitDbArgument     bool
}

type Service

type Service struct {
	Name                string
	InputNames          []string
	InputTypes          []string
	Output              string
	Sql                 string
	Messages            map[string]*Message
	CustomProtoComments []string
	CustomProtoOptions  []string
}

func (*Service) EmptyInput

func (s *Service) EmptyInput() bool

func (*Service) EmptyOutput

func (s *Service) EmptyOutput() bool

func (*Service) HasArrayOutput

func (s *Service) HasArrayOutput() bool

func (*Service) HasArrayParams

func (s *Service) HasArrayParams() bool

func (*Service) HasCustomOutput

func (s *Service) HasCustomOutput() bool

func (*Service) HasCustomParams

func (s *Service) HasCustomParams() bool

func (*Service) HasSimpleParams

func (s *Service) HasSimpleParams() bool

func (*Service) InputGrpc

func (s *Service) InputGrpc() []string

func (*Service) OutputGrpc

func (s *Service) OutputGrpc() []string

func (*Service) ParamsCallDatabase

func (s *Service) ParamsCallDatabase() string

func (*Service) ProtoOutputs

func (s *Service) ProtoOutputs() string

Jump to

Keyboard shortcuts

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