stubgen

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GolangStub

func GolangStub(in Input) (string, error)

func TypeScriptStub added in v0.12.0

func TypeScriptStub(in Input) (string, error)

Types

type GenFunc added in v0.9.10

type GenFunc func(in Input) (string, error)

GenFunc is the function which generates the final code. For example to generate golang code use GolangStub

type Generator added in v0.9.10

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

func New added in v0.9.10

func New(opt ...Option) *Generator

func (*Generator) Generate added in v0.9.10

func (g *Generator) Generate(descs ...desc.ServiceDesc) error

func (*Generator) MustGenerate added in v0.9.10

func (g *Generator) MustGenerate(desc ...desc.ServiceDesc)

type Input added in v0.10.20

type Input struct {
	desc.Stub
	Name string
	Pkg  string
}

type Option added in v0.10.19

type Option func(*genConfig)

func WithFolderName added in v0.10.19

func WithFolderName(name string) Option

func WithGenFunc added in v0.10.19

func WithGenFunc(gf GenFunc, ext string) Option

func WithOutputDir added in v0.10.19

func WithOutputDir(dir string) Option

func WithPkgName added in v0.10.19

func WithPkgName(name string) Option

func WithStubName added in v0.10.20

func WithStubName(name string) Option

func WithTags added in v0.10.19

func WithTags(tags ...string) Option

Jump to

Keyboard shortcuts

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