model

package
v6.103.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts *Options) (*genny.Generator, error)

New returns a generator for creating a new model

Types

type Options

type Options struct {
	Name                   string      `json:"name"`
	Attrs                  attrs.Attrs `json:"props"`
	Path                   string      `json:"path"`
	Package                string      `json:"package"`
	TestPackage            string      `json:"test_package"`
	Encoding               string      `json:"encoding"`
	ForceDefaultID         bool        `json:"force_default_id"`
	ForceDefaultTimestamps bool        `json:"force_default_timestamps"`
}

Options for generating a new model

func (*Options) Validate

func (opts *Options) Validate() error

Validate that options are usable

Directories

Path Synopsis
_fixtures

Jump to

Keyboard shortcuts

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