Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Languages map[string][]string
Languages is a map of SDK IDs to supported languages.
var Names map[string]string
Names is a map of SDK IDs to display names.
var Popularity map[string]int
Popularity is a map of SDK IDs to popularity scores.
var Releases map[string]ReleaseList
var Repos map[string]Repo
Repos is a map of SDK IDs to repository information.
var Types map[string]Type
Types is a map of SDK IDs to SDK types.
var UserAgents map[string]SDKUserAgentMap
UserAgents is a map of SDK IDs to their user agent and wrapper information
Functions ¶
func GetSDKNameByWrapperOrUserAgent ¶ added in v0.4.0
GetSDKNameByWrapperOrUserAgent attempts to find an SDK name by first checking wrapper names, then user agents, in alphabetical order by SDK ID. Returns the SDK name and true if found, empty string and false if not found.
Types ¶
type Release ¶
type Release struct { Major int `json:"major"` Minor int `json:"minor"` Date time.Time `json:"date"` EOL *time.Time `json:"eol"` }
func (Release) IsApproachingEOL ¶
IsApproachingEOL returns true if the release is not the latest release and the EOL date is within the time period from now to now + thresholdPrior. This is only valid if IsEOL() returns false.
func (Release) IsEOL ¶
IsEOL returns true if the release is not the latest release and the current time is after the EOL date. The parameter represents the current time.
func (Release) IsLatest ¶
IsLatest returns true if the release is the latest release, meaning there is no EOL date set.
func (Release) MajorMinor ¶
MajorMinor returns a version string comprised of the major and minor version. For example, '2.1'.
type ReleaseList ¶
type ReleaseList []Release
ReleaseList is an ordered list of releases. The first item should be the most recent release, while the last item is the oldest release.
func (ReleaseList) Earliest ¶
func (r ReleaseList) Earliest() Release
Earliest returns the earliest release.
func (ReleaseList) Latest ¶
func (r ReleaseList) Latest() Release
Latest returns the latest release.
type Repo ¶
type Repo struct { // GitHub is the GitHub repo path including the owner and repo name (e.g. launchdarkly/js-core). GitHub string `json:"github"` }
Repo contains the location of an SDK.
type SDKUserAgentMap ¶ added in v0.4.0
type SDKUserAgentMap struct { UserAgents []string `json:"userAgents,omitempty"` WrapperNames []string `json:"wrapperNames,omitempty"` }
SDKUserAgentMap contains user agent and wrapper information for an SDK
type Type ¶
type Type string
Type represents the most common use-case for an SDK.
const ( // ClientSideType is an SDK that runs in a client context. ClientSideType Type = "client-side" // ServerSideType is an SDK that runs in a server context. ServerSideType Type = "server-side" // EdgeType is an SDK that runs in an edge deployment scenario. EdgeType Type = "edge" // RelayType is Relay Proxy. RelayType Type = "relay" )