Documentation
¶
Index ¶
- func Delete(service *services.ObjectService) http.HandlerFunc
- func Get(service *services.ObjectService) http.HandlerFunc
- func Put(service *services.ObjectService) http.HandlerFunc
- func Route(service *services.ObjectService, ctx context.Context, cfg *config.Config) *http.ServeMux
- func View(engine *templating.Engine, name string, data any) http.HandlerFunc
- func ViewIndex(engine *templating.Engine, serverSessions *security.ServerSessions) http.HandlerFunc
- func ViewStore(engine *templating.Engine, serverSessions *security.ServerSessions) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(service *services.ObjectService) http.HandlerFunc
Delete defines an HTTP handler function for deleting an object by key. It expects a JSON request body with the "key" field and deletes the corresponding object.
func Get ¶
func Get(service *services.ObjectService) http.HandlerFunc
Get defines an HTTP handler function for retrieving an object by key. It expects a JSON request body with the "key" field and retrieves the corresponding object.
func Put ¶
func Put(service *services.ObjectService) http.HandlerFunc
Put defines an HTTP handler function for creating or updating an object. It expects a JSON request body with "key" and "value" fields.
func Route ¶
Route creates a new mux with the liveness and readiness probe (/liveness, /readiness), the static assets endpoint (/) and the store endpoints (/api/v1/store).
func View ¶ added in v0.1.7
func View(engine *templating.Engine, name string, data any) http.HandlerFunc
View defines an HTTP handler function for rendering a template with data.
func ViewIndex ¶ added in v0.1.7
func ViewIndex(engine *templating.Engine, serverSessions *security.ServerSessions) http.HandlerFunc
ViewIndex defines an HTTP handler function for rendering the index template.
func ViewStore ¶ added in v0.1.7
func ViewStore(engine *templating.Engine, serverSessions *security.ServerSessions) http.HandlerFunc
ViewStore defines an HTTP handler function for rendering the store template.
Types ¶
This section is empty.