Documentation
¶
Index ¶
- func ExportCommand(parent *cobra.Command, con *client.Client, ...) *cobra.Command
- func ImportCommand(parent *cobra.Command, con *client.Client, ...) *cobra.Command
- func ImportJSON[out protoreflect.ProtoMessage](data []byte, arg string) (list []out, err error)
- func MarshalExport(cmd *cobra.Command, data any) (s []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportCommand ¶
func ExportCommand(parent *cobra.Command, con *client.Client, data func(cmd *cobra.Command, args []string) any) *cobra.Command
ExportCommand returns an "export" subcommand to hook into a parent "object" command, to query/write to DB those objects.
func ImportCommand ¶
func ImportCommand(parent *cobra.Command, con *client.Client, runE func(cmd *cobra.Command, arg string, data []byte) error) *cobra.Command
ImportCommand returns an "import" subcommand to hook into a parent "object" command, to query/write to DB those objects.
func ImportJSON ¶
func ImportJSON[out protoreflect.ProtoMessage](data []byte, arg string) (list []out, err error)
ImportJSON takes a protobuf message struct and unmarshals data into either this type or a list.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.