asset

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDefinition

func ReadDefinition(path string, target interface{}, stdin io.Reader) error

ReadDefinition reads a YAML or JSON definition from a file or stdin. If path is "-" or empty, it reads from stdin (assumes YAML format). Otherwise, it reads from the file at the given path.

func ReadDefinitionFile

func ReadDefinitionFile(path string, target interface{}) error

ReadDefinitionFile reads a YAML or JSON file and unmarshals into the target. It auto-detects the format based on file extension, falling back to YAML first.

func RegisterCommonFlags

func RegisterCommonFlags(cmd *cobra.Command, flags *CommonFlags)

RegisterCommonFlags adds common flags to a command

func RegisterDeleteFlags

func RegisterDeleteFlags(cmd *cobra.Command, flags *DeleteFlags)

RegisterDeleteFlags adds delete-specific flags to a command

func RegisterFileInputFlags

func RegisterFileInputFlags(cmd *cobra.Command, flags *FileInputFlags)

RegisterFileInputFlags adds file input flags to a command and marks -f as required

func RegisterGetFlags

func RegisterGetFlags(cmd *cobra.Command, flags *GetFlags)

RegisterGetFlags adds get-specific flags to a command

func RegisterListFlags

func RegisterListFlags(cmd *cobra.Command, flags *ListFlags)

RegisterListFlags adds list-specific flags to a command

func WriteDefinitionFile

func WriteDefinitionFile(path string, data interface{}) error

WriteDefinitionFile writes data to a YAML or JSON file. It auto-detects the format based on file extension, defaulting to YAML.

func WriteToStdout

func WriteToStdout(format string, data interface{}) error

WriteToStdout writes data to stdout in the specified format. Format can be "yaml", "yml", or "json".

Types

type CommonFlags

type CommonFlags struct {
	ApiUrl    string
	AuthToken string
	Dataset   string
	Output    string
}

CommonFlags holds common flag values used across all asset commands

type DeleteFlags

type DeleteFlags struct {
	CommonFlags
	Force bool
}

DeleteFlags holds flags specific to delete commands

type FileInputFlags

type FileInputFlags struct {
	CommonFlags
	File   string
	DryRun bool
}

FileInputFlags holds flags for file-based input operations (create, update, apply)

type GetFlags

type GetFlags struct {
	CommonFlags
}

GetFlags holds flags specific to get commands

type ListFlags

type ListFlags struct {
	CommonFlags
	Limit int
	All   bool
}

ListFlags holds flags specific to list commands

Jump to

Keyboard shortcuts

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