Documentation ¶
Index ¶
- type Structpath
- func (p *Structpath) Accept(path string, args ...interface{}) bool
- func (p *Structpath) Equals(expected interface{}, path string, args ...interface{}) *Structpath
- func (p *Structpath) Exists(path string, args ...interface{}) *Structpath
- func (p *Structpath) ForTest(t *testing.T) *Structpath
- func (p *Structpath) NotExists(path string, args ...interface{}) *Structpath
- func (p *Structpath) Select(path string, args ...interface{}) *Structpath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Structpath ¶
type Structpath struct {
// contains filtered or unexported fields
}
func AssertThatProto ¶
func AssertThatProto(t *testing.T, proto proto.Message) *Structpath
Creates a new Structpath by marshaling the proto to JSON and then evaluating over that structure. This is the most generally useful form as serialization to JSON also automatically converts proto.Any and proto.Struct to the serialized JSON forms which can then be evaluated over. The downside is the loss of type fidelity for numeric types as JSON can only represent floats.
func (*Structpath) Accept ¶
func (p *Structpath) Accept(path string, args ...interface{}) bool
func (*Structpath) Equals ¶
func (p *Structpath) Equals(expected interface{}, path string, args ...interface{}) *Structpath
func (*Structpath) Exists ¶
func (p *Structpath) Exists(path string, args ...interface{}) *Structpath
func (*Structpath) ForTest ¶
func (p *Structpath) ForTest(t *testing.T) *Structpath
func (*Structpath) NotExists ¶
func (p *Structpath) NotExists(path string, args ...interface{}) *Structpath
func (*Structpath) Select ¶
func (p *Structpath) Select(path string, args ...interface{}) *Structpath
Click to show internal directories.
Click to hide internal directories.