Help us shape the future of Go! Take the 2026 Go Developer Survey

plugin

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
}

APIError an API error.

func (*APIError) Error

func (a *APIError) Error() string

type BlacklistEntry added in v0.29.0

type BlacklistEntry struct {
	Repository string    `json:"repository"`
	Reason     string    `json:"reason,omitempty"`
	Author     string    `json:"author,omitempty"`
	CreatedAt  time.Time `json:"createdAt"`
}

BlacklistEntry represents a repository (owner/repo) excluded from the scraping.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for the plugin service.

func New

func New(baseURL string) *Client

New creates a plugin service client.

func (*Client) Create

func (c *Client) Create(ctx context.Context, p Plugin) error

Create creates a plugin.

func (*Client) GetByName

func (c *Client) GetByName(ctx context.Context, name string) (*Plugin, error)

GetByName gets a plugin by name.

func (*Client) ListBlacklist added in v0.29.0

func (c *Client) ListBlacklist(ctx context.Context) ([]BlacklistEntry, error)

ListBlacklist gets the blacklisted repositories.

func (*Client) Update

func (c *Client) Update(ctx context.Context, p Plugin) error

Update updates a plugin.

type Plugin

type Plugin struct {
	ID            string         `json:"id,omitempty"`
	Name          string         `json:"name,omitempty"`
	RepoName      string         `json:"repoName,omitempty"`
	DisplayName   string         `json:"displayName,omitempty"`
	Runtime       string         `json:"runtime,omitempty"`
	Author        string         `json:"author,omitempty"`
	Type          string         `json:"type,omitempty"`
	Import        string         `json:"import,omitempty"`
	Compatibility string         `json:"compatibility,omitempty"`
	Summary       string         `json:"summary,omitempty"`
	IconURL       string         `json:"iconUrl,omitempty"`
	BannerURL     string         `json:"bannerUrl,omitempty"`
	Readme        string         `json:"readme,omitempty"`
	LatestVersion string         `json:"latestVersion,omitempty"`
	Versions      []string       `json:"versions,omitempty"`
	Stars         int            `json:"stars,omitempty"`
	Snippet       map[string]any `json:"snippet,omitempty"`
	CreatedAt     time.Time      `json:"createdAt"`
	Hidden        bool           `json:"hidden,omitempty"`
	UseUnsafe     bool           `json:"useUnsafe,omitempty"`
}

Plugin The plugin information.

Jump to

Keyboard shortcuts

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