Documentation ¶
Index ¶
- Variables
- func BindJSON(r *http.Request, dst interface{}) error
- func BindQuery(r *http.Request, dst interface{}) error
- func GetAuthContext(ctx context.Context) (*core.AuthContext, bool)
- func NumericURLParam(r *http.Request, name string) (int64, error)
- func RemoteAddr(r *http.Request) string
- func WithAuthContext(parent context.Context, auth *core.AuthContext) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFailedToBindJSON = errors.New("failed to parse json body")
)
Functions ¶
func GetAuthContext ¶
func GetAuthContext(ctx context.Context) (*core.AuthContext, bool)
SessionFrom returns the auth context for the given context.
func NumericURLParam ¶
NumericURLParam returns a url parameter as int64.
func WithAuthContext ¶
WithAuthContext returns a copy of parent ctx which includes the auth context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.