sdkmeta

package
v0.3.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Languages map[string][]string

Languages is a map of SDK IDs to supported languages.

View Source
var Names map[string]string

Names is a map of SDK IDs to display names.

View Source
var Popularity map[string]int

Popularity is a map of SDK IDs to popularity scores.

View Source
var Releases map[string]ReleaseList
View Source
var Repos map[string]Repo

Repos is a map of SDK IDs to repository information.

View Source
var Types map[string]Type

Types is a map of SDK IDs to SDK types.

Functions

This section is empty.

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

func (r Release) IsApproachingEOL(now time.Time, thresholdPrior time.Duration) bool

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

func (r Release) IsEOL(now time.Time) bool

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

func (r Release) IsLatest() bool

IsLatest returns true if the release is the latest release, meaning there is no EOL date set.

func (Release) MajorMinor

func (r Release) MajorMinor() string

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 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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL