put

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = flags{}

	ErrExpectedKeyValueInconsistent = errors.New("inconsistent flags; key and value flags must be in pairs")
	ErrExpectedVersionInconsistent  = errors.New("inconsistent flags; zero or all keys must have an expected version")
	ErrBase64ValueInvalid           = errors.New("binary flag was set but value is not valid base64")
	ErrIncorrectBinaryFlagUse       = errors.New("binary flag was set when config is being sourced from stdin")
)
View Source
var Cmd = &cobra.Command{
	Use:   "put",
	Short: "Put values",
	Long:  `Put a values and associated them with the given keys, either inserting a new entries or updating existing ones. If an expected version is provided, the put will only take place if it matches the version of the current record on the server`,
	Args:  cobra.NoArgs,
	RunE:  exec,
}

Functions

This section is empty.

Types

type Call

type Call struct {
	// contains filtered or unexported fields
}

func (Call) Complete

func (call Call) Complete() <-chan any

type Output

type Output struct {
	Version common.OutputVersion `json:"version"`
}

type Query

type Query struct {
	Key             string `json:"key"`
	Value           string `json:"value"`
	ExpectedVersion *int64 `json:"expected_version,omitempty"`
	Binary          *bool  `json:"binary,omitempty"`
}

func (Query) Perform

func (query Query) Perform(client oxia.AsyncClient) common.Call

func (Query) Unmarshal

func (Query) Unmarshal(b []byte) (common.Query, error)

Jump to

Keyboard shortcuts

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