From 4961a6bbdb97214827703ce3da3bb4f100fc1704 Mon Sep 17 00:00:00 2001 From: Adam Babik Date: Wed, 22 May 2024 23:40:32 +0200 Subject: [PATCH] Separate project and runtime options in runme.yaml --- experimental/runme.yaml | 66 +- internal/cmd/beta/beta_cmd.go | 4 +- internal/config/autoconfig/autoconfig.go | 26 +- internal/config/autoconfig/autoconfig_test.go | 2 +- internal/config/config.go | 107 ++-- internal/config/config_test.go | 103 ++-- .../go/runme/config/v1alpha1/config.pb.go | 577 ++++++++++-------- .../ts/runme/config/v1alpha1/config_pb.d.ts | 189 +++--- .../ts/runme/config/v1alpha1/config_pb.js | 84 +-- .../proto/runme/config/v1alpha1/config.proto | 96 +-- testdata/beta/base.txtar | 8 +- testdata/beta/categories.txtar | 3 +- testdata/beta/failure.txtar | 3 +- testdata/beta/find_repo_upward.txtar | 8 +- testdata/beta/project_dir_nested.txtar | 8 +- testdata/beta/server.txtar | 3 +- 16 files changed, 670 insertions(+), 617 deletions(-) diff --git a/experimental/runme.yaml b/experimental/runme.yaml index 5c7845a81..6257f9926 100644 --- a/experimental/runme.yaml +++ b/experimental/runme.yaml @@ -6,10 +6,11 @@ # You can test it with the "runme beta" commands. version: v1alpha1 -# Indicate the root of the runme project. "." means that -# the project root directory will be used. +# Settings that apply on at the project level. project: - dir: "." + # Indicate the root of the runme project. "." means that + # the project root directory will be used. + root: "." # If true, the project root will be searched upwards starting from "dir". # If found, the repo root will be used as the project root. find_repo_upward: true @@ -18,38 +19,39 @@ project: - ".venv" disable_gitignore: false -# It's possible to point at a single file as well. -# filename: "README.md" + # It's possible to point the project at a single file. + # filename: "README.md" -# List of dotenv files to load. -env: - use_system_env: true - sources: - - ".env" - - ".env.local" + # List of dotenv files to load. + env: + use_system_env: false + sources: + - ".env" + - ".env.local" -# Optional Docker configuration to run code blocks in a container. -docker: - enabled: false - image: runme-runtime:latest - build: - context: ./experimental/docker - dockerfile: Dockerfile + # The list of filters to apply to blocks. + # "condition" must return a boolean value. + # You can learn about the syntax at https://expr-lang.org/docs/language-definition. + # Available fields are defined in [config.FilterDocumentEnv] and [config.FilterBlockEnv]. + filters: + # Do not allow unnamed code blocks. + # - type: "FILTER_TYPE_BLOCK" + # condition: "is_named" + # Do not allow code blocks without a language. + - type: "FILTER_TYPE_BLOCK" + condition: "language != ''" + # Do not allow code blocks starting with "test". + - type: "FILTER_TYPE_BLOCK" + condition: "!hasPrefix(name, 'test')" -# The list of filters to apply to blocks. -# "condition" must return a boolean value. -# You can learn about the syntax at https://expr-lang.org/docs/language-definition. -# Available fields are defined in [config.FilterDocumentEnv] and [config.FilterBlockEnv]. -filters: - # Do not allow unnamed code blocks. - # - type: "FILTER_TYPE_BLOCK" - # condition: "is_named" - # Do not allow code blocks without a language. - - type: "FILTER_TYPE_BLOCK" - condition: "language != ''" - # Do not allow code blocks starting with "test". - - type: "FILTER_TYPE_BLOCK" - condition: "!hasPrefix(name, 'test')" +runtime: + # Optional Docker configuration to run code blocks in a container. + docker: + enabled: false + image: runme-runtime:latest + build: + context: ./experimental/docker + dockerfile: Dockerfile server: # Also unix:///path/to/file.sock is supported. diff --git a/internal/cmd/beta/beta_cmd.go b/internal/cmd/beta/beta_cmd.go index 09c8e175f..c855eee0f 100644 --- a/internal/cmd/beta/beta_cmd.go +++ b/internal/cmd/beta/beta_cmd.go @@ -30,12 +30,12 @@ All commands use the runme.yaml configuration file.`, return autoconfig.Invoke(func(cfg *config.Config) error { // Override the filename if provided. if cFlags.filename != "" { - cfg.Filename = cFlags.filename + cfg.ProjectFilename = cFlags.filename } // Add a filter to run only tasks from the specified categories. if len(cFlags.categories) > 0 { - cfg.Filters = append(cfg.Filters, &config.Filter{ + cfg.ProjectFilters = append(cfg.ProjectFilters, &config.Filter{ Type: config.FilterTypeBlock, Condition: `len(intersection(categories, extra.categories)) > 0`, Extra: map[string]interface{}{"categories": cFlags.categories}, diff --git a/internal/config/autoconfig/autoconfig.go b/internal/config/autoconfig/autoconfig.go index 28a59c47e..0bb8a32e6 100644 --- a/internal/config/autoconfig/autoconfig.go +++ b/internal/config/autoconfig/autoconfig.go @@ -101,11 +101,11 @@ func getProject(c *config.Config, logger *zap.Logger) (*project.Project, error) project.WithLogger(logger), } - if c.Filename != "" { - return project.NewFileProject(c.Filename, opts...) + if c.ProjectFilename != "" { + return project.NewFileProject(c.ProjectFilename, opts...) } - projDir := c.ProjectDir + projDir := c.ProjectRoot // If no project directory is specified, use the current directory. if projDir == "" { projDir = "." @@ -113,12 +113,12 @@ func getProject(c *config.Config, logger *zap.Logger) (*project.Project, error) opts = append( opts, - project.WithIgnoreFilePatterns(c.IgnorePaths...), - project.WithRespectGitignore(!c.DisableGitignore), - project.WithEnvFilesReadOrder(c.EnvSourceFiles), + project.WithIgnoreFilePatterns(c.ProjectIgnorePaths...), + project.WithRespectGitignore(!c.ProjectDisableGitignore), + project.WithEnvFilesReadOrder(c.ProjectEnvSources), ) - if c.FindRepoUpward { + if c.ProjectFindRepoUpward { opts = append(opts, project.WithFindRepoUpward()) } @@ -128,7 +128,7 @@ func getProject(c *config.Config, logger *zap.Logger) (*project.Project, error) func getProjectFilters(c *config.Config) ([]project.Filter, error) { var filters []project.Filter - for _, filter := range c.Filters { + for _, filter := range c.ProjectFilters { filter := filter switch filter.Type { @@ -197,11 +197,11 @@ func getRootConfig(cfgLoader *config.Loader, userCfgDir UserConfigDir) (*config. } func getRuntime(c *config.Config, logger *zap.Logger) (command.Runtime, error) { - if c.DockerEnabled { + if c.RuntimeDockerEnabled { docker, err := dockerexec.New(&dockerexec.Options{ - BuildContext: c.DockerBuildContext, - Dockerfile: c.DockerBuildDockerfile, - Image: c.DockerImage, + BuildContext: c.RuntimeDockerBuildContext, + Dockerfile: c.RuntimeDockerBuildDockerfile, + Image: c.RuntimeDockerImage, Logger: logger, }) if err != nil { @@ -215,7 +215,7 @@ func getRuntime(c *config.Config, logger *zap.Logger) (command.Runtime, error) { func getSession(cfg *config.Config, proj *project.Project) (*command.Session, error) { sess := command.NewSession() - if cfg.UseSystemEnv { + if cfg.ProjectEnvUseSystemEnv { if err := sess.SetEnv(os.Environ()...); err != nil { return nil, err } diff --git a/internal/config/autoconfig/autoconfig_test.go b/internal/config/autoconfig/autoconfig_test.go index dd2fa84e8..03c2acf8a 100644 --- a/internal/config/autoconfig/autoconfig_test.go +++ b/internal/config/autoconfig/autoconfig_test.go @@ -17,7 +17,7 @@ func TestInvokeConfig(t *testing.T) { Data: []byte("Hello, World!"), }, "runme.yaml": { - Data: []byte(fmt.Sprintf("version: v1alpha1\nfilename: %s\n", "README.md")), + Data: []byte(fmt.Sprintf("version: v1alpha1\nproject:\n filename: %s\n", "README.md")), }, } diff --git a/internal/config/config.go b/internal/config/config.go index d745bd41a..7481d2b6e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -18,37 +18,28 @@ import ( // Config is a flatten configuration of runme.yaml. The purpose of it is to // unify all the different configuration versions into a single struct. type Config struct { - // Dir- or git-based project fields. - DisableGitignore bool - IgnorePaths []string - FindRepoUpward bool - ProjectDir string + ProjectRoot string + ProjectFilename string + ProjectFindRepoUpward bool + ProjectIgnorePaths []string + ProjectDisableGitignore bool + ProjectEnvUseSystemEnv bool + ProjectEnvSources []string + ProjectFilters []*Filter + + RuntimeDockerEnabled bool + RuntimeDockerImage string + RuntimeDockerBuildContext string + RuntimeDockerBuildDockerfile string - // Filemode fields. - Filename string - - // Environment variable fields. - EnvSourceFiles []string - UseSystemEnv bool - - Filters []*Filter - - // Log related fields. - LogEnabled bool - LogPath string - LogVerbose bool - - // Server related fields. ServerAddress string ServerTLSEnabled bool ServerTLSCertFile string ServerTLSKeyFile string - // Docker configuration. - DockerEnabled bool - DockerImage string - DockerBuildContext string - DockerBuildDockerfile string + LogEnabled bool + LogPath string + LogVerbose bool } func ParseYAML(data []byte) (*Config, error) { @@ -122,10 +113,12 @@ func parseYAMLv1alpha1(data []byte) (*configv1alpha1.Config, error) { func configV1alpha1ToConfig(c *configv1alpha1.Config) (*Config, error) { project := c.GetProject() + runtime := c.GetRuntime() + server := c.GetServer() log := c.GetLog() var filters []*Filter - for _, f := range c.GetFilters() { + for _, f := range c.GetProject().GetFilters() { filters = append(filters, &Filter{ Type: f.GetType().String(), Condition: f.GetCondition(), @@ -133,31 +126,28 @@ func configV1alpha1ToConfig(c *configv1alpha1.Config) (*Config, error) { } cfg := &Config{ - ProjectDir: project.GetDir(), - FindRepoUpward: project.GetFindRepoUpward(), - IgnorePaths: project.GetIgnorePaths(), - DisableGitignore: project.GetDisableGitignore(), - - Filename: c.GetFilename(), - - UseSystemEnv: c.GetEnv().GetUseSystemEnv(), - EnvSourceFiles: c.GetEnv().GetSources(), - - Filters: filters, + ProjectRoot: project.GetRoot(), + ProjectFilename: project.GetFilename(), + ProjectFindRepoUpward: project.GetFindRepoUpward(), + ProjectIgnorePaths: project.GetIgnorePaths(), + ProjectDisableGitignore: project.GetDisableGitignore(), + ProjectEnvUseSystemEnv: project.GetEnv().GetUseSystemEnv(), + ProjectEnvSources: project.GetEnv().GetSources(), + ProjectFilters: filters, + + RuntimeDockerEnabled: runtime.GetDocker().GetEnabled(), + RuntimeDockerImage: runtime.GetDocker().GetImage(), + RuntimeDockerBuildContext: runtime.GetDocker().GetBuild().GetContext(), + RuntimeDockerBuildDockerfile: runtime.GetDocker().GetBuild().GetDockerfile(), + + ServerAddress: server.GetAddress(), + ServerTLSEnabled: server.GetTls().GetEnabled(), + ServerTLSCertFile: server.GetTls().GetCertFile(), + ServerTLSKeyFile: server.GetTls().GetKeyFile(), LogEnabled: log.GetEnabled(), LogPath: log.GetPath(), LogVerbose: log.GetVerbose(), - - ServerAddress: c.GetServer().GetAddress(), - ServerTLSEnabled: c.GetServer().GetTls().GetEnabled(), - ServerTLSCertFile: c.GetServer().GetTls().GetCertFile(), - ServerTLSKeyFile: c.GetServer().GetTls().GetKeyFile(), - - DockerEnabled: c.GetDocker().GetEnabled(), - DockerImage: c.GetDocker().GetImage(), - DockerBuildContext: c.GetDocker().GetBuild().GetContext(), - DockerBuildDockerfile: c.GetDocker().GetBuild().GetDockerfile(), } return cfg, nil @@ -169,38 +159,25 @@ func validateConfig(cfg *Config) error { cwd = "." } - if err := validateProjectDir(cfg, cwd); err != nil { + if err := validateInsideCwd(cfg.ProjectRoot, cwd); err != nil { return errors.Wrap(err, "failed to validate project dir") } - if err := validateFilename(cfg, cwd); err != nil { + if err := validateInsideCwd(cfg.ProjectFilename, cwd); err != nil { return errors.Wrap(err, "failed to validate filename") } return nil } -func validateProjectDir(cfg *Config, cwd string) error { - rel, err := filepath.Rel(cwd, filepath.Join(cwd, cfg.ProjectDir)) - if err != nil { - return errors.WithStack(err) - } - if strings.HasPrefix(rel, "..") { - return errors.New("outside of current working directory") - } - - return nil -} - -func validateFilename(cfg *Config, cwd string) error { - rel, err := filepath.Rel(cwd, filepath.Join(cwd, cfg.Filename)) +func validateInsideCwd(path, cwd string) error { + rel, err := filepath.Rel(cwd, filepath.Join(cwd, path)) if err != nil { return errors.WithStack(err) } if strings.HasPrefix(rel, "..") { - return errors.New("outside of current working directory") + return errors.New("outside of the current working directory") } - return nil } diff --git a/internal/config/config_test.go b/internal/config/config_test.go index d710b7123..7e2a64a23 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -21,34 +21,48 @@ func TestParseYAML(t *testing.T) { expectedConfig: testConfigV1alpha1, }, { - name: "minimal config v1alpha1", - rawConfig: "version: v1alpha1\nfilename: REAEDME.md\n", - expectedConfig: &Config{Filename: "REAEDME.md"}, - }, - { - name: "validate source", - rawConfig: "version: v1alpha1", - errorSubstring: "failed to validate v1alpha1 config: validation error:\n - source: exactly one field is required", + name: "only filename", + rawConfig: `version: v1alpha1 +project: + filename: REAEDME.md +`, + expectedConfig: &Config{ProjectFilename: "REAEDME.md"}, }, { - name: "project and filename", - rawConfig: "version: v1alpha1\nproject:\n dir: \".\"\nfilename: \"README.md\"\n", - errorSubstring: "error parsing \"project\", oneof runme.config.v1alpha1.Config.source is already set", + name: "root and filename", + rawConfig: `version: v1alpha1 +project: + root: "." + filename: README.md +`, + expectedConfig: &Config{ProjectRoot: ".", ProjectFilename: "README.md"}, }, { - name: "validate filter type", - rawConfig: "version: v1alpha1\nfilename: README.md\nfilters:\n - type: 3\n condition: \"name != ''\"\n", - errorSubstring: "failed to validate v1alpha1 config: validation error:\n - filters[0].type: value must be one of the defined enum values", + name: "validate filter type", + rawConfig: `version: v1alpha1 +project: + filename: README.md + filters: + - type: 3 + condition: "name != ''" +`, + errorSubstring: "failed to validate v1alpha1 config: validation error:\n - project.filters[0].type: value must be one of the defined enum values", }, { - name: "validate project within cwd", - rawConfig: "version: v1alpha1\nproject:\n dir: '..'\n", - errorSubstring: "failed to validate config: failed to validate project dir: outside of current working directory", + name: "validate project within cwd", + rawConfig: `version: v1alpha1 +project: + root: '..' +`, + errorSubstring: "failed to validate config: failed to validate project dir: outside of the current working directory", }, { - name: "validate filename within cwd", - rawConfig: "version: v1alpha1\nfilename: '../README.md'\n", - errorSubstring: "failed to validate config: failed to validate filename: outside of current working directory", + name: "validate filename within cwd", + rawConfig: `version: v1alpha1 +project: + filename: '../README.md' +`, + errorSubstring: "failed to validate config: failed to validate filename: outside of the current working directory", }, } @@ -80,27 +94,28 @@ var ( testConfigV1alpha1Raw = `version: v1alpha1 project: - dir: "." + root: "." find_repo_upward: true ignore: - "node_modules" - ".venv" disable_gitignore: false -env: - sources: - - ".env" + env: + sources: + - ".env" -filters: - - type: "FILTER_TYPE_BLOCK" - condition: "name != ''" + filters: + - type: "FILTER_TYPE_BLOCK" + condition: "name != ''" -docker: - enabled: false - image: "runme-runner:latest" - build: - context: "./experimental/docker" - dockerfile: "Dockerfile" +runtime: + docker: + enabled: false + image: "runme-runner:latest" + build: + context: "./experimental/docker" + dockerfile: "Dockerfile" log: enabled: true @@ -109,24 +124,22 @@ log: ` testConfigV1alpha1 = &Config{ - ProjectDir: ".", - FindRepoUpward: true, - IgnorePaths: []string{"node_modules", ".venv"}, - DisableGitignore: false, - - EnvSourceFiles: []string{".env"}, - - Filters: []*Filter{ + ProjectRoot: ".", + ProjectFindRepoUpward: true, + ProjectIgnorePaths: []string{"node_modules", ".venv"}, + ProjectDisableGitignore: false, + ProjectEnvSources: []string{".env"}, + ProjectFilters: []*Filter{ { Type: "FILTER_TYPE_BLOCK", Condition: "name != ''", }, }, - DockerEnabled: false, - DockerImage: "runme-runner:latest", - DockerBuildContext: "./experimental/docker", - DockerBuildDockerfile: "Dockerfile", + RuntimeDockerEnabled: false, + RuntimeDockerImage: "runme-runner:latest", + RuntimeDockerBuildContext: "./experimental/docker", + RuntimeDockerBuildDockerfile: "Dockerfile", LogEnabled: true, LogPath: "/var/tmp/runme.log", diff --git a/pkg/api/gen/proto/go/runme/config/v1alpha1/config.pb.go b/pkg/api/gen/proto/go/runme/config/v1alpha1/config.pb.go index d5516a77a..b69a7178f 100644 --- a/pkg/api/gen/proto/go/runme/config/v1alpha1/config.pb.go +++ b/pkg/api/gen/proto/go/runme/config/v1alpha1/config.pb.go @@ -76,23 +76,10 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // source is a source of Markdown files to look into. - // - // Types that are assignable to Source: - // - // *Config_Project_ - // *Config_Filename - Source isConfig_Source `protobuf_oneof:"source"` - // env is the environment variables configuration. - Env *Config_Env `protobuf:"bytes,3,opt,name=env,proto3" json:"env,omitempty"` - // filters is a list of filters to apply. - // Filters can be applied to documents or - // individual code blocks. - Filters []*Config_Filter `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters,omitempty"` - // log contains the log configuration. - Log *Config_Log `protobuf:"bytes,7,opt,name=log,proto3" json:"log,omitempty"` - Server *Config_Server `protobuf:"bytes,8,opt,name=server,proto3" json:"server,omitempty"` - Docker *Config_Docker `protobuf:"bytes,9,opt,name=docker,proto3" json:"docker,omitempty"` + Project *Config_Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + Runtime *Config_Runtime `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"` + Server *Config_Server `protobuf:"bytes,3,opt,name=server,proto3" json:"server,omitempty"` + Log *Config_Log `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty"` } func (x *Config) Reset() { @@ -127,44 +114,16 @@ func (*Config) Descriptor() ([]byte, []int) { return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0} } -func (m *Config) GetSource() isConfig_Source { - if m != nil { - return m.Source - } - return nil -} - func (x *Config) GetProject() *Config_Project { - if x, ok := x.GetSource().(*Config_Project_); ok { - return x.Project - } - return nil -} - -func (x *Config) GetFilename() string { - if x, ok := x.GetSource().(*Config_Filename); ok { - return x.Filename - } - return "" -} - -func (x *Config) GetEnv() *Config_Env { if x != nil { - return x.Env - } - return nil -} - -func (x *Config) GetFilters() []*Config_Filter { - if x != nil { - return x.Filters + return x.Project } return nil } -func (x *Config) GetLog() *Config_Log { +func (x *Config) GetRuntime() *Config_Runtime { if x != nil { - return x.Log + return x.Runtime } return nil } @@ -176,45 +135,40 @@ func (x *Config) GetServer() *Config_Server { return nil } -func (x *Config) GetDocker() *Config_Docker { +func (x *Config) GetLog() *Config_Log { if x != nil { - return x.Docker + return x.Log } return nil } -type isConfig_Source interface { - isConfig_Source() -} - -type Config_Project_ struct { - // project indicates a dir-based source typically including multiple Markdown files. - Project *Config_Project `protobuf:"bytes,1,opt,name=project,proto3,oneof"` -} - -type Config_Filename struct { - // filename indicates a single Markdown file. - Filename string `protobuf:"bytes,2,opt,name=filename,proto3,oneof"` -} - -func (*Config_Project_) isConfig_Source() {} - -func (*Config_Filename) isConfig_Source() {} - type Config_Project struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // dir is the directory to look for Markdown files. - Dir string `protobuf:"bytes,1,opt,name=dir,proto3" json:"dir,omitempty"` + // root is the root directory of the project. + Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` + // filename is the filename to look for in the project. + // It effectively narrows down to search code blocks + // within a single file. + // + // If root is empty, it should be the absolute path. + // Otherwise, it should be a relative path to the root. + Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` // find_repo_upward indicates whether to find the nearest Git repository upward. // This is useful to, for example, recognize .gitignore files. - FindRepoUpward bool `protobuf:"varint,2,opt,name=find_repo_upward,json=findRepoUpward,proto3" json:"find_repo_upward,omitempty"` + FindRepoUpward bool `protobuf:"varint,3,opt,name=find_repo_upward,json=findRepoUpward,proto3" json:"find_repo_upward,omitempty"` // ignore_paths is a list of paths to ignore relative to dir. - IgnorePaths []string `protobuf:"bytes,3,rep,name=ignore_paths,json=ignore,proto3" json:"ignore_paths,omitempty"` + IgnorePaths []string `protobuf:"bytes,4,rep,name=ignore_paths,json=ignore,proto3" json:"ignore_paths,omitempty"` // disable_gitignore indicates whether to disable the .gitignore file. - DisableGitignore bool `protobuf:"varint,4,opt,name=disable_gitignore,json=disableGitignore,proto3" json:"disable_gitignore,omitempty"` + DisableGitignore bool `protobuf:"varint,5,opt,name=disable_gitignore,json=disableGitignore,proto3" json:"disable_gitignore,omitempty"` + // env is the environment variables configuration. + Env *Config_Env `protobuf:"bytes,6,opt,name=env,proto3" json:"env,omitempty"` + // filters is a list of filters to apply. + // They can be applied to documents or + // individual code blocks. + Filters []*Config_Filter `protobuf:"bytes,7,rep,name=filters,proto3" json:"filters,omitempty"` } func (x *Config_Project) Reset() { @@ -249,9 +203,16 @@ func (*Config_Project) Descriptor() ([]byte, []int) { return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 0} } -func (x *Config_Project) GetDir() string { +func (x *Config_Project) GetRoot() string { + if x != nil { + return x.Root + } + return "" +} + +func (x *Config_Project) GetFilename() string { if x != nil { - return x.Dir + return x.Filename } return "" } @@ -277,6 +238,20 @@ func (x *Config_Project) GetDisableGitignore() bool { return false } +func (x *Config_Project) GetEnv() *Config_Env { + if x != nil { + return x.Env + } + return nil +} + +func (x *Config_Project) GetFilters() []*Config_Filter { + if x != nil { + return x.Filters + } + return nil +} + type Config_Filter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -395,21 +370,16 @@ func (x *Config_Env) GetSources() []string { return nil } -type Config_Log struct { +type Config_Runtime struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // enabled indicates whether to enable logging. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // path is the path to the log output file. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // verbose is the verbosity level of the log. - Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"` + Docker *Config_Docker `protobuf:"bytes,1,opt,name=docker,proto3,oneof" json:"docker,omitempty"` } -func (x *Config_Log) Reset() { - *x = Config_Log{} +func (x *Config_Runtime) Reset() { + *x = Config_Runtime{} if protoimpl.UnsafeEnabled { mi := &file_runme_config_v1alpha1_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -417,13 +387,13 @@ func (x *Config_Log) Reset() { } } -func (x *Config_Log) String() string { +func (x *Config_Runtime) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Config_Log) ProtoMessage() {} +func (*Config_Runtime) ProtoMessage() {} -func (x *Config_Log) ProtoReflect() protoreflect.Message { +func (x *Config_Runtime) ProtoReflect() protoreflect.Message { mi := &file_runme_config_v1alpha1_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -435,30 +405,79 @@ func (x *Config_Log) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Config_Log.ProtoReflect.Descriptor instead. -func (*Config_Log) Descriptor() ([]byte, []int) { +// Deprecated: Use Config_Runtime.ProtoReflect.Descriptor instead. +func (*Config_Runtime) Descriptor() ([]byte, []int) { return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 3} } -func (x *Config_Log) GetEnabled() bool { +func (x *Config_Runtime) GetDocker() *Config_Docker { + if x != nil { + return x.Docker + } + return nil +} + +type Config_Docker struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + Build *Config_Docker_Build `protobuf:"bytes,3,opt,name=build,proto3" json:"build,omitempty"` +} + +func (x *Config_Docker) Reset() { + *x = Config_Docker{} + if protoimpl.UnsafeEnabled { + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config_Docker) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_Docker) ProtoMessage() {} + +func (x *Config_Docker) ProtoReflect() protoreflect.Message { + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config_Docker.ProtoReflect.Descriptor instead. +func (*Config_Docker) Descriptor() ([]byte, []int) { + return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *Config_Docker) GetEnabled() bool { if x != nil { return x.Enabled } return false } -func (x *Config_Log) GetPath() string { +func (x *Config_Docker) GetImage() string { if x != nil { - return x.Path + return x.Image } return "" } -func (x *Config_Log) GetVerbose() bool { +func (x *Config_Docker) GetBuild() *Config_Docker_Build { if x != nil { - return x.Verbose + return x.Build } - return false + return nil } type Config_Server struct { @@ -473,7 +492,7 @@ type Config_Server struct { func (x *Config_Server) Reset() { *x = Config_Server{} if protoimpl.UnsafeEnabled { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[5] + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -486,7 +505,7 @@ func (x *Config_Server) String() string { func (*Config_Server) ProtoMessage() {} func (x *Config_Server) ProtoReflect() protoreflect.Message { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[5] + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -499,7 +518,7 @@ func (x *Config_Server) ProtoReflect() protoreflect.Message { // Deprecated: Use Config_Server.ProtoReflect.Descriptor instead. func (*Config_Server) Descriptor() ([]byte, []int) { - return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 4} + return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 5} } func (x *Config_Server) GetAddress() string { @@ -516,33 +535,36 @@ func (x *Config_Server) GetTls() *Config_Server_TLS { return nil } -type Config_Docker struct { +type Config_Log struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - Build *Config_Docker_Build `protobuf:"bytes,3,opt,name=build,proto3" json:"build,omitempty"` + // enabled indicates whether to enable logging. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // path is the path to the log output file. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // verbose is the verbosity level of the log. + Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"` } -func (x *Config_Docker) Reset() { - *x = Config_Docker{} +func (x *Config_Log) Reset() { + *x = Config_Log{} if protoimpl.UnsafeEnabled { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[6] + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Config_Docker) String() string { +func (x *Config_Log) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Config_Docker) ProtoMessage() {} +func (*Config_Log) ProtoMessage() {} -func (x *Config_Docker) ProtoReflect() protoreflect.Message { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[6] +func (x *Config_Log) ProtoReflect() protoreflect.Message { + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -553,59 +575,58 @@ func (x *Config_Docker) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Config_Docker.ProtoReflect.Descriptor instead. -func (*Config_Docker) Descriptor() ([]byte, []int) { - return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 5} +// Deprecated: Use Config_Log.ProtoReflect.Descriptor instead. +func (*Config_Log) Descriptor() ([]byte, []int) { + return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 6} } -func (x *Config_Docker) GetEnabled() bool { +func (x *Config_Log) GetEnabled() bool { if x != nil { return x.Enabled } return false } -func (x *Config_Docker) GetImage() string { +func (x *Config_Log) GetPath() string { if x != nil { - return x.Image + return x.Path } return "" } -func (x *Config_Docker) GetBuild() *Config_Docker_Build { +func (x *Config_Log) GetVerbose() bool { if x != nil { - return x.Build + return x.Verbose } - return nil + return false } -type Config_Server_TLS struct { +type Config_Docker_Build struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - CertFile string `protobuf:"bytes,2,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"` - KeyFile string `protobuf:"bytes,3,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"` + Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + Dockerfile string `protobuf:"bytes,2,opt,name=dockerfile,proto3" json:"dockerfile,omitempty"` } -func (x *Config_Server_TLS) Reset() { - *x = Config_Server_TLS{} +func (x *Config_Docker_Build) Reset() { + *x = Config_Docker_Build{} if protoimpl.UnsafeEnabled { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[7] + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Config_Server_TLS) String() string { +func (x *Config_Docker_Build) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Config_Server_TLS) ProtoMessage() {} +func (*Config_Docker_Build) ProtoMessage() {} -func (x *Config_Server_TLS) ProtoReflect() protoreflect.Message { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[7] +func (x *Config_Docker_Build) ProtoReflect() protoreflect.Message { + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -616,58 +637,52 @@ func (x *Config_Server_TLS) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Config_Server_TLS.ProtoReflect.Descriptor instead. -func (*Config_Server_TLS) Descriptor() ([]byte, []int) { +// Deprecated: Use Config_Docker_Build.ProtoReflect.Descriptor instead. +func (*Config_Docker_Build) Descriptor() ([]byte, []int) { return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 4, 0} } -func (x *Config_Server_TLS) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *Config_Server_TLS) GetCertFile() string { +func (x *Config_Docker_Build) GetContext() string { if x != nil { - return x.CertFile + return x.Context } return "" } -func (x *Config_Server_TLS) GetKeyFile() string { +func (x *Config_Docker_Build) GetDockerfile() string { if x != nil { - return x.KeyFile + return x.Dockerfile } return "" } -type Config_Docker_Build struct { +type Config_Server_TLS struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - Dockerfile string `protobuf:"bytes,2,opt,name=dockerfile,proto3" json:"dockerfile,omitempty"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + CertFile string `protobuf:"bytes,2,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"` + KeyFile string `protobuf:"bytes,3,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"` } -func (x *Config_Docker_Build) Reset() { - *x = Config_Docker_Build{} +func (x *Config_Server_TLS) Reset() { + *x = Config_Server_TLS{} if protoimpl.UnsafeEnabled { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[8] + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Config_Docker_Build) String() string { +func (x *Config_Server_TLS) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Config_Docker_Build) ProtoMessage() {} +func (*Config_Server_TLS) ProtoMessage() {} -func (x *Config_Docker_Build) ProtoReflect() protoreflect.Message { - mi := &file_runme_config_v1alpha1_config_proto_msgTypes[8] +func (x *Config_Server_TLS) ProtoReflect() protoreflect.Message { + mi := &file_runme_config_v1alpha1_config_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -678,21 +693,28 @@ func (x *Config_Docker_Build) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Config_Docker_Build.ProtoReflect.Descriptor instead. -func (*Config_Docker_Build) Descriptor() ([]byte, []int) { +// Deprecated: Use Config_Server_TLS.ProtoReflect.Descriptor instead. +func (*Config_Server_TLS) Descriptor() ([]byte, []int) { return file_runme_config_v1alpha1_config_proto_rawDescGZIP(), []int{0, 5, 0} } -func (x *Config_Docker_Build) GetContext() string { +func (x *Config_Server_TLS) GetEnabled() bool { if x != nil { - return x.Context + return x.Enabled + } + return false +} + +func (x *Config_Server_TLS) GetCertFile() string { + if x != nil { + return x.CertFile } return "" } -func (x *Config_Docker_Build) GetDockerfile() string { +func (x *Config_Server_TLS) GetKeyFile() string { if x != nil { - return x.Dockerfile + return x.KeyFile } return "" } @@ -705,95 +727,99 @@ var file_runme_config_v1alpha1_config_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x0a, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x0a, 0x0a, 0x06, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x3e, 0x0a, 0x07, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x75, 0x6e, - 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x03, 0x6c, 0x6f, 0x67, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, + 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x07, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x1a, 0xa3, 0x02, 0x0a, 0x07, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x5f, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x66, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x55, 0x70, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, + 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x69, 0x74, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x47, 0x69, 0x74, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x03, 0x65, 0x6e, 0x76, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x3c, - 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x06, - 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x3e, + 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x7a, + 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x08, 0x52, + 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x45, 0x0a, 0x03, 0x45, 0x6e, + 0x76, 0x12, 0x24, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, + 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x6e, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x1a, 0x57, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x06, + 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x63, 0x6b, - 0x65, 0x72, 0x52, 0x06, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x1a, 0x90, 0x01, 0x0a, 0x07, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, - 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x75, 0x70, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x55, 0x70, 0x77, 0x61, - 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x69, 0x74, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x1a, 0x7a, 0x0a, - 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x28, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x08, 0x52, 0x09, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x45, 0x0a, 0x03, 0x45, 0x6e, 0x76, - 0x12, 0x24, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x65, - 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x45, 0x6e, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x1a, 0x4d, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x1a, - 0xb7, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, - 0x1a, 0x57, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6b, 0x65, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x1a, 0xbd, 0x01, 0x0a, 0x06, 0x44, 0x6f, - 0x63, 0x6b, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, - 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x1a, 0x41, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, - 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x49, 0x4c, 0x54, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x46, - 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, - 0x45, 0x4e, 0x54, 0x10, 0x02, 0x42, 0x0f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x42, 0x55, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2f, 0x72, 0x75, - 0x6e, 0x6d, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x1a, 0xbd, 0x01, 0x0a, 0x06, 0x44, + 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x1a, 0x41, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, + 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0xb7, 0x01, 0x0a, 0x06, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x3a, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, + 0x75, 0x6e, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x1a, 0x57, 0x0a, 0x03, 0x54, + 0x4c, 0x53, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, + 0x46, 0x69, 0x6c, 0x65, 0x1a, 0x4d, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x62, 0x6f, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, + 0x6f, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, + 0x0a, 0x11, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4c, + 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x42, + 0x55, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2f, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x6d, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -809,34 +835,36 @@ func file_runme_config_v1alpha1_config_proto_rawDescGZIP() []byte { } var file_runme_config_v1alpha1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_runme_config_v1alpha1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_runme_config_v1alpha1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_runme_config_v1alpha1_config_proto_goTypes = []interface{}{ (Config_FilterType)(0), // 0: runme.config.v1alpha1.Config.FilterType (*Config)(nil), // 1: runme.config.v1alpha1.Config (*Config_Project)(nil), // 2: runme.config.v1alpha1.Config.Project (*Config_Filter)(nil), // 3: runme.config.v1alpha1.Config.Filter (*Config_Env)(nil), // 4: runme.config.v1alpha1.Config.Env - (*Config_Log)(nil), // 5: runme.config.v1alpha1.Config.Log - (*Config_Server)(nil), // 6: runme.config.v1alpha1.Config.Server - (*Config_Docker)(nil), // 7: runme.config.v1alpha1.Config.Docker - (*Config_Server_TLS)(nil), // 8: runme.config.v1alpha1.Config.Server.TLS + (*Config_Runtime)(nil), // 5: runme.config.v1alpha1.Config.Runtime + (*Config_Docker)(nil), // 6: runme.config.v1alpha1.Config.Docker + (*Config_Server)(nil), // 7: runme.config.v1alpha1.Config.Server + (*Config_Log)(nil), // 8: runme.config.v1alpha1.Config.Log (*Config_Docker_Build)(nil), // 9: runme.config.v1alpha1.Config.Docker.Build + (*Config_Server_TLS)(nil), // 10: runme.config.v1alpha1.Config.Server.TLS } var file_runme_config_v1alpha1_config_proto_depIdxs = []int32{ - 2, // 0: runme.config.v1alpha1.Config.project:type_name -> runme.config.v1alpha1.Config.Project - 4, // 1: runme.config.v1alpha1.Config.env:type_name -> runme.config.v1alpha1.Config.Env - 3, // 2: runme.config.v1alpha1.Config.filters:type_name -> runme.config.v1alpha1.Config.Filter - 5, // 3: runme.config.v1alpha1.Config.log:type_name -> runme.config.v1alpha1.Config.Log - 6, // 4: runme.config.v1alpha1.Config.server:type_name -> runme.config.v1alpha1.Config.Server - 7, // 5: runme.config.v1alpha1.Config.docker:type_name -> runme.config.v1alpha1.Config.Docker - 0, // 6: runme.config.v1alpha1.Config.Filter.type:type_name -> runme.config.v1alpha1.Config.FilterType - 8, // 7: runme.config.v1alpha1.Config.Server.tls:type_name -> runme.config.v1alpha1.Config.Server.TLS - 9, // 8: runme.config.v1alpha1.Config.Docker.build:type_name -> runme.config.v1alpha1.Config.Docker.Build - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 2, // 0: runme.config.v1alpha1.Config.project:type_name -> runme.config.v1alpha1.Config.Project + 5, // 1: runme.config.v1alpha1.Config.runtime:type_name -> runme.config.v1alpha1.Config.Runtime + 7, // 2: runme.config.v1alpha1.Config.server:type_name -> runme.config.v1alpha1.Config.Server + 8, // 3: runme.config.v1alpha1.Config.log:type_name -> runme.config.v1alpha1.Config.Log + 4, // 4: runme.config.v1alpha1.Config.Project.env:type_name -> runme.config.v1alpha1.Config.Env + 3, // 5: runme.config.v1alpha1.Config.Project.filters:type_name -> runme.config.v1alpha1.Config.Filter + 0, // 6: runme.config.v1alpha1.Config.Filter.type:type_name -> runme.config.v1alpha1.Config.FilterType + 6, // 7: runme.config.v1alpha1.Config.Runtime.docker:type_name -> runme.config.v1alpha1.Config.Docker + 9, // 8: runme.config.v1alpha1.Config.Docker.build:type_name -> runme.config.v1alpha1.Config.Docker.Build + 10, // 9: runme.config.v1alpha1.Config.Server.tls:type_name -> runme.config.v1alpha1.Config.Server.TLS + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_runme_config_v1alpha1_config_proto_init() } @@ -894,7 +922,7 @@ func file_runme_config_v1alpha1_config_proto_init() { } } file_runme_config_v1alpha1_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config_Log); i { + switch v := v.(*Config_Runtime); i { case 0: return &v.state case 1: @@ -906,7 +934,7 @@ func file_runme_config_v1alpha1_config_proto_init() { } } file_runme_config_v1alpha1_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config_Server); i { + switch v := v.(*Config_Docker); i { case 0: return &v.state case 1: @@ -918,7 +946,7 @@ func file_runme_config_v1alpha1_config_proto_init() { } } file_runme_config_v1alpha1_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config_Docker); i { + switch v := v.(*Config_Server); i { case 0: return &v.state case 1: @@ -930,7 +958,7 @@ func file_runme_config_v1alpha1_config_proto_init() { } } file_runme_config_v1alpha1_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config_Server_TLS); i { + switch v := v.(*Config_Log); i { case 0: return &v.state case 1: @@ -953,18 +981,27 @@ func file_runme_config_v1alpha1_config_proto_init() { return nil } } + file_runme_config_v1alpha1_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config_Server_TLS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_runme_config_v1alpha1_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Config_Project_)(nil), - (*Config_Filename)(nil), - } + file_runme_config_v1alpha1_config_proto_msgTypes[4].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_runme_config_v1alpha1_config_proto_rawDesc, NumEnums: 1, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.d.ts b/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.d.ts index 1fd7b1cca..2bed8223c 100644 --- a/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.d.ts +++ b/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.d.ts @@ -11,85 +11,76 @@ import { MessageType } from "@protobuf-ts/runtime"; */ export interface Config { /** - * @generated from protobuf oneof: source - */ - source: { - oneofKind: "project"; - /** - * project indicates a dir-based source typically including multiple Markdown files. - * - * @generated from protobuf field: runme.config.v1alpha1.Config.Project project = 1; - */ - project: Config_Project; - } | { - oneofKind: "filename"; - /** - * filename indicates a single Markdown file. - * - * @generated from protobuf field: string filename = 2; - */ - filename: string; - } | { - oneofKind: undefined; - }; - /** - * env is the environment variables configuration. - * - * @generated from protobuf field: runme.config.v1alpha1.Config.Env env = 3; - */ - env?: Config_Env; - /** - * filters is a list of filters to apply. - * Filters can be applied to documents or - * individual code blocks. - * - * @generated from protobuf field: repeated runme.config.v1alpha1.Config.Filter filters = 5; + * @generated from protobuf field: runme.config.v1alpha1.Config.Project project = 1; */ - filters: Config_Filter[]; + project?: Config_Project; /** - * log contains the log configuration. - * - * @generated from protobuf field: runme.config.v1alpha1.Config.Log log = 7; + * @generated from protobuf field: runme.config.v1alpha1.Config.Runtime runtime = 2; */ - log?: Config_Log; + runtime?: Config_Runtime; /** - * @generated from protobuf field: runme.config.v1alpha1.Config.Server server = 8; + * @generated from protobuf field: runme.config.v1alpha1.Config.Server server = 3; */ server?: Config_Server; /** - * @generated from protobuf field: runme.config.v1alpha1.Config.Docker docker = 9; + * @generated from protobuf field: runme.config.v1alpha1.Config.Log log = 4; */ - docker?: Config_Docker; + log?: Config_Log; } /** * @generated from protobuf message runme.config.v1alpha1.Config.Project */ export interface Config_Project { /** - * dir is the directory to look for Markdown files. + * root is the root directory of the project. + * + * @generated from protobuf field: string root = 1; + */ + root: string; + /** + * filename is the filename to look for in the project. + * It effectively narrows down to search code blocks + * within a single file. + * + * If root is empty, it should be the absolute path. + * Otherwise, it should be a relative path to the root. * - * @generated from protobuf field: string dir = 1; + * @generated from protobuf field: string filename = 2; */ - dir: string; + filename: string; /** * find_repo_upward indicates whether to find the nearest Git repository upward. * This is useful to, for example, recognize .gitignore files. * - * @generated from protobuf field: bool find_repo_upward = 2; + * @generated from protobuf field: bool find_repo_upward = 3; */ findRepoUpward: boolean; /** * ignore_paths is a list of paths to ignore relative to dir. * - * @generated from protobuf field: repeated string ignore_paths = 3 [json_name = "ignore"]; + * @generated from protobuf field: repeated string ignore_paths = 4 [json_name = "ignore"]; */ ignorePaths: string[]; /** * disable_gitignore indicates whether to disable the .gitignore file. * - * @generated from protobuf field: bool disable_gitignore = 4; + * @generated from protobuf field: bool disable_gitignore = 5; */ disableGitignore: boolean; + /** + * env is the environment variables configuration. + * + * @generated from protobuf field: runme.config.v1alpha1.Config.Env env = 6; + */ + env?: Config_Env; + /** + * filters is a list of filters to apply. + * They can be applied to documents or + * individual code blocks. + * + * @generated from protobuf field: repeated runme.config.v1alpha1.Config.Filter filters = 7; + */ + filters: Config_Filter[]; } /** * @generated from protobuf message runme.config.v1alpha1.Config.Filter @@ -130,27 +121,43 @@ export interface Config_Env { sources: string[]; } /** - * @generated from protobuf message runme.config.v1alpha1.Config.Log + * @generated from protobuf message runme.config.v1alpha1.Config.Runtime */ -export interface Config_Log { +export interface Config_Runtime { + /** + * @generated from protobuf field: optional runme.config.v1alpha1.Config.Docker docker = 1; + */ + docker?: Config_Docker; +} +/** + * @generated from protobuf message runme.config.v1alpha1.Config.Docker + */ +export interface Config_Docker { /** - * enabled indicates whether to enable logging. - * * @generated from protobuf field: bool enabled = 1; */ enabled: boolean; /** - * path is the path to the log output file. - * - * @generated from protobuf field: string path = 2; + * @generated from protobuf field: string image = 2; */ - path: string; + image: string; /** - * verbose is the verbosity level of the log. - * - * @generated from protobuf field: bool verbose = 3; + * @generated from protobuf field: runme.config.v1alpha1.Config.Docker.Build build = 3; */ - verbose: boolean; + build?: Config_Docker_Build; +} +/** + * @generated from protobuf message runme.config.v1alpha1.Config.Docker.Build + */ +export interface Config_Docker_Build { + /** + * @generated from protobuf field: string context = 1; + */ + context: string; + /** + * @generated from protobuf field: string dockerfile = 2; + */ + dockerfile: string; } /** * @generated from protobuf message runme.config.v1alpha1.Config.Server @@ -183,34 +190,27 @@ export interface Config_Server_TLS { keyFile: string; } /** - * @generated from protobuf message runme.config.v1alpha1.Config.Docker + * @generated from protobuf message runme.config.v1alpha1.Config.Log */ -export interface Config_Docker { +export interface Config_Log { /** + * enabled indicates whether to enable logging. + * * @generated from protobuf field: bool enabled = 1; */ enabled: boolean; /** - * @generated from protobuf field: string image = 2; - */ - image: string; - /** - * @generated from protobuf field: runme.config.v1alpha1.Config.Docker.Build build = 3; - */ - build?: Config_Docker_Build; -} -/** - * @generated from protobuf message runme.config.v1alpha1.Config.Docker.Build - */ -export interface Config_Docker_Build { - /** - * @generated from protobuf field: string context = 1; + * path is the path to the log output file. + * + * @generated from protobuf field: string path = 2; */ - context: string; + path: string; /** - * @generated from protobuf field: string dockerfile = 2; + * verbose is the verbosity level of the log. + * + * @generated from protobuf field: bool verbose = 3; */ - dockerfile: string; + verbose: boolean; } /** * @generated from protobuf enum runme.config.v1alpha1.Config.FilterType @@ -257,13 +257,27 @@ declare class Config_Env$Type extends MessageType { * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Env */ export declare const Config_Env: Config_Env$Type; -declare class Config_Log$Type extends MessageType { +declare class Config_Runtime$Type extends MessageType { constructor(); } /** - * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Log + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Runtime */ -export declare const Config_Log: Config_Log$Type; +export declare const Config_Runtime: Config_Runtime$Type; +declare class Config_Docker$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker + */ +export declare const Config_Docker: Config_Docker$Type; +declare class Config_Docker_Build$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker.Build + */ +export declare const Config_Docker_Build: Config_Docker_Build$Type; declare class Config_Server$Type extends MessageType { constructor(); } @@ -278,18 +292,11 @@ declare class Config_Server_TLS$Type extends MessageType { * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Server.TLS */ export declare const Config_Server_TLS: Config_Server_TLS$Type; -declare class Config_Docker$Type extends MessageType { - constructor(); -} -/** - * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker - */ -export declare const Config_Docker: Config_Docker$Type; -declare class Config_Docker_Build$Type extends MessageType { +declare class Config_Log$Type extends MessageType { constructor(); } /** - * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker.Build + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Log */ -export declare const Config_Docker_Build: Config_Docker_Build$Type; +export declare const Config_Log: Config_Log$Type; export {}; diff --git a/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.js b/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.js index e73d5a94e..27dfdf0d2 100644 --- a/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.js +++ b/pkg/api/gen/proto/ts/runme/config/v1alpha1/config_pb.js @@ -31,13 +31,10 @@ export var Config_FilterType; class Config$Type extends MessageType { constructor() { super("runme.config.v1alpha1.Config", [ - { no: 1, name: "project", kind: "message", oneof: "source", T: () => Config_Project }, - { no: 2, name: "filename", kind: "scalar", oneof: "source", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "env", kind: "message", T: () => Config_Env }, - { no: 5, name: "filters", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Config_Filter }, - { no: 7, name: "log", kind: "message", T: () => Config_Log }, - { no: 8, name: "server", kind: "message", T: () => Config_Server }, - { no: 9, name: "docker", kind: "message", T: () => Config_Docker } + { no: 1, name: "project", kind: "message", T: () => Config_Project }, + { no: 2, name: "runtime", kind: "message", T: () => Config_Runtime }, + { no: 3, name: "server", kind: "message", T: () => Config_Server }, + { no: 4, name: "log", kind: "message", T: () => Config_Log } ]); } } @@ -49,10 +46,13 @@ export const Config = new Config$Type(); class Config_Project$Type extends MessageType { constructor() { super("runme.config.v1alpha1.Config.Project", [ - { no: 1, name: "dir", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "find_repo_upward", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "ignore_paths", kind: "scalar", jsonName: "ignore", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "disable_gitignore", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + { no: 1, name: "root", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "filename", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "find_repo_upward", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "ignore_paths", kind: "scalar", jsonName: "ignore", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "disable_gitignore", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "env", kind: "message", T: () => Config_Env }, + { no: 7, name: "filters", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Config_Filter } ]); } } @@ -87,19 +87,44 @@ class Config_Env$Type extends MessageType { */ export const Config_Env = new Config_Env$Type(); // @generated message type with reflection information, may provide speed optimized methods -class Config_Log$Type extends MessageType { +class Config_Runtime$Type extends MessageType { constructor() { - super("runme.config.v1alpha1.Config.Log", [ + super("runme.config.v1alpha1.Config.Runtime", [ + { no: 1, name: "docker", kind: "message", T: () => Config_Docker } + ]); + } +} +/** + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Runtime + */ +export const Config_Runtime = new Config_Runtime$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Config_Docker$Type extends MessageType { + constructor() { + super("runme.config.v1alpha1.Config.Docker", [ { no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "verbose", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + { no: 2, name: "image", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "build", kind: "message", T: () => Config_Docker_Build } ]); } } /** - * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Log + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker */ -export const Config_Log = new Config_Log$Type(); +export const Config_Docker = new Config_Docker$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Config_Docker_Build$Type extends MessageType { + constructor() { + super("runme.config.v1alpha1.Config.Docker.Build", [ + { no: 1, name: "context", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "dockerfile", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker.Build + */ +export const Config_Docker_Build = new Config_Docker_Build$Type(); // @generated message type with reflection information, may provide speed optimized methods class Config_Server$Type extends MessageType { constructor() { @@ -128,29 +153,16 @@ class Config_Server_TLS$Type extends MessageType { */ export const Config_Server_TLS = new Config_Server_TLS$Type(); // @generated message type with reflection information, may provide speed optimized methods -class Config_Docker$Type extends MessageType { +class Config_Log$Type extends MessageType { constructor() { - super("runme.config.v1alpha1.Config.Docker", [ + super("runme.config.v1alpha1.Config.Log", [ { no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "image", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "build", kind: "message", T: () => Config_Docker_Build } - ]); - } -} -/** - * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker - */ -export const Config_Docker = new Config_Docker$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class Config_Docker_Build$Type extends MessageType { - constructor() { - super("runme.config.v1alpha1.Config.Docker.Build", [ - { no: 1, name: "context", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "dockerfile", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + { no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "verbose", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } ]); } } /** - * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Docker.Build + * @generated MessageType for protobuf message runme.config.v1alpha1.Config.Log */ -export const Config_Docker_Build = new Config_Docker_Build$Type(); +export const Config_Log = new Config_Log$Type(); diff --git a/pkg/api/proto/runme/config/v1alpha1/config.proto b/pkg/api/proto/runme/config/v1alpha1/config.proto index 8c540d3e4..60ce329af 100644 --- a/pkg/api/proto/runme/config/v1alpha1/config.proto +++ b/pkg/api/proto/runme/config/v1alpha1/config.proto @@ -8,45 +8,51 @@ option go_package = "github.com/stateful/runme/pkg/api/gen/proto/go/runme/config // Config describes the configuration of the runme tools, including CLI, server, and clients like VS Code extension. message Config { - // source is a source of Markdown files to look into. - oneof source { - option (buf.validate.oneof).required = true; + Project project = 1; - // project indicates a dir-based source typically including multiple Markdown files. - Project project = 1; + Runtime runtime = 2; - // filename indicates a single Markdown file. - string filename = 2; - } - - // env is the environment variables configuration. - Env env = 3; - - // filters is a list of filters to apply. - // Filters can be applied to documents or - // individual code blocks. - repeated Filter filters = 5; + Server server = 3; - // log contains the log configuration. - Log log = 7; - - Server server = 8; - - Docker docker = 9; + Log log = 4; message Project { - // dir is the directory to look for Markdown files. - string dir = 1; + // root is the root directory of the project. + string root = 1; + + // filename is the filename to look for in the project. + // It effectively narrows down to search code blocks + // within a single file. + // + // If root is empty, it should be the absolute path. + // Otherwise, it should be a relative path to the root. + string filename = 2; // find_repo_upward indicates whether to find the nearest Git repository upward. // This is useful to, for example, recognize .gitignore files. - bool find_repo_upward = 2; + bool find_repo_upward = 3; // ignore_paths is a list of paths to ignore relative to dir. - repeated string ignore_paths = 3 [json_name = "ignore"]; + repeated string ignore_paths = 4 [json_name = "ignore"]; // disable_gitignore indicates whether to disable the .gitignore file. - bool disable_gitignore = 4; + bool disable_gitignore = 5; + + // env is the environment variables configuration. + Env env = 6; + + // filters is a list of filters to apply. + // They can be applied to documents or + // individual code blocks. + repeated Filter filters = 7; + } + + message Env { + // use_system_env indicates whether to use the system environment variables. + bool use_system_env = 1; + + // sources is a list of files with env. + repeated string sources = 2; } message Filter { @@ -70,23 +76,21 @@ message Config { FILTER_TYPE_DOCUMENT = 2; } - message Env { - // use_system_env indicates whether to use the system environment variables. - bool use_system_env = 1; - - // sources is a list of files with env. - repeated string sources = 2; + message Runtime { + optional Docker docker = 1; } - message Log { - // enabled indicates whether to enable logging. + message Docker { bool enabled = 1; - // path is the path to the log output file. - string path = 2; + string image = 2; - // verbose is the verbosity level of the log. - bool verbose = 3; + Build build = 3; + + message Build { + string context = 1; + string dockerfile = 2; + } } message Server { @@ -101,16 +105,14 @@ message Config { } } - message Docker { + message Log { + // enabled indicates whether to enable logging. bool enabled = 1; - string image = 2; - - Build build = 3; + // path is the path to the log output file. + string path = 2; - message Build { - string context = 1; - string dockerfile = 2; - } + // verbose is the verbosity level of the log. + bool verbose = 3; } } diff --git a/testdata/beta/base.txtar b/testdata/beta/base.txtar index 2240aaa52..30a005cf1 100644 --- a/testdata/beta/base.txtar +++ b/testdata/beta/base.txtar @@ -17,10 +17,10 @@ stderr 'no tasks to run' -- experimental/runme.yaml -- version: v1alpha1 project: - dir: "." -env: - sources: - - .env + root: "." + env: + sources: + - .env # log: # enable: true diff --git a/testdata/beta/categories.txtar b/testdata/beta/categories.txtar index 8e28d2598..3059136cc 100644 --- a/testdata/beta/categories.txtar +++ b/testdata/beta/categories.txtar @@ -8,7 +8,8 @@ stdout '^bar[\s]+bar-baz[\s]+$' -- experimental/runme.yaml -- version: v1alpha1 -filename: README.md +project: + filename: README.md # log: # enable: true diff --git a/testdata/beta/failure.txtar b/testdata/beta/failure.txtar index 1a962d6d7..9e36f5cba 100644 --- a/testdata/beta/failure.txtar +++ b/testdata/beta/failure.txtar @@ -12,7 +12,8 @@ stderr '^could not execute command: failed to open file-based project ".*/unknow -- experimental/runme.yaml -- version: v1alpha1 -filename: README.md +project: + filename: README.md -- README.md -- ```sh { "name": "not-found-singleline" } diff --git a/testdata/beta/find_repo_upward.txtar b/testdata/beta/find_repo_upward.txtar index e45f1b93c..c01be856d 100644 --- a/testdata/beta/find_repo_upward.txtar +++ b/testdata/beta/find_repo_upward.txtar @@ -13,11 +13,11 @@ cmp stdout result-print.txt -- nested/experimental/runme.yaml -- version: v1alpha1 project: - dir: "." + root: "." find_repo_upward: true -env: - sources: - - .env + env: + sources: + - .env # Ensure that there is a git repository upwards. # It contains .gitignore which should be respected. diff --git a/testdata/beta/project_dir_nested.txtar b/testdata/beta/project_dir_nested.txtar index 2168e28b6..26116ddc4 100644 --- a/testdata/beta/project_dir_nested.txtar +++ b/testdata/beta/project_dir_nested.txtar @@ -9,10 +9,10 @@ cmp stdout result-print.txt -- experimental/runme.yaml -- version: v1alpha1 project: - dir: "./nested" -env: - sources: - - .env + root: "./nested" + env: + sources: + - .env -- README.md -- ```sh {"name": "root-hello"} diff --git a/testdata/beta/server.txtar b/testdata/beta/server.txtar index f4828e1ee..bcb72b26e 100644 --- a/testdata/beta/server.txtar +++ b/testdata/beta/server.txtar @@ -8,7 +8,8 @@ stderr '(?sm)server listening' -- experimental/runme.yaml -- version: v1alpha1 -filename: README.md +project: + filename: README.md server: address: unix://runme.sock tls: