Documentation
¶
Index ¶
- Constants
- type WordPressSource
- func (w *WordPressSource) DetectWrapper(method *source.Method) (bool, string, string)
- func (w *WordPressSource) DiscoverEntities(ctx context.Context, fetch source.FetchFunc) ([]string, error)
- func (w *WordPressSource) ID() string
- func (w *WordPressSource) Meta() source.LibraryMeta
- func (w *WordPressSource) ParseEntity(_ context.Context, url string, body []byte) (*source.Entity, []string, error)
- func (w *WordPressSource) ParseMethod(_ context.Context, url string, body []byte) (*source.Method, error)
- func (w *WordPressSource) ParseSourceCode(body []byte) (string, error)
- func (w *WordPressSource) ResolveWrapperURL(targetName, targetKind, entitySlug string) string
Constants ¶
View Source
const ( BaseURL = "https://developer.wordpress.org" LibraryID = "/wordpress/classes" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WordPressSource ¶
type WordPressSource struct{}
func New ¶
func New() *WordPressSource
func (*WordPressSource) DetectWrapper ¶
DetectWrapper analyzes a method's source code to determine if it's a wrapper. Returns (isWrapper, targetName, targetKind).
func (*WordPressSource) DiscoverEntities ¶
func (*WordPressSource) ID ¶
func (w *WordPressSource) ID() string
func (*WordPressSource) Meta ¶
func (w *WordPressSource) Meta() source.LibraryMeta
func (*WordPressSource) ParseEntity ¶
func (*WordPressSource) ParseMethod ¶
func (*WordPressSource) ParseSourceCode ¶
func (w *WordPressSource) ParseSourceCode(body []byte) (string, error)
ParseSourceCode extracts just the source code from a page.
func (*WordPressSource) ResolveWrapperURL ¶
func (w *WordPressSource) ResolveWrapperURL(targetName, targetKind, entitySlug string) string
ResolveWrapperURL constructs the URL to fetch the wrapped method's documentation.
Click to show internal directories.
Click to hide internal directories.