Documentation ¶
Index ¶
- func MessageDiff(a, b proto.Message, pre string) (r []string, e error)
- func NodeURLJoin(node, url string) string
- func NodeURLSplit(s string) (node string, url string)
- func ProtoName(m types.Message) string
- func ResolveOrMakeURL(url string, context reflect.Value) (v reflect.Value, e error)
- func ResolveURL(url string, context reflect.Value) (v reflect.Value, e error)
- func SliceToURL(s []string) (url string)
- func StringToValue(s string, t reflect.Type) (r reflect.Value)
- func URLPush(url string, elem string) string
- func URLShift(url string) (root string, sub string)
- func URLToSlice(url string) (s []string)
- func ValueToString(v reflect.Value) (s string)
- type Fixture
- func (*Fixture) Descriptor() ([]byte, []int)
- func (m *Fixture) GetBoolean() bool
- func (m *Fixture) GetMap() map[string]uint32
- func (m *Fixture) GetMapSub() map[uint32]*SubFixture
- func (m *Fixture) GetSlice() []string
- func (m *Fixture) GetSliceSub() []*SubFixture
- func (m *Fixture) GetSub() *SubFixture
- func (m *Fixture) GetUInt() uint32
- func (*Fixture) ProtoMessage()
- func (m *Fixture) Reset()
- func (m *Fixture) String() string
- func (m *Fixture) XXX_DiscardUnknown()
- func (m *Fixture) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fixture) XXX_Merge(src proto.Message)
- func (m *Fixture) XXX_Size() int
- func (m *Fixture) XXX_Unmarshal(b []byte) error
- type SubFixture
- func (*SubFixture) Descriptor() ([]byte, []int)
- func (m *SubFixture) GetA() string
- func (m *SubFixture) GetB() string
- func (*SubFixture) ProtoMessage()
- func (m *SubFixture) Reset()
- func (m *SubFixture) String() string
- func (m *SubFixture) XXX_DiscardUnknown()
- func (m *SubFixture) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubFixture) XXX_Merge(src proto.Message)
- func (m *SubFixture) XXX_Size() int
- func (m *SubFixture) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MessageDiff ¶
MessageDiff compares a & b, returns a slice of differing field names
returns an error if types are different. This borrows a lot from the proto.Merge code
func NodeURLJoin ¶
func NodeURLSplit ¶
func ResolveOrMakeURL ¶
ResolveOrMakeURL is like ResolveURL, except it will create any referenced but non-defined objects
func ResolveURL ¶
ResolveURL turns a state URL (string) into an interface reference
func SliceToURL ¶
func StringToValue ¶
StringToValue creats values for a type. It returns a zero for the type if it's an unsupported type We always return a valid value. If we fail to parse, you get a zero value
func URLToSlice ¶
func ValueToString ¶
ValueToString does its best to convert values into sensible strings for printing
Types ¶
type Fixture ¶
type Fixture struct { Boolean bool `protobuf:"varint,1,opt,name=Boolean,proto3" json:"Boolean,omitempty"` UInt uint32 `protobuf:"varint,2,opt,name=UInt,proto3" json:"UInt,omitempty"` Slice []string `protobuf:"bytes,3,rep,name=Slice,proto3" json:"Slice,omitempty"` Map map[string]uint32 `` /* 148-byte string literal not displayed */ Sub *SubFixture `protobuf:"bytes,5,opt,name=Sub,proto3" json:"Sub,omitempty"` SliceSub []*SubFixture `protobuf:"bytes,6,rep,name=SliceSub,proto3" json:"SliceSub,omitempty"` MapSub map[uint32]*SubFixture `` /* 154-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Fixture) Descriptor ¶
func (*Fixture) GetBoolean ¶
func (*Fixture) GetMapSub ¶
func (m *Fixture) GetMapSub() map[uint32]*SubFixture
func (*Fixture) GetSliceSub ¶
func (m *Fixture) GetSliceSub() []*SubFixture
func (*Fixture) GetSub ¶
func (m *Fixture) GetSub() *SubFixture
func (*Fixture) ProtoMessage ¶
func (*Fixture) ProtoMessage()
func (*Fixture) XXX_DiscardUnknown ¶
func (m *Fixture) XXX_DiscardUnknown()
func (*Fixture) XXX_Marshal ¶
func (*Fixture) XXX_Unmarshal ¶
type SubFixture ¶
type SubFixture struct { A string `protobuf:"bytes,1,opt,name=A,proto3" json:"A,omitempty"` B string `protobuf:"bytes,2,opt,name=B,proto3" json:"B,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SubFixture) Descriptor ¶
func (*SubFixture) Descriptor() ([]byte, []int)
func (*SubFixture) GetA ¶
func (m *SubFixture) GetA() string
func (*SubFixture) GetB ¶
func (m *SubFixture) GetB() string
func (*SubFixture) ProtoMessage ¶
func (*SubFixture) ProtoMessage()
func (*SubFixture) Reset ¶
func (m *SubFixture) Reset()
func (*SubFixture) String ¶
func (m *SubFixture) String() string
func (*SubFixture) XXX_DiscardUnknown ¶
func (m *SubFixture) XXX_DiscardUnknown()
func (*SubFixture) XXX_Marshal ¶
func (m *SubFixture) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubFixture) XXX_Merge ¶
func (m *SubFixture) XXX_Merge(src proto.Message)
func (*SubFixture) XXX_Size ¶
func (m *SubFixture) XXX_Size() int
func (*SubFixture) XXX_Unmarshal ¶
func (m *SubFixture) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.