update

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 17 Imported by: ? 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

View Source
const (
	Increment     string = "Increment"
	Decrement     string = "Decrement"
	Add           string = "Add"
	AddUnique     string = "AddUnique"
	IncrementSet  string = "IncrementSet"
	IncrementFrom string = "IncrementFrom"
)

Valid operations

Variables

This section is empty.

Functions

func NewUpdateCmd

func NewUpdateCmd(f *cmdutil.Factory, runF func(*UpdateOptions) error) *cobra.Command

NewUpdateCmd creates and returns an update command for index objects

func ValidateOperation

func ValidateOperation(p search.PartialUpdateOperation) error

ValidateOperation checks that the operation is valid

Types

type Object

type Object map[string]interface{}

Object is a map[string]interface{} that can be unmarshalled from a JSON object The object must have an objectID field Each field could be either an `search.PartialUpdateOperation` or a scalar value

func (*Object) UnmarshalJSON

func (o *Object) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a JSON object into an Object

type UpdateOptions

type UpdateOptions struct {
	Config config.IConfig
	IO     *iostreams.IOStreams

	SearchClient func() (*search.Client, error)

	Index             string
	CreateIfNotExists bool
	Wait              bool

	File    string
	Scanner *bufio.Scanner

	ContinueOnError bool
}

Jump to

Keyboard shortcuts

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