Documentation
¶
Index ¶
- func New(cfg *config.Config, services *handlers.Services, scipSvc *scip.Service, ...) *http.Server
- type Builder
- func (b *Builder) Build() *http.Server
- func (b *Builder) WithAuditLogger(al audit.AuditLogger) *Builder
- func (b *Builder) WithAuthenticator(auth authmw.Authenticator) *Builder
- func (b *Builder) WithAuthorizer(authz authmw.Authorizer) *Builder
- func (b *Builder) WithRoutes(fn func(chi.Router)) *Builder
- func (b *Builder) WithSCIP(svc *scip.Service) *Builder
- func (b *Builder) WithSearchResultFilter(...) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder provides a fluent API for constructing the HTTP server with optional enterprise extension points. This is the primary integration surface for the enterprise repository.
func NewBuilder ¶
NewBuilder creates a server builder with the required dependencies.
func (*Builder) WithAuditLogger ¶
func (b *Builder) WithAuditLogger(al audit.AuditLogger) *Builder
WithAuditLogger sets a custom audit logger for compliance logging. If not called, the default NoOpAuditLogger is used.
func (*Builder) WithAuthenticator ¶
func (b *Builder) WithAuthenticator(auth authmw.Authenticator) *Builder
WithAuthenticator sets a custom authenticator (e.g., SAML, OIDC). If not called, the default NoOpAuthenticator is used.
func (*Builder) WithAuthorizer ¶
func (b *Builder) WithAuthorizer(authz authmw.Authorizer) *Builder
WithAuthorizer sets a custom authorizer (e.g., RBAC). If not called, the default NoOpAuthorizer is used.
func (*Builder) WithRoutes ¶
WithRoutes adds a function that registers additional routes on the router. This allows enterprise to add auth, admin, and other routes to the same server without modifying the core router setup.
func (*Builder) WithSearchResultFilter ¶
func (b *Builder) WithSearchResultFilter(fn func(ctx context.Context, results []search.SearchResult) []search.SearchResult) *Builder
WithSearchResultFilter sets a function to filter search results based on user access. This is a convenience that wraps authorizer-level filtering into the search pipeline.