golang

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	Report  analyzer.Report
	Files   map[string]string
	BaseDir string
}

Generator handles Go code generation

func New

func New(report analyzer.Report) *Generator

New creates a new Go code generator

func (*Generator) Generate

func (g *Generator) Generate() (string, error)

Generate generates Go code for all transactions and scripts

func (*Generator) SetBaseDir

func (g *Generator) SetBaseDir(dir string)

SetBaseDir sets the base directory for reading files

type GoField

type GoField struct {
	Name     string
	Type     string
	Optional bool
	JSONName string
}

GoField represents a field in a Go struct

type GoFunction

type GoFunction struct {
	Name       string
	Parameters []GoParameter
	ReturnType string
	Base64     string
	Type       string // "transaction" or "query"
}

GoFunction represents a function in the generated code

type GoParameter

type GoParameter struct {
	Name     string
	Type     string
	Optional bool
}

GoParameter represents a parameter in Go

type GoStruct

type GoStruct struct {
	Name   string
	Fields []GoField
}

GoStruct represents a struct in Go

Jump to

Keyboard shortcuts

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