wirepath

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: Apache-2.0, BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package wirepath is an xpath-like means of representing a location within a protocol buffer message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValue

func GetValue(p *WirePath, within proto.Message) (protoreflect.Value, error)

GetValue returns the value of some path within a protocol buffer message.

Types

type Value

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

Value is like protoreflect.Value, but it preserves the protobuf kind of the value.

func ValueOf

func ValueOf(v interface{}, kind protoreflect.Kind) Value

func ValueOfBytes

func ValueOfBytes(v []byte) Value

func ValueOfDouble

func ValueOfDouble(v float64) Value

func ValueOfEnum

func ValueOfEnum(v protoreflect.EnumNumber) Value

func ValueOfFixed32

func ValueOfFixed32(v uint32) Value

func ValueOfFixed64

func ValueOfFixed64(v uint64) Value

func ValueOfFloat

func ValueOfFloat(v float32) Value

func ValueOfInt32

func ValueOfInt32(v int32) Value

func ValueOfInt64

func ValueOfInt64(v int64) Value

func ValueOfList

func ValueOfList(v protoreflect.List, kind protoreflect.Kind) Value

func ValueOfMessage

func ValueOfMessage(v protoreflect.Message) Value

func ValueOfSfixed32

func ValueOfSfixed32(v int32) Value

func ValueOfSfixed64

func ValueOfSfixed64(v int64) Value

func ValueOfSint32

func ValueOfSint32(v int32) Value

func ValueOfSint64

func ValueOfSint64(v int64) Value

func ValueOfString

func ValueOfString(v string) Value

func ValueOfUint32

func ValueOfUint32(v uint32) Value

func ValueOfUint64

func ValueOfUint64(v uint64) Value

func (Value) Bool

func (v Value) Bool() bool

func (Value) Bytes

func (v Value) Bytes() []byte

func (Value) Enum

func (v Value) Enum() protoreflect.EnumNumber

func (Value) Float

func (v Value) Float() float64

func (Value) Int

func (v Value) Int() int64

func (Value) Interface

func (v Value) Interface() interface{}

func (Value) IsValid

func (v Value) IsValid() bool

func (Value) Kind

func (v Value) Kind() protoreflect.Kind

func (Value) List

func (v Value) List() protoreflect.List

func (Value) Map

func (v Value) Map() protoreflect.Map

func (Value) MapKey

func (v Value) MapKey() protoreflect.MapKey

func (Value) Message

func (v Value) Message() protoreflect.Message

func (Value) String

func (v Value) String() string

func (Value) Uint

func (v Value) Uint() uint64

type WirePath

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

WirePath is a parsed and validated Go representation of a WirePath protobuf.

func FromProto

func FromProto(proto *pb.WirePath) (*WirePath, error)

FromProto returns a parsed and validated version of the argument.

func MustParse

func MustParse(wirePathLiteral string) *WirePath

func ParseString

func ParseString(wirePathLiteral string) (*WirePath, error)

func (*WirePath) Proto

func (p *WirePath) Proto() *pb.WirePath

Proto returns the protobuf representation of the WirePath object. The value should not be modified.

func (*WirePath) String

func (p *WirePath) String() string

String returns a wirepath expression that may be parsed into a *WirePath object.

Jump to

Keyboard shortcuts

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