model

package
v6.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

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