types

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name   string            `json:"name"`
	Type   GoType            `json:"type"`
	Column introspect.Column `json:"column"`
}

func NewField

func NewField(
	column introspect.Column,
	translate Translate,
	storePackageDir string,
	storePackageName string,
) (Field, error)

type GoType

type GoType struct {
	DbType    string
	GoType    string
	Import    string
	IsPointer bool
}

type Translate

type Translate interface {
	Infer(
		storePackageDir string,
		storePackageName string,
		column introspect.Column,
	) (GoType, error)

	ModelTemplate() string

	QueryTemplate() string
}

func NewFakeTranslate

func NewFakeTranslate(
	modelTemplateContent string,
	queryTemplateContent string,
) Translate

Jump to

Keyboard shortcuts

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