Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenTestSnapshots ¶
func GenTestSnapshots(args *GenTestSnapshotArguments) error
GenTestSnapshots generates test snapshots from NDC schema.
func GenerateNewProject ¶ added in v1.4.0
func GenerateNewProject(args *NewArguments, silent bool) error
GenerateNewProject generates a new project boilerplate.
func UpdateConnectorSchema ¶ added in v1.4.0
func UpdateConnectorSchema(args UpdateArguments, start time.Time)
UpdateConnectorSchema updates connector schema.
Types ¶
type GenTestSnapshotArguments ¶
type GenTestSnapshotArguments struct { Schema string `help:"NDC schema file path. Use either endpoint or schema path"` Endpoint string `help:"The endpoint of the connector. Use either endpoint or schema path"` Dir string `help:"The directory of test snapshots."` Depth uint `help:"The selection depth of nested fields in result types." default:"10"` Query []string `help:"Specify individual queries to be generated. Separated by commas, or 'all' for all queries"` Mutation []string `help:"Specify individual mutations to be generated. Separated by commas, or 'all' for all mutations"` Strategy internal.WriteFileStrategy `help:"Decide the strategy to do when the snapshot file exists. Accept: none, override" enum:"none,override" default:"none"` }
GenTestSnapshotArguments represents arguments for test snapshot generation.
type NewArguments ¶ added in v1.4.0
type NewArguments struct { Name string `help:"Name of the connector." short:"n" required:""` Module string `help:"Module name of the connector" short:"m" required:""` Version string `help:"The version of ndc-sdk-go."` Output string `help:"The location where source codes will be generated" short:"o" default:""` }
NewArguments input arguments for the new command.
type UpdateArguments ¶ added in v1.4.0
type UpdateArguments internal.ConnectorGenerationArguments
UpdateArguments represent input arguments of the `update` command.
Click to show internal directories.
Click to hide internal directories.