mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 15:35:59 +08:00
feat: add tracefunnel module and handler
Signed-off-by: Shivanshu Raj Shrivastava <shivanshu1333@gmail.com>
This commit is contained in:
parent
235ea39d73
commit
19ee5860cb
41
pkg/modules/tracefunnel/tracefunnel.go
Normal file
41
pkg/modules/tracefunnel/tracefunnel.go
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
package tracefunnel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
traceFunnels "github.com/SigNoz/signoz/pkg/types/tracefunnel"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Module defines the interface for trace funnel operations
|
||||||
|
type Module interface {
|
||||||
|
Create(ctx context.Context, timestamp int64, name string, userID string, orgID string) (*traceFunnels.Funnel, error)
|
||||||
|
|
||||||
|
Get(ctx context.Context, funnelID string) (*traceFunnels.Funnel, error)
|
||||||
|
|
||||||
|
Update(ctx context.Context, funnel *traceFunnels.Funnel, userID string) error
|
||||||
|
|
||||||
|
List(ctx context.Context, orgID string) ([]*traceFunnels.Funnel, error)
|
||||||
|
|
||||||
|
Delete(ctx context.Context, funnelID string) error
|
||||||
|
|
||||||
|
Save(ctx context.Context, funnel *traceFunnels.Funnel, userID string, orgID string) error
|
||||||
|
|
||||||
|
GetFunnelMetadata(ctx context.Context, funnelID string) (int64, int64, string, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type Handler interface {
|
||||||
|
New(http.ResponseWriter, *http.Request)
|
||||||
|
|
||||||
|
UpdateSteps(http.ResponseWriter, *http.Request)
|
||||||
|
|
||||||
|
UpdateFunnel(http.ResponseWriter, *http.Request)
|
||||||
|
|
||||||
|
List(http.ResponseWriter, *http.Request)
|
||||||
|
|
||||||
|
Get(http.ResponseWriter, *http.Request)
|
||||||
|
|
||||||
|
Delete(http.ResponseWriter, *http.Request)
|
||||||
|
|
||||||
|
Save(http.ResponseWriter, *http.Request)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user