Documentation
¶
Overview ¶
Package api implements the API server for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorToStatus ¶ added in v0.7.0
ErrorToStatus converts an application error to a gRPC status. Compatible with grpchelper.GRPCCodesConverterHandler.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides the API server implementation.
func (*API) GenerateCode ¶
func (api *API) GenerateCode(ctx context.Context, request *generator.GenerateCodeRequest) (*generator.GenerateCodeResponse, error)
GenerateCode implements generator.PluginGeneratorServiceServer.
func (*API) Plugins ¶
func (api *API) Plugins(ctx context.Context, _ *generator.PluginsRequest) (*generator.PluginsResponse, error)
Plugins implements generator.ServiceAPIServer.
type AuditInterceptor ¶ added in v0.7.0
type AuditInterceptor struct {
// contains filtered or unexported fields
}
AuditInterceptor creates a gRPC UnaryServerInterceptor for audit logging.
func NewAuditInterceptor ¶ added in v0.7.0
func NewAuditInterceptor(entries chan<- core.AuditEntry, logger *slog.Logger) *AuditInterceptor
NewAuditInterceptor creates a new AuditInterceptor with the given audit channel and logger.
func (*AuditInterceptor) UnaryServerInterceptor ¶ added in v0.7.0
func (a *AuditInterceptor) UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a grpc.UnaryServerInterceptor that records audit entries.
Click to show internal directories.
Click to hide internal directories.