callbacks service draft

This commit is contained in:
Stephan D
2026-02-28 10:10:26 +01:00
parent b7900d3beb
commit 0f28f2d088
71 changed files with 5212 additions and 446 deletions

View File

@@ -0,0 +1,34 @@
package kv
import (
"context"
"github.com/tech/sendico/pkg/mlogger"
)
// Config describes Vault KV v2 connection settings.
type Config struct {
Address string `mapstructure:"address" yaml:"address"`
TokenEnv string `mapstructure:"token_env" yaml:"token_env"`
Namespace string `mapstructure:"namespace" yaml:"namespace"`
MountPath string `mapstructure:"mount_path" yaml:"mount_path"`
}
// Client defines KV operations used by services.
type Client interface {
Put(ctx context.Context, secretPath string, payload map[string]interface{}) error
Get(ctx context.Context, secretPath string) (map[string]interface{}, error)
GetString(ctx context.Context, secretPath, field string) (string, error)
}
// Options configure KV client creation.
type Options struct {
Logger mlogger.Logger
Config Config
Component string
}
// New creates a Vault KV v2 client.
func New(opts Options) (Client, error) {
return newService(opts)
}