Documentation ¶
Index ¶
- func UserFrom(ctx context.Context) (user.Info, bool)
- func WithInfo(parent context.Context, info *Info) context.Context
- func WithUser(parent context.Context, user user.Info) context.Context
- func WithValue(parent context.Context, key interface{}, val interface{}) context.Context
- type Info
- type InfoFactory
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct { // IsResourceRequest indicates whether or not the request is for an API resource or subresource IsResourceRequest bool // Path is the URL path of the request Path string // Verb is the kube verb associated with the request for API requests, not the http verb. This includes things like list and watch. // for non-resource requests, this is the lowercase http verb Verb string APIPrefix string APIGroup string APIVersion string // Resource is the name of the resource being requested. This is not the kind. For example: pods Resource string // Subresource is the name of the subresource being requested. This is a different resource, scoped to the parent resource, but it may have a different kind. // For instance, /pods has the resource "pods" and the kind "Pod", while /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" // (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource "binding", and kind "Binding". Subresource string // Name is empty for some verbs, but if the request directly indicates a name (not in body content) then this field is filled in. Name string }
type InfoFactory ¶
func (*InfoFactory) NewRequestInfo ¶
func (i *InfoFactory) NewRequestInfo(req *http.Request) (*Info, error)
Click to show internal directories.
Click to hide internal directories.