atomic

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadOnlyStore_Integer_Helper = struct {
	// Args accepts the parameters of integer in-order and returns
	// the arguments struct for the function.
	Args func(
		key *string,
	) *ReadOnlyStore_Integer_Args

	// IsException returns true if the given error can be thrown
	// by integer.
	//
	// An error can be thrown by integer only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for integer
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// integer into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by integer
	//
	//   value, err := integer(args)
	//   result, err := ReadOnlyStore_Integer_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from integer: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(int64, error) (*ReadOnlyStore_Integer_Result, error)

	// UnwrapResponse takes the result struct for integer
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if integer threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := ReadOnlyStore_Integer_Helper.UnwrapResponse(result)
	UnwrapResponse func(*ReadOnlyStore_Integer_Result) (int64, error)
}{}

ReadOnlyStore_Integer_Helper provides functions that aid in handling the parameters and return values of the ReadOnlyStore.integer function.

View Source
var Store_CompareAndSwap_Helper = struct {
	// Args accepts the parameters of compareAndSwap in-order and returns
	// the arguments struct for the function.
	Args func(
		request *CompareAndSwap,
	) *Store_CompareAndSwap_Args

	// IsException returns true if the given error can be thrown
	// by compareAndSwap.
	//
	// An error can be thrown by compareAndSwap only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for compareAndSwap
	// given the error returned by it. The provided error may
	// be nil if compareAndSwap did not fail.
	//
	// This allows mapping errors returned by compareAndSwap into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// compareAndSwap
	//
	//   err := compareAndSwap(args)
	//   result, err := Store_CompareAndSwap_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from compareAndSwap: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*Store_CompareAndSwap_Result, error)

	// UnwrapResponse takes the result struct for compareAndSwap
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if compareAndSwap threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := Store_CompareAndSwap_Helper.UnwrapResponse(result)
	UnwrapResponse func(*Store_CompareAndSwap_Result) error
}{}

Store_CompareAndSwap_Helper provides functions that aid in handling the parameters and return values of the Store.compareAndSwap function.

View Source
var Store_Forget_Helper = struct {
	// Args accepts the parameters of forget in-order and returns
	// the arguments struct for the function.
	Args func(
		key *string,
	) *Store_Forget_Args
}{}

Store_Forget_Helper provides functions that aid in handling the parameters and return values of the Store.forget function.

View Source
var Store_Increment_Helper = struct {
	// Args accepts the parameters of increment in-order and returns
	// the arguments struct for the function.
	Args func(
		key *string,
		value *int64,
	) *Store_Increment_Args

	// IsException returns true if the given error can be thrown
	// by increment.
	//
	// An error can be thrown by increment only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for increment
	// given the error returned by it. The provided error may
	// be nil if increment did not fail.
	//
	// This allows mapping errors returned by increment into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// increment
	//
	//   err := increment(args)
	//   result, err := Store_Increment_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from increment: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*Store_Increment_Result, error)

	// UnwrapResponse takes the result struct for increment
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if increment threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := Store_Increment_Helper.UnwrapResponse(result)
	UnwrapResponse func(*Store_Increment_Result) error
}{}

Store_Increment_Helper provides functions that aid in handling the parameters and return values of the Store.increment function.

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "atomic",
	Package:  "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/atomic",
	FilePath: "atomic.thrift",
	SHA1:     "86799ad54683404a517c661f6f10d83cf7afa99e",
	Includes: []*thriftreflect.ThriftModule{
		common.ThriftModule,
	},
	Raw: rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type CompareAndSwap

type CompareAndSwap struct {
	Key          string `json:"key,required"`
	CurrentValue int64  `json:"currentValue,required"`
	NewValue     int64  `json:"newValue,required"`
}

func (*CompareAndSwap) Decode added in v1.57.0

func (v *CompareAndSwap) Decode(sr stream.Reader) error

Decode deserializes a CompareAndSwap struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a CompareAndSwap struct could not be generated from the wire representation.

func (*CompareAndSwap) Encode added in v1.57.0

func (v *CompareAndSwap) Encode(sw stream.Writer) error

Encode serializes a CompareAndSwap struct directly into bytes, without going through an intermediary type.

An error is returned if a CompareAndSwap struct could not be encoded.

func (*CompareAndSwap) Equals added in v1.8.0

func (v *CompareAndSwap) Equals(rhs *CompareAndSwap) bool

Equals returns true if all the fields of this CompareAndSwap match the provided CompareAndSwap.

This function performs a deep comparison.

func (*CompareAndSwap) FromWire

func (v *CompareAndSwap) FromWire(w wire.Value) error

FromWire deserializes a CompareAndSwap struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a CompareAndSwap struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v CompareAndSwap
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*CompareAndSwap) GetCurrentValue added in v1.31.0

func (v *CompareAndSwap) GetCurrentValue() (o int64)

GetCurrentValue returns the value of CurrentValue if it is set or its zero value if it is unset.

func (*CompareAndSwap) GetKey added in v1.31.0

func (v *CompareAndSwap) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*CompareAndSwap) GetNewValue added in v1.31.0

func (v *CompareAndSwap) GetNewValue() (o int64)

GetNewValue returns the value of NewValue if it is set or its zero value if it is unset.

func (*CompareAndSwap) MarshalLogObject added in v1.33.0

func (v *CompareAndSwap) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of CompareAndSwap.

func (*CompareAndSwap) String

func (v *CompareAndSwap) String() string

String returns a readable string representation of a CompareAndSwap struct.

func (*CompareAndSwap) ToWire

func (v *CompareAndSwap) ToWire() (wire.Value, error)

ToWire translates a CompareAndSwap struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type IntegerMismatchError

type IntegerMismatchError struct {
	ExpectedValue int64 `json:"expectedValue,required"`
	GotValue      int64 `json:"gotValue,required"`
}

func (*IntegerMismatchError) Decode added in v1.57.0

func (v *IntegerMismatchError) Decode(sr stream.Reader) error

Decode deserializes a IntegerMismatchError struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a IntegerMismatchError struct could not be generated from the wire representation.

func (*IntegerMismatchError) Encode added in v1.57.0

func (v *IntegerMismatchError) Encode(sw stream.Writer) error

Encode serializes a IntegerMismatchError struct directly into bytes, without going through an intermediary type.

An error is returned if a IntegerMismatchError struct could not be encoded.

func (*IntegerMismatchError) Equals added in v1.8.0

Equals returns true if all the fields of this IntegerMismatchError match the provided IntegerMismatchError.

This function performs a deep comparison.

func (*IntegerMismatchError) Error

func (v *IntegerMismatchError) Error() string

func (*IntegerMismatchError) ErrorName added in v1.43.0

func (*IntegerMismatchError) ErrorName() string

ErrorName is the name of this type as defined in the Thrift file.

func (*IntegerMismatchError) FromWire

func (v *IntegerMismatchError) FromWire(w wire.Value) error

FromWire deserializes a IntegerMismatchError struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a IntegerMismatchError struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v IntegerMismatchError
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*IntegerMismatchError) GetExpectedValue added in v1.31.0

func (v *IntegerMismatchError) GetExpectedValue() (o int64)

GetExpectedValue returns the value of ExpectedValue if it is set or its zero value if it is unset.

func (*IntegerMismatchError) GetGotValue added in v1.31.0

func (v *IntegerMismatchError) GetGotValue() (o int64)

GetGotValue returns the value of GotValue if it is set or its zero value if it is unset.

func (*IntegerMismatchError) MarshalLogObject added in v1.33.0

func (v *IntegerMismatchError) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of IntegerMismatchError.

func (*IntegerMismatchError) String

func (v *IntegerMismatchError) String() string

String returns a readable string representation of a IntegerMismatchError struct.

func (*IntegerMismatchError) ToWire

func (v *IntegerMismatchError) ToWire() (wire.Value, error)

ToWire translates a IntegerMismatchError struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

func (*IntegerMismatchError) YARPCErrorCode added in v1.47.0

func (e *IntegerMismatchError) YARPCErrorCode() *yarpcerrors.Code

YARPCErrorCode returns a yarpcerrors.CodeInvalidArgument for IntegerMismatchError.

This is derived from the rpc.code annotation on the Thrift exception.

func (*IntegerMismatchError) YARPCErrorName added in v1.47.0

func (e *IntegerMismatchError) YARPCErrorName() string

Name is the error name for IntegerMismatchError.

type KeyDoesNotExist

type KeyDoesNotExist struct {
	Key *string `json:"key,omitempty"`
}

func (*KeyDoesNotExist) Decode added in v1.57.0

func (v *KeyDoesNotExist) Decode(sr stream.Reader) error

Decode deserializes a KeyDoesNotExist struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a KeyDoesNotExist struct could not be generated from the wire representation.

func (*KeyDoesNotExist) Encode added in v1.57.0

func (v *KeyDoesNotExist) Encode(sw stream.Writer) error

Encode serializes a KeyDoesNotExist struct directly into bytes, without going through an intermediary type.

An error is returned if a KeyDoesNotExist struct could not be encoded.

func (*KeyDoesNotExist) Equals added in v1.8.0

func (v *KeyDoesNotExist) Equals(rhs *KeyDoesNotExist) bool

Equals returns true if all the fields of this KeyDoesNotExist match the provided KeyDoesNotExist.

This function performs a deep comparison.

func (*KeyDoesNotExist) Error

func (v *KeyDoesNotExist) Error() string

func (*KeyDoesNotExist) ErrorName added in v1.43.0

func (*KeyDoesNotExist) ErrorName() string

ErrorName is the name of this type as defined in the Thrift file.

func (*KeyDoesNotExist) FromWire

func (v *KeyDoesNotExist) FromWire(w wire.Value) error

FromWire deserializes a KeyDoesNotExist struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a KeyDoesNotExist struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v KeyDoesNotExist
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*KeyDoesNotExist) GetKey added in v1.14.0

func (v *KeyDoesNotExist) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*KeyDoesNotExist) IsSetKey added in v1.35.2

func (v *KeyDoesNotExist) IsSetKey() bool

IsSetKey returns true if Key is not nil.

func (*KeyDoesNotExist) MarshalLogObject added in v1.33.0

func (v *KeyDoesNotExist) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of KeyDoesNotExist.

func (*KeyDoesNotExist) String

func (v *KeyDoesNotExist) String() string

String returns a readable string representation of a KeyDoesNotExist struct.

func (*KeyDoesNotExist) ToWire

func (v *KeyDoesNotExist) ToWire() (wire.Value, error)

ToWire translates a KeyDoesNotExist struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

func (*KeyDoesNotExist) YARPCErrorCode added in v1.47.0

func (e *KeyDoesNotExist) YARPCErrorCode() *yarpcerrors.Code

YARPCErrorCode returns a yarpcerrors.CodeInvalidArgument for KeyDoesNotExist.

This is derived from the rpc.code annotation on the Thrift exception.

func (*KeyDoesNotExist) YARPCErrorName added in v1.47.0

func (e *KeyDoesNotExist) YARPCErrorName() string

Name is the error name for KeyDoesNotExist.

type OptionalCompareAndSwap added in v1.45.0

type OptionalCompareAndSwap struct {
	Key          *string `json:"key,omitempty"`
	CurrentValue *int64  `json:"currentValue,omitempty"`
	NewValue     *int64  `json:"newValue,omitempty"`
}

func (*OptionalCompareAndSwap) Decode added in v1.57.0

func (v *OptionalCompareAndSwap) Decode(sr stream.Reader) error

Decode deserializes a OptionalCompareAndSwap struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a OptionalCompareAndSwap struct could not be generated from the wire representation.

func (*OptionalCompareAndSwap) Encode added in v1.57.0

func (v *OptionalCompareAndSwap) Encode(sw stream.Writer) error

Encode serializes a OptionalCompareAndSwap struct directly into bytes, without going through an intermediary type.

An error is returned if a OptionalCompareAndSwap struct could not be encoded.

func (*OptionalCompareAndSwap) Equals added in v1.45.0

Equals returns true if all the fields of this OptionalCompareAndSwap match the provided OptionalCompareAndSwap.

This function performs a deep comparison.

func (*OptionalCompareAndSwap) FromWire added in v1.45.0

func (v *OptionalCompareAndSwap) FromWire(w wire.Value) error

FromWire deserializes a OptionalCompareAndSwap struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a OptionalCompareAndSwap struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v OptionalCompareAndSwap
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*OptionalCompareAndSwap) GetCurrentValue added in v1.45.0

func (v *OptionalCompareAndSwap) GetCurrentValue() (o int64)

GetCurrentValue returns the value of CurrentValue if it is set or its zero value if it is unset.

func (*OptionalCompareAndSwap) GetKey added in v1.45.0

func (v *OptionalCompareAndSwap) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*OptionalCompareAndSwap) GetNewValue added in v1.45.0

func (v *OptionalCompareAndSwap) GetNewValue() (o int64)

GetNewValue returns the value of NewValue if it is set or its zero value if it is unset.

func (*OptionalCompareAndSwap) IsSetCurrentValue added in v1.45.0

func (v *OptionalCompareAndSwap) IsSetCurrentValue() bool

IsSetCurrentValue returns true if CurrentValue is not nil.

func (*OptionalCompareAndSwap) IsSetKey added in v1.45.0

func (v *OptionalCompareAndSwap) IsSetKey() bool

IsSetKey returns true if Key is not nil.

func (*OptionalCompareAndSwap) IsSetNewValue added in v1.45.0

func (v *OptionalCompareAndSwap) IsSetNewValue() bool

IsSetNewValue returns true if NewValue is not nil.

func (*OptionalCompareAndSwap) MarshalLogObject added in v1.45.0

func (v *OptionalCompareAndSwap) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of OptionalCompareAndSwap.

func (*OptionalCompareAndSwap) String added in v1.45.0

func (v *OptionalCompareAndSwap) String() string

String returns a readable string representation of a OptionalCompareAndSwap struct.

func (*OptionalCompareAndSwap) ToWire added in v1.45.0

func (v *OptionalCompareAndSwap) ToWire() (wire.Value, error)

ToWire translates a OptionalCompareAndSwap struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type OptionalCompareAndSwapWrapper added in v1.45.0

type OptionalCompareAndSwapWrapper struct {
	Cas *OptionalCompareAndSwap `json:"cas,omitempty"`
}

func (*OptionalCompareAndSwapWrapper) Decode added in v1.57.0

Decode deserializes a OptionalCompareAndSwapWrapper struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a OptionalCompareAndSwapWrapper struct could not be generated from the wire representation.

func (*OptionalCompareAndSwapWrapper) Encode added in v1.57.0

Encode serializes a OptionalCompareAndSwapWrapper struct directly into bytes, without going through an intermediary type.

An error is returned if a OptionalCompareAndSwapWrapper struct could not be encoded.

func (*OptionalCompareAndSwapWrapper) Equals added in v1.45.0

Equals returns true if all the fields of this OptionalCompareAndSwapWrapper match the provided OptionalCompareAndSwapWrapper.

This function performs a deep comparison.

func (*OptionalCompareAndSwapWrapper) FromWire added in v1.45.0

FromWire deserializes a OptionalCompareAndSwapWrapper struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a OptionalCompareAndSwapWrapper struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v OptionalCompareAndSwapWrapper
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*OptionalCompareAndSwapWrapper) GetCas added in v1.45.0

GetCas returns the value of Cas if it is set or its zero value if it is unset.

func (*OptionalCompareAndSwapWrapper) IsSetCas added in v1.45.0

func (v *OptionalCompareAndSwapWrapper) IsSetCas() bool

IsSetCas returns true if Cas is not nil.

func (*OptionalCompareAndSwapWrapper) MarshalLogObject added in v1.45.0

func (v *OptionalCompareAndSwapWrapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of OptionalCompareAndSwapWrapper.

func (*OptionalCompareAndSwapWrapper) String added in v1.45.0

String returns a readable string representation of a OptionalCompareAndSwapWrapper struct.

func (*OptionalCompareAndSwapWrapper) ToWire added in v1.45.0

ToWire translates a OptionalCompareAndSwapWrapper struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type ReadOnlyStore_Integer_Args added in v1.1.0

type ReadOnlyStore_Integer_Args struct {
	Key *string `json:"key,omitempty"`
}

ReadOnlyStore_Integer_Args represents the arguments for the ReadOnlyStore.integer function.

The arguments for integer are sent and received over the wire as this struct.

func (*ReadOnlyStore_Integer_Args) Decode added in v1.57.0

Decode deserializes a ReadOnlyStore_Integer_Args struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a ReadOnlyStore_Integer_Args struct could not be generated from the wire representation.

func (*ReadOnlyStore_Integer_Args) Encode added in v1.57.0

Encode serializes a ReadOnlyStore_Integer_Args struct directly into bytes, without going through an intermediary type.

An error is returned if a ReadOnlyStore_Integer_Args struct could not be encoded.

func (*ReadOnlyStore_Integer_Args) EnvelopeType added in v1.1.0

func (v *ReadOnlyStore_Integer_Args) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be Call for this struct.

func (*ReadOnlyStore_Integer_Args) Equals added in v1.8.0

Equals returns true if all the fields of this ReadOnlyStore_Integer_Args match the provided ReadOnlyStore_Integer_Args.

This function performs a deep comparison.

func (*ReadOnlyStore_Integer_Args) FromWire added in v1.1.0

func (v *ReadOnlyStore_Integer_Args) FromWire(w wire.Value) error

FromWire deserializes a ReadOnlyStore_Integer_Args struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a ReadOnlyStore_Integer_Args struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v ReadOnlyStore_Integer_Args
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*ReadOnlyStore_Integer_Args) GetKey added in v1.14.0

func (v *ReadOnlyStore_Integer_Args) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*ReadOnlyStore_Integer_Args) IsSetKey added in v1.35.2

func (v *ReadOnlyStore_Integer_Args) IsSetKey() bool

IsSetKey returns true if Key is not nil.

func (*ReadOnlyStore_Integer_Args) MarshalLogObject added in v1.33.0

func (v *ReadOnlyStore_Integer_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of ReadOnlyStore_Integer_Args.

func (*ReadOnlyStore_Integer_Args) MethodName added in v1.1.0

func (v *ReadOnlyStore_Integer_Args) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the arguments.

This will always be "integer" for this struct.

func (*ReadOnlyStore_Integer_Args) String added in v1.1.0

func (v *ReadOnlyStore_Integer_Args) String() string

String returns a readable string representation of a ReadOnlyStore_Integer_Args struct.

func (*ReadOnlyStore_Integer_Args) ToWire added in v1.1.0

func (v *ReadOnlyStore_Integer_Args) ToWire() (wire.Value, error)

ToWire translates a ReadOnlyStore_Integer_Args struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type ReadOnlyStore_Integer_Result added in v1.1.0

type ReadOnlyStore_Integer_Result struct {
	// Value returned by integer after a successful execution.
	Success      *int64           `json:"success,omitempty"`
	DoesNotExist *KeyDoesNotExist `json:"doesNotExist,omitempty"`
}

ReadOnlyStore_Integer_Result represents the result of a ReadOnlyStore.integer function call.

The result of a integer execution is sent and received over the wire as this struct.

Success is set only if the function did not throw an exception.

func (*ReadOnlyStore_Integer_Result) Decode added in v1.57.0

Decode deserializes a ReadOnlyStore_Integer_Result struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a ReadOnlyStore_Integer_Result struct could not be generated from the wire representation.

func (*ReadOnlyStore_Integer_Result) Encode added in v1.57.0

Encode serializes a ReadOnlyStore_Integer_Result struct directly into bytes, without going through an intermediary type.

An error is returned if a ReadOnlyStore_Integer_Result struct could not be encoded.

func (*ReadOnlyStore_Integer_Result) EnvelopeType added in v1.1.0

EnvelopeType returns the kind of value inside this struct.

This will always be Reply for this struct.

func (*ReadOnlyStore_Integer_Result) Equals added in v1.8.0

Equals returns true if all the fields of this ReadOnlyStore_Integer_Result match the provided ReadOnlyStore_Integer_Result.

This function performs a deep comparison.

func (*ReadOnlyStore_Integer_Result) FromWire added in v1.1.0

FromWire deserializes a ReadOnlyStore_Integer_Result struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a ReadOnlyStore_Integer_Result struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v ReadOnlyStore_Integer_Result
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*ReadOnlyStore_Integer_Result) GetDoesNotExist added in v1.31.0

func (v *ReadOnlyStore_Integer_Result) GetDoesNotExist() (o *KeyDoesNotExist)

GetDoesNotExist returns the value of DoesNotExist if it is set or its zero value if it is unset.

func (*ReadOnlyStore_Integer_Result) GetSuccess added in v1.14.0

func (v *ReadOnlyStore_Integer_Result) GetSuccess() (o int64)

GetSuccess returns the value of Success if it is set or its zero value if it is unset.

func (*ReadOnlyStore_Integer_Result) IsSetDoesNotExist added in v1.35.2

func (v *ReadOnlyStore_Integer_Result) IsSetDoesNotExist() bool

IsSetDoesNotExist returns true if DoesNotExist is not nil.

func (*ReadOnlyStore_Integer_Result) IsSetSuccess added in v1.35.2

func (v *ReadOnlyStore_Integer_Result) IsSetSuccess() bool

IsSetSuccess returns true if Success is not nil.

func (*ReadOnlyStore_Integer_Result) MarshalLogObject added in v1.33.0

func (v *ReadOnlyStore_Integer_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of ReadOnlyStore_Integer_Result.

func (*ReadOnlyStore_Integer_Result) MethodName added in v1.1.0

func (v *ReadOnlyStore_Integer_Result) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the result.

This will always be "integer" for this struct.

func (*ReadOnlyStore_Integer_Result) String added in v1.1.0

String returns a readable string representation of a ReadOnlyStore_Integer_Result struct.

func (*ReadOnlyStore_Integer_Result) ToWire added in v1.1.0

ToWire translates a ReadOnlyStore_Integer_Result struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type Store_CompareAndSwap_Args

type Store_CompareAndSwap_Args struct {
	Request *CompareAndSwap `json:"request,omitempty"`
}

Store_CompareAndSwap_Args represents the arguments for the Store.compareAndSwap function.

The arguments for compareAndSwap are sent and received over the wire as this struct.

func (*Store_CompareAndSwap_Args) Decode added in v1.57.0

Decode deserializes a Store_CompareAndSwap_Args struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Store_CompareAndSwap_Args struct could not be generated from the wire representation.

func (*Store_CompareAndSwap_Args) Encode added in v1.57.0

Encode serializes a Store_CompareAndSwap_Args struct directly into bytes, without going through an intermediary type.

An error is returned if a Store_CompareAndSwap_Args struct could not be encoded.

func (*Store_CompareAndSwap_Args) EnvelopeType

func (v *Store_CompareAndSwap_Args) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be Call for this struct.

func (*Store_CompareAndSwap_Args) Equals added in v1.8.0

Equals returns true if all the fields of this Store_CompareAndSwap_Args match the provided Store_CompareAndSwap_Args.

This function performs a deep comparison.

func (*Store_CompareAndSwap_Args) FromWire

func (v *Store_CompareAndSwap_Args) FromWire(w wire.Value) error

FromWire deserializes a Store_CompareAndSwap_Args struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Store_CompareAndSwap_Args struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Store_CompareAndSwap_Args
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Store_CompareAndSwap_Args) GetRequest added in v1.31.0

func (v *Store_CompareAndSwap_Args) GetRequest() (o *CompareAndSwap)

GetRequest returns the value of Request if it is set or its zero value if it is unset.

func (*Store_CompareAndSwap_Args) IsSetRequest added in v1.35.2

func (v *Store_CompareAndSwap_Args) IsSetRequest() bool

IsSetRequest returns true if Request is not nil.

func (*Store_CompareAndSwap_Args) MarshalLogObject added in v1.33.0

func (v *Store_CompareAndSwap_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Store_CompareAndSwap_Args.

func (*Store_CompareAndSwap_Args) MethodName

func (v *Store_CompareAndSwap_Args) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the arguments.

This will always be "compareAndSwap" for this struct.

func (*Store_CompareAndSwap_Args) String

func (v *Store_CompareAndSwap_Args) String() string

String returns a readable string representation of a Store_CompareAndSwap_Args struct.

func (*Store_CompareAndSwap_Args) ToWire

func (v *Store_CompareAndSwap_Args) ToWire() (wire.Value, error)

ToWire translates a Store_CompareAndSwap_Args struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type Store_CompareAndSwap_Result

type Store_CompareAndSwap_Result struct {
	Mismatch *IntegerMismatchError `json:"mismatch,omitempty"`
}

Store_CompareAndSwap_Result represents the result of a Store.compareAndSwap function call.

The result of a compareAndSwap execution is sent and received over the wire as this struct.

func (*Store_CompareAndSwap_Result) Decode added in v1.57.0

Decode deserializes a Store_CompareAndSwap_Result struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Store_CompareAndSwap_Result struct could not be generated from the wire representation.

func (*Store_CompareAndSwap_Result) Encode added in v1.57.0

Encode serializes a Store_CompareAndSwap_Result struct directly into bytes, without going through an intermediary type.

An error is returned if a Store_CompareAndSwap_Result struct could not be encoded.

func (*Store_CompareAndSwap_Result) EnvelopeType

func (v *Store_CompareAndSwap_Result) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be Reply for this struct.

func (*Store_CompareAndSwap_Result) Equals added in v1.8.0

Equals returns true if all the fields of this Store_CompareAndSwap_Result match the provided Store_CompareAndSwap_Result.

This function performs a deep comparison.

func (*Store_CompareAndSwap_Result) FromWire

FromWire deserializes a Store_CompareAndSwap_Result struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Store_CompareAndSwap_Result struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Store_CompareAndSwap_Result
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Store_CompareAndSwap_Result) GetMismatch added in v1.31.0

func (v *Store_CompareAndSwap_Result) GetMismatch() (o *IntegerMismatchError)

GetMismatch returns the value of Mismatch if it is set or its zero value if it is unset.

func (*Store_CompareAndSwap_Result) IsSetMismatch added in v1.35.2

func (v *Store_CompareAndSwap_Result) IsSetMismatch() bool

IsSetMismatch returns true if Mismatch is not nil.

func (*Store_CompareAndSwap_Result) MarshalLogObject added in v1.33.0

func (v *Store_CompareAndSwap_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Store_CompareAndSwap_Result.

func (*Store_CompareAndSwap_Result) MethodName

func (v *Store_CompareAndSwap_Result) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the result.

This will always be "compareAndSwap" for this struct.

func (*Store_CompareAndSwap_Result) String

func (v *Store_CompareAndSwap_Result) String() string

String returns a readable string representation of a Store_CompareAndSwap_Result struct.

func (*Store_CompareAndSwap_Result) ToWire

ToWire translates a Store_CompareAndSwap_Result struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type Store_Forget_Args

type Store_Forget_Args struct {
	Key *string `json:"key,omitempty"`
}

Store_Forget_Args represents the arguments for the Store.forget function.

The arguments for forget are sent and received over the wire as this struct.

func (*Store_Forget_Args) Decode added in v1.57.0

func (v *Store_Forget_Args) Decode(sr stream.Reader) error

Decode deserializes a Store_Forget_Args struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Store_Forget_Args struct could not be generated from the wire representation.

func (*Store_Forget_Args) Encode added in v1.57.0

func (v *Store_Forget_Args) Encode(sw stream.Writer) error

Encode serializes a Store_Forget_Args struct directly into bytes, without going through an intermediary type.

An error is returned if a Store_Forget_Args struct could not be encoded.

func (*Store_Forget_Args) EnvelopeType

func (v *Store_Forget_Args) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be OneWay for this struct.

func (*Store_Forget_Args) Equals added in v1.8.0

func (v *Store_Forget_Args) Equals(rhs *Store_Forget_Args) bool

Equals returns true if all the fields of this Store_Forget_Args match the provided Store_Forget_Args.

This function performs a deep comparison.

func (*Store_Forget_Args) FromWire

func (v *Store_Forget_Args) FromWire(w wire.Value) error

FromWire deserializes a Store_Forget_Args struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Store_Forget_Args struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Store_Forget_Args
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Store_Forget_Args) GetKey added in v1.14.0

func (v *Store_Forget_Args) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*Store_Forget_Args) IsSetKey added in v1.35.2

func (v *Store_Forget_Args) IsSetKey() bool

IsSetKey returns true if Key is not nil.

func (*Store_Forget_Args) MarshalLogObject added in v1.33.0

func (v *Store_Forget_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Store_Forget_Args.

func (*Store_Forget_Args) MethodName

func (v *Store_Forget_Args) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the arguments.

This will always be "forget" for this struct.

func (*Store_Forget_Args) String

func (v *Store_Forget_Args) String() string

String returns a readable string representation of a Store_Forget_Args struct.

func (*Store_Forget_Args) ToWire

func (v *Store_Forget_Args) ToWire() (wire.Value, error)

ToWire translates a Store_Forget_Args struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type Store_Increment_Args

type Store_Increment_Args struct {
	Key   *string `json:"key,omitempty"`
	Value *int64  `json:"value,omitempty"`
}

Store_Increment_Args represents the arguments for the Store.increment function.

The arguments for increment are sent and received over the wire as this struct.

func (*Store_Increment_Args) Decode added in v1.57.0

func (v *Store_Increment_Args) Decode(sr stream.Reader) error

Decode deserializes a Store_Increment_Args struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Store_Increment_Args struct could not be generated from the wire representation.

func (*Store_Increment_Args) Encode added in v1.57.0

func (v *Store_Increment_Args) Encode(sw stream.Writer) error

Encode serializes a Store_Increment_Args struct directly into bytes, without going through an intermediary type.

An error is returned if a Store_Increment_Args struct could not be encoded.

func (*Store_Increment_Args) EnvelopeType

func (v *Store_Increment_Args) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be Call for this struct.

func (*Store_Increment_Args) Equals added in v1.8.0

Equals returns true if all the fields of this Store_Increment_Args match the provided Store_Increment_Args.

This function performs a deep comparison.

func (*Store_Increment_Args) FromWire

func (v *Store_Increment_Args) FromWire(w wire.Value) error

FromWire deserializes a Store_Increment_Args struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Store_Increment_Args struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Store_Increment_Args
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Store_Increment_Args) GetKey added in v1.14.0

func (v *Store_Increment_Args) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*Store_Increment_Args) GetValue added in v1.14.0

func (v *Store_Increment_Args) GetValue() (o int64)

GetValue returns the value of Value if it is set or its zero value if it is unset.

func (*Store_Increment_Args) IsSetKey added in v1.35.2

func (v *Store_Increment_Args) IsSetKey() bool

IsSetKey returns true if Key is not nil.

func (*Store_Increment_Args) IsSetValue added in v1.35.2

func (v *Store_Increment_Args) IsSetValue() bool

IsSetValue returns true if Value is not nil.

func (*Store_Increment_Args) MarshalLogObject added in v1.33.0

func (v *Store_Increment_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Store_Increment_Args.

func (*Store_Increment_Args) MethodName

func (v *Store_Increment_Args) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the arguments.

This will always be "increment" for this struct.

func (*Store_Increment_Args) String

func (v *Store_Increment_Args) String() string

String returns a readable string representation of a Store_Increment_Args struct.

func (*Store_Increment_Args) ToWire

func (v *Store_Increment_Args) ToWire() (wire.Value, error)

ToWire translates a Store_Increment_Args struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type Store_Increment_Result

type Store_Increment_Result struct {
}

Store_Increment_Result represents the result of a Store.increment function call.

The result of a increment execution is sent and received over the wire as this struct.

func (*Store_Increment_Result) Decode added in v1.57.0

func (v *Store_Increment_Result) Decode(sr stream.Reader) error

Decode deserializes a Store_Increment_Result struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Store_Increment_Result struct could not be generated from the wire representation.

func (*Store_Increment_Result) Encode added in v1.57.0

func (v *Store_Increment_Result) Encode(sw stream.Writer) error

Encode serializes a Store_Increment_Result struct directly into bytes, without going through an intermediary type.

An error is returned if a Store_Increment_Result struct could not be encoded.

func (*Store_Increment_Result) EnvelopeType

func (v *Store_Increment_Result) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be Reply for this struct.

func (*Store_Increment_Result) Equals added in v1.8.0

Equals returns true if all the fields of this Store_Increment_Result match the provided Store_Increment_Result.

This function performs a deep comparison.

func (*Store_Increment_Result) FromWire

func (v *Store_Increment_Result) FromWire(w wire.Value) error

FromWire deserializes a Store_Increment_Result struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Store_Increment_Result struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Store_Increment_Result
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Store_Increment_Result) MarshalLogObject added in v1.33.0

func (v *Store_Increment_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Store_Increment_Result.

func (*Store_Increment_Result) MethodName

func (v *Store_Increment_Result) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the result.

This will always be "increment" for this struct.

func (*Store_Increment_Result) String

func (v *Store_Increment_Result) String() string

String returns a readable string representation of a Store_Increment_Result struct.

func (*Store_Increment_Result) ToWire

func (v *Store_Increment_Result) ToWire() (wire.Value, error)

ToWire translates a Store_Increment_Result struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

Directories

Path Synopsis
Package readonlystorefx provides better integration for Fx for services implementing or calling ReadOnlyStore.
Package readonlystorefx provides better integration for Fx for services implementing or calling ReadOnlyStore.
Package storefx provides better integration for Fx for services implementing or calling Store.
Package storefx provides better integration for Fx for services implementing or calling Store.

Jump to

Keyboard shortcuts

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