language

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportList

type ImportList []string

ImportList of imports

func (ImportList) Format

func (l ImportList) Format() []byte

Format the set into Go syntax (compatible with go imports)

func (ImportList) GetSorted

func (l ImportList) GetSorted() (ImportList, ImportList)

func (ImportList) Len

func (l ImportList) Len() int

Len implements sort.Interface.Len

func (ImportList) Less

func (l ImportList) Less(i, j int) bool

Less implements sort.Interface.Less

func (ImportList) Swap

func (l ImportList) Swap(i, j int)

Swap implements sort.Interface.Swap

type Importer

type Importer interface {
	Import(...string) string
	ImportList(list ImportList) string
	ToList() ImportList
}

type Language

type Language interface {
	Importer() Importer
	IsTest(templateName string) bool
	OutputFileName(schema, tableName string, isTest bool) string
	WriteHeader(
		out *bytes.Buffer, imps ImportList,
		pkgName string, isTest bool,
	) error
	Format(buf io.Reader) ([]byte, error)
	Disclaimer() string
}

type Languages

type Languages struct {
	GeneratorName           string
	GoVersion               string
	SeparatePackageForTests bool
}

func (Languages) GetOutputLanguage

func (o Languages) GetOutputLanguage(ext string) Language

Jump to

Keyboard shortcuts

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