plugin

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 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 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) 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]interface{} `json:"snippet,omitempty"`
	CreatedAt     time.Time              `json:"createdAt"`
	Hidden        bool                   `json:"hidden,omitempty"`
}

Plugin The plugin information.

Jump to

Keyboard shortcuts

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