Files
unifood/model/resources/resources.go
bdoerfchen da2d507629 feat: add resource handler (#2)
Features:
- Adds the new meta-resource "Resource" with its resource handler

Reviewed-on: #2
Co-authored-by: bdoerfchen <git@bissendorf.co>
Co-committed-by: bdoerfchen <git@bissendorf.co>
2025-07-20 17:48:00 +00:00

18 lines
430 B
Go

package resources
import "strings"
type Resource struct {
ResourceName string
Aliases []string
Description string
}
func (r *Resource) Kind() string { return "Resource" }
func (r *Resource) Name() string { return r.ResourceName }
func (r *Resource) ColumnNames() []string { return []string{"Aliases", "Description"} }
func (r *Resource) Columns() []any {
return []any{strings.Join(r.Aliases, ", "), r.Description}
}