feat: add resource handler

This commit is contained in:
2025-07-20 19:45:22 +02:00
parent ec66365b5e
commit 79c1759799
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}
}