-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
clear_send_gen.go
55 lines (50 loc) · 1.6 KB
/
clear_send_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// +build !generate
package hit
import errortrace "github.com/Eun/go-hit/errortrace"
// ⚠️⚠️⚠️ This file was autogenerated by generators/clear/clear ⚠️⚠️⚠️ //
// IClearSend provides methods to clear steps.
type IClearSend interface {
IStep
// Body clears all matching Body steps
Body() IClearSendBody
// Custom clears all matching Custom steps
Custom(value ...Callback) IStep
// Headers clears all matching Headers steps
Headers(value ...string) IClearSendHeaders
// Trailers clears all matching Trailers steps
Trailers(value ...string) IClearSendHeaders
}
type clearSend struct {
cp callPath
tr *errortrace.ErrorTrace
}
func newClearSend(cp callPath) IClearSend {
return &clearSend{cp: cp, tr: ett.Prepare()}
}
func (v *clearSend) trace() *errortrace.ErrorTrace {
return v.tr
}
func (*clearSend) when() StepTime {
return cleanStep
}
func (v *clearSend) callPath() callPath {
return v.cp
}
func (v *clearSend) exec(hit *hitImpl) error {
if err := removeSteps(hit, v.callPath()); err != nil {
return err
}
return nil
}
func (v *clearSend) Body() IClearSendBody {
return newClearSendBody(v.callPath().Push("Body", nil))
}
func (v *clearSend) Custom(value ...Callback) IStep {
return removeStep(v.callPath().Push("Custom", callbackSliceToInterfaceSlice(value)))
}
func (v *clearSend) Headers(value ...string) IClearSendHeaders {
return newClearSendHeaders(v.callPath().Push("Headers", stringSliceToInterfaceSlice(value)))
}
func (v *clearSend) Trailers(value ...string) IClearSendHeaders {
return newClearSendHeaders(v.callPath().Push("Trailers", stringSliceToInterfaceSlice(value)))
}