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>
This commit is contained in:
2025-07-20 17:48:00 +00:00
committed by bissendorf
parent ec66365b5e
commit da2d507629
2 changed files with 52 additions and 3 deletions

View File

@ -0,0 +1,17 @@
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}
}