Documentation
ΒΆ
Index ΒΆ
- func Example(di *dixinternal.Dix)
- type DependencyData
- type EdgeInfo
- type ObjectInfo
- type PackageDetailsData
- type PackageInfo
- type ProviderInfo
- type Server
- func (s *Server) HandleDependencies(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleIndex(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePackageDetails(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePackages(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleStats(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleTypeDetails(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListenAndServe(addr string) error
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type ServerOption
- type StatsData
- type TypeDetailsData
- type TypeNode
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func Example ΒΆ
func Example(di *dixinternal.Dix)
Example demonstrates how to use the HTTP server for dependency visualization
Types ΒΆ
type DependencyData ΒΆ
type DependencyData struct {
Providers []ProviderInfo `json:"providers"`
Objects []ObjectInfo `json:"objects"`
Edges []EdgeInfo `json:"edges"`
}
DependencyData represents the structure of dependency information
type EdgeInfo ΒΆ
type EdgeInfo struct {
From string `json:"from"`
To string `json:"to"`
Type string `json:"type"` // "provider", "object", "dependency"
}
EdgeInfo represents a dependency relationship
type ObjectInfo ΒΆ
type ObjectInfo struct {
ID string `json:"id"`
Type string `json:"type"`
Group string `json:"group"`
IsInitialized bool `json:"is_initialized"`
}
ObjectInfo contains information about an object instance
type PackageDetailsData ΒΆ
type PackageDetailsData struct {
Package string `json:"package"`
Providers []ProviderInfo `json:"providers"`
Edges []EdgeInfo `json:"edges"`
}
PackageDetailsData contains detailed information for a package
type PackageInfo ΒΆ
type PackageInfo struct {
Name string `json:"name"`
ProviderCount int `json:"provider_count"`
Types []string `json:"types"`
}
PackageInfo contains information about a package
type ProviderInfo ΒΆ
type ProviderInfo struct {
ID string `json:"id"`
OutputType string `json:"output_type"`
FunctionName string `json:"function_name"`
InputTypes []string `json:"input_types"`
}
ProviderInfo contains information about a provider
type Server ΒΆ
type Server struct {
// contains filtered or unexported fields
}
Server provides HTTP endpoints to visualize dependency relationships
func NewServer ΒΆ
func NewServer(dix *dixinternal.Dix) *Server
NewServer creates a new HTTP server for dependency visualization
func NewServerWithOptions ΒΆ
func NewServerWithOptions(dix *dixinternal.Dix, opts ...ServerOption) *Server
NewServerWithOptions creates a new HTTP server with options.
func (*Server) HandleDependencies ΒΆ
func (s *Server) HandleDependencies(w http.ResponseWriter, r *http.Request)
HandleDependencies returns JSON data about providers and objects relationships
func (*Server) HandleIndex ΒΆ
func (s *Server) HandleIndex(w http.ResponseWriter, r *http.Request)
HandleIndex serves the HTML visualization page
func (*Server) HandlePackageDetails ΒΆ
func (s *Server) HandlePackageDetails(w http.ResponseWriter, r *http.Request)
HandlePackageDetails returns details for a specific package
func (*Server) HandlePackages ΒΆ
func (s *Server) HandlePackages(w http.ResponseWriter, r *http.Request)
HandlePackages returns list of packages for navigation
func (*Server) HandleStats ΒΆ
func (s *Server) HandleStats(w http.ResponseWriter, r *http.Request)
HandleStats returns summary statistics
func (*Server) HandleTypeDetails ΒΆ
func (s *Server) HandleTypeDetails(w http.ResponseWriter, r *http.Request)
HandleTypeDetails returns dependency details for a specific type
func (*Server) ListenAndServe ΒΆ
ListenAndServe starts the HTTP server on the specified address
type ServerOption ΒΆ
type ServerOption func(*Server)
ServerOption customizes the HTTP server behavior.
func WithBasePath ΒΆ
func WithBasePath(basePath string) ServerOption
WithBasePath sets an optional URL prefix for all routes. Example: "/dix".
type StatsData ΒΆ
type StatsData struct {
ProviderCount int `json:"provider_count"`
ObjectCount int `json:"object_count"`
PackageCount int `json:"package_count"`
EdgeCount int `json:"edge_count"`
}
StatsData contains summary statistics