Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
API is the main entry point for the Sentra API. It is used to execute policies and rules.
type DecisionRequest ¶
DecisionRequest represents the request body for rule execution
type DecisionResponse ¶
type DecisionResponse struct {
Decisions []*runtime.ExecutorOutput `json:"decisions"`
Error string `json:"error,omitempty"`
}
DecisionResponse represents the response from rule execution
type HTTPAPI ¶
type HTTPAPI struct {
// contains filtered or unexported fields
}
HTTPAPI provides HTTP endpoints for rule execution
func NewHTTPAPI ¶
NewHTTPAPI creates a new HTTP API instance
func (*HTTPAPI) StartServer ¶
StartServer starts the HTTP server on the specified addresses
type ListenerServerPair ¶
func NewListenerServerPair ¶
func NewListenerServerPair(listener net.Listener, server *http.Server) *ListenerServerPair
func (*ListenerServerPair) Close ¶
func (p *ListenerServerPair) Close() error
type ProblemDetails ¶
type ProblemDetails struct {
Type string `json:"type,omitempty"`
Title string `json:"title"`
Status int `json:"status,omitempty"`
Detail string `json:"detail,omitempty"`
Instance string `json:"instance,omitempty"`
Ext map[string]any `json:"-"`
}
ProblemDetails represents an RFC 9457 Problem Details for HTTP APIs
func NewProblemDetails ¶
func NewProblemDetails(type_, title, detail, instance string, status int, ext map[string]any) *ProblemDetails
func (*ProblemDetails) MarshalJSON ¶
func (p *ProblemDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements custom JSON marshaling for ProblemDetails
Click to show internal directories.
Click to hide internal directories.