Documentation
¶
Index ¶
Constants ¶
View Source
const ValueKey = CtxKey("ctx.bhe")
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
StartTime time.Time
Timeout time.Duration
RequestID string
AuthCtx auth.Context
Host *url.URL
RequestedURL model.AuditableURL
RequestIP string
RemoteAddr string
}
Context holds contextual data that is passed around to functions. This is an extension to Golang's built in context.
func FromRequest ¶
FromRequest extracts the Golang-builtin-Context from a request and converts it to a BloodHound Context struct
func (*Context) ConstructGoContext ¶
func (*Context) WithRequestID ¶
WithRequestID adds the supplied RequestID value to the BloodHound Context structure
type CtxKey ¶
type CtxKey string
Use our own type rather than a primitive to avoid collisions (https://staticcheck.io/docs/checks#SA1029)
Click to show internal directories.
Click to hide internal directories.