Documentation
¶
Index ¶
- func IsNotFound(err error) bool
- func ProjectStreamHandler(recorder *Recorder) http.Handler
- type CursorStore
- type Event
- type IDStore
- type PolicyEvent
- type Recorder
- func (recorder *Recorder) Recent(projectID string, limit int) []Event
- func (recorder *Recorder) Record(event Event) Event
- func (recorder *Recorder) RecordPolicyEvent(event PolicyEvent) Event
- func (recorder *Recorder) RecordRunEvent(event Event) Event
- func (recorder *Recorder) Since(projectID string, afterID int64, limit int) []Event
- func (recorder *Recorder) Subscribe(ctx context.Context) <-chan Event
- type SQLiteStore
- func (store *SQLiteStore) MaxID(ctx context.Context) (int64, error)
- func (store *SQLiteStore) Recent(ctx context.Context, projectID string, limit int) ([]Event, error)
- func (store *SQLiteStore) Record(ctx context.Context, event Event) error
- func (store *SQLiteStore) Since(ctx context.Context, projectID string, afterID int64, limit int) ([]Event, error)
- type SQLiteStoreOptions
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶ added in v0.1.12
func ProjectStreamHandler ¶
Types ¶
type CursorStore ¶ added in v0.1.12
type Event ¶
type Event struct {
ID int64 `json:"id"`
Timestamp time.Time `json:"timestamp"`
EventKind string `json:"event_kind,omitempty"`
ProjectID string `json:"project_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
RunID string `json:"run_id,omitempty"`
ParentID string `json:"parent_id,omitempty"`
CorrelationKind string `json:"correlation_kind,omitempty"`
Method string `json:"method"`
ToolName string `json:"tool_name,omitempty"`
Status string `json:"status"`
DurationMS int64 `json:"duration_ms"`
Error string `json:"error,omitempty"`
FailureCategory string `json:"failure_category,omitempty"`
PolicyCategory string `json:"policy_category,omitempty"`
RelativePath string `json:"relative_path,omitempty"`
RequestID string `json:"request_id,omitempty"`
RemoteAddr string `json:"remote_addr,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ClientClass string `json:"client_class,omitempty"`
InputSummaryHash string `json:"input_summary_hash,omitempty"`
InputSummaryClass string `json:"input_summary_class,omitempty"`
OutputSummaryHash string `json:"output_summary_hash,omitempty"`
OutputSummaryClass string `json:"output_summary_class,omitempty"`
RawRequest json.RawMessage `json:"raw_request,omitempty"`
RawParams json.RawMessage `json:"raw_params,omitempty"`
RawArgs json.RawMessage `json:"raw_arguments,omitempty"`
RawResult json.RawMessage `json:"raw_result,omitempty"`
}
type PolicyEvent ¶ added in v0.1.12
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func NewRecorder ¶
func NewRecorderWithStore ¶ added in v0.1.12
func (*Recorder) RecordPolicyEvent ¶ added in v0.1.12
func (recorder *Recorder) RecordPolicyEvent(event PolicyEvent) Event
func (*Recorder) RecordRunEvent ¶ added in v0.1.12
type SQLiteStore ¶ added in v0.1.12
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶ added in v0.1.12
func NewSQLiteStore(db *sql.DB, options SQLiteStoreOptions) *SQLiteStore
func (*SQLiteStore) MaxID ¶ added in v0.1.12
func (store *SQLiteStore) MaxID(ctx context.Context) (int64, error)
type SQLiteStoreOptions ¶ added in v0.1.12
type SQLiteStoreOptions struct {
RetainRawPayloads bool
}
Click to show internal directories.
Click to hide internal directories.