Documentation ¶
Index ¶
- func CheckGoldenDataResponse(path string, dr *backend.DataResponse, updateFile bool) errordeprecated
- func CheckGoldenFrame(path string, f *data.Frame, updateFile bool) errordeprecated
- func CheckGoldenFramer(path string, f data.Framer, updateFile bool) errordeprecated
- func CheckGoldenJSONFrame(t *testing.T, dir string, name string, f *data.Frame, updateFile bool)
- func CheckGoldenJSONFramer(t *testing.T, dir string, name string, f data.Framer, updateFile bool)
- func CheckGoldenJSONResponse(t *testing.T, dir string, name string, dr *backend.DataResponse, ...)
- func GetDirectoryFrame(p string, details bool) (*data.Frame, error)
- type Client
- type FrameSorter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGoldenDataResponse
deprecated
added in
v0.73.0
func CheckGoldenDataResponse(path string, dr *backend.DataResponse, updateFile bool) error
CheckGoldenDataResponse will verify that the stored file matches the given data.DataResponse when the updateFile flag is set, this will both add errors to the response and update the saved file
Deprecated: Use CheckGoldenJSONResponse instead
func CheckGoldenJSONFrame ¶ added in v0.136.0
CheckGoldenJSONFrame calls CheckGoldenJSONResponse using a single frame.
func CheckGoldenJSONFramer ¶ added in v0.136.0
CheckGoldenJSONFramer calls CheckGoldenJSONResponse using a data.Framer instead of a backend.DataResponse.
func CheckGoldenJSONResponse ¶ added in v0.136.0
func CheckGoldenJSONResponse(t *testing.T, dir string, name string, dr *backend.DataResponse, updateFile bool)
CheckGoldenJSONResponse will verify that the stored JSON file matches the given backend.DataResponse.
Types ¶
type Client ¶ added in v0.77.0
type Client interface { // Fetch performs an HTTP GET and returns the body as []byte to prep for marshalling. Fetch(ctx context.Context, uriPath, uriQuery string) ([]byte, error) // Get performs an HTTP GET and returns the response. // This can be used directly from resource calls that don't need to marshal the data Get(ctx context.Context, uriPath, uriQuery string) (*http.Response, error) }
Client implements a REST client that can be easily mocked in tests and manages connection setup and teardown behavior internally
type FrameSorter ¶ added in v0.78.0
type FrameSorter struct {
// contains filtered or unexported fields
}
FrameSorter sorts a DataFrame by field.
func NewFrameSorter ¶ added in v0.78.0
func NewFrameSorter(frame *data.Frame, sortField *data.Field) FrameSorter
NewFrameSorter returns a new frameSorter.
func (FrameSorter) Len ¶ added in v0.78.0
func (fs FrameSorter) Len() int
func (FrameSorter) Less ¶ added in v0.78.0
func (fs FrameSorter) Less(i, j int) bool
func (FrameSorter) Swap ¶ added in v0.78.0
func (fs FrameSorter) Swap(i, j int)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
apis
|
|
Package status provides utilities for status and errors.
|
Package status provides utilities for status and errors. |