go_generator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoFileBuilder

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

func NewGoFileBuilder

func NewGoFileBuilder(generatedBy string, packageName string) *GoFileBuilder

func (*GoFileBuilder) AddAliasedImport

func (b *GoFileBuilder) AddAliasedImport(alias string, path string) *GoFileBuilder

func (*GoFileBuilder) AddFunction

func (b *GoFileBuilder) AddFunction(function *GoFunctionBuilder) *GoFileBuilder

func (*GoFileBuilder) AddImport

func (b *GoFileBuilder) AddImport(path string) *GoFileBuilder

func (*GoFileBuilder) AddRaw

func (b *GoFileBuilder) AddRaw(raw string) *GoFileBuilder

func (*GoFileBuilder) AddStruct

func (b *GoFileBuilder) AddStruct(structBuilder *GoStructBuilder) *GoFileBuilder

func (*GoFileBuilder) AddVarDeclaration

func (b *GoFileBuilder) AddVarDeclaration(name string, declType string) *GoFileBuilder

func (*GoFileBuilder) AddVarInitializer

func (b *GoFileBuilder) AddVarInitializer(name string, initializer string) *GoFileBuilder

func (*GoFileBuilder) Build

func (b *GoFileBuilder) Build() (string, error)

type GoFunctionBuilder

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

func NewGoFunctionBuilder

func NewGoFunctionBuilder(name string) *GoFunctionBuilder

func (*GoFunctionBuilder) AddImplLines

func (b *GoFunctionBuilder) AddImplLines(impl ...string) *GoFunctionBuilder

func (*GoFunctionBuilder) AddParam

func (b *GoFunctionBuilder) AddParam(name string, paramType string) *GoFunctionBuilder

func (*GoFunctionBuilder) AddReturnType

func (b *GoFunctionBuilder) AddReturnType(name string, retType string) *GoFunctionBuilder

func (*GoFunctionBuilder) Build

func (b *GoFunctionBuilder) Build() string

func (*GoFunctionBuilder) SetImplRaw

func (b *GoFunctionBuilder) SetImplRaw(impl string) *GoFunctionBuilder

func (*GoFunctionBuilder) SetReceiver

func (b *GoFunctionBuilder) SetReceiver(name string, receiverType string, isRef bool) *GoFunctionBuilder

type GoStructBuilder

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

func NewGoStructBuilder

func NewGoStructBuilder(name string) *GoStructBuilder

func (*GoStructBuilder) AddReceiverFunction

func (b *GoStructBuilder) AddReceiverFunction(function *GoFunctionBuilder, receiverName string, isRefReceiver bool) *GoStructBuilder

func (*GoStructBuilder) AddVar

func (b *GoStructBuilder) AddVar(name string, varType string) *GoStructBuilder

func (*GoStructBuilder) Build

func (b *GoStructBuilder) Build() string

func (*GoStructBuilder) GetName

func (b *GoStructBuilder) GetName() string

Jump to

Keyboard shortcuts

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