views

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ResourceName string
	PluralName   string
	ModulePath   string
}

type GeneratedView

type GeneratedView struct {
	ResourceName string
	PluralName   string
	Fields       []ViewField
	ModulePath   string
}

type Generator

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

func NewGenerator

func NewGenerator(databaseType string) *Generator

func (*Generator) Build

func (g *Generator) Build(cat *catalog.Catalog, config Config) (*GeneratedView, error)

func (*Generator) GenerateView

func (g *Generator) GenerateView(
	cat *catalog.Catalog,
	resourceName string,
	modulePath string,
) error

func (*Generator) GenerateViewFile

func (g *Generator) GenerateViewFile(view *GeneratedView, withController bool) (string, error)

func (*Generator) GenerateViewWithController

func (g *Generator) GenerateViewWithController(
	cat *catalog.Catalog,
	resourceName string,
	modulePath string,
	withController bool,
) error

type ViewField

type ViewField struct {
	Name            string
	GoType          string
	GoFormType      string
	DisplayName     string
	IsTimestamp     bool
	InputType       string
	StringConverter string
	DBName          string
	CamelCase       string
	IsSystemField   bool
}

Jump to

Keyboard shortcuts

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