Versions in this module Expand all Collapse all v0 v0.1.0 Nov 9, 2026 Changes in this version + const CodeAlreadyExists + const CodeFailedPrecondition + const CodeInternal + const CodeInvalidArgument + const CodeNotFound + const CodePermissionDenied + const CodeResourceExhausted + const CodeUnauthenticated + const CodeUnavailable + const CodeUnimplemented + const ErrorDomain + const ImageChunkSize + const MaxMessageSize + const PluginName + const Protocol + var Handshake = goplugin.HandshakeConfig + var InstanceID = func() string { ... }() + var PackageIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._-]*$`) + func FromConnectError(err error) error + func FromGRPCError(err error) error + func IsManaged() bool + func Main(p Plugin, opts ...MainOption) + func NewHTTPServer(p Plugin, apiKey string, routes ...Route) *http.Server + func NewHandler(p Plugin, apiKey string, routes ...Route) http.Handler + func PluginSet(impl Plugin) goplugin.PluginSet + func RegisterGRPC(s *grpc.Server, p Plugin) + func SendImage(send ImageSendFunc, contentType string, size int64, r io.Reader) error + func Serve(ctx context.Context, p Plugin, cfg Config) error + func ToConnectError(err error) error + func ToGRPCError(err error) error + type Code = connect.Code + func ErrorCode(err error) Code + type Config struct + APIKey string + ConfigFile string + Listen string + Logger *slog.Logger + Routes []Route + type Error struct + Code Code + CurrentRunID string + Message string + Metadata map[string]string + Reason Reason + RetryAfter time.Duration + func ErrAlreadyRunning(runID, format string, args ...any) *Error + func ErrChallenge(format string, args ...any) *Error + func ErrInvalidArgument(format string, args ...any) *Error + func ErrJobDisabled(jobID, reason string) *Error + func ErrLoginRequired(format string, args ...any) *Error + func ErrNotFound(format string, args ...any) *Error + func ErrRateLimited(retryAfter time.Duration, format string, args ...any) *Error + func ErrSourceDown(format string, args ...any) *Error + func ErrStoreFetchFailed(format string, args ...any) *Error + func ErrStoreInvalid(format string, args ...any) *Error + func ErrUnimplemented(method string) *Error + func ErrUnsupported(format string, args ...any) *Error + func Errorf(code Code, format string, args ...any) *Error + func (e *Error) Error() string + type GRPCPlugin struct + Impl Plugin + func (g *GRPCPlugin) GRPCClient(_ context.Context, _ *goplugin.GRPCBroker, c *grpc.ClientConn) (any, error) + func (g *GRPCPlugin) GRPCServer(_ *goplugin.GRPCBroker, s *grpc.Server) error + type ImageSendFunc func(*sourcev1.FetchImageResponse) error + type MainOption func(*mainOptions) + func WithDefaultListen(addr string) MainOption + func WithRoutes(routes ...Route) MainOption + type Plugin interface + CancelJobRun func(ctx context.Context, req *sourcev1.CancelJobRunRequest) (*sourcev1.CancelJobRunResponse, error) + FetchImage func(ctx context.Context, req *sourcev1.FetchImageRequest, send ImageSendFunc) error + GetConfig func(ctx context.Context, req *sourcev1.GetConfigRequest) (*sourcev1.GetConfigResponse, error) + GetFilters func(ctx context.Context, req *sourcev1.GetFiltersRequest) (*sourcev1.GetFiltersResponse, error) + GetInfo func(ctx context.Context, req *sourcev1.GetInfoRequest) (*sourcev1.GetInfoResponse, error) + GetJob func(ctx context.Context, req *sourcev1.GetJobRequest) (*sourcev1.GetJobResponse, error) + GetJobRun func(ctx context.Context, req *sourcev1.GetJobRunRequest) (*sourcev1.GetJobRunResponse, error) + GetNetworkProfile func(ctx context.Context, req *sourcev1.GetNetworkProfileRequest) (*sourcev1.GetNetworkProfileResponse, error) + GetPackage func(ctx context.Context, req *sourcev1.GetPackageRequest) (*sourcev1.GetPackageResponse, error) + GetSeries func(ctx context.Context, req *sourcev1.GetSeriesRequest) (*sourcev1.GetSeriesResponse, error) + GetSettings func(ctx context.Context, req *sourcev1.GetSettingsRequest) (*sourcev1.GetSettingsResponse, error) + GetSettingsSchema func(ctx context.Context, req *sourcev1.GetSettingsSchemaRequest) (*sourcev1.GetSettingsSchemaResponse, error) + GetSource func(ctx context.Context, req *sourcev1.GetSourceRequest) (*sourcev1.GetSourceResponse, error) + Health func(ctx context.Context, req *sourcev1.HealthRequest) (*sourcev1.HealthResponse, error) + InstallPackage func(ctx context.Context, req *sourcev1.InstallPackageRequest) (*sourcev1.InstallPackageResponse, error) + Latest func(ctx context.Context, req *sourcev1.LatestRequest) (*sourcev1.LatestResponse, error) + ListChapters func(ctx context.Context, req *sourcev1.ListChaptersRequest) (*sourcev1.ListChaptersResponse, error) + ListJobRuns func(ctx context.Context, req *sourcev1.ListJobRunsRequest) (*sourcev1.ListJobRunsResponse, error) + ListJobs func(ctx context.Context, req *sourcev1.ListJobsRequest) (*sourcev1.ListJobsResponse, error) + ListOrigins func(ctx context.Context, req *sourcev1.ListOriginsRequest) (*sourcev1.ListOriginsResponse, error) + ListPackages func(ctx context.Context, req *sourcev1.ListPackagesRequest) (*sourcev1.ListPackagesResponse, error) + ListPages func(ctx context.Context, req *sourcev1.ListPagesRequest) (*sourcev1.ListPagesResponse, error) + ListSources func(ctx context.Context, req *sourcev1.ListSourcesRequest) (*sourcev1.ListSourcesResponse, error) + Popular func(ctx context.Context, req *sourcev1.PopularRequest) (*sourcev1.PopularResponse, error) + RefreshOrigin func(ctx context.Context, req *sourcev1.RefreshOriginRequest) (*sourcev1.RefreshOriginResponse, error) + ReloadPackage func(ctx context.Context, req *sourcev1.ReloadPackageRequest) (*sourcev1.ReloadPackageResponse, error) + ResolveUrl func(ctx context.Context, req *sourcev1.ResolveUrlRequest) (*sourcev1.ResolveUrlResponse, error) + RunJob func(ctx context.Context, req *sourcev1.RunJobRequest) (*sourcev1.RunJobResponse, error) + Search func(ctx context.Context, req *sourcev1.SearchRequest) (*sourcev1.SearchResponse, error) + SetConfig func(ctx context.Context, req *sourcev1.SetConfigRequest) (*sourcev1.SetConfigResponse, error) + SetNetworkProfile func(ctx context.Context, req *sourcev1.SetNetworkProfileRequest) (*sourcev1.SetNetworkProfileResponse, error) + SetPackageSettings func(ctx context.Context, req *sourcev1.SetPackageSettingsRequest) (*sourcev1.SetPackageSettingsResponse, error) + SetSettings func(ctx context.Context, req *sourcev1.SetSettingsRequest) (*sourcev1.SetSettingsResponse, error) + SetSourceHealthCheck func(ctx context.Context, req *sourcev1.SetSourceHealthCheckRequest) (*sourcev1.SetSourceHealthCheckResponse, error) + UninstallPackage func(ctx context.Context, req *sourcev1.UninstallPackageRequest) (*sourcev1.UninstallPackageResponse, error) + UpdatePackage func(ctx context.Context, req *sourcev1.UpdatePackageRequest) (*sourcev1.UpdatePackageResponse, error) + type PluginConfig struct + func NewPluginConfig(schema *settings.Schema, ...) *PluginConfig + func (c *PluginConfig) GetConfig(context.Context, *sourcev1.GetConfigRequest) (*sourcev1.GetConfigResponse, error) + func (c *PluginConfig) Schema() *settings.Schema + func (c *PluginConfig) SchemaStruct() *structpb.Struct + func (c *PluginConfig) Set(ctx context.Context, values map[string]any) error + func (c *PluginConfig) SetConfig(ctx context.Context, req *sourcev1.SetConfigRequest) (*sourcev1.SetConfigResponse, error) + func (c *PluginConfig) Values() map[string]any + type Reason string + const ReasonAlreadyRunning + const ReasonChallenge + const ReasonJobDisabled + const ReasonLoginRequired + const ReasonNotFound + const ReasonRateLimited + const ReasonSourceDown + const ReasonStoreFetchFailed + const ReasonStoreInvalid + const ReasonUnsupported + func ErrorReason(err error) Reason + func ReasonOf(r sourcev1.ErrorReason) Reason + type Route struct + Handler http.Handler + Pattern string + Public bool + type Unimplemented struct + func (Unimplemented) CancelJobRun(context.Context, *sourcev1.CancelJobRunRequest) (*sourcev1.CancelJobRunResponse, error) + func (Unimplemented) FetchImage(context.Context, *sourcev1.FetchImageRequest, ImageSendFunc) error + func (Unimplemented) GetConfig(context.Context, *sourcev1.GetConfigRequest) (*sourcev1.GetConfigResponse, error) + func (Unimplemented) GetFilters(context.Context, *sourcev1.GetFiltersRequest) (*sourcev1.GetFiltersResponse, error) + func (Unimplemented) GetInfo(context.Context, *sourcev1.GetInfoRequest) (*sourcev1.GetInfoResponse, error) + func (Unimplemented) GetJob(context.Context, *sourcev1.GetJobRequest) (*sourcev1.GetJobResponse, error) + func (Unimplemented) GetJobRun(context.Context, *sourcev1.GetJobRunRequest) (*sourcev1.GetJobRunResponse, error) + func (Unimplemented) GetNetworkProfile(context.Context, *sourcev1.GetNetworkProfileRequest) (*sourcev1.GetNetworkProfileResponse, error) + func (Unimplemented) GetPackage(context.Context, *sourcev1.GetPackageRequest) (*sourcev1.GetPackageResponse, error) + func (Unimplemented) GetSeries(context.Context, *sourcev1.GetSeriesRequest) (*sourcev1.GetSeriesResponse, error) + func (Unimplemented) GetSettings(context.Context, *sourcev1.GetSettingsRequest) (*sourcev1.GetSettingsResponse, error) + func (Unimplemented) GetSettingsSchema(context.Context, *sourcev1.GetSettingsSchemaRequest) (*sourcev1.GetSettingsSchemaResponse, error) + func (Unimplemented) GetSource(context.Context, *sourcev1.GetSourceRequest) (*sourcev1.GetSourceResponse, error) + func (Unimplemented) Health(context.Context, *sourcev1.HealthRequest) (*sourcev1.HealthResponse, error) + func (Unimplemented) InstallPackage(context.Context, *sourcev1.InstallPackageRequest) (*sourcev1.InstallPackageResponse, error) + func (Unimplemented) Latest(context.Context, *sourcev1.LatestRequest) (*sourcev1.LatestResponse, error) + func (Unimplemented) ListChapters(context.Context, *sourcev1.ListChaptersRequest) (*sourcev1.ListChaptersResponse, error) + func (Unimplemented) ListJobRuns(context.Context, *sourcev1.ListJobRunsRequest) (*sourcev1.ListJobRunsResponse, error) + func (Unimplemented) ListJobs(context.Context, *sourcev1.ListJobsRequest) (*sourcev1.ListJobsResponse, error) + func (Unimplemented) ListOrigins(context.Context, *sourcev1.ListOriginsRequest) (*sourcev1.ListOriginsResponse, error) + func (Unimplemented) ListPackages(context.Context, *sourcev1.ListPackagesRequest) (*sourcev1.ListPackagesResponse, error) + func (Unimplemented) ListPages(context.Context, *sourcev1.ListPagesRequest) (*sourcev1.ListPagesResponse, error) + func (Unimplemented) ListSources(context.Context, *sourcev1.ListSourcesRequest) (*sourcev1.ListSourcesResponse, error) + func (Unimplemented) Popular(context.Context, *sourcev1.PopularRequest) (*sourcev1.PopularResponse, error) + func (Unimplemented) RefreshOrigin(context.Context, *sourcev1.RefreshOriginRequest) (*sourcev1.RefreshOriginResponse, error) + func (Unimplemented) ReloadPackage(context.Context, *sourcev1.ReloadPackageRequest) (*sourcev1.ReloadPackageResponse, error) + func (Unimplemented) ResolveUrl(context.Context, *sourcev1.ResolveUrlRequest) (*sourcev1.ResolveUrlResponse, error) + func (Unimplemented) RunJob(context.Context, *sourcev1.RunJobRequest) (*sourcev1.RunJobResponse, error) + func (Unimplemented) Search(context.Context, *sourcev1.SearchRequest) (*sourcev1.SearchResponse, error) + func (Unimplemented) SetConfig(context.Context, *sourcev1.SetConfigRequest) (*sourcev1.SetConfigResponse, error) + func (Unimplemented) SetNetworkProfile(context.Context, *sourcev1.SetNetworkProfileRequest) (*sourcev1.SetNetworkProfileResponse, error) + func (Unimplemented) SetPackageSettings(context.Context, *sourcev1.SetPackageSettingsRequest) (*sourcev1.SetPackageSettingsResponse, error) + func (Unimplemented) SetSettings(context.Context, *sourcev1.SetSettingsRequest) (*sourcev1.SetSettingsResponse, error) + func (Unimplemented) SetSourceHealthCheck(context.Context, *sourcev1.SetSourceHealthCheckRequest) (*sourcev1.SetSourceHealthCheckResponse, error) + func (Unimplemented) UninstallPackage(context.Context, *sourcev1.UninstallPackageRequest) (*sourcev1.UninstallPackageResponse, error) + func (Unimplemented) UpdatePackage(context.Context, *sourcev1.UpdatePackageRequest) (*sourcev1.UpdatePackageResponse, error)