Documentation ¶
Index ¶
- Variables
- func IsConflict(err error) bool
- func IsHTTPCode(err error, code int) bool
- func Watch[T client.Object](r Context, list client.ObjectList) (<-chan T, error)
- type Context
- func (r *Context) Accepts(contentType string) bool
- func (r *Context) AuthProviderID() uint
- func (r *Context) Body() ([]byte, error)
- func (r *Context) Create(obj client.Object) error
- func (r *Context) Delete(obj client.Object) error
- func (r *Context) Flush()
- func (r *Context) Get(obj client.Object, name string) error
- func (r *Context) IsStreamRequested() bool
- func (r *Context) List(obj client.ObjectList, opts ...client.ListOption) error
- func (r *Context) Namespace() string
- func (r *Context) Read(obj any) error
- func (r *Context) Update(obj client.Object) error
- func (r *Context) UserID() uint
- func (r *Context) UserIsAdmin() bool
- func (r *Context) UserIsAuthenticated() bool
- func (r *Context) Write(obj any) error
- func (r *Context) WriteCreated(obj any) error
- func (r *Context) WriteDataEvent(obj any) error
- func (r *Context) WriteEvents(events <-chan types.Progress) error
- type EventClose
- type HandlerFunc
- type Middleware
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMustAuth = &types.ErrHTTP{ Code: http.StatusUnauthorized, Message: "unauthorized request, must authenticate", }
Functions ¶
func IsConflict ¶
func IsHTTPCode ¶
Types ¶
type Context ¶
type Context struct { http.ResponseWriter *http.Request GPTClient *gptscript.GPTScript Storage storage.Client User user.Info APIBaseURL string }
func (*Context) AuthProviderID ¶
func (*Context) IsStreamRequested ¶
func (*Context) List ¶
func (r *Context) List(obj client.ObjectList, opts ...client.ListOption) error
func (*Context) UserIsAdmin ¶
func (*Context) UserIsAuthenticated ¶
func (*Context) WriteCreated ¶ added in v0.2.0
func (*Context) WriteDataEvent ¶
type EventClose ¶ added in v0.2.0
type EventClose struct{}
type HandlerFunc ¶
type Middleware ¶
type Middleware func(HandlerFunc) HandlerFunc
Click to show internal directories.
Click to hide internal directories.