Documentation
¶
Index ¶
- func ParseUintList(values []string) []uint
- type BodyOptions
- type Context
- func (r *Context) Accepts(contentType string) bool
- func (r *Context) AuthProviderNameAndNamespace() (string, string)
- func (r *Context) AuthProviderUserID() string
- func (r *Context) Body(opts ...BodyOptions) (_ []byte, err error)
- func (r *Context) Create(obj kclient.Object) error
- func (r *Context) Delete(obj kclient.Object) error
- func (r *Context) Flush()
- func (r *Context) Get(obj kclient.Object, name string) error
- func (r *Context) IsStreamRequested() bool
- func (r *Context) List(obj kclient.ObjectList, opts ...kclient.ListOption) error
- func (r *Context) Namespace() string
- func (r *Context) Read(obj any) error
- func (r *Context) Update(obj kclient.Object) error
- func (r *Context) UserID() uint
- func (r *Context) UserIsAdmin() bool
- func (r *Context) UserIsAuditor() bool
- func (r *Context) UserIsAuthenticated() bool
- func (r *Context) UserIsOwner() bool
- func (r *Context) UserIsPowerUser() bool
- func (r *Context) UserIsPowerUserPlus() bool
- func (r *Context) UserTimezone() string
- func (r *Context) Write(obj any) error
- func (r *Context) WriteCode(obj any, code int) error
- func (r *Context) WriteCreated(obj any) error
- type HandlerFunc
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseUintList ¶ added in v0.26.0
ParseUintList parses repeated and comma-separated query parameter values, returning only valid, positive uint values.
Types ¶
type BodyOptions ¶ added in v0.5.0
type BodyOptions struct {
// MaxBytes caps the body, applied to the compressed and decoded streams alike.
MaxBytes int64
}
type Context ¶
type Context struct {
http.ResponseWriter
*http.Request
Storage storage.Client
GatewayClient *gclient.Client
User user.Info
APIBaseURL string
// LocalK8sClient is a kclient for the local Kubernetes cluster — the
// cluster the obot pod runs in, where source Secrets for
// secretBindings live. It reads from the local router's cache. Nil on
// the docker backend.
LocalK8sClient kclient.Client
// ObotNamespace is the Kubernetes namespace in which the obot server
// runs; mcp.MergeBoundCreds reads source Secrets from here. Empty
// when LocalK8sClient is nil.
ObotNamespace string
}
func (*Context) AuthProviderNameAndNamespace ¶ added in v0.5.0
func (*Context) AuthProviderUserID ¶ added in v0.11.0
func (*Context) IsStreamRequested ¶
func (*Context) List ¶
func (r *Context) List(obj kclient.ObjectList, opts ...kclient.ListOption) error
func (*Context) UserIsAdmin ¶
func (*Context) UserIsAuditor ¶ added in v0.12.0
func (*Context) UserIsAuthenticated ¶
func (*Context) UserIsOwner ¶ added in v0.12.0
func (*Context) UserIsPowerUser ¶ added in v0.12.0
func (*Context) UserIsPowerUserPlus ¶ added in v0.23.0
func (*Context) UserTimezone ¶ added in v0.5.0
func (*Context) WriteCreated ¶
type HandlerFunc ¶
type Middleware ¶
type Middleware func(HandlerFunc) HandlerFunc
Click to show internal directories.
Click to hide internal directories.