Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MethodInfo ¶
type MethodInfo struct {
Name string
Input *TypeInfo // Input parameter type information
Output *TypeInfo // Return value type information
}
MethodInfo represents a method definition in an interface.
type ServiceInfo ¶
type ServiceInfo struct {
Name string
Package string
Methods []MethodInfo
}
ServiceInfo represents information about an interface.
func ParseService ¶
func ParseService(ifacePtr interface{}) (*ServiceInfo, error)
ParseService parses method information from an interface type. Note: input must be a pointer to an interface type (e.g., (*MyInterface)(nil)) or a reflect.Type (more recommended), but for API simplification, interface{} is accepted here.
func (*ServiceInfo) String ¶
func (ii *ServiceInfo) String() string
String implements the string representation of ServiceInfo (for easy printing).
Click to show internal directories.
Click to hide internal directories.