8000 entc/gen: import gen.Config documentation by a8m · Pull Request #2189 · ent/ent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

entc/gen: import gen.Config documentation #2189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions entc/gen/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,33 @@ import (
)

type (
// Config for global codegen to be shared between all nodes.
// The Config holds the global codegen configuration to be
// shared between all generated nodes.
Config struct {
// Schema is the package path for the schema package.
// Schema holds the Go package path for the user ent/schema.
// For example, "<project>/ent/schema".
Schema string
// Target is the filepath for the directory that holds the generated code.

// Target defines the filepath for the target directory that
// holds the generated code. For example, "./project/ent".
//
// By default, 'ent generate ./ent/schema' uses './ent' as a
// target directory.
Target string
// Package path for the targeted directory that holds the generated code.

// Package defines the Go package path of the target directory
// mentioned above. For example, "github.com/org/project/ent".
//
// By default, for schema package named "<project>/ent/schema",
// 'ent generate' uses "<project>/ent" as a default package.
Package string
// Header is an optional header signature for generated files.

// Header allows users to provides an optional header signature for
// the generated files. It defaults to the standard 'go generate'
// format: '// Code generated by entc, DO NOT EDIT.'.
Header string
// Storage to support in codegen.

// Storage configuration for the codegen. Defaults to sql.
Storage *Storage

// IDType specifies the type of the id field in the codegen.
Expand Down
0