Documentation ¶
Index ¶
- func CheckMeta(resource interface{}, vars map[string]string) error
- type Handlers
- func (h Handlers) CreateOrUpdateResource(r *http.Request) (interface{}, error)
- func (h Handlers) CreateResource(r *http.Request) (interface{}, error)
- func (h Handlers) DeleteResource(r *http.Request) (interface{}, error)
- func (h Handlers) GetResource(r *http.Request) (interface{}, error)
- func (h Handlers) ListResources(ctx context.Context, pred *store.SelectionPredicate) ([]corev2.Resource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handlers ¶
type Handlers struct { Resource corev2.Resource Store store.ResourceStore }
Handlers represents the HTTP handlers for CRUD operations on resources
func (Handlers) CreateOrUpdateResource ¶
CreateOrUpdateResource creates or updates the resource given in the request body, regardless of whether it already exists or not
func (Handlers) CreateResource ¶
CreateResource creates the resource given in the request body but only if it does not already exist
func (Handlers) DeleteResource ¶
DeleteResource deletes the resources identified in the request path
func (Handlers) GetResource ¶
GetResource retrieves the resource identified in the request path
func (Handlers) ListResources ¶
func (h Handlers) ListResources(ctx context.Context, pred *store.SelectionPredicate) ([]corev2.Resource, error)
ListResources lists all resources for the resource type
Source Files ¶
Click to show internal directories.
Click to hide internal directories.