From 7f4bce79c9f4cc9fd9f777052e11a07f2fbf2f68 Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Mon, 1 Jun 2026 23:55:01 +0800 Subject: [PATCH] feat(cli): ninja CLI with login, plugin init/publish/status Cobra scaffold, credentials store, Connect client, device-flow login, whoami/logout, plugin init (creates + adds git remote), publish (tag + push + registry RPC), and status (list scopes/plugins). Proto copied from orchestrator with buf codegen for client stubs. Co-Authored-By: Claude Opus 4.6 --- buf.gen.yaml | 15 + buf.yaml | 12 + cmd/ninja/cmd/login.go | 114 + cmd/ninja/cmd/plugin.go | 236 ++ cmd/ninja/cmd/root.go | 18 + cmd/ninja/cmd/version.go | 19 + cmd/ninja/internal/creds/creds.go | 77 + cmd/ninja/internal/orchclient/client.go | 42 + cmd/ninja/main.go | 15 + go.mod | 8 +- go.sum | 17 +- .../plugin_registry.connect.go | 597 +++++ .../api/orchestrator/v1/plugin_registry.pb.go | 2108 +++++++++++++++++ proto/orchestrator/v1/plugin_registry.proto | 184 ++ 14 files changed, 3455 insertions(+), 7 deletions(-) create mode 100644 buf.gen.yaml create mode 100644 buf.yaml create mode 100644 cmd/ninja/cmd/login.go create mode 100644 cmd/ninja/cmd/plugin.go create mode 100644 cmd/ninja/cmd/root.go create mode 100644 cmd/ninja/cmd/version.go create mode 100644 cmd/ninja/internal/creds/creds.go create mode 100644 cmd/ninja/internal/orchclient/client.go create mode 100644 cmd/ninja/main.go create mode 100644 internal/api/orchestrator/v1/orchestratorv1connect/plugin_registry.connect.go create mode 100644 internal/api/orchestrator/v1/plugin_registry.pb.go create mode 100644 proto/orchestrator/v1/plugin_registry.proto diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..50d2d4f --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,15 @@ +version: v2 +managed: + enabled: true + override: + - file_option: go_package_prefix + value: git.dev.alexdunmow.com/block/core/internal/api +plugins: + - local: protoc-gen-go + out: internal/api + opt: + - paths=source_relative + - local: protoc-gen-connect-go + out: internal/api + opt: + - paths=source_relative diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..22bc7d8 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,12 @@ +version: v2 +modules: + - path: proto +lint: + use: + - STANDARD + except: + - PACKAGE_SAME_GO_PACKAGE + - RPC_REQUEST_RESPONSE_UNIQUE +breaking: + use: + - FILE diff --git a/cmd/ninja/cmd/login.go b/cmd/ninja/cmd/login.go new file mode 100644 index 0000000..0733ad1 --- /dev/null +++ b/cmd/ninja/cmd/login.go @@ -0,0 +1,114 @@ +package cmd + +import ( + "context" + "fmt" + "time" + + "connectrpc.com/connect" + "github.com/spf13/cobra" + + "git.dev.alexdunmow.com/block/core/cmd/ninja/internal/creds" + "git.dev.alexdunmow.com/block/core/cmd/ninja/internal/orchclient" + v1 "git.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1" +) + +func newLoginCmd() *cobra.Command { + var host string + cmd := &cobra.Command{ + Use: "login", + Short: "Authenticate against the orchestrator using device flow", + RunE: func(c *cobra.Command, _ []string) error { + if host == "" { + host, _ = c.Flags().GetString("host") + } + if host == "" { + host = "https://my.blockninjacms.com" + } + cli := orchclient.New(host, "") + ctx := context.Background() + start, err := cli.Auth.StartDevice(ctx, connect.NewRequest(&v1.StartDeviceRequest{ + Scopes: []string{"plugin:read", "plugin:publish", "scope:admin"}, + })) + if err != nil { + return fmt.Errorf("start device: %w", err) + } + fmt.Printf("Visit %s and enter code: %s\n", start.Msg.VerificationUri, start.Msg.UserCode) + interval := time.Duration(start.Msg.IntervalSeconds) * time.Second + deadline := time.Now().Add(time.Duration(start.Msg.ExpiresInSeconds) * time.Second) + for time.Now().Before(deadline) { + time.Sleep(interval) + poll, err := cli.Auth.PollDevice(ctx, connect.NewRequest(&v1.PollDeviceRequest{DeviceCode: start.Msg.DeviceCode})) + if err != nil { + return err + } + switch poll.Msg.Status { + case "pending": + continue + case "approved": + cr, err := creds.Load() + if err != nil { + return err + } + cr.DefaultHost = host + if cr.Hosts == nil { + cr.Hosts = map[string]creds.HostCreds{} + } + cr.Hosts[host] = creds.HostCreds{Token: poll.Msg.AccessToken} + if err := cr.Save(); err != nil { + return err + } + fmt.Println("Logged in.") + return nil + case "expired": + return fmt.Errorf("device code expired; try again") + } + } + return fmt.Errorf("login timed out") + }, + } + cmd.Flags().StringVar(&host, "host", "", "Orchestrator base URL") + return cmd +} + +func newWhoamiCmd() *cobra.Command { + return &cobra.Command{ + Use: "whoami", + Short: "Show the currently logged-in user", + RunE: func(c *cobra.Command, _ []string) error { + host, _ := c.Flags().GetString("host") + cr, err := creds.Load() + if err != nil { + return err + } + resolvedHost, hc, err := cr.Resolve(host) + if err != nil { + return err + } + cli := orchclient.New(resolvedHost, hc.Token) + r, err := cli.Auth.Whoami(context.Background(), connect.NewRequest(&v1.WhoamiRequest{})) + if err != nil { + return err + } + fmt.Printf("%s <%s> at %s\n", r.Msg.DisplayName, r.Msg.Email, resolvedHost) + return nil + }, + } +} + +func newLogoutCmd() *cobra.Command { + return &cobra.Command{ + Use: "logout", + Short: "Remove stored credentials", + RunE: func(c *cobra.Command, _ []string) error { + host, _ := c.Flags().GetString("host") + cr, err := creds.Load() + if err != nil { + return err + } + resolvedHost, _, _ := cr.Resolve(host) + delete(cr.Hosts, resolvedHost) + return cr.Save() + }, + } +} diff --git a/cmd/ninja/cmd/plugin.go b/cmd/ninja/cmd/plugin.go new file mode 100644 index 0000000..5213a9b --- /dev/null +++ b/cmd/ninja/cmd/plugin.go @@ -0,0 +1,236 @@ +package cmd + +import ( + "context" + "fmt" + "os" + "os/exec" + "strings" + + "connectrpc.com/connect" + "github.com/spf13/cobra" + + core "git.dev.alexdunmow.com/block/core/plugin" + + "git.dev.alexdunmow.com/block/core/cmd/ninja/internal/creds" + "git.dev.alexdunmow.com/block/core/cmd/ninja/internal/orchclient" + v1 "git.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1" +) + +func newPluginCmd() *cobra.Command { + c := &cobra.Command{Use: "plugin", Short: "Manage BlockNinja plugins"} + c.AddCommand(newPluginInitCmd(), newPluginPublishCmd(), newPluginStatusCmd()) + return c +} + +func newPluginInitCmd() *cobra.Command { + var scope, name string + cmd := &cobra.Command{ + Use: "init", + Short: "Create a plugin in the registry and add a git remote", + RunE: func(c *cobra.Command, _ []string) error { + host, _ := c.Flags().GetString("host") + cr, err := creds.Load() + if err != nil { + return err + } + resolvedHost, hc, err := cr.Resolve(host) + if err != nil { + return err + } + cli := orchclient.New(resolvedHost, hc.Token) + + scope = strings.TrimPrefix(scope, "@") + if scope == "" || name == "" { + return fmt.Errorf("usage: ninja plugin init --scope ACME --name foo") + } + ctx := context.Background() + resp, err := cli.Reg.CreatePlugin(ctx, connect.NewRequest(&v1.CreatePluginRequest{ + ScopeSlug: scope, Name: name, Description: "", + })) + if err != nil { + return err + } + fmt.Printf("Created @%s/%s\n", scope, name) + fmt.Printf(" Git remote: %s\n", resp.Msg.GitRemoteUrl) + + if _, err := os.Stat(".git"); err == nil { + _ = runCmd("git", "remote", "remove", "ninja") + if err := runCmd("git", "remote", "add", "ninja", resp.Msg.GitRemoteUrl); err != nil { + return fmt.Errorf("git remote add: %w", err) + } + fmt.Println("Added git remote 'ninja'") + } else { + fmt.Println("Not in a git repo - skipped adding remote") + } + + if err := upsertPluginMod(scope, name); err != nil { + return err + } + fmt.Println("plugin.mod updated") + return nil + }, + } + cmd.Flags().StringVar(&scope, "scope", "", "Scope slug (with or without @)") + cmd.Flags().StringVar(&name, "name", "", "Plugin name") + return cmd +} + +func newPluginPublishCmd() *cobra.Command { + var channel string + var allowDirty bool + cmd := &cobra.Command{ + Use: "publish", + Short: "Push the current commit as a new version and notify the registry", + RunE: func(c *cobra.Command, _ []string) error { + host, _ := c.Flags().GetString("host") + cr, err := creds.Load() + if err != nil { + return err + } + resolvedHost, hc, err := cr.Resolve(host) + if err != nil { + return err + } + cli := orchclient.New(resolvedHost, hc.Token) + + modBytes, err := os.ReadFile("plugin.mod") + if err != nil { + return fmt.Errorf("read plugin.mod: %w", err) + } + mod, err := core.ParseModFull(modBytes) + if err != nil { + return err + } + if mod.Plugin.Scope == "" || mod.Plugin.Name == "" || mod.Plugin.Version == "" { + return fmt.Errorf("plugin.mod must have scope, name, and version") + } + + if !allowDirty { + out, _ := exec.Command("git", "status", "--porcelain").Output() + if len(strings.TrimSpace(string(out))) > 0 { + return fmt.Errorf("working tree dirty; commit or pass --allow-dirty") + } + } + + tag := "v" + mod.Plugin.Version + if err := runCmd("git", "tag", "-a", tag, "-m", tag); err != nil { + fmt.Fprintf(os.Stderr, "tag %s already exists or could not be created (%v); attempting push\n", tag, err) + } + if err := runCmd("git", "push", "ninja", tag); err != nil { + return fmt.Errorf("git push ninja %s: %w", tag, err) + } + fmt.Printf("Pushed %s to ninja remote\n", tag) + + ctx := context.Background() + pr, err := cli.Reg.GetPlugin(ctx, connect.NewRequest(&v1.GetPluginRequest{ + ScopeSlug: mod.Plugin.Scope, Name: mod.Plugin.Name, + })) + if err != nil { + return fmt.Errorf("get plugin: %w", err) + } + + readme, _ := os.ReadFile("README.md") + changelog, _ := os.ReadFile("CHANGELOG.md") + + pubResp, err := cli.Pub.PublishVersion(ctx, connect.NewRequest(&v1.PublishVersionRequest{ + PluginId: pr.Msg.Plugin.Id, + GitRef: "refs/tags/" + tag, + Channel: channel, + ReadmeMd: string(readme), + ChangelogMd: string(changelog), + })) + if err != nil { + return fmt.Errorf("publish: %w", err) + } + fmt.Printf("Published version_id=%s\n", pubResp.Msg.Version.Id) + for _, w := range pubResp.Msg.Warnings { + fmt.Printf(" warning: %s\n", w) + } + fmt.Printf(" Archive: %s\n", pubResp.Msg.ArchiveUrl) + return nil + }, + } + cmd.Flags().StringVar(&channel, "channel", "latest", "Channel to point at this version") + cmd.Flags().BoolVar(&allowDirty, "allow-dirty", false, "Skip clean-working-tree check") + return cmd +} + +func newPluginStatusCmd() *cobra.Command { + return &cobra.Command{ + Use: "status", + Short: "List owned scopes and their plugins", + RunE: func(c *cobra.Command, _ []string) error { + host, _ := c.Flags().GetString("host") + cr, err := creds.Load() + if err != nil { + return err + } + resolvedHost, hc, err := cr.Resolve(host) + if err != nil { + return err + } + cli := orchclient.New(resolvedHost, hc.Token) + ctx := context.Background() + scopes, err := cli.Scope.ListMyScopes(ctx, connect.NewRequest(&v1.ListMyScopesRequest{})) + if err != nil { + return err + } + if len(scopes.Msg.Scopes) == 0 { + fmt.Println("No scopes yet. Create one in the orchestrator UI or via a CreateScope call.") + return nil + } + for _, s := range scopes.Msg.Scopes { + fmt.Printf("@%s - %s\n", s.Slug, s.DisplayName) + gs, err := cli.Scope.GetScope(ctx, connect.NewRequest(&v1.GetScopeRequest{Slug: s.Slug})) + if err != nil { + fmt.Printf(" (error: %v)\n", err) + continue + } + for _, p := range gs.Msg.Plugins { + fmt.Printf(" @%s/%s [%s]\n", s.Slug, p.Name, p.Visibility) + } + } + return nil + }, + } +} + +func runCmd(name string, args ...string) error { + c := exec.Command(name, args...) + c.Stderr = os.Stderr + return c.Run() +} + +func upsertPluginMod(scope, name string) error { + const file = "plugin.mod" + existing, _ := os.ReadFile(file) + mod, _ := core.ParseModFull(existing) + if mod == nil { + mod = &core.ModFile{} + } + if mod.Plugin.Version == "" { + mod.Plugin.Version = "0.1.0" + } + mod.Plugin.Scope = scope + mod.Plugin.Name = name + return writeMod(file, mod) +} + +func writeMod(path string, m *core.ModFile) error { + var b strings.Builder + b.WriteString("[plugin]\n") + b.WriteString(fmt.Sprintf("name = %q\n", m.Plugin.Name)) + b.WriteString(fmt.Sprintf("scope = %q\n", m.Plugin.Scope)) + b.WriteString(fmt.Sprintf("version = %q\n", m.Plugin.Version)) + if m.Compatibility != nil { + b.WriteString("\n[compatibility]\n") + b.WriteString(fmt.Sprintf("block_core = %q\n", m.Compatibility.BlockCore)) + } + for _, r := range m.Requires { + b.WriteString("\n[[requires]]\n") + b.WriteString(fmt.Sprintf("name = %q\n", r.Name)) + b.WriteString(fmt.Sprintf("version = %q\n", r.Version)) + } + return os.WriteFile(path, []byte(b.String()), 0o644) +} diff --git a/cmd/ninja/cmd/root.go b/cmd/ninja/cmd/root.go new file mode 100644 index 0000000..379924f --- /dev/null +++ b/cmd/ninja/cmd/root.go @@ -0,0 +1,18 @@ +package cmd + +import "github.com/spf13/cobra" + +func NewRoot() *cobra.Command { + root := &cobra.Command{ + Use: "ninja", + Short: "BlockNinja developer CLI", + Long: "ninja is the developer-facing CLI for BlockNinja. First subcommand group: plugin.", + } + root.PersistentFlags().String("host", "", "Orchestrator base URL (default: from credentials or https://my.blockninjacms.com)") + root.AddCommand(newVersionCmd()) + root.AddCommand(newLoginCmd()) + root.AddCommand(newLogoutCmd()) + root.AddCommand(newWhoamiCmd()) + root.AddCommand(newPluginCmd()) + return root +} diff --git a/cmd/ninja/cmd/version.go b/cmd/ninja/cmd/version.go new file mode 100644 index 0000000..a5501c9 --- /dev/null +++ b/cmd/ninja/cmd/version.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +var Version = "dev" + +func newVersionCmd() *cobra.Command { + return &cobra.Command{ + Use: "version", + Short: "Print ninja version", + Run: func(_ *cobra.Command, _ []string) { + fmt.Println("ninja", Version) + }, + } +} diff --git a/cmd/ninja/internal/creds/creds.go b/cmd/ninja/internal/creds/creds.go new file mode 100644 index 0000000..4b0757b --- /dev/null +++ b/cmd/ninja/internal/creds/creds.go @@ -0,0 +1,77 @@ +package creds + +import ( + "encoding/json" + "errors" + "os" + "path/filepath" +) + +type Credentials struct { + DefaultHost string `json:"default_host"` + Hosts map[string]HostCreds `json:"hosts"` +} + +type HostCreds struct { + Token string `json:"token"` + User string `json:"user,omitempty"` +} + +func filePath() (string, error) { + dir, err := os.UserConfigDir() + if err != nil { + return "", err + } + return filepath.Join(dir, "ninja", "credentials.json"), nil +} + +func Load() (*Credentials, error) { + p, err := filePath() + if err != nil { + return nil, err + } + b, err := os.ReadFile(p) + if errors.Is(err, os.ErrNotExist) { + return &Credentials{Hosts: map[string]HostCreds{}}, nil + } + if err != nil { + return nil, err + } + c := &Credentials{Hosts: map[string]HostCreds{}} + if err := json.Unmarshal(b, c); err != nil { + return nil, err + } + return c, nil +} + +func (c *Credentials) Save() error { + p, err := filePath() + if err != nil { + return err + } + if err := os.MkdirAll(filepath.Dir(p), 0o700); err != nil { + return err + } + b, err := json.MarshalIndent(c, "", " ") + if err != nil { + return err + } + return os.WriteFile(p, b, 0o600) +} + +func (c *Credentials) Resolve(host string) (string, HostCreds, error) { + if host == "" { + host = c.DefaultHost + } + if host == "" { + host = "https://my.blockninjacms.com" + } + if t := os.Getenv("NINJA_TOKEN"); t != "" { + return host, HostCreds{Token: t}, nil + } + hc, ok := c.Hosts[host] + if !ok || hc.Token == "" { + return host, HostCreds{}, errors.New("not logged in; run `ninja login`") + } + return host, hc, nil +} diff --git a/cmd/ninja/internal/orchclient/client.go b/cmd/ninja/internal/orchclient/client.go new file mode 100644 index 0000000..2ddd815 --- /dev/null +++ b/cmd/ninja/internal/orchclient/client.go @@ -0,0 +1,42 @@ +package orchclient + +import ( + "context" + "net/http" + + "connectrpc.com/connect" + "git.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1/orchestratorv1connect" +) + +type Client struct { + Host string + Token string + Auth orchestratorv1connect.PluginAuthServiceClient + Scope orchestratorv1connect.PluginScopeServiceClient + Reg orchestratorv1connect.PluginRegistryServiceClient + Pub orchestratorv1connect.PluginPublishServiceClient +} + +func New(host, token string) *Client { + httpClient := &http.Client{} + opts := []connect.ClientOption{ + connect.WithInterceptors(bearerInterceptor(token)), + } + c := &Client{Host: host, Token: token} + c.Auth = orchestratorv1connect.NewPluginAuthServiceClient(httpClient, host, opts...) + c.Scope = orchestratorv1connect.NewPluginScopeServiceClient(httpClient, host, opts...) + c.Reg = orchestratorv1connect.NewPluginRegistryServiceClient(httpClient, host, opts...) + c.Pub = orchestratorv1connect.NewPluginPublishServiceClient(httpClient, host, opts...) + return c +} + +func bearerInterceptor(token string) connect.Interceptor { + return connect.UnaryInterceptorFunc(func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + if token != "" { + req.Header().Set("Authorization", "Bearer "+token) + } + return next(ctx, req) + } + }) +} diff --git a/cmd/ninja/main.go b/cmd/ninja/main.go new file mode 100644 index 0000000..ba41b6b --- /dev/null +++ b/cmd/ninja/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "os" + + "git.dev.alexdunmow.com/block/core/cmd/ninja/cmd" +) + +func main() { + if err := cmd.NewRoot().Execute(); err != nil { + fmt.Fprintln(os.Stderr, "Error:", err) + os.Exit(1) + } +} diff --git a/go.mod b/go.mod index 3bca224..f2db536 100644 --- a/go.mod +++ b/go.mod @@ -3,18 +3,20 @@ module git.dev.alexdunmow.com/block/core go 1.26 require ( - connectrpc.com/connect v1.19.2 + connectrpc.com/connect v1.20.0 github.com/BurntSushi/toml v1.6.0 github.com/a-h/templ v0.3.1001 github.com/google/uuid v1.6.0 github.com/jackc/pgx/v5 v5.9.2 + github.com/spf13/cobra v1.10.2 golang.org/x/mod v0.34.0 + google.golang.org/protobuf v1.36.11 ) require ( - github.com/google/go-cmp v0.7.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/spf13/pflag v1.0.9 // indirect golang.org/x/text v0.36.0 // indirect - google.golang.org/protobuf v1.36.9 // indirect ) diff --git a/go.sum b/go.sum index 0928c72..ae03f99 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,10 @@ -connectrpc.com/connect v1.19.2 h1:McQ83FGdzL+t60peksi0gXC7MQ/iLKgLduAnThbM0mo= -connectrpc.com/connect v1.19.2/go.mod h1:tN20fjdGlewnSFeZxLKb0xwIZ6ozc3OQs2hTXy4du9w= +connectrpc.com/connect v1.20.0 h1:6TNDAB+WeNd2uolWNlYczB5E0KNNaVMNUEx8JEUsPmQ= +connectrpc.com/connect v1.20.0/go.mod h1:A2ygJrukXwWy32vkCAAHNVguZrqZ+jeZ9rGRnGR4dN4= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/a-h/templ v0.3.1001 h1:yHDTgexACdJttyiyamcTHXr2QkIeVF1MukLy44EAhMY= github.com/a-h/templ v0.3.1001/go.mod h1:oCZcnKRf5jjsGpf2yELzQfodLphd2mwecwG4Crk5HBo= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -11,6 +12,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= @@ -21,19 +24,25 @@ github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= -google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= -google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/api/orchestrator/v1/orchestratorv1connect/plugin_registry.connect.go b/internal/api/orchestrator/v1/orchestratorv1connect/plugin_registry.connect.go new file mode 100644 index 0000000..c1ac322 --- /dev/null +++ b/internal/api/orchestrator/v1/orchestratorv1connect/plugin_registry.connect.go @@ -0,0 +1,597 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: orchestrator/v1/plugin_registry.proto + +package orchestratorv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "git.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // PluginScopeServiceName is the fully-qualified name of the PluginScopeService service. + PluginScopeServiceName = "orchestrator.v1.PluginScopeService" + // PluginRegistryServiceName is the fully-qualified name of the PluginRegistryService service. + PluginRegistryServiceName = "orchestrator.v1.PluginRegistryService" + // PluginPublishServiceName is the fully-qualified name of the PluginPublishService service. + PluginPublishServiceName = "orchestrator.v1.PluginPublishService" + // PluginAuthServiceName is the fully-qualified name of the PluginAuthService service. + PluginAuthServiceName = "orchestrator.v1.PluginAuthService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // PluginScopeServiceCreateScopeProcedure is the fully-qualified name of the PluginScopeService's + // CreateScope RPC. + PluginScopeServiceCreateScopeProcedure = "/orchestrator.v1.PluginScopeService/CreateScope" + // PluginScopeServiceListMyScopesProcedure is the fully-qualified name of the PluginScopeService's + // ListMyScopes RPC. + PluginScopeServiceListMyScopesProcedure = "/orchestrator.v1.PluginScopeService/ListMyScopes" + // PluginScopeServiceGetScopeProcedure is the fully-qualified name of the PluginScopeService's + // GetScope RPC. + PluginScopeServiceGetScopeProcedure = "/orchestrator.v1.PluginScopeService/GetScope" + // PluginRegistryServiceCreatePluginProcedure is the fully-qualified name of the + // PluginRegistryService's CreatePlugin RPC. + PluginRegistryServiceCreatePluginProcedure = "/orchestrator.v1.PluginRegistryService/CreatePlugin" + // PluginRegistryServiceGetPluginProcedure is the fully-qualified name of the + // PluginRegistryService's GetPlugin RPC. + PluginRegistryServiceGetPluginProcedure = "/orchestrator.v1.PluginRegistryService/GetPlugin" + // PluginRegistryServiceListPluginsProcedure is the fully-qualified name of the + // PluginRegistryService's ListPlugins RPC. + PluginRegistryServiceListPluginsProcedure = "/orchestrator.v1.PluginRegistryService/ListPlugins" + // PluginRegistryServiceGetVersionProcedure is the fully-qualified name of the + // PluginRegistryService's GetVersion RPC. + PluginRegistryServiceGetVersionProcedure = "/orchestrator.v1.PluginRegistryService/GetVersion" + // PluginRegistryServiceResolveInstallProcedure is the fully-qualified name of the + // PluginRegistryService's ResolveInstall RPC. + PluginRegistryServiceResolveInstallProcedure = "/orchestrator.v1.PluginRegistryService/ResolveInstall" + // PluginPublishServicePublishVersionProcedure is the fully-qualified name of the + // PluginPublishService's PublishVersion RPC. + PluginPublishServicePublishVersionProcedure = "/orchestrator.v1.PluginPublishService/PublishVersion" + // PluginAuthServiceStartDeviceProcedure is the fully-qualified name of the PluginAuthService's + // StartDevice RPC. + PluginAuthServiceStartDeviceProcedure = "/orchestrator.v1.PluginAuthService/StartDevice" + // PluginAuthServicePollDeviceProcedure is the fully-qualified name of the PluginAuthService's + // PollDevice RPC. + PluginAuthServicePollDeviceProcedure = "/orchestrator.v1.PluginAuthService/PollDevice" + // PluginAuthServiceApproveDeviceProcedure is the fully-qualified name of the PluginAuthService's + // ApproveDevice RPC. + PluginAuthServiceApproveDeviceProcedure = "/orchestrator.v1.PluginAuthService/ApproveDevice" + // PluginAuthServiceWhoamiProcedure is the fully-qualified name of the PluginAuthService's Whoami + // RPC. + PluginAuthServiceWhoamiProcedure = "/orchestrator.v1.PluginAuthService/Whoami" +) + +// PluginScopeServiceClient is a client for the orchestrator.v1.PluginScopeService service. +type PluginScopeServiceClient interface { + CreateScope(context.Context, *connect.Request[v1.CreateScopeRequest]) (*connect.Response[v1.CreateScopeResponse], error) + ListMyScopes(context.Context, *connect.Request[v1.ListMyScopesRequest]) (*connect.Response[v1.ListMyScopesResponse], error) + GetScope(context.Context, *connect.Request[v1.GetScopeRequest]) (*connect.Response[v1.GetScopeResponse], error) +} + +// NewPluginScopeServiceClient constructs a client for the orchestrator.v1.PluginScopeService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPluginScopeServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginScopeServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + pluginScopeServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginScopeService").Methods() + return &pluginScopeServiceClient{ + createScope: connect.NewClient[v1.CreateScopeRequest, v1.CreateScopeResponse]( + httpClient, + baseURL+PluginScopeServiceCreateScopeProcedure, + connect.WithSchema(pluginScopeServiceMethods.ByName("CreateScope")), + connect.WithClientOptions(opts...), + ), + listMyScopes: connect.NewClient[v1.ListMyScopesRequest, v1.ListMyScopesResponse]( + httpClient, + baseURL+PluginScopeServiceListMyScopesProcedure, + connect.WithSchema(pluginScopeServiceMethods.ByName("ListMyScopes")), + connect.WithClientOptions(opts...), + ), + getScope: connect.NewClient[v1.GetScopeRequest, v1.GetScopeResponse]( + httpClient, + baseURL+PluginScopeServiceGetScopeProcedure, + connect.WithSchema(pluginScopeServiceMethods.ByName("GetScope")), + connect.WithClientOptions(opts...), + ), + } +} + +// pluginScopeServiceClient implements PluginScopeServiceClient. +type pluginScopeServiceClient struct { + createScope *connect.Client[v1.CreateScopeRequest, v1.CreateScopeResponse] + listMyScopes *connect.Client[v1.ListMyScopesRequest, v1.ListMyScopesResponse] + getScope *connect.Client[v1.GetScopeRequest, v1.GetScopeResponse] +} + +// CreateScope calls orchestrator.v1.PluginScopeService.CreateScope. +func (c *pluginScopeServiceClient) CreateScope(ctx context.Context, req *connect.Request[v1.CreateScopeRequest]) (*connect.Response[v1.CreateScopeResponse], error) { + return c.createScope.CallUnary(ctx, req) +} + +// ListMyScopes calls orchestrator.v1.PluginScopeService.ListMyScopes. +func (c *pluginScopeServiceClient) ListMyScopes(ctx context.Context, req *connect.Request[v1.ListMyScopesRequest]) (*connect.Response[v1.ListMyScopesResponse], error) { + return c.listMyScopes.CallUnary(ctx, req) +} + +// GetScope calls orchestrator.v1.PluginScopeService.GetScope. +func (c *pluginScopeServiceClient) GetScope(ctx context.Context, req *connect.Request[v1.GetScopeRequest]) (*connect.Response[v1.GetScopeResponse], error) { + return c.getScope.CallUnary(ctx, req) +} + +// PluginScopeServiceHandler is an implementation of the orchestrator.v1.PluginScopeService service. +type PluginScopeServiceHandler interface { + CreateScope(context.Context, *connect.Request[v1.CreateScopeRequest]) (*connect.Response[v1.CreateScopeResponse], error) + ListMyScopes(context.Context, *connect.Request[v1.ListMyScopesRequest]) (*connect.Response[v1.ListMyScopesResponse], error) + GetScope(context.Context, *connect.Request[v1.GetScopeRequest]) (*connect.Response[v1.GetScopeResponse], error) +} + +// NewPluginScopeServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPluginScopeServiceHandler(svc PluginScopeServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pluginScopeServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginScopeService").Methods() + pluginScopeServiceCreateScopeHandler := connect.NewUnaryHandler( + PluginScopeServiceCreateScopeProcedure, + svc.CreateScope, + connect.WithSchema(pluginScopeServiceMethods.ByName("CreateScope")), + connect.WithHandlerOptions(opts...), + ) + pluginScopeServiceListMyScopesHandler := connect.NewUnaryHandler( + PluginScopeServiceListMyScopesProcedure, + svc.ListMyScopes, + connect.WithSchema(pluginScopeServiceMethods.ByName("ListMyScopes")), + connect.WithHandlerOptions(opts...), + ) + pluginScopeServiceGetScopeHandler := connect.NewUnaryHandler( + PluginScopeServiceGetScopeProcedure, + svc.GetScope, + connect.WithSchema(pluginScopeServiceMethods.ByName("GetScope")), + connect.WithHandlerOptions(opts...), + ) + return "/orchestrator.v1.PluginScopeService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PluginScopeServiceCreateScopeProcedure: + pluginScopeServiceCreateScopeHandler.ServeHTTP(w, r) + case PluginScopeServiceListMyScopesProcedure: + pluginScopeServiceListMyScopesHandler.ServeHTTP(w, r) + case PluginScopeServiceGetScopeProcedure: + pluginScopeServiceGetScopeHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPluginScopeServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedPluginScopeServiceHandler struct{} + +func (UnimplementedPluginScopeServiceHandler) CreateScope(context.Context, *connect.Request[v1.CreateScopeRequest]) (*connect.Response[v1.CreateScopeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginScopeService.CreateScope is not implemented")) +} + +func (UnimplementedPluginScopeServiceHandler) ListMyScopes(context.Context, *connect.Request[v1.ListMyScopesRequest]) (*connect.Response[v1.ListMyScopesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginScopeService.ListMyScopes is not implemented")) +} + +func (UnimplementedPluginScopeServiceHandler) GetScope(context.Context, *connect.Request[v1.GetScopeRequest]) (*connect.Response[v1.GetScopeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginScopeService.GetScope is not implemented")) +} + +// PluginRegistryServiceClient is a client for the orchestrator.v1.PluginRegistryService service. +type PluginRegistryServiceClient interface { + CreatePlugin(context.Context, *connect.Request[v1.CreatePluginRequest]) (*connect.Response[v1.CreatePluginResponse], error) + GetPlugin(context.Context, *connect.Request[v1.GetPluginRequest]) (*connect.Response[v1.GetPluginResponse], error) + ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error) + GetVersion(context.Context, *connect.Request[v1.GetVersionRequest]) (*connect.Response[v1.GetVersionResponse], error) + ResolveInstall(context.Context, *connect.Request[v1.ResolveInstallRequest]) (*connect.Response[v1.ResolveInstallResponse], error) +} + +// NewPluginRegistryServiceClient constructs a client for the orchestrator.v1.PluginRegistryService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPluginRegistryServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginRegistryServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + pluginRegistryServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginRegistryService").Methods() + return &pluginRegistryServiceClient{ + createPlugin: connect.NewClient[v1.CreatePluginRequest, v1.CreatePluginResponse]( + httpClient, + baseURL+PluginRegistryServiceCreatePluginProcedure, + connect.WithSchema(pluginRegistryServiceMethods.ByName("CreatePlugin")), + connect.WithClientOptions(opts...), + ), + getPlugin: connect.NewClient[v1.GetPluginRequest, v1.GetPluginResponse]( + httpClient, + baseURL+PluginRegistryServiceGetPluginProcedure, + connect.WithSchema(pluginRegistryServiceMethods.ByName("GetPlugin")), + connect.WithClientOptions(opts...), + ), + listPlugins: connect.NewClient[v1.ListPluginsRequest, v1.ListPluginsResponse]( + httpClient, + baseURL+PluginRegistryServiceListPluginsProcedure, + connect.WithSchema(pluginRegistryServiceMethods.ByName("ListPlugins")), + connect.WithClientOptions(opts...), + ), + getVersion: connect.NewClient[v1.GetVersionRequest, v1.GetVersionResponse]( + httpClient, + baseURL+PluginRegistryServiceGetVersionProcedure, + connect.WithSchema(pluginRegistryServiceMethods.ByName("GetVersion")), + connect.WithClientOptions(opts...), + ), + resolveInstall: connect.NewClient[v1.ResolveInstallRequest, v1.ResolveInstallResponse]( + httpClient, + baseURL+PluginRegistryServiceResolveInstallProcedure, + connect.WithSchema(pluginRegistryServiceMethods.ByName("ResolveInstall")), + connect.WithClientOptions(opts...), + ), + } +} + +// pluginRegistryServiceClient implements PluginRegistryServiceClient. +type pluginRegistryServiceClient struct { + createPlugin *connect.Client[v1.CreatePluginRequest, v1.CreatePluginResponse] + getPlugin *connect.Client[v1.GetPluginRequest, v1.GetPluginResponse] + listPlugins *connect.Client[v1.ListPluginsRequest, v1.ListPluginsResponse] + getVersion *connect.Client[v1.GetVersionRequest, v1.GetVersionResponse] + resolveInstall *connect.Client[v1.ResolveInstallRequest, v1.ResolveInstallResponse] +} + +// CreatePlugin calls orchestrator.v1.PluginRegistryService.CreatePlugin. +func (c *pluginRegistryServiceClient) CreatePlugin(ctx context.Context, req *connect.Request[v1.CreatePluginRequest]) (*connect.Response[v1.CreatePluginResponse], error) { + return c.createPlugin.CallUnary(ctx, req) +} + +// GetPlugin calls orchestrator.v1.PluginRegistryService.GetPlugin. +func (c *pluginRegistryServiceClient) GetPlugin(ctx context.Context, req *connect.Request[v1.GetPluginRequest]) (*connect.Response[v1.GetPluginResponse], error) { + return c.getPlugin.CallUnary(ctx, req) +} + +// ListPlugins calls orchestrator.v1.PluginRegistryService.ListPlugins. +func (c *pluginRegistryServiceClient) ListPlugins(ctx context.Context, req *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error) { + return c.listPlugins.CallUnary(ctx, req) +} + +// GetVersion calls orchestrator.v1.PluginRegistryService.GetVersion. +func (c *pluginRegistryServiceClient) GetVersion(ctx context.Context, req *connect.Request[v1.GetVersionRequest]) (*connect.Response[v1.GetVersionResponse], error) { + return c.getVersion.CallUnary(ctx, req) +} + +// ResolveInstall calls orchestrator.v1.PluginRegistryService.ResolveInstall. +func (c *pluginRegistryServiceClient) ResolveInstall(ctx context.Context, req *connect.Request[v1.ResolveInstallRequest]) (*connect.Response[v1.ResolveInstallResponse], error) { + return c.resolveInstall.CallUnary(ctx, req) +} + +// PluginRegistryServiceHandler is an implementation of the orchestrator.v1.PluginRegistryService +// service. +type PluginRegistryServiceHandler interface { + CreatePlugin(context.Context, *connect.Request[v1.CreatePluginRequest]) (*connect.Response[v1.CreatePluginResponse], error) + GetPlugin(context.Context, *connect.Request[v1.GetPluginRequest]) (*connect.Response[v1.GetPluginResponse], error) + ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error) + GetVersion(context.Context, *connect.Request[v1.GetVersionRequest]) (*connect.Response[v1.GetVersionResponse], error) + ResolveInstall(context.Context, *connect.Request[v1.ResolveInstallRequest]) (*connect.Response[v1.ResolveInstallResponse], error) +} + +// NewPluginRegistryServiceHandler builds an HTTP handler from the service implementation. It +// returns the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPluginRegistryServiceHandler(svc PluginRegistryServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pluginRegistryServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginRegistryService").Methods() + pluginRegistryServiceCreatePluginHandler := connect.NewUnaryHandler( + PluginRegistryServiceCreatePluginProcedure, + svc.CreatePlugin, + connect.WithSchema(pluginRegistryServiceMethods.ByName("CreatePlugin")), + connect.WithHandlerOptions(opts...), + ) + pluginRegistryServiceGetPluginHandler := connect.NewUnaryHandler( + PluginRegistryServiceGetPluginProcedure, + svc.GetPlugin, + connect.WithSchema(pluginRegistryServiceMethods.ByName("GetPlugin")), + connect.WithHandlerOptions(opts...), + ) + pluginRegistryServiceListPluginsHandler := connect.NewUnaryHandler( + PluginRegistryServiceListPluginsProcedure, + svc.ListPlugins, + connect.WithSchema(pluginRegistryServiceMethods.ByName("ListPlugins")), + connect.WithHandlerOptions(opts...), + ) + pluginRegistryServiceGetVersionHandler := connect.NewUnaryHandler( + PluginRegistryServiceGetVersionProcedure, + svc.GetVersion, + connect.WithSchema(pluginRegistryServiceMethods.ByName("GetVersion")), + connect.WithHandlerOptions(opts...), + ) + pluginRegistryServiceResolveInstallHandler := connect.NewUnaryHandler( + PluginRegistryServiceResolveInstallProcedure, + svc.ResolveInstall, + connect.WithSchema(pluginRegistryServiceMethods.ByName("ResolveInstall")), + connect.WithHandlerOptions(opts...), + ) + return "/orchestrator.v1.PluginRegistryService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PluginRegistryServiceCreatePluginProcedure: + pluginRegistryServiceCreatePluginHandler.ServeHTTP(w, r) + case PluginRegistryServiceGetPluginProcedure: + pluginRegistryServiceGetPluginHandler.ServeHTTP(w, r) + case PluginRegistryServiceListPluginsProcedure: + pluginRegistryServiceListPluginsHandler.ServeHTTP(w, r) + case PluginRegistryServiceGetVersionProcedure: + pluginRegistryServiceGetVersionHandler.ServeHTTP(w, r) + case PluginRegistryServiceResolveInstallProcedure: + pluginRegistryServiceResolveInstallHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPluginRegistryServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedPluginRegistryServiceHandler struct{} + +func (UnimplementedPluginRegistryServiceHandler) CreatePlugin(context.Context, *connect.Request[v1.CreatePluginRequest]) (*connect.Response[v1.CreatePluginResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginRegistryService.CreatePlugin is not implemented")) +} + +func (UnimplementedPluginRegistryServiceHandler) GetPlugin(context.Context, *connect.Request[v1.GetPluginRequest]) (*connect.Response[v1.GetPluginResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginRegistryService.GetPlugin is not implemented")) +} + +func (UnimplementedPluginRegistryServiceHandler) ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginRegistryService.ListPlugins is not implemented")) +} + +func (UnimplementedPluginRegistryServiceHandler) GetVersion(context.Context, *connect.Request[v1.GetVersionRequest]) (*connect.Response[v1.GetVersionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginRegistryService.GetVersion is not implemented")) +} + +func (UnimplementedPluginRegistryServiceHandler) ResolveInstall(context.Context, *connect.Request[v1.ResolveInstallRequest]) (*connect.Response[v1.ResolveInstallResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginRegistryService.ResolveInstall is not implemented")) +} + +// PluginPublishServiceClient is a client for the orchestrator.v1.PluginPublishService service. +type PluginPublishServiceClient interface { + PublishVersion(context.Context, *connect.Request[v1.PublishVersionRequest]) (*connect.Response[v1.PublishVersionResponse], error) +} + +// NewPluginPublishServiceClient constructs a client for the orchestrator.v1.PluginPublishService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPluginPublishServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginPublishServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + pluginPublishServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginPublishService").Methods() + return &pluginPublishServiceClient{ + publishVersion: connect.NewClient[v1.PublishVersionRequest, v1.PublishVersionResponse]( + httpClient, + baseURL+PluginPublishServicePublishVersionProcedure, + connect.WithSchema(pluginPublishServiceMethods.ByName("PublishVersion")), + connect.WithClientOptions(opts...), + ), + } +} + +// pluginPublishServiceClient implements PluginPublishServiceClient. +type pluginPublishServiceClient struct { + publishVersion *connect.Client[v1.PublishVersionRequest, v1.PublishVersionResponse] +} + +// PublishVersion calls orchestrator.v1.PluginPublishService.PublishVersion. +func (c *pluginPublishServiceClient) PublishVersion(ctx context.Context, req *connect.Request[v1.PublishVersionRequest]) (*connect.Response[v1.PublishVersionResponse], error) { + return c.publishVersion.CallUnary(ctx, req) +} + +// PluginPublishServiceHandler is an implementation of the orchestrator.v1.PluginPublishService +// service. +type PluginPublishServiceHandler interface { + PublishVersion(context.Context, *connect.Request[v1.PublishVersionRequest]) (*connect.Response[v1.PublishVersionResponse], error) +} + +// NewPluginPublishServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPluginPublishServiceHandler(svc PluginPublishServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pluginPublishServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginPublishService").Methods() + pluginPublishServicePublishVersionHandler := connect.NewUnaryHandler( + PluginPublishServicePublishVersionProcedure, + svc.PublishVersion, + connect.WithSchema(pluginPublishServiceMethods.ByName("PublishVersion")), + connect.WithHandlerOptions(opts...), + ) + return "/orchestrator.v1.PluginPublishService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PluginPublishServicePublishVersionProcedure: + pluginPublishServicePublishVersionHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPluginPublishServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedPluginPublishServiceHandler struct{} + +func (UnimplementedPluginPublishServiceHandler) PublishVersion(context.Context, *connect.Request[v1.PublishVersionRequest]) (*connect.Response[v1.PublishVersionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginPublishService.PublishVersion is not implemented")) +} + +// PluginAuthServiceClient is a client for the orchestrator.v1.PluginAuthService service. +type PluginAuthServiceClient interface { + StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error) + PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error) + ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error) + Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) +} + +// NewPluginAuthServiceClient constructs a client for the orchestrator.v1.PluginAuthService service. +// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped +// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPluginAuthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginAuthServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + pluginAuthServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginAuthService").Methods() + return &pluginAuthServiceClient{ + startDevice: connect.NewClient[v1.StartDeviceRequest, v1.StartDeviceResponse]( + httpClient, + baseURL+PluginAuthServiceStartDeviceProcedure, + connect.WithSchema(pluginAuthServiceMethods.ByName("StartDevice")), + connect.WithClientOptions(opts...), + ), + pollDevice: connect.NewClient[v1.PollDeviceRequest, v1.PollDeviceResponse]( + httpClient, + baseURL+PluginAuthServicePollDeviceProcedure, + connect.WithSchema(pluginAuthServiceMethods.ByName("PollDevice")), + connect.WithClientOptions(opts...), + ), + approveDevice: connect.NewClient[v1.ApproveDeviceRequest, v1.ApproveDeviceResponse]( + httpClient, + baseURL+PluginAuthServiceApproveDeviceProcedure, + connect.WithSchema(pluginAuthServiceMethods.ByName("ApproveDevice")), + connect.WithClientOptions(opts...), + ), + whoami: connect.NewClient[v1.WhoamiRequest, v1.WhoamiResponse]( + httpClient, + baseURL+PluginAuthServiceWhoamiProcedure, + connect.WithSchema(pluginAuthServiceMethods.ByName("Whoami")), + connect.WithClientOptions(opts...), + ), + } +} + +// pluginAuthServiceClient implements PluginAuthServiceClient. +type pluginAuthServiceClient struct { + startDevice *connect.Client[v1.StartDeviceRequest, v1.StartDeviceResponse] + pollDevice *connect.Client[v1.PollDeviceRequest, v1.PollDeviceResponse] + approveDevice *connect.Client[v1.ApproveDeviceRequest, v1.ApproveDeviceResponse] + whoami *connect.Client[v1.WhoamiRequest, v1.WhoamiResponse] +} + +// StartDevice calls orchestrator.v1.PluginAuthService.StartDevice. +func (c *pluginAuthServiceClient) StartDevice(ctx context.Context, req *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error) { + return c.startDevice.CallUnary(ctx, req) +} + +// PollDevice calls orchestrator.v1.PluginAuthService.PollDevice. +func (c *pluginAuthServiceClient) PollDevice(ctx context.Context, req *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error) { + return c.pollDevice.CallUnary(ctx, req) +} + +// ApproveDevice calls orchestrator.v1.PluginAuthService.ApproveDevice. +func (c *pluginAuthServiceClient) ApproveDevice(ctx context.Context, req *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error) { + return c.approveDevice.CallUnary(ctx, req) +} + +// Whoami calls orchestrator.v1.PluginAuthService.Whoami. +func (c *pluginAuthServiceClient) Whoami(ctx context.Context, req *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) { + return c.whoami.CallUnary(ctx, req) +} + +// PluginAuthServiceHandler is an implementation of the orchestrator.v1.PluginAuthService service. +type PluginAuthServiceHandler interface { + StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error) + PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error) + ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error) + Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) +} + +// NewPluginAuthServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPluginAuthServiceHandler(svc PluginAuthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pluginAuthServiceMethods := v1.File_orchestrator_v1_plugin_registry_proto.Services().ByName("PluginAuthService").Methods() + pluginAuthServiceStartDeviceHandler := connect.NewUnaryHandler( + PluginAuthServiceStartDeviceProcedure, + svc.StartDevice, + connect.WithSchema(pluginAuthServiceMethods.ByName("StartDevice")), + connect.WithHandlerOptions(opts...), + ) + pluginAuthServicePollDeviceHandler := connect.NewUnaryHandler( + PluginAuthServicePollDeviceProcedure, + svc.PollDevice, + connect.WithSchema(pluginAuthServiceMethods.ByName("PollDevice")), + connect.WithHandlerOptions(opts...), + ) + pluginAuthServiceApproveDeviceHandler := connect.NewUnaryHandler( + PluginAuthServiceApproveDeviceProcedure, + svc.ApproveDevice, + connect.WithSchema(pluginAuthServiceMethods.ByName("ApproveDevice")), + connect.WithHandlerOptions(opts...), + ) + pluginAuthServiceWhoamiHandler := connect.NewUnaryHandler( + PluginAuthServiceWhoamiProcedure, + svc.Whoami, + connect.WithSchema(pluginAuthServiceMethods.ByName("Whoami")), + connect.WithHandlerOptions(opts...), + ) + return "/orchestrator.v1.PluginAuthService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PluginAuthServiceStartDeviceProcedure: + pluginAuthServiceStartDeviceHandler.ServeHTTP(w, r) + case PluginAuthServicePollDeviceProcedure: + pluginAuthServicePollDeviceHandler.ServeHTTP(w, r) + case PluginAuthServiceApproveDeviceProcedure: + pluginAuthServiceApproveDeviceHandler.ServeHTTP(w, r) + case PluginAuthServiceWhoamiProcedure: + pluginAuthServiceWhoamiHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPluginAuthServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedPluginAuthServiceHandler struct{} + +func (UnimplementedPluginAuthServiceHandler) StartDevice(context.Context, *connect.Request[v1.StartDeviceRequest]) (*connect.Response[v1.StartDeviceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.StartDevice is not implemented")) +} + +func (UnimplementedPluginAuthServiceHandler) PollDevice(context.Context, *connect.Request[v1.PollDeviceRequest]) (*connect.Response[v1.PollDeviceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.PollDevice is not implemented")) +} + +func (UnimplementedPluginAuthServiceHandler) ApproveDevice(context.Context, *connect.Request[v1.ApproveDeviceRequest]) (*connect.Response[v1.ApproveDeviceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.ApproveDevice is not implemented")) +} + +func (UnimplementedPluginAuthServiceHandler) Whoami(context.Context, *connect.Request[v1.WhoamiRequest]) (*connect.Response[v1.WhoamiResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("orchestrator.v1.PluginAuthService.Whoami is not implemented")) +} diff --git a/internal/api/orchestrator/v1/plugin_registry.pb.go b/internal/api/orchestrator/v1/plugin_registry.pb.go new file mode 100644 index 0000000..1903581 --- /dev/null +++ b/internal/api/orchestrator/v1/plugin_registry.pb.go @@ -0,0 +1,2108 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: orchestrator/v1/plugin_registry.proto + +package orchestratorv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Scope struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Scope) Reset() { + *x = Scope{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Scope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scope) ProtoMessage() {} + +func (x *Scope) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Scope.ProtoReflect.Descriptor instead. +func (*Scope) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{0} +} + +func (x *Scope) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Scope) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *Scope) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Scope) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type Plugin struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ScopeSlug string `protobuf:"bytes,2,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Visibility string `protobuf:"bytes,4,opt,name=visibility,proto3" json:"visibility,omitempty"` + Premium bool `protobuf:"varint,5,opt,name=premium,proto3" json:"premium,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + HomepageUrl string `protobuf:"bytes,7,opt,name=homepage_url,json=homepageUrl,proto3" json:"homepage_url,omitempty"` + Categories []string `protobuf:"bytes,8,rep,name=categories,proto3" json:"categories,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Plugin) Reset() { + *x = Plugin{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Plugin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Plugin) ProtoMessage() {} + +func (x *Plugin) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Plugin.ProtoReflect.Descriptor instead. +func (*Plugin) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{1} +} + +func (x *Plugin) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Plugin) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *Plugin) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Plugin) GetVisibility() string { + if x != nil { + return x.Visibility + } + return "" +} + +func (x *Plugin) GetPremium() bool { + if x != nil { + return x.Premium + } + return false +} + +func (x *Plugin) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Plugin) GetHomepageUrl() string { + if x != nil { + return x.HomepageUrl + } + return "" +} + +func (x *Plugin) GetCategories() []string { + if x != nil { + return x.Categories + } + return nil +} + +func (x *Plugin) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Version struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PluginId string `protobuf:"bytes,2,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + GitTag string `protobuf:"bytes,5,opt,name=git_tag,json=gitTag,proto3" json:"git_tag,omitempty"` + PublishedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"` + Yanked bool `protobuf:"varint,7,opt,name=yanked,proto3" json:"yanked,omitempty"` + SdkConstraint string `protobuf:"bytes,8,opt,name=sdk_constraint,json=sdkConstraint,proto3" json:"sdk_constraint,omitempty"` + SourceArchiveSha256 string `protobuf:"bytes,9,opt,name=source_archive_sha256,json=sourceArchiveSha256,proto3" json:"source_archive_sha256,omitempty"` + SourceArchiveSize int64 `protobuf:"varint,10,opt,name=source_archive_size,json=sourceArchiveSize,proto3" json:"source_archive_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Version) Reset() { + *x = Version{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Version) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Version) ProtoMessage() {} + +func (x *Version) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Version.ProtoReflect.Descriptor instead. +func (*Version) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{2} +} + +func (x *Version) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Version) GetPluginId() string { + if x != nil { + return x.PluginId + } + return "" +} + +func (x *Version) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Version) GetGitCommit() string { + if x != nil { + return x.GitCommit + } + return "" +} + +func (x *Version) GetGitTag() string { + if x != nil { + return x.GitTag + } + return "" +} + +func (x *Version) GetPublishedAt() *timestamppb.Timestamp { + if x != nil { + return x.PublishedAt + } + return nil +} + +func (x *Version) GetYanked() bool { + if x != nil { + return x.Yanked + } + return false +} + +func (x *Version) GetSdkConstraint() string { + if x != nil { + return x.SdkConstraint + } + return "" +} + +func (x *Version) GetSourceArchiveSha256() string { + if x != nil { + return x.SourceArchiveSha256 + } + return "" +} + +func (x *Version) GetSourceArchiveSize() int64 { + if x != nil { + return x.SourceArchiveSize + } + return 0 +} + +type Requirement struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScopeSlug string `protobuf:"bytes,1,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + ConstraintExpr string `protobuf:"bytes,3,opt,name=constraint_expr,json=constraintExpr,proto3" json:"constraint_expr,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Requirement) Reset() { + *x = Requirement{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Requirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Requirement) ProtoMessage() {} + +func (x *Requirement) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Requirement.ProtoReflect.Descriptor instead. +func (*Requirement) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{3} +} + +func (x *Requirement) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *Requirement) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Requirement) GetConstraintExpr() string { + if x != nil { + return x.ConstraintExpr + } + return "" +} + +type CreateScopeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateScopeRequest) Reset() { + *x = CreateScopeRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateScopeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateScopeRequest) ProtoMessage() {} + +func (x *CreateScopeRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateScopeRequest.ProtoReflect.Descriptor instead. +func (*CreateScopeRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateScopeRequest) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *CreateScopeRequest) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +type CreateScopeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scope *Scope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateScopeResponse) Reset() { + *x = CreateScopeResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateScopeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateScopeResponse) ProtoMessage() {} + +func (x *CreateScopeResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateScopeResponse.ProtoReflect.Descriptor instead. +func (*CreateScopeResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateScopeResponse) GetScope() *Scope { + if x != nil { + return x.Scope + } + return nil +} + +type ListMyScopesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMyScopesRequest) Reset() { + *x = ListMyScopesRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMyScopesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMyScopesRequest) ProtoMessage() {} + +func (x *ListMyScopesRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMyScopesRequest.ProtoReflect.Descriptor instead. +func (*ListMyScopesRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{6} +} + +type ListMyScopesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scopes []*Scope `protobuf:"bytes,1,rep,name=scopes,proto3" json:"scopes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMyScopesResponse) Reset() { + *x = ListMyScopesResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMyScopesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMyScopesResponse) ProtoMessage() {} + +func (x *ListMyScopesResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMyScopesResponse.ProtoReflect.Descriptor instead. +func (*ListMyScopesResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{7} +} + +func (x *ListMyScopesResponse) GetScopes() []*Scope { + if x != nil { + return x.Scopes + } + return nil +} + +type GetScopeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetScopeRequest) Reset() { + *x = GetScopeRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetScopeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetScopeRequest) ProtoMessage() {} + +func (x *GetScopeRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetScopeRequest.ProtoReflect.Descriptor instead. +func (*GetScopeRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{8} +} + +func (x *GetScopeRequest) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +type GetScopeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scope *Scope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetScopeResponse) Reset() { + *x = GetScopeResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetScopeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetScopeResponse) ProtoMessage() {} + +func (x *GetScopeResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetScopeResponse.ProtoReflect.Descriptor instead. +func (*GetScopeResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{9} +} + +func (x *GetScopeResponse) GetScope() *Scope { + if x != nil { + return x.Scope + } + return nil +} + +func (x *GetScopeResponse) GetPlugins() []*Plugin { + if x != nil { + return x.Plugins + } + return nil +} + +type CreatePluginRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScopeSlug string `protobuf:"bytes,1,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePluginRequest) Reset() { + *x = CreatePluginRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePluginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePluginRequest) ProtoMessage() {} + +func (x *CreatePluginRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePluginRequest.ProtoReflect.Descriptor instead. +func (*CreatePluginRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{10} +} + +func (x *CreatePluginRequest) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *CreatePluginRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreatePluginRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type CreatePluginResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Plugin *Plugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` + GitRemoteUrl string `protobuf:"bytes,2,opt,name=git_remote_url,json=gitRemoteUrl,proto3" json:"git_remote_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePluginResponse) Reset() { + *x = CreatePluginResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePluginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePluginResponse) ProtoMessage() {} + +func (x *CreatePluginResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePluginResponse.ProtoReflect.Descriptor instead. +func (*CreatePluginResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{11} +} + +func (x *CreatePluginResponse) GetPlugin() *Plugin { + if x != nil { + return x.Plugin + } + return nil +} + +func (x *CreatePluginResponse) GetGitRemoteUrl() string { + if x != nil { + return x.GitRemoteUrl + } + return "" +} + +type GetPluginRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScopeSlug string `protobuf:"bytes,1,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPluginRequest) Reset() { + *x = GetPluginRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPluginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPluginRequest) ProtoMessage() {} + +func (x *GetPluginRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPluginRequest.ProtoReflect.Descriptor instead. +func (*GetPluginRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{12} +} + +func (x *GetPluginRequest) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *GetPluginRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetPluginResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Plugin *Plugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` + Versions []*Version `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"` + Channels map[string]string `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPluginResponse) Reset() { + *x = GetPluginResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPluginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPluginResponse) ProtoMessage() {} + +func (x *GetPluginResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPluginResponse.ProtoReflect.Descriptor instead. +func (*GetPluginResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{13} +} + +func (x *GetPluginResponse) GetPlugin() *Plugin { + if x != nil { + return x.Plugin + } + return nil +} + +func (x *GetPluginResponse) GetVersions() []*Version { + if x != nil { + return x.Versions + } + return nil +} + +func (x *GetPluginResponse) GetChannels() map[string]string { + if x != nil { + return x.Channels + } + return nil +} + +type ListPluginsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPluginsRequest) Reset() { + *x = ListPluginsRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPluginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPluginsRequest) ProtoMessage() {} + +func (x *ListPluginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPluginsRequest.ProtoReflect.Descriptor instead. +func (*ListPluginsRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{14} +} + +func (x *ListPluginsRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListPluginsRequest) GetOffset() int32 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListPluginsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type ListPluginsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Plugins []*Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPluginsResponse) Reset() { + *x = ListPluginsResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPluginsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPluginsResponse) ProtoMessage() {} + +func (x *ListPluginsResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPluginsResponse.ProtoReflect.Descriptor instead. +func (*ListPluginsResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{15} +} + +func (x *ListPluginsResponse) GetPlugins() []*Plugin { + if x != nil { + return x.Plugins + } + return nil +} + +type GetVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScopeSlug string `protobuf:"bytes,1,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + PluginName string `protobuf:"bytes,2,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetVersionRequest) Reset() { + *x = GetVersionRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVersionRequest) ProtoMessage() {} + +func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead. +func (*GetVersionRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{16} +} + +func (x *GetVersionRequest) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *GetVersionRequest) GetPluginName() string { + if x != nil { + return x.PluginName + } + return "" +} + +func (x *GetVersionRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type GetVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Requires []*Requirement `protobuf:"bytes,2,rep,name=requires,proto3" json:"requires,omitempty"` + ReadmeMd string `protobuf:"bytes,3,opt,name=readme_md,json=readmeMd,proto3" json:"readme_md,omitempty"` + ChangelogMd string `protobuf:"bytes,4,opt,name=changelog_md,json=changelogMd,proto3" json:"changelog_md,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetVersionResponse) Reset() { + *x = GetVersionResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVersionResponse) ProtoMessage() {} + +func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead. +func (*GetVersionResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{17} +} + +func (x *GetVersionResponse) GetVersion() *Version { + if x != nil { + return x.Version + } + return nil +} + +func (x *GetVersionResponse) GetRequires() []*Requirement { + if x != nil { + return x.Requires + } + return nil +} + +func (x *GetVersionResponse) GetReadmeMd() string { + if x != nil { + return x.ReadmeMd + } + return "" +} + +func (x *GetVersionResponse) GetChangelogMd() string { + if x != nil { + return x.ChangelogMd + } + return "" +} + +type ResolveInstallRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ScopeSlug string `protobuf:"bytes,1,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + PluginName string `protobuf:"bytes,2,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"` + VersionOrChannel string `protobuf:"bytes,3,opt,name=version_or_channel,json=versionOrChannel,proto3" json:"version_or_channel,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveInstallRequest) Reset() { + *x = ResolveInstallRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveInstallRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveInstallRequest) ProtoMessage() {} + +func (x *ResolveInstallRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveInstallRequest.ProtoReflect.Descriptor instead. +func (*ResolveInstallRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{18} +} + +func (x *ResolveInstallRequest) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *ResolveInstallRequest) GetPluginName() string { + if x != nil { + return x.PluginName + } + return "" +} + +func (x *ResolveInstallRequest) GetVersionOrChannel() string { + if x != nil { + return x.VersionOrChannel + } + return "" +} + +type ResolveInstallResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + ScopeSlug string `protobuf:"bytes,2,opt,name=scope_slug,json=scopeSlug,proto3" json:"scope_slug,omitempty"` + PluginName string `protobuf:"bytes,3,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + ChannelPinned string `protobuf:"bytes,5,opt,name=channel_pinned,json=channelPinned,proto3" json:"channel_pinned,omitempty"` + ArchiveUrl string `protobuf:"bytes,6,opt,name=archive_url,json=archiveUrl,proto3" json:"archive_url,omitempty"` + ArchiveSha256 string `protobuf:"bytes,7,opt,name=archive_sha256,json=archiveSha256,proto3" json:"archive_sha256,omitempty"` + SdkConstraint string `protobuf:"bytes,8,opt,name=sdk_constraint,json=sdkConstraint,proto3" json:"sdk_constraint,omitempty"` + Requires []*Requirement `protobuf:"bytes,9,rep,name=requires,proto3" json:"requires,omitempty"` + Yanked bool `protobuf:"varint,10,opt,name=yanked,proto3" json:"yanked,omitempty"` + Warnings []string `protobuf:"bytes,11,rep,name=warnings,proto3" json:"warnings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveInstallResponse) Reset() { + *x = ResolveInstallResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveInstallResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveInstallResponse) ProtoMessage() {} + +func (x *ResolveInstallResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveInstallResponse.ProtoReflect.Descriptor instead. +func (*ResolveInstallResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{19} +} + +func (x *ResolveInstallResponse) GetVersionId() string { + if x != nil { + return x.VersionId + } + return "" +} + +func (x *ResolveInstallResponse) GetScopeSlug() string { + if x != nil { + return x.ScopeSlug + } + return "" +} + +func (x *ResolveInstallResponse) GetPluginName() string { + if x != nil { + return x.PluginName + } + return "" +} + +func (x *ResolveInstallResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ResolveInstallResponse) GetChannelPinned() string { + if x != nil { + return x.ChannelPinned + } + return "" +} + +func (x *ResolveInstallResponse) GetArchiveUrl() string { + if x != nil { + return x.ArchiveUrl + } + return "" +} + +func (x *ResolveInstallResponse) GetArchiveSha256() string { + if x != nil { + return x.ArchiveSha256 + } + return "" +} + +func (x *ResolveInstallResponse) GetSdkConstraint() string { + if x != nil { + return x.SdkConstraint + } + return "" +} + +func (x *ResolveInstallResponse) GetRequires() []*Requirement { + if x != nil { + return x.Requires + } + return nil +} + +func (x *ResolveInstallResponse) GetYanked() bool { + if x != nil { + return x.Yanked + } + return false +} + +func (x *ResolveInstallResponse) GetWarnings() []string { + if x != nil { + return x.Warnings + } + return nil +} + +type PublishVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` + GitRef string `protobuf:"bytes,2,opt,name=git_ref,json=gitRef,proto3" json:"git_ref,omitempty"` + Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"` + ReadmeMd string `protobuf:"bytes,4,opt,name=readme_md,json=readmeMd,proto3" json:"readme_md,omitempty"` + ChangelogMd string `protobuf:"bytes,5,opt,name=changelog_md,json=changelogMd,proto3" json:"changelog_md,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublishVersionRequest) Reset() { + *x = PublishVersionRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublishVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishVersionRequest) ProtoMessage() {} + +func (x *PublishVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishVersionRequest.ProtoReflect.Descriptor instead. +func (*PublishVersionRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{20} +} + +func (x *PublishVersionRequest) GetPluginId() string { + if x != nil { + return x.PluginId + } + return "" +} + +func (x *PublishVersionRequest) GetGitRef() string { + if x != nil { + return x.GitRef + } + return "" +} + +func (x *PublishVersionRequest) GetChannel() string { + if x != nil { + return x.Channel + } + return "" +} + +func (x *PublishVersionRequest) GetReadmeMd() string { + if x != nil { + return x.ReadmeMd + } + return "" +} + +func (x *PublishVersionRequest) GetChangelogMd() string { + if x != nil { + return x.ChangelogMd + } + return "" +} + +type PublishVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + ArchiveUrl string `protobuf:"bytes,2,opt,name=archive_url,json=archiveUrl,proto3" json:"archive_url,omitempty"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublishVersionResponse) Reset() { + *x = PublishVersionResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublishVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishVersionResponse) ProtoMessage() {} + +func (x *PublishVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishVersionResponse.ProtoReflect.Descriptor instead. +func (*PublishVersionResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{21} +} + +func (x *PublishVersionResponse) GetVersion() *Version { + if x != nil { + return x.Version + } + return nil +} + +func (x *PublishVersionResponse) GetArchiveUrl() string { + if x != nil { + return x.ArchiveUrl + } + return "" +} + +func (x *PublishVersionResponse) GetWarnings() []string { + if x != nil { + return x.Warnings + } + return nil +} + +type StartDeviceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scopes []string `protobuf:"bytes,1,rep,name=scopes,proto3" json:"scopes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartDeviceRequest) Reset() { + *x = StartDeviceRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartDeviceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartDeviceRequest) ProtoMessage() {} + +func (x *StartDeviceRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartDeviceRequest.ProtoReflect.Descriptor instead. +func (*StartDeviceRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{22} +} + +func (x *StartDeviceRequest) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +type StartDeviceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceCode string `protobuf:"bytes,1,opt,name=device_code,json=deviceCode,proto3" json:"device_code,omitempty"` + UserCode string `protobuf:"bytes,2,opt,name=user_code,json=userCode,proto3" json:"user_code,omitempty"` + VerificationUri string `protobuf:"bytes,3,opt,name=verification_uri,json=verificationUri,proto3" json:"verification_uri,omitempty"` + IntervalSeconds int32 `protobuf:"varint,4,opt,name=interval_seconds,json=intervalSeconds,proto3" json:"interval_seconds,omitempty"` + ExpiresInSeconds int32 `protobuf:"varint,5,opt,name=expires_in_seconds,json=expiresInSeconds,proto3" json:"expires_in_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartDeviceResponse) Reset() { + *x = StartDeviceResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartDeviceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartDeviceResponse) ProtoMessage() {} + +func (x *StartDeviceResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartDeviceResponse.ProtoReflect.Descriptor instead. +func (*StartDeviceResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{23} +} + +func (x *StartDeviceResponse) GetDeviceCode() string { + if x != nil { + return x.DeviceCode + } + return "" +} + +func (x *StartDeviceResponse) GetUserCode() string { + if x != nil { + return x.UserCode + } + return "" +} + +func (x *StartDeviceResponse) GetVerificationUri() string { + if x != nil { + return x.VerificationUri + } + return "" +} + +func (x *StartDeviceResponse) GetIntervalSeconds() int32 { + if x != nil { + return x.IntervalSeconds + } + return 0 +} + +func (x *StartDeviceResponse) GetExpiresInSeconds() int32 { + if x != nil { + return x.ExpiresInSeconds + } + return 0 +} + +type PollDeviceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceCode string `protobuf:"bytes,1,opt,name=device_code,json=deviceCode,proto3" json:"device_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PollDeviceRequest) Reset() { + *x = PollDeviceRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PollDeviceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PollDeviceRequest) ProtoMessage() {} + +func (x *PollDeviceRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PollDeviceRequest.ProtoReflect.Descriptor instead. +func (*PollDeviceRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{24} +} + +func (x *PollDeviceRequest) GetDeviceCode() string { + if x != nil { + return x.DeviceCode + } + return "" +} + +type PollDeviceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PollDeviceResponse) Reset() { + *x = PollDeviceResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PollDeviceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PollDeviceResponse) ProtoMessage() {} + +func (x *PollDeviceResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PollDeviceResponse.ProtoReflect.Descriptor instead. +func (*PollDeviceResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{25} +} + +func (x *PollDeviceResponse) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *PollDeviceResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +type ApproveDeviceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserCode string `protobuf:"bytes,1,opt,name=user_code,json=userCode,proto3" json:"user_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApproveDeviceRequest) Reset() { + *x = ApproveDeviceRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveDeviceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveDeviceRequest) ProtoMessage() {} + +func (x *ApproveDeviceRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveDeviceRequest.ProtoReflect.Descriptor instead. +func (*ApproveDeviceRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{26} +} + +func (x *ApproveDeviceRequest) GetUserCode() string { + if x != nil { + return x.UserCode + } + return "" +} + +type ApproveDeviceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApproveDeviceResponse) Reset() { + *x = ApproveDeviceResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveDeviceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveDeviceResponse) ProtoMessage() {} + +func (x *ApproveDeviceResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveDeviceResponse.ProtoReflect.Descriptor instead. +func (*ApproveDeviceResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{27} +} + +type WhoamiRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WhoamiRequest) Reset() { + *x = WhoamiRequest{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WhoamiRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WhoamiRequest) ProtoMessage() {} + +func (x *WhoamiRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WhoamiRequest.ProtoReflect.Descriptor instead. +func (*WhoamiRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{28} +} + +type WhoamiResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WhoamiResponse) Reset() { + *x = WhoamiResponse{} + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WhoamiResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WhoamiResponse) ProtoMessage() {} + +func (x *WhoamiResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_v1_plugin_registry_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WhoamiResponse.ProtoReflect.Descriptor instead. +func (*WhoamiResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_v1_plugin_registry_proto_rawDescGZIP(), []int{29} +} + +func (x *WhoamiResponse) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *WhoamiResponse) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *WhoamiResponse) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +var File_orchestrator_v1_plugin_registry_proto protoreflect.FileDescriptor + +const file_orchestrator_v1_plugin_registry_proto_rawDesc = "" + + "\n" + + "%orchestrator/v1/plugin_registry.proto\x12\x0forchestrator.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x89\x01\n" + + "\x05Scope\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04slug\x18\x02 \x01(\tR\x04slug\x12!\n" + + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\xa5\x02\n" + + "\x06Plugin\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" + + "\n" + + "scope_slug\x18\x02 \x01(\tR\tscopeSlug\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12\x1e\n" + + "\n" + + "visibility\x18\x04 \x01(\tR\n" + + "visibility\x12\x18\n" + + "\apremium\x18\x05 \x01(\bR\apremium\x12 \n" + + "\vdescription\x18\x06 \x01(\tR\vdescription\x12!\n" + + "\fhomepage_url\x18\a \x01(\tR\vhomepageUrl\x12\x1e\n" + + "\n" + + "categories\x18\b \x03(\tR\n" + + "categories\x129\n" + + "\n" + + "updated_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xea\x02\n" + + "\aVersion\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" + + "\tplugin_id\x18\x02 \x01(\tR\bpluginId\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x12\x1d\n" + + "\n" + + "git_commit\x18\x04 \x01(\tR\tgitCommit\x12\x17\n" + + "\agit_tag\x18\x05 \x01(\tR\x06gitTag\x12=\n" + + "\fpublished_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\vpublishedAt\x12\x16\n" + + "\x06yanked\x18\a \x01(\bR\x06yanked\x12%\n" + + "\x0esdk_constraint\x18\b \x01(\tR\rsdkConstraint\x122\n" + + "\x15source_archive_sha256\x18\t \x01(\tR\x13sourceArchiveSha256\x12.\n" + + "\x13source_archive_size\x18\n" + + " \x01(\x03R\x11sourceArchiveSize\"i\n" + + "\vRequirement\x12\x1d\n" + + "\n" + + "scope_slug\x18\x01 \x01(\tR\tscopeSlug\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12'\n" + + "\x0fconstraint_expr\x18\x03 \x01(\tR\x0econstraintExpr\"K\n" + + "\x12CreateScopeRequest\x12\x12\n" + + "\x04slug\x18\x01 \x01(\tR\x04slug\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\"C\n" + + "\x13CreateScopeResponse\x12,\n" + + "\x05scope\x18\x01 \x01(\v2\x16.orchestrator.v1.ScopeR\x05scope\"\x15\n" + + "\x13ListMyScopesRequest\"F\n" + + "\x14ListMyScopesResponse\x12.\n" + + "\x06scopes\x18\x01 \x03(\v2\x16.orchestrator.v1.ScopeR\x06scopes\"%\n" + + "\x0fGetScopeRequest\x12\x12\n" + + "\x04slug\x18\x01 \x01(\tR\x04slug\"s\n" + + "\x10GetScopeResponse\x12,\n" + + "\x05scope\x18\x01 \x01(\v2\x16.orchestrator.v1.ScopeR\x05scope\x121\n" + + "\aplugins\x18\x02 \x03(\v2\x17.orchestrator.v1.PluginR\aplugins\"j\n" + + "\x13CreatePluginRequest\x12\x1d\n" + + "\n" + + "scope_slug\x18\x01 \x01(\tR\tscopeSlug\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\"m\n" + + "\x14CreatePluginResponse\x12/\n" + + "\x06plugin\x18\x01 \x01(\v2\x17.orchestrator.v1.PluginR\x06plugin\x12$\n" + + "\x0egit_remote_url\x18\x02 \x01(\tR\fgitRemoteUrl\"E\n" + + "\x10GetPluginRequest\x12\x1d\n" + + "\n" + + "scope_slug\x18\x01 \x01(\tR\tscopeSlug\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\x85\x02\n" + + "\x11GetPluginResponse\x12/\n" + + "\x06plugin\x18\x01 \x01(\v2\x17.orchestrator.v1.PluginR\x06plugin\x124\n" + + "\bversions\x18\x02 \x03(\v2\x18.orchestrator.v1.VersionR\bversions\x12L\n" + + "\bchannels\x18\x03 \x03(\v20.orchestrator.v1.GetPluginResponse.ChannelsEntryR\bchannels\x1a;\n" + + "\rChannelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"X\n" + + "\x12ListPluginsRequest\x12\x14\n" + + "\x05limit\x18\x01 \x01(\x05R\x05limit\x12\x16\n" + + "\x06offset\x18\x02 \x01(\x05R\x06offset\x12\x14\n" + + "\x05query\x18\x03 \x01(\tR\x05query\"H\n" + + "\x13ListPluginsResponse\x121\n" + + "\aplugins\x18\x01 \x03(\v2\x17.orchestrator.v1.PluginR\aplugins\"m\n" + + "\x11GetVersionRequest\x12\x1d\n" + + "\n" + + "scope_slug\x18\x01 \x01(\tR\tscopeSlug\x12\x1f\n" + + "\vplugin_name\x18\x02 \x01(\tR\n" + + "pluginName\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\"\xc2\x01\n" + + "\x12GetVersionResponse\x122\n" + + "\aversion\x18\x01 \x01(\v2\x18.orchestrator.v1.VersionR\aversion\x128\n" + + "\brequires\x18\x02 \x03(\v2\x1c.orchestrator.v1.RequirementR\brequires\x12\x1b\n" + + "\treadme_md\x18\x03 \x01(\tR\breadmeMd\x12!\n" + + "\fchangelog_md\x18\x04 \x01(\tR\vchangelogMd\"\x85\x01\n" + + "\x15ResolveInstallRequest\x12\x1d\n" + + "\n" + + "scope_slug\x18\x01 \x01(\tR\tscopeSlug\x12\x1f\n" + + "\vplugin_name\x18\x02 \x01(\tR\n" + + "pluginName\x12,\n" + + "\x12version_or_channel\x18\x03 \x01(\tR\x10versionOrChannel\"\x95\x03\n" + + "\x16ResolveInstallResponse\x12\x1d\n" + + "\n" + + "version_id\x18\x01 \x01(\tR\tversionId\x12\x1d\n" + + "\n" + + "scope_slug\x18\x02 \x01(\tR\tscopeSlug\x12\x1f\n" + + "\vplugin_name\x18\x03 \x01(\tR\n" + + "pluginName\x12\x18\n" + + "\aversion\x18\x04 \x01(\tR\aversion\x12%\n" + + "\x0echannel_pinned\x18\x05 \x01(\tR\rchannelPinned\x12\x1f\n" + + "\varchive_url\x18\x06 \x01(\tR\n" + + "archiveUrl\x12%\n" + + "\x0earchive_sha256\x18\a \x01(\tR\rarchiveSha256\x12%\n" + + "\x0esdk_constraint\x18\b \x01(\tR\rsdkConstraint\x128\n" + + "\brequires\x18\t \x03(\v2\x1c.orchestrator.v1.RequirementR\brequires\x12\x16\n" + + "\x06yanked\x18\n" + + " \x01(\bR\x06yanked\x12\x1a\n" + + "\bwarnings\x18\v \x03(\tR\bwarnings\"\xa7\x01\n" + + "\x15PublishVersionRequest\x12\x1b\n" + + "\tplugin_id\x18\x01 \x01(\tR\bpluginId\x12\x17\n" + + "\agit_ref\x18\x02 \x01(\tR\x06gitRef\x12\x18\n" + + "\achannel\x18\x03 \x01(\tR\achannel\x12\x1b\n" + + "\treadme_md\x18\x04 \x01(\tR\breadmeMd\x12!\n" + + "\fchangelog_md\x18\x05 \x01(\tR\vchangelogMd\"\x89\x01\n" + + "\x16PublishVersionResponse\x122\n" + + "\aversion\x18\x01 \x01(\v2\x18.orchestrator.v1.VersionR\aversion\x12\x1f\n" + + "\varchive_url\x18\x02 \x01(\tR\n" + + "archiveUrl\x12\x1a\n" + + "\bwarnings\x18\x03 \x03(\tR\bwarnings\",\n" + + "\x12StartDeviceRequest\x12\x16\n" + + "\x06scopes\x18\x01 \x03(\tR\x06scopes\"\xd7\x01\n" + + "\x13StartDeviceResponse\x12\x1f\n" + + "\vdevice_code\x18\x01 \x01(\tR\n" + + "deviceCode\x12\x1b\n" + + "\tuser_code\x18\x02 \x01(\tR\buserCode\x12)\n" + + "\x10verification_uri\x18\x03 \x01(\tR\x0fverificationUri\x12)\n" + + "\x10interval_seconds\x18\x04 \x01(\x05R\x0fintervalSeconds\x12,\n" + + "\x12expires_in_seconds\x18\x05 \x01(\x05R\x10expiresInSeconds\"4\n" + + "\x11PollDeviceRequest\x12\x1f\n" + + "\vdevice_code\x18\x01 \x01(\tR\n" + + "deviceCode\"O\n" + + "\x12PollDeviceResponse\x12!\n" + + "\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12\x16\n" + + "\x06status\x18\x02 \x01(\tR\x06status\"3\n" + + "\x14ApproveDeviceRequest\x12\x1b\n" + + "\tuser_code\x18\x01 \x01(\tR\buserCode\"\x17\n" + + "\x15ApproveDeviceResponse\"\x0f\n" + + "\rWhoamiRequest\"b\n" + + "\x0eWhoamiResponse\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12\x14\n" + + "\x05email\x18\x02 \x01(\tR\x05email\x12!\n" + + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName2\x9c\x02\n" + + "\x12PluginScopeService\x12X\n" + + "\vCreateScope\x12#.orchestrator.v1.CreateScopeRequest\x1a$.orchestrator.v1.CreateScopeResponse\x12[\n" + + "\fListMyScopes\x12$.orchestrator.v1.ListMyScopesRequest\x1a%.orchestrator.v1.ListMyScopesResponse\x12O\n" + + "\bGetScope\x12 .orchestrator.v1.GetScopeRequest\x1a!.orchestrator.v1.GetScopeResponse2\xdc\x03\n" + + "\x15PluginRegistryService\x12[\n" + + "\fCreatePlugin\x12$.orchestrator.v1.CreatePluginRequest\x1a%.orchestrator.v1.CreatePluginResponse\x12R\n" + + "\tGetPlugin\x12!.orchestrator.v1.GetPluginRequest\x1a\".orchestrator.v1.GetPluginResponse\x12X\n" + + "\vListPlugins\x12#.orchestrator.v1.ListPluginsRequest\x1a$.orchestrator.v1.ListPluginsResponse\x12U\n" + + "\n" + + "GetVersion\x12\".orchestrator.v1.GetVersionRequest\x1a#.orchestrator.v1.GetVersionResponse\x12a\n" + + "\x0eResolveInstall\x12&.orchestrator.v1.ResolveInstallRequest\x1a'.orchestrator.v1.ResolveInstallResponse2y\n" + + "\x14PluginPublishService\x12a\n" + + "\x0ePublishVersion\x12&.orchestrator.v1.PublishVersionRequest\x1a'.orchestrator.v1.PublishVersionResponse2\xef\x02\n" + + "\x11PluginAuthService\x12X\n" + + "\vStartDevice\x12#.orchestrator.v1.StartDeviceRequest\x1a$.orchestrator.v1.StartDeviceResponse\x12U\n" + + "\n" + + "PollDevice\x12\".orchestrator.v1.PollDeviceRequest\x1a#.orchestrator.v1.PollDeviceResponse\x12^\n" + + "\rApproveDevice\x12%.orchestrator.v1.ApproveDeviceRequest\x1a&.orchestrator.v1.ApproveDeviceResponse\x12I\n" + + "\x06Whoami\x12\x1e.orchestrator.v1.WhoamiRequest\x1a\x1f.orchestrator.v1.WhoamiResponseB\xd6\x01\n" + + "\x13com.orchestrator.v1B\x13PluginRegistryProtoP\x01ZMgit.dev.alexdunmow.com/block/core/internal/api/orchestrator/v1;orchestratorv1\xa2\x02\x03OXX\xaa\x02\x0fOrchestrator.V1\xca\x02\x0fOrchestrator\\V1\xe2\x02\x1bOrchestrator\\V1\\GPBMetadata\xea\x02\x10Orchestrator::V1b\x06proto3" + +var ( + file_orchestrator_v1_plugin_registry_proto_rawDescOnce sync.Once + file_orchestrator_v1_plugin_registry_proto_rawDescData []byte +) + +func file_orchestrator_v1_plugin_registry_proto_rawDescGZIP() []byte { + file_orchestrator_v1_plugin_registry_proto_rawDescOnce.Do(func() { + file_orchestrator_v1_plugin_registry_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_orchestrator_v1_plugin_registry_proto_rawDesc), len(file_orchestrator_v1_plugin_registry_proto_rawDesc))) + }) + return file_orchestrator_v1_plugin_registry_proto_rawDescData +} + +var file_orchestrator_v1_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_orchestrator_v1_plugin_registry_proto_goTypes = []any{ + (*Scope)(nil), // 0: orchestrator.v1.Scope + (*Plugin)(nil), // 1: orchestrator.v1.Plugin + (*Version)(nil), // 2: orchestrator.v1.Version + (*Requirement)(nil), // 3: orchestrator.v1.Requirement + (*CreateScopeRequest)(nil), // 4: orchestrator.v1.CreateScopeRequest + (*CreateScopeResponse)(nil), // 5: orchestrator.v1.CreateScopeResponse + (*ListMyScopesRequest)(nil), // 6: orchestrator.v1.ListMyScopesRequest + (*ListMyScopesResponse)(nil), // 7: orchestrator.v1.ListMyScopesResponse + (*GetScopeRequest)(nil), // 8: orchestrator.v1.GetScopeRequest + (*GetScopeResponse)(nil), // 9: orchestrator.v1.GetScopeResponse + (*CreatePluginRequest)(nil), // 10: orchestrator.v1.CreatePluginRequest + (*CreatePluginResponse)(nil), // 11: orchestrator.v1.CreatePluginResponse + (*GetPluginRequest)(nil), // 12: orchestrator.v1.GetPluginRequest + (*GetPluginResponse)(nil), // 13: orchestrator.v1.GetPluginResponse + (*ListPluginsRequest)(nil), // 14: orchestrator.v1.ListPluginsRequest + (*ListPluginsResponse)(nil), // 15: orchestrator.v1.ListPluginsResponse + (*GetVersionRequest)(nil), // 16: orchestrator.v1.GetVersionRequest + (*GetVersionResponse)(nil), // 17: orchestrator.v1.GetVersionResponse + (*ResolveInstallRequest)(nil), // 18: orchestrator.v1.ResolveInstallRequest + (*ResolveInstallResponse)(nil), // 19: orchestrator.v1.ResolveInstallResponse + (*PublishVersionRequest)(nil), // 20: orchestrator.v1.PublishVersionRequest + (*PublishVersionResponse)(nil), // 21: orchestrator.v1.PublishVersionResponse + (*StartDeviceRequest)(nil), // 22: orchestrator.v1.StartDeviceRequest + (*StartDeviceResponse)(nil), // 23: orchestrator.v1.StartDeviceResponse + (*PollDeviceRequest)(nil), // 24: orchestrator.v1.PollDeviceRequest + (*PollDeviceResponse)(nil), // 25: orchestrator.v1.PollDeviceResponse + (*ApproveDeviceRequest)(nil), // 26: orchestrator.v1.ApproveDeviceRequest + (*ApproveDeviceResponse)(nil), // 27: orchestrator.v1.ApproveDeviceResponse + (*WhoamiRequest)(nil), // 28: orchestrator.v1.WhoamiRequest + (*WhoamiResponse)(nil), // 29: orchestrator.v1.WhoamiResponse + nil, // 30: orchestrator.v1.GetPluginResponse.ChannelsEntry + (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp +} +var file_orchestrator_v1_plugin_registry_proto_depIdxs = []int32{ + 31, // 0: orchestrator.v1.Scope.created_at:type_name -> google.protobuf.Timestamp + 31, // 1: orchestrator.v1.Plugin.updated_at:type_name -> google.protobuf.Timestamp + 31, // 2: orchestrator.v1.Version.published_at:type_name -> google.protobuf.Timestamp + 0, // 3: orchestrator.v1.CreateScopeResponse.scope:type_name -> orchestrator.v1.Scope + 0, // 4: orchestrator.v1.ListMyScopesResponse.scopes:type_name -> orchestrator.v1.Scope + 0, // 5: orchestrator.v1.GetScopeResponse.scope:type_name -> orchestrator.v1.Scope + 1, // 6: orchestrator.v1.GetScopeResponse.plugins:type_name -> orchestrator.v1.Plugin + 1, // 7: orchestrator.v1.CreatePluginResponse.plugin:type_name -> orchestrator.v1.Plugin + 1, // 8: orchestrator.v1.GetPluginResponse.plugin:type_name -> orchestrator.v1.Plugin + 2, // 9: orchestrator.v1.GetPluginResponse.versions:type_name -> orchestrator.v1.Version + 30, // 10: orchestrator.v1.GetPluginResponse.channels:type_name -> orchestrator.v1.GetPluginResponse.ChannelsEntry + 1, // 11: orchestrator.v1.ListPluginsResponse.plugins:type_name -> orchestrator.v1.Plugin + 2, // 12: orchestrator.v1.GetVersionResponse.version:type_name -> orchestrator.v1.Version + 3, // 13: orchestrator.v1.GetVersionResponse.requires:type_name -> orchestrator.v1.Requirement + 3, // 14: orchestrator.v1.ResolveInstallResponse.requires:type_name -> orchestrator.v1.Requirement + 2, // 15: orchestrator.v1.PublishVersionResponse.version:type_name -> orchestrator.v1.Version + 4, // 16: orchestrator.v1.PluginScopeService.CreateScope:input_type -> orchestrator.v1.CreateScopeRequest + 6, // 17: orchestrator.v1.PluginScopeService.ListMyScopes:input_type -> orchestrator.v1.ListMyScopesRequest + 8, // 18: orchestrator.v1.PluginScopeService.GetScope:input_type -> orchestrator.v1.GetScopeRequest + 10, // 19: orchestrator.v1.PluginRegistryService.CreatePlugin:input_type -> orchestrator.v1.CreatePluginRequest + 12, // 20: orchestrator.v1.PluginRegistryService.GetPlugin:input_type -> orchestrator.v1.GetPluginRequest + 14, // 21: orchestrator.v1.PluginRegistryService.ListPlugins:input_type -> orchestrator.v1.ListPluginsRequest + 16, // 22: orchestrator.v1.PluginRegistryService.GetVersion:input_type -> orchestrator.v1.GetVersionRequest + 18, // 23: orchestrator.v1.PluginRegistryService.ResolveInstall:input_type -> orchestrator.v1.ResolveInstallRequest + 20, // 24: orchestrator.v1.PluginPublishService.PublishVersion:input_type -> orchestrator.v1.PublishVersionRequest + 22, // 25: orchestrator.v1.PluginAuthService.StartDevice:input_type -> orchestrator.v1.StartDeviceRequest + 24, // 26: orchestrator.v1.PluginAuthService.PollDevice:input_type -> orchestrator.v1.PollDeviceRequest + 26, // 27: orchestrator.v1.PluginAuthService.ApproveDevice:input_type -> orchestrator.v1.ApproveDeviceRequest + 28, // 28: orchestrator.v1.PluginAuthService.Whoami:input_type -> orchestrator.v1.WhoamiRequest + 5, // 29: orchestrator.v1.PluginScopeService.CreateScope:output_type -> orchestrator.v1.CreateScopeResponse + 7, // 30: orchestrator.v1.PluginScopeService.ListMyScopes:output_type -> orchestrator.v1.ListMyScopesResponse + 9, // 31: orchestrator.v1.PluginScopeService.GetScope:output_type -> orchestrator.v1.GetScopeResponse + 11, // 32: orchestrator.v1.PluginRegistryService.CreatePlugin:output_type -> orchestrator.v1.CreatePluginResponse + 13, // 33: orchestrator.v1.PluginRegistryService.GetPlugin:output_type -> orchestrator.v1.GetPluginResponse + 15, // 34: orchestrator.v1.PluginRegistryService.ListPlugins:output_type -> orchestrator.v1.ListPluginsResponse + 17, // 35: orchestrator.v1.PluginRegistryService.GetVersion:output_type -> orchestrator.v1.GetVersionResponse + 19, // 36: orchestrator.v1.PluginRegistryService.ResolveInstall:output_type -> orchestrator.v1.ResolveInstallResponse + 21, // 37: orchestrator.v1.PluginPublishService.PublishVersion:output_type -> orchestrator.v1.PublishVersionResponse + 23, // 38: orchestrator.v1.PluginAuthService.StartDevice:output_type -> orchestrator.v1.StartDeviceResponse + 25, // 39: orchestrator.v1.PluginAuthService.PollDevice:output_type -> orchestrator.v1.PollDeviceResponse + 27, // 40: orchestrator.v1.PluginAuthService.ApproveDevice:output_type -> orchestrator.v1.ApproveDeviceResponse + 29, // 41: orchestrator.v1.PluginAuthService.Whoami:output_type -> orchestrator.v1.WhoamiResponse + 29, // [29:42] is the sub-list for method output_type + 16, // [16:29] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_orchestrator_v1_plugin_registry_proto_init() } +func file_orchestrator_v1_plugin_registry_proto_init() { + if File_orchestrator_v1_plugin_registry_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_orchestrator_v1_plugin_registry_proto_rawDesc), len(file_orchestrator_v1_plugin_registry_proto_rawDesc)), + NumEnums: 0, + NumMessages: 31, + NumExtensions: 0, + NumServices: 4, + }, + GoTypes: file_orchestrator_v1_plugin_registry_proto_goTypes, + DependencyIndexes: file_orchestrator_v1_plugin_registry_proto_depIdxs, + MessageInfos: file_orchestrator_v1_plugin_registry_proto_msgTypes, + }.Build() + File_orchestrator_v1_plugin_registry_proto = out.File + file_orchestrator_v1_plugin_registry_proto_goTypes = nil + file_orchestrator_v1_plugin_registry_proto_depIdxs = nil +} diff --git a/proto/orchestrator/v1/plugin_registry.proto b/proto/orchestrator/v1/plugin_registry.proto new file mode 100644 index 0000000..fc00bd3 --- /dev/null +++ b/proto/orchestrator/v1/plugin_registry.proto @@ -0,0 +1,184 @@ +syntax = "proto3"; + +package orchestrator.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "git.dev.alexdunmow.com/block/ninja/orchestrator/internal/api/orchestrator/v1;orchestratorv1"; + +// PluginScopeService manages @scope namespaces. +service PluginScopeService { + rpc CreateScope(CreateScopeRequest) returns (CreateScopeResponse); + rpc ListMyScopes(ListMyScopesRequest) returns (ListMyScopesResponse); + rpc GetScope(GetScopeRequest) returns (GetScopeResponse); +} + +// PluginRegistryService is the read-side public API plus CreatePlugin. +service PluginRegistryService { + rpc CreatePlugin(CreatePluginRequest) returns (CreatePluginResponse); + rpc GetPlugin(GetPluginRequest) returns (GetPluginResponse); + rpc ListPlugins(ListPluginsRequest) returns (ListPluginsResponse); + rpc GetVersion(GetVersionRequest) returns (GetVersionResponse); + rpc ResolveInstall(ResolveInstallRequest) returns (ResolveInstallResponse); +} + +// PluginPublishService is called by the ninja CLI to publish a version. +service PluginPublishService { + rpc PublishVersion(PublishVersionRequest) returns (PublishVersionResponse); +} + +// PluginAuthService handles OAuth device flow used by ninja CLI. +service PluginAuthService { + rpc StartDevice(StartDeviceRequest) returns (StartDeviceResponse); + rpc PollDevice(PollDeviceRequest) returns (PollDeviceResponse); + rpc ApproveDevice(ApproveDeviceRequest) returns (ApproveDeviceResponse); + rpc Whoami(WhoamiRequest) returns (WhoamiResponse); +} + +// --- Shared messages --- + +message Scope { + string id = 1; + string slug = 2; + string display_name = 3; + google.protobuf.Timestamp created_at = 4; +} + +message Plugin { + string id = 1; + string scope_slug = 2; + string name = 3; + string visibility = 4; + bool premium = 5; + string description = 6; + string homepage_url = 7; + repeated string categories = 8; + google.protobuf.Timestamp updated_at = 9; +} + +message Version { + string id = 1; + string plugin_id = 2; + string version = 3; + string git_commit = 4; + string git_tag = 5; + google.protobuf.Timestamp published_at = 6; + bool yanked = 7; + string sdk_constraint = 8; + string source_archive_sha256 = 9; + int64 source_archive_size = 10; +} + +message Requirement { + string scope_slug = 1; + string name = 2; + string constraint_expr = 3; +} + +// --- Scope service --- + +message CreateScopeRequest { string slug = 1; string display_name = 2; } +message CreateScopeResponse { Scope scope = 1; } +message ListMyScopesRequest {} +message ListMyScopesResponse { repeated Scope scopes = 1; } +message GetScopeRequest { string slug = 1; } +message GetScopeResponse { Scope scope = 1; repeated Plugin plugins = 2; } + +// --- Registry service --- + +message CreatePluginRequest { + string scope_slug = 1; + string name = 2; + string description = 3; +} +message CreatePluginResponse { + Plugin plugin = 1; + string git_remote_url = 2; +} + +message GetPluginRequest { string scope_slug = 1; string name = 2; } +message GetPluginResponse { + Plugin plugin = 1; + repeated Version versions = 2; + map channels = 3; +} + +message ListPluginsRequest { + int32 limit = 1; + int32 offset = 2; + string query = 3; +} +message ListPluginsResponse { repeated Plugin plugins = 1; } + +message GetVersionRequest { + string scope_slug = 1; + string plugin_name = 2; + string version = 3; +} +message GetVersionResponse { + Version version = 1; + repeated Requirement requires = 2; + string readme_md = 3; + string changelog_md = 4; +} + +message ResolveInstallRequest { + string scope_slug = 1; + string plugin_name = 2; + string version_or_channel = 3; +} +message ResolveInstallResponse { + string version_id = 1; + string scope_slug = 2; + string plugin_name = 3; + string version = 4; + string channel_pinned = 5; + string archive_url = 6; + string archive_sha256 = 7; + string sdk_constraint = 8; + repeated Requirement requires = 9; + bool yanked = 10; + repeated string warnings = 11; +} + +// --- Publish service --- + +message PublishVersionRequest { + string plugin_id = 1; + string git_ref = 2; + string channel = 3; + string readme_md = 4; + string changelog_md = 5; +} +message PublishVersionResponse { + Version version = 1; + string archive_url = 2; + repeated string warnings = 3; +} + +// --- Auth service (device flow) --- + +message StartDeviceRequest { repeated string scopes = 1; } +message StartDeviceResponse { + string device_code = 1; + string user_code = 2; + string verification_uri = 3; + int32 interval_seconds = 4; + int32 expires_in_seconds = 5; +} + +message PollDeviceRequest { string device_code = 1; } +message PollDeviceResponse { + string access_token = 1; + string status = 2; +} + +message ApproveDeviceRequest { string user_code = 1; } +message ApproveDeviceResponse {} + +message WhoamiRequest {} +message WhoamiResponse { + string user_id = 1; + string email = 2; + string display_name = 3; +}