metadata

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputGrpc added in v0.18.1

func InputGrpc(s *Service) []string

func OutputGrpc added in v0.18.1

func OutputGrpc(s *Service) []string

Types

type Definition

type Definition struct {
	Args               string
	GoModule           string
	Packages           []*Package
	MigrationPath      string
	MigrationLib       string
	LiteFS             bool
	Litestream         bool
	DistributedTracing bool
	Metric             bool
}

func (*Definition) Database

func (d *Definition) Database() string

func (*Definition) DatabaseDriver added in v0.18.1

func (d *Definition) DatabaseDriver() string

func (*Definition) DatabaseImport added in v0.18.1

func (d *Definition) DatabaseImport() string

func (*Definition) SqlPackage added in v0.17.1

func (d *Definition) SqlPackage() string

func (*Definition) Validate added in v0.18.1

func (d *Definition) Validate() error

type Field added in v0.10.1

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

func (*Field) Proto added in v0.10.1

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

type HttpSpec added in v0.19.0

type HttpSpec struct {
	Method string
	Path   string
}

type Message

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

func (*Message) AdapterToGo added in v0.5.0

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

func (*Message) AdapterToProto added in v0.5.0

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

func (*Message) HasComplexAttribute added in v0.2.0

func (m *Message) HasComplexAttribute(messages map[string]*Message) bool

func (*Message) ProtoAttributes

func (m *Message) ProtoAttributes() string

func (*Message) ProtoName added in v0.9.0

func (m *Message) ProtoName() string

type Package added in v0.1.0

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
	CustomProtoRPCs            []string
	CustomProtoMessages        []string
	HasExecResult              bool
}

func ParsePackage added in v0.1.0

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

func (*Package) LoadOptions added in v0.10.1

func (p *Package) LoadOptions(protoFile string)

func (*Package) ProtoImports added in v0.1.0

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

type PackageOpts added in v0.7.0

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
	HttpSpecs           []HttpSpec
	CustomSpecs         map[string][]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 added in v0.2.0

func (s *Service) HasSimpleParams() bool

func (*Service) HttpBody added in v0.2.0

func (s *Service) HttpBody() string

func (*Service) HttpMethod added in v0.2.0

func (s *Service) HttpMethod() string

func (*Service) HttpOptions added in v0.2.0

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

func (*Service) HttpPath added in v0.2.0

func (s *Service) HttpPath() string

func (*Service) HttpResponseBody added in v0.2.0

func (s *Service) HttpResponseBody() string

func (*Service) ParamsCallDatabase

func (s *Service) ParamsCallDatabase() string

Jump to

Keyboard shortcuts

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