sponsors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sponsors owns the M4 "sponsors" plugin. The plugin is gated by the `read:user` AND `read:org` OAuth scopes; the MVP wires the scope-gate path and returns an empty (but non-Skipped) Result when both scopes are present. The full GraphQL fetch lands as a follow-up.

Contracts: specs/004-m4-github-plugins/contracts/plugin-p2-graphql.md §9 Data model: specs/004-m4-github-plugins/data-model.md E-030

Index

Constants

View Source
const Name = "sponsors"

Name is the canonical plugin slug.

Variables

View Source
var Plugin plugins.Plugin = &sponsorsPlugin{}

Plugin is the singleton registered with the global plugin registry.

Functions

func Partial

Partial renders the sponsors fragment. DOM contract: <g class="sponsor"> per entry.

Types

type Result

type Result struct {
	Skipped       bool      `json:"skipped,omitempty"`
	SkippedReason string    `json:"-"`
	Mode          string    `json:"mode,omitempty"`
	Sections      []string  `json:"sections"`
	Sponsors      []Sponsor `json:"sponsors"`
	Past          []Sponsor `json:"past,omitempty"`
}

Result is the JSON payload published under data.Plugins["sponsors"].

func (*Result) IsSkipped

func (r *Result) IsSkipped() bool

IsSkipped lets the classic dispatcher detect the skipped path.

type Sponsor struct {
	Login string    `json:"login"`
	Tier  string    `json:"tier"`
	Since time.Time `json:"since"`
}

Sponsor mirrors one entry from the upstream sponsor list.

Jump to

Keyboard shortcuts

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