hookproviderservice

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidHook = errors.New("invalid remote hook data")
)

Functions

This section is empty.

Types

type LocalHook

type LocalHook struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Type        string            `json:"type"`
	Tools       []taskengine.Tool `json:"tools,omitempty"`
}

type Service

type Service interface {
	Create(ctx context.Context, hook *runtimetypes.RemoteHook) error
	Get(ctx context.Context, id string) (*runtimetypes.RemoteHook, error)
	GetByName(ctx context.Context, name string) (*runtimetypes.RemoteHook, error)
	Update(ctx context.Context, hook *runtimetypes.RemoteHook) error
	Delete(ctx context.Context, id string) error
	List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.RemoteHook, error)
	GetSchemasForSupportedHooks(ctx context.Context) (map[string]*openapi3.T, error)
	ListLocalHooks(ctx context.Context) ([]LocalHook, error)
}

Service defines the interface for managing remote hooks and querying hook capabilities.

func New

func New(dbInstance libdb.DBManager, hookRegistry taskengine.HookProvider) Service

New creates a new service instance.

func WithActivityTracker

func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service

WithActivityTracker wraps a Service with activity tracking functionality.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL