Struct: request.HandlerList
Overview
A HandlerList manages zero or more handlers in a list.
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom
Method Summary collapse
-
func (l *HandlerList) Clear()
Clear clears the handler list.
-
func (l *HandlerList) Len() int
Len returns the number of handlers in the list.
-
func (l *HandlerList) PushBack(f func(*Request))
PushBack pushes handler f to the back of the handler list.
-
func (l *HandlerList) PushBackNamed(n NamedHandler)
PushBackNamed pushes named handler f to the back of the handler list.
-
func (l *HandlerList) PushFront(f func(*Request))
PushFront pushes handler f to the front of the handler list.
-
func (l *HandlerList) PushFrontNamed(n NamedHandler)
PushFrontNamed pushes named handler f to the front of the handler list.
-
func (l *HandlerList) Remove(n NamedHandler)
Remove removes a NamedHandler n.
-
func (l *HandlerList) RemoveByName(name string)
RemoveByName removes a NamedHandler by name.
-
func (l *HandlerList) Run(r *Request)
Run executes all handlers in the list with a given request object.
-
func (l *HandlerList) SetBackNamed(n NamedHandler)
SetBackNamed will replace the named handler if it exists in the handler list.
-
func (l *HandlerList) SetFrontNamed(n NamedHandler)
SetFrontNamed will replace the named handler if it exists in the handler list.
-
func (l *HandlerList) Swap(name string, replace NamedHandler) bool
Swap will swap out all handlers matching the name passed in.
-
func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool)
SwapNamed will swap out any existing handlers with the same name as the passed in NamedHandler returning true if handlers were swapped.
Method Details
func (l *HandlerList) Clear()
Clear clears the handler list.
156 157 158 |
// File 'aws/request/handlers.go', line 156
|
func (l *HandlerList) Len() int
Len returns the number of handlers in the list.
161 162 163 |
// File 'aws/request/handlers.go', line 161
|
func (l *HandlerList) PushBack(f func(*Request))
PushBack pushes handler f to the back of the handler list.
166 167 168 |
// File 'aws/request/handlers.go', line 166
|
func (l *HandlerList) PushBackNamed(n NamedHandler)
PushBackNamed pushes named handler f to the back of the handler list.
171 172 173 174 175 176 |
// File 'aws/request/handlers.go', line 171
|
func (l *HandlerList) PushFront(f func(*Request))
PushFront pushes handler f to the front of the handler list.
179 180 181 |
// File 'aws/request/handlers.go', line 179
|
func (l *HandlerList) PushFrontNamed(n NamedHandler)
PushFrontNamed pushes named handler f to the front of the handler list.
184 185 186 187 188 189 190 191 192 193 194 |
// File 'aws/request/handlers.go', line 184
|
func (l *HandlerList) Remove(n NamedHandler)
Remove removes a NamedHandler n
197 198 199 |
// File 'aws/request/handlers.go', line 197
|
func (l *HandlerList) RemoveByName(name string)
RemoveByName removes a NamedHandler by name.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
// File 'aws/request/handlers.go', line 202
|
func (l *HandlerList) Run(r *Request)
Run executes all handlers in the list with a given request object.
264 265 266 267 268 269 270 271 272 273 274 |
// File 'aws/request/handlers.go', line 264
|
func (l *HandlerList) SetBackNamed(n NamedHandler)
SetBackNamed will replace the named handler if it exists in the handler list. If the handler does not exist the handler will be added to the end of the list.
248 249 250 251 252 |
// File 'aws/request/handlers.go', line 248
|
func (l *HandlerList) SetFrontNamed(n NamedHandler)
SetFrontNamed will replace the named handler if it exists in the handler list. If the handler does not exist the handler will be added to the beginning of the list.
257 258 259 260 261 |
// File 'aws/request/handlers.go', line 257
|
func (l *HandlerList) Swap(name string, replace NamedHandler) bool
Swap will swap out all handlers matching the name passed in. The matched handlers will be swapped in. True is returned if the handlers were swapped.
233 234 235 236 237 238 239 240 241 242 243 244 |
// File 'aws/request/handlers.go', line 233
|
func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool)
SwapNamed will swap out any existing handlers with the same name as the passed in NamedHandler returning true if handlers were swapped. False is returned otherwise.
220 221 222 223 224 225 226 227 228 229 |
// File 'aws/request/handlers.go', line 220
|