Versions in this module Expand all Collapse all v1 v1.0.0 Nov 12, 2022 Changes in this version + const MetaCPANURL + var ErrInvalidPodKind = errors.New("invalid pod kind") + var ErrNilClient = errors.New("nil client") + type Author struct + ASCIIName string + Blog []struct{ ... } + City string + Country string + Directory string + Donation []struct{ ... } + Email []string + Extra map[string]string + GravatarURL string + Links struct{ ... } + Name string + PauseID string + PerlMongers []struct{ ... } + Profile []struct{ ... } + Region string + ReleaseCount struct{ ... } + Updated iso8601.Time + User string + Website []string + func (a *Author) MetaCPANURL() string + func (a *Author) Releases() (ResultSet[*Release], error) + func (a *Author) UnmarshalJSON(data []byte) error + type Bugs struct + Active int + Closed int + Open int + Source string + func (b *Bugs) UnmarshalJSON(data []byte) error + type Client struct + func NewClient(debug bool, scrollSize uint16, scrollTime time.Duration, userAgent string, ...) (*Client, error) + func (mc *Client) AllAuthors() (ResultSet[*Author], error) + func (mc *Client) AllDistributions() (ResultSet[*Distribution], error) + func (mc *Client) AllFavorites() (ResultSet[*Favorite], error) + func (mc *Client) AllModules() (ResultSet[*Module], error) + func (mc *Client) AllReleases() (ResultSet[*Release], error) + func (mc *Client) Author(s string) (*Author, error) + func (mc *Client) AuthorSearch(args map[string]interface{}) (ResultSet[*Author], error) + func (mc *Client) Autocomplete(s string) ([]*File, error) + func (mc *Client) AutocompleteSuggest(s string) ([]*File, error) + func (mc *Client) Close() error + func (mc *Client) Cover(s string) (*Cover, error) + func (mc *Client) Debug() bool + func (mc *Client) Distribution(s string) (*Distribution, error) + func (mc *Client) DistributionSearch(args map[string]interface{}) (ResultSet[*Distribution], error) + func (mc *Client) Domains() []string + func (mc *Client) DownloadURL(release string, r *version.Range, dev bool) (*DownloadURL, error) + func (mc *Client) Favorite(args map[string]interface{}) (ResultSet[*Favorite], error) + func (mc *Client) File(s string) (*File, error) + func (mc *Client) Mirror(s string) (*Mirror, error) + func (mc *Client) Module(s string) (*Module, error) + func (mc *Client) ModuleSearch(args map[string]interface{}) (ResultSet[*Module], error) + func (mc *Client) Package(s string) (*Package, error) + func (mc *Client) Permission(s string) (*Permission, error) + func (mc *Client) Pod(s string) (*Pod, error) + func (mc *Client) Rating(args map[string]interface{}) (ResultSet[*Rating], error) + func (mc *Client) Recent(count uint16) (ResultSet[*Release], error) + func (mc *Client) Release(s string) (*Release, error) + func (mc *Client) ReleaseSearch(args map[string]interface{}) (ResultSet[*Release], error) + func (mc *Client) ReleasedToday() (ResultSet[*Release], error) + func (mc *Client) ReverseDependencies(s string) (ResultSet[*Release], error) + func (mc *Client) UserAgent() string + type Cover struct + Criteria struct{ ... } + Distribution string + Release string + Version version.JSON + func (c *Cover) UnmarshalJSON(data []byte) error + type Distribution struct + Bugs struct{ ... } + Name string + River struct{ ... } + func (d *Distribution) Github() Bugs + func (d *Distribution) RT() Bugs + type DownloadURL struct + ChecksumMD5 string + ChecksumSHA256 string + Date iso8601.Time + DownloadURL string + Status ReleaseStatus + Version version.JSON + type Favorite struct + Author string + Date iso8601.Time + Distribution string + ID string + Release string + User string + type File struct + func (f *File) MetaCPANURL() string + func (f *File) Pod(kind PodKind) (string, error) + func (f *File) Source() (string, error) + type FileInfo struct + Abstract string + Author string + Authorized bool + Binary bool + Date iso8601.Time + Deprecated bool + Description string + Directory bool + Distribution string + Documentation string + DownloadURL string + ID string + Indexed bool + Level int + Maturity Maturity + Mime string + Module []struct{ ... } + Name string + Path string + PodLines [][]int + Release string + SLOC int + SLOP int + Stat Stat + Status ReleaseStatus + Version version.JSON + VersionNumified float64 + type Maturity = internal.XEnum[MaturityKind] + type MaturityKind int + const MaturityKindDeveloper + const MaturityKindReleased + func (m MaturityKind) Parse(s string) (MaturityKind, error) + func (m MaturityKind) String() string + type Mirror struct + AKAName string + AOrCName string + CCode string + City string + Contact []struct{ ... } + Country string + DNSRR string + FTP string + Freq string + HTTP string + InceptDate iso8601.Time + Location [2]float64 + Name string + Note string + Organization string + RSync string + Region string + ReitreDate iso8601.Time + Src string + Tz string + type Module struct + func (m *Module) MetaCPANURL() string + func (m *Module) Package() (*Package, error) + func (m *Module) Permission() (*Permission, error) + type Package struct + Author string + DistVersion version.JSON + Distribution string + ModuleName string + Version version.JSON + type Permission struct + CoMaintainers []string + ModuleName string + Owner string + type Phase = internal.XEnum[PhaseKind] + type PhaseKind int + const PhaseKindBuild + const PhaseKindConfigure + const PhaseKindDevelop + const PhaseKindRuntime + const PhaseKindTest + func (p PhaseKind) Parse(s string) (PhaseKind, error) + func (p PhaseKind) String() string + type Pod struct + HTML string + Name string + Plain string + URLPrefix string + XMarkdown string + XPod string + func NewPod(name, urlPrefix string, mc *Client) (*Pod, error) + type PodKind string + const PodKindHTML + const PodKindPlain + const PodKindXMarkdown + const PodKindXPod + type Rating struct + Author string + Date string + Details string + Distribution string + Helpful int + Rating string + Release string + User string + type Relationship = internal.XEnum[RelationshipKind] + type RelationshipKind int + const RelationshipKindConflicts + const RelationshipKindRecommends + const RelationshipKindRequires + const RelationshipKindSuggests + func (r RelationshipKind) Parse(s string) (RelationshipKind, error) + func (r RelationshipKind) String() string + type Release struct + Abstract string + Archive string + Author string + Authorized bool + ChecksumMD5 string + ChecksumSHA256 string + Date string + Dependency []struct{ ... } + Deprecated bool + Distribution string + DownloadURL string + First bool + License []string + MainModule string + Maturity Maturity + Metadata cm.Spec + Name string + Provides []string + Resources cm.Resources + Stat struct{ ... } + Status ReleaseStatus + Tests struct{ ... } + Version version.JSON + VersionNumified float64 + func (r *Release) Changes() (string, error) + func (r *Release) MetaCPANURL() string + func (r *Release) UnmarshalJSON(data []byte) error + type ReleaseStatus = internal.XEnum[ReleaseStatusKind] + type ReleaseStatusKind int + const ReleaseStatusKindBackpan + const ReleaseStatusKindCPAN + const ReleaseStatusKindLatest + func (s ReleaseStatusKind) Parse(str string) (ReleaseStatusKind, error) + func (s ReleaseStatusKind) String() string + type Request struct + func NewRequest(domain, baseURL string, debug bool, mc *Client) *Request[T] + func (r *Request[T]) DisableDebug() + func (r *Request[T]) EnableDebug() + func (r *Request[T]) Fetch(s string, m map[string]interface{}) (T, error) + func (r *Request[T]) IsDebug() bool + func (r *Request[T]) SSearch(params map[string]interface{}) (*Scroll[T], error) + func (r *Request[T]) SetClient(mc *Client) error + type ResultSet interface + Aggregations func() map[string]interface{} + HasScroller func() bool + Items func() []T + Next func() (T, error) + Scroller func() *Scroll[T] + Total func() int + type Scroll struct + func NewScroll(baseURL string, dur time.Duration, size uint16) *Scroll[T] + func (s *Scroll[T]) Next() (T, error) + func (s *Scroll[T]) Total() int + func (s *Scroll[T]) Type() Type + func (s *Scroll[T]) UnmarshalJSON(data []byte) error + type Stat struct + ModTime time.Time + Mode fs.FileMode + Size int64 + func (s *Stat) MarshalJSON() ([]byte, error) + func (s *Stat) UnmarshalJSON(data []byte) error + type Type int + const TypeAuthor + const TypeDistribution + const TypeFavorite + const TypeFile + const TypeModule + const TypeRating + const TypeRelease + func (r *Type) MarshalJSON() ([]byte, error) + func (r *Type) String() string + func (r *Type) UnmarshalJSON(data []byte) error