feat: base implementation

This commit is contained in:
2025-07-20 13:47:16 +02:00
parent ad082a3f12
commit 7d561ea6ea
21 changed files with 635 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package interfaces
import (
"context"
"git.bissendorf.co/bissendorf/unifood/m/v2/core/interfaces/params"
)
type ResourceCommand[T any] struct {
Name string
Aliases []string
Description string
Verbs []Verb
Handler ResourceHandler
}
type ResourceHandler interface {
GetParametersForVerb(verb Verb) []params.Registration
}
type GetHandler interface {
Get(ctx context.Context, params params.Container) (any, error)
}
type Verb string
const (
VerbGet Verb = "get"
)