Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchitecturePattern ¶
type ArchitecturePattern string
const ( PatternMicroservice ArchitecturePattern = "microservice" PatternModular ArchitecturePattern = "modular_monolith" PatternHybrid ArchitecturePattern = "hybrid" )
type ComplianceReport ¶
type DependencyContract ¶
type EndpointContract ¶
type EndpointContract struct {
Path string `json:"path"`
Method string `json:"method"`
RequestSchema json.RawMessage `json:"request_schema"`
ResponseSchema json.RawMessage `json:"response_schema"`
ErrorCodes []int `json:"error_codes"`
RateLimit *RateLimitConfig `json:"rate_limit,omitempty"`
Authorization []string `json:"authorization"`
}
type HealthCheckContract ¶
type HealthCheckContract struct {
Path string `json:"path"`
}
type MetricsContract ¶
type MetricsContract struct {
Enabled bool `json:"enabled"`
}
type PatternManager ¶
type PatternManager struct {
// contains filtered or unexported fields
}
func NewPatternManager ¶
func NewPatternManager(db *sql.DB) *PatternManager
func (*PatternManager) AnalyzeServiceCompliance ¶
func (pm *PatternManager) AnalyzeServiceCompliance(serviceName string) (*ComplianceReport, error)
type RateLimitConfig ¶
type ServiceContract ¶
type ServiceContract struct {
ServiceName string `json:"service_name"`
Version string `json:"version"`
Endpoints []EndpointContract `json:"endpoints"`
Dependencies []DependencyContract `json:"dependencies"`
HealthCheck HealthCheckContract `json:"health_check"`
Metrics MetricsContract `json:"metrics"`
}
ServiceContract defines the interface contract for a service.
type ServiceRegistry ¶
type ServiceRegistry struct {
// contains filtered or unexported fields
}
ServiceRegistry manages service contracts and provides contract validation.
func NewServiceRegistry ¶
func NewServiceRegistry(db *sql.DB) *ServiceRegistry
NewServiceRegistry creates a new registry instance.
func (*ServiceRegistry) GetServiceContract ¶
func (sr *ServiceRegistry) GetServiceContract(name string) (*ServiceContract, bool)
GetServiceContract retrieves a contract by service name.
func (*ServiceRegistry) RegisterService ¶
func (sr *ServiceRegistry) RegisterService(contract *ServiceContract) error
RegisterService validates and stores a service contract.
Click to show internal directories.
Click to hide internal directories.