Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonMarshalRaw ¶
JsonMarshalRaw does the same a json.Marshal, except that it does not use the MarshalJSON methods of the value being marshaled. If any types are specified in the allow set then those will use their MarshalJSON method.
Many of the types in the Azure SDK have MarshalJSON which skip over fields that are marked as READ-ONLY, this is useful for the client, but a problem when pretending to be a server.
func RequestRecorder ¶
func RequestRecorder(requests *[]*http.Request) autorest.PrepareDecorator
RequestRecorder returns an autorest.PrepareDecorator that records requests to ghe given slice.
Types ¶
type MockSender ¶
type MockSender struct { *mocks.Sender // PathPattern, if non-empty, is assumed to be a regular expression // that must match the request path. PathPattern string }
MockSender is a wrapper around autorest/mocks.Sender, extending it with request path checking to ease testing.
func NewSenderWithValue ¶
func NewSenderWithValue(v interface{}) *MockSender
NewSenderWithValue returns a *mocks.Sender that marshals the provided object to JSON and sets it as the content. This function will panic if marshalling fails.
type Senders ¶
Senders is a Sender that includes a collection of Senders, which will be called in sequence.
type SerialSender ¶
type SerialSender struct {
// contains filtered or unexported fields
}
SerialSender is a Sender that permits only one active Do call at a time.
func NewSerialSender ¶
func NewSerialSender(s autorest.Sender) *SerialSender