diff --git a/docs/plugins/misp/_index.md b/docs/plugins/misp/_index.md index 7e161102..55eec619 100644 --- a/docs/plugins/misp/_index.md +++ b/docs/plugins/misp/_index.md @@ -29,3 +29,7 @@ fabric { ## Data sources {{< plugin-resources "misp" "data-source" >}} + +## Publishers + +{{< plugin-resources "misp" "publisher" >}} \ No newline at end of file diff --git a/docs/plugins/misp/publishers/misp_event_reports.md b/docs/plugins/misp/publishers/misp_event_reports.md new file mode 100644 index 00000000..b3dbb559 --- /dev/null +++ b/docs/plugins/misp/publishers/misp_event_reports.md @@ -0,0 +1,101 @@ +--- +title: "`misp_event_reports` publisher" +plugin: + name: blackstork/misp + description: "Publishes content to misp event reports" + tags: [] + version: "v0.4.2" + source_github: "https://github.com/blackstork-io/fabric/tree/main/internal/misp/" +resource: + type: publisher +type: docs +--- + +{{< breadcrumbs 2 >}} + +{{< plugin-resource-header "blackstork/misp" "misp" "v0.4.2" "misp_event_reports" "publisher" >}} + +## Installation + +To use `misp_event_reports` publisher, you must install the plugin `blackstork/misp`. + +To install the plugin, add the full plugin name to the `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), as shown below: + +```hcl +fabric { + plugin_versions = { + "blackstork/misp" = ">= v0.4.2" + } +} +``` + +Note the version constraint set for the plugin. + +#### Formats + +The publisher supports the following document formats: + +- `md` + +To set the output format, specify it inside `publish` block with `format` argument. + + +#### Configuration + +The publisher supports the following configuration arguments: + +```hcl +config publish misp_event_reports { + # misp api key + # + # Required string. + # Must be non-empty + # For example: + api_key = "some string" + + # misp base url + # + # Required string. + # Must be non-empty + # For example: + base_url = "some string" + + # skip ssl verification + # + # Optional bool. + # Default value: + skip_ssl = false +} + +``` + +#### Usage + +The publisher supports the following execution arguments: + +```hcl +# In addition to the arguments listed, `publish` block accepts `format` argument. + +publish misp_event_reports { + # Required string. + # Must be non-empty + # For example: + event_id = "some string" + + # Required string. + # Must be non-empty + # For example: + name = "some string" + + # Optional string. + # Must be one of: "0", "1", "2", "3", "4", "5" + # Default value: + distribution = null + + # Optional string. + # Default value: + sharing_group_id = null +} + +``` + diff --git a/docs/plugins/plugins.json b/docs/plugins/plugins.json index 68dd5aab..e5ce2688 100644 --- a/docs/plugins/plugins.json +++ b/docs/plugins/plugins.json @@ -581,6 +581,21 @@ "version": "v0.4.2", "shortname": "misp", "resources": [ + { + "name": "misp_event_reports", + "type": "publisher", + "config_params": [ + "api_key", + "base_url", + "skip_ssl" + ], + "arguments": [ + "distribution", + "event_id", + "name", + "sharing_group_id" + ] + }, { "name": "misp_events", "type": "data-source", diff --git a/examples/templates/misp/misp_event_reports.fabric b/examples/templates/misp/misp_event_reports.fabric new file mode 100644 index 00000000..df0665e2 --- /dev/null +++ b/examples/templates/misp/misp_event_reports.fabric @@ -0,0 +1,21 @@ +document "misp_event_reports" { + meta { + name = "example_document" + } + + title = "Publish" + + publish misp_event_reports "myreport" { + format = "md" + event_id = "1" + name = "doc.md" + distribution = "0" + config { + api_key = "" + base_url = "https://localhost" + skip_ssl = true + } + } + +} + diff --git a/go.mod b/go.mod index 934f9519..36819651 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( github.com/golang-cz/devslog v0.0.8 github.com/google/go-github/v58 v58.0.0 github.com/google/go-querystring v1.1.0 + github.com/google/uuid v1.6.0 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/go-plugin v1.6.1 github.com/hashicorp/hcl/v2 v2.20.1 @@ -107,7 +108,6 @@ require ( github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f // indirect diff --git a/internal/misp/client/misp_client.go b/internal/misp/client/misp_client.go index a24f6f24..aa00aa87 100644 --- a/internal/misp/client/misp_client.go +++ b/internal/misp/client/misp_client.go @@ -61,6 +61,7 @@ func (client *Client) Do(ctx context.Context, method, path string, payload inter req.Header = make(http.Header) req.Header.Set("Content-Type", "application/json") + req.Header.Set("Accept", "application/json") client.auth(req) resp, err = client.client.Do(req) if err != nil { @@ -86,3 +87,16 @@ func (client *Client) RestSearchEvents(ctx context.Context, req RestSearchEvents } return } + +func (client *Client) AddEventReport(ctx context.Context, req AddEventReportRequest) (events AddEventReportResponse, err error) { + resp, err := client.Do(ctx, http.MethodPost, "/event_reports/add/"+req.EventId, req) + if err != nil { + return + } + defer resp.Body.Close() + err = json.NewDecoder(resp.Body).Decode(&events) + if err != nil { + return + } + return +} diff --git a/internal/misp/client/misp_models.go b/internal/misp/client/misp_models.go index cb6a79a9..e1c9899d 100644 --- a/internal/misp/client/misp_models.go +++ b/internal/misp/client/misp_models.go @@ -50,3 +50,30 @@ type Event struct { SightingTimestamp string `json:"sighting_timestamp"` DisableCorrelation bool `json:"disable_correlation"` } + +type AddEventReportRequest struct { + Uuid string `json:"uuid"` + EventId string `json:"event_id"` + Name string `json:"name"` + Content string `json:"content"` + Distribution *string `json:"distribution"` + SharingGroupId *string `json:"sharing_group_id"` + Timestamp *string `json:"timestamp"` + Deleted bool `json:"deleted"` +} + +type EventReport struct { + Id string `json:"id"` + Uuid string `json:"uuid"` + EventId string `json:"event_id"` + Name string `json:"name"` + Content string `json:"content"` + Distribution string `json:"distribution"` + SharingGroupId *string `json:"sharing_group_id"` + Timestamp *string `json:"timestamp"` + Deleted bool `json:"deleted"` +} + +type AddEventReportResponse struct { + EventReport EventReport `json:"EventReport"` +} diff --git a/internal/misp/plugin.go b/internal/misp/plugin.go index b864d28c..48ae541f 100644 --- a/internal/misp/plugin.go +++ b/internal/misp/plugin.go @@ -18,6 +18,7 @@ import ( type Client interface { RestSearchEvents(ctx context.Context, req client.RestSearchEventsRequest) (events client.RestSearchEventsResponse, err error) + AddEventReport(ctx context.Context, req client.AddEventReportRequest) (resp client.AddEventReportResponse, err error) } type ClientLoaderFn func(cfg *dataspec.Block) Client @@ -49,6 +50,9 @@ func Plugin(version string, loader ClientLoaderFn) *plugin.Schema { DataSources: plugin.DataSources{ "misp_events": makeMispEventsDataSource(loader), }, + Publishers: plugin.Publishers{ + "misp_event_reports": makeMispEventReportsPublisher(loader), + }, } } diff --git a/internal/misp/publish_misp_event_reports.go b/internal/misp/publish_misp_event_reports.go new file mode 100644 index 00000000..a35e5fa5 --- /dev/null +++ b/internal/misp/publish_misp_event_reports.go @@ -0,0 +1,157 @@ +package misp + +import ( + "bytes" + "context" + "fmt" + "log/slog" + "time" + + "github.com/google/uuid" + "github.com/hashicorp/hcl/v2" + "github.com/zclconf/go-cty/cty" + "go.opentelemetry.io/otel/attribute" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "github.com/blackstork-io/fabric/internal/misp/client" + "github.com/blackstork-io/fabric/pkg/diagnostics" + "github.com/blackstork-io/fabric/plugin" + "github.com/blackstork-io/fabric/plugin/dataspec" + "github.com/blackstork-io/fabric/plugin/dataspec/constraint" + "github.com/blackstork-io/fabric/plugin/plugindata" + "github.com/blackstork-io/fabric/print" + "github.com/blackstork-io/fabric/print/mdprint" +) + +func makeMispEventReportsPublisher(loader ClientLoaderFn) *plugin.Publisher { + return &plugin.Publisher{ + Doc: "Publishes content to misp event reports", + Tags: []string{}, + Config: makeDataSourceConfig(), + Args: &dataspec.RootSpec{ + Attrs: []*dataspec.AttrSpec{ + { + Name: "event_id", + Type: cty.String, + Constraints: constraint.RequiredMeaningful, + }, + { + Name: "name", + Type: cty.String, + Constraints: constraint.RequiredMeaningful, + }, + { + Name: "distribution", + Type: cty.String, + OneOf: []cty.Value{ + cty.StringVal("0"), + cty.StringVal("1"), + cty.StringVal("2"), + cty.StringVal("3"), + cty.StringVal("4"), + cty.StringVal("5"), + }, + }, + { + Name: "sharing_group_id", + Type: cty.String, + }, + }, + }, + AllowedFormats: []plugin.OutputFormat{plugin.OutputFormatMD}, + PublishFunc: publishEventReport(loader), + } +} + +func parseContent(data plugindata.Map) (document *plugin.ContentSection) { + documentMap, ok := data["document"] + if !ok { + return + } + contentMap, ok := documentMap.(plugindata.Map)["content"] + if !ok { + return + } + content, err := plugin.ParseContentData(contentMap.(plugindata.Map)) + if err != nil { + return + } + document = content.(*plugin.ContentSection) + return +} + +func publishEventReport(loader ClientLoaderFn) plugin.PublishFunc { + logger := slog.Default() + tracer := nooptrace.Tracer{} + return func(ctx context.Context, params *plugin.PublishParams) diagnostics.Diag { + document := parseContent(params.DataContext) + if document == nil { + return diagnostics.Diag{{ + Severity: hcl.DiagError, + Summary: "Failed to parse document", + Detail: "document is required", + }} + } + datactx := params.DataContext + datactx["format"] = plugindata.String(params.Format.String()) + var printer print.Printer + switch params.Format { + case plugin.OutputFormatMD: + printer = mdprint.New() + default: + return diagnostics.Diag{{ + Severity: hcl.DiagError, + Summary: "Unsupported format", + Detail: "Only md format is supported", + }} + } + printer = print.WithLogging(printer, logger, slog.String("format", params.Format.String())) + printer = print.WithTracing(printer, tracer, attribute.String("format", params.Format.String())) + + buff := bytes.NewBuffer(nil) + err := printer.Print(ctx, buff, document) + if err != nil { + return diagnostics.Diag{{ + Severity: hcl.DiagError, + Summary: "Failed to render the report", + Detail: err.Error(), + }} + } + + cli := loader(params.Config) + + timestamp := fmt.Sprintf("%d", time.Now().Unix()) + report := client.AddEventReportRequest{ + Uuid: uuid.New().String(), + EventId: params.Args.GetAttrVal("event_id").AsString(), + Name: params.Args.GetAttrVal("name").AsString(), + Content: buff.String(), + Timestamp: ×tamp, + Deleted: false, + } + distribution := params.Args.GetAttrVal("distribution") + if !distribution.IsNull() { + distributionStr := distribution.AsString() + report.Distribution = &distributionStr + } + sharingGroupId := params.Args.GetAttrVal("sharing_group_id") + if !sharingGroupId.IsNull() { + sharingGroupIdStr := sharingGroupId.AsString() + report.SharingGroupId = &sharingGroupIdStr + } + + slog.InfoContext(ctx, "Publish to misp event reports", "filename", report.Name) + + resp, err := cli.AddEventReport(ctx, report) + if err != nil { + return diagnostics.Diag{{ + Severity: hcl.DiagError, + Summary: "Failed to add event report", + Detail: err.Error(), + }} + } + + slog.InfoContext(ctx, "Successfully added report", "id", resp.EventReport.Id, "uuid", resp.EventReport.Uuid, "event_id", resp.EventReport.EventId, "name", resp.EventReport.Name) + return nil + } +} diff --git a/internal/misp/publish_misp_event_reports_test.go b/internal/misp/publish_misp_event_reports_test.go new file mode 100644 index 00000000..6959cd78 --- /dev/null +++ b/internal/misp/publish_misp_event_reports_test.go @@ -0,0 +1,162 @@ +package misp_test + +import ( + "context" + "errors" + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" + "github.com/zclconf/go-cty/cty" + + "github.com/blackstork-io/fabric/internal/misp" + "github.com/blackstork-io/fabric/internal/misp/client" + mocks "github.com/blackstork-io/fabric/mocks/internalpkg/misp" + "github.com/blackstork-io/fabric/pkg/diagnostics/diagtest" + "github.com/blackstork-io/fabric/plugin" + "github.com/blackstork-io/fabric/plugin/dataspec" + "github.com/blackstork-io/fabric/plugin/plugindata" + "github.com/blackstork-io/fabric/plugin/plugintest" +) + +type MispPublishEventReportsTestSuite struct { + suite.Suite + plugin *plugin.Schema + cli *mocks.Client +} + +func TestGithubublishGistSuite(t *testing.T) { + suite.Run(t, &MispPublishEventReportsTestSuite{}) +} + +func (s *MispPublishEventReportsTestSuite) SetupSuite() { + s.plugin = misp.Plugin("1.2.3", func(cfg *dataspec.Block) misp.Client { + return s.cli + }) +} + +func (s *MispPublishEventReportsTestSuite) SetupTest() { + s.cli = &mocks.Client{} +} + +func (s *MispPublishEventReportsTestSuite) TearDownTest() { + s.cli.AssertExpectations(s.T()) +} + +func (s *MispPublishEventReportsTestSuite) PublisherName() string { + return "misp_event_reports" +} + +func (s *MispPublishEventReportsTestSuite) Publisher() *plugin.Publisher { + return s.plugin.Publishers[s.PublisherName()] +} + +func (s *MispPublishEventReportsTestSuite) TestSchema() { + schema := s.plugin.Publishers["misp_event_reports"] + s.Require().NotNil(schema) + s.NotNil(schema.Config) + s.NotNil(schema.Args) + s.NotNil(schema.PublishFunc) +} + +func (s *MispPublishEventReportsTestSuite) TestBasic() { + uuid := uuid.New().String() + s.cli.On("AddEventReport", mock.Anything, mock.Anything).Return(client.AddEventReportResponse{ + EventReport: client.EventReport{ + Id: "id", + Uuid: uuid, + EventId: "event_id", + Name: "name", + }, + }, nil) + ctx := context.Background() + titleMeta := plugindata.Map{ + "provider": plugindata.String("title"), + "plugin": plugindata.String("blackstork/builtin"), + } + + diags := s.plugin.Publish(ctx, s.PublisherName(), &plugin.PublishParams{ + Config: plugintest.NewTestDecoder(s.T(), s.Publisher().Config). + SetAttr("base_url", cty.StringVal("test")). + SetAttr("api_key", cty.StringVal("test")). + Decode(), + Args: plugintest.NewTestDecoder(s.T(), s.Publisher().Args). + SetAttr("event_id", cty.StringVal("event_id")). + SetAttr("name", cty.StringVal("name")). + SetAttr("distribution", cty.StringVal("0")). + Decode(), + Format: plugin.OutputFormatMD, + DataContext: plugindata.Map{ + "document": plugindata.Map{ + "meta": plugindata.Map{ + "name": plugindata.String("test_document"), + }, + "content": plugindata.Map{ + "type": plugindata.String("section"), + "children": plugindata.List{ + plugindata.Map{ + "type": plugindata.String("element"), + "markdown": plugindata.String("# Header 1"), + "meta": titleMeta, + }, + plugindata.Map{ + "type": plugindata.String("element"), + "markdown": plugindata.String("Lorem ipsum dolor sit amet, consectetur adipiscing elit."), + }, + }, + }, + }, + }, + DocumentName: "test_doc", + }) + s.Require().Nil(diags) +} + +func (s *MispPublishEventReportsTestSuite) TestError() { + s.cli.On("AddEventReport", mock.Anything, mock.Anything).Return(client.AddEventReportResponse{}, errors.New("something went wrong")) + ctx := context.Background() + titleMeta := plugindata.Map{ + "provider": plugindata.String("title"), + "plugin": plugindata.String("blackstork/builtin"), + } + + diags := s.plugin.Publish(ctx, s.PublisherName(), &plugin.PublishParams{ + Config: plugintest.NewTestDecoder(s.T(), s.Publisher().Config). + SetAttr("base_url", cty.StringVal("test")). + SetAttr("api_key", cty.StringVal("test")). + Decode(), + Args: plugintest.NewTestDecoder(s.T(), s.Publisher().Args). + SetAttr("event_id", cty.StringVal("event_id")). + SetAttr("name", cty.StringVal("name")). + SetAttr("distribution", cty.StringVal("0")). + Decode(), + Format: plugin.OutputFormatMD, + DataContext: plugindata.Map{ + "document": plugindata.Map{ + "meta": plugindata.Map{ + "name": plugindata.String("test_document"), + }, + "content": plugindata.Map{ + "type": plugindata.String("section"), + "children": plugindata.List{ + plugindata.Map{ + "type": plugindata.String("element"), + "markdown": plugindata.String("# Header 1"), + "meta": titleMeta, + }, + plugindata.Map{ + "type": plugindata.String("element"), + "markdown": plugindata.String("Lorem ipsum dolor sit amet, consectetur adipiscing elit."), + }, + }, + }, + }, + }, + DocumentName: "test_doc", + }) + diagtest.Asserts{{ + diagtest.IsError, + diagtest.DetailContains("something went wrong"), + }}.AssertMatch(s.T(), diags, nil) +} diff --git a/mocks/internalpkg/misp/client.go b/mocks/internalpkg/misp/client.go index b41dcd7d..6887a255 100644 --- a/mocks/internalpkg/misp/client.go +++ b/mocks/internalpkg/misp/client.go @@ -23,6 +23,63 @@ func (_m *Client) EXPECT() *Client_Expecter { return &Client_Expecter{mock: &_m.Mock} } +// AddEventReport provides a mock function with given fields: ctx, req +func (_m *Client) AddEventReport(ctx context.Context, req client.AddEventReportRequest) (client.AddEventReportResponse, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for AddEventReport") + } + + var r0 client.AddEventReportResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, client.AddEventReportRequest) (client.AddEventReportResponse, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, client.AddEventReportRequest) client.AddEventReportResponse); ok { + r0 = rf(ctx, req) + } else { + r0 = ret.Get(0).(client.AddEventReportResponse) + } + + if rf, ok := ret.Get(1).(func(context.Context, client.AddEventReportRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Client_AddEventReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddEventReport' +type Client_AddEventReport_Call struct { + *mock.Call +} + +// AddEventReport is a helper method to define mock.On call +// - ctx context.Context +// - req client.AddEventReportRequest +func (_e *Client_Expecter) AddEventReport(ctx interface{}, req interface{}) *Client_AddEventReport_Call { + return &Client_AddEventReport_Call{Call: _e.mock.On("AddEventReport", ctx, req)} +} + +func (_c *Client_AddEventReport_Call) Run(run func(ctx context.Context, req client.AddEventReportRequest)) *Client_AddEventReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(client.AddEventReportRequest)) + }) + return _c +} + +func (_c *Client_AddEventReport_Call) Return(resp client.AddEventReportResponse, err error) *Client_AddEventReport_Call { + _c.Call.Return(resp, err) + return _c +} + +func (_c *Client_AddEventReport_Call) RunAndReturn(run func(context.Context, client.AddEventReportRequest) (client.AddEventReportResponse, error)) *Client_AddEventReport_Call { + _c.Call.Return(run) + return _c +} + // RestSearchEvents provides a mock function with given fields: ctx, req func (_m *Client) RestSearchEvents(ctx context.Context, req client.RestSearchEventsRequest) (client.RestSearchEventsResponse, error) { ret := _m.Called(ctx, req) diff --git a/plugin/ast/v1/ast.pb.go b/plugin/ast/v1/ast.pb.go index a2a40358..c4a1eb0f 100644 --- a/plugin/ast/v1/ast.pb.go +++ b/plugin/ast/v1/ast.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: ast/v1/ast.proto @@ -190,16 +190,15 @@ func (CellAlignment) EnumDescriptor() ([]byte, []int) { } type Attribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to Value: + state protoimpl.MessageState `protogen:"open.v1"` + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to Value: // // *Attribute_Bytes // *Attribute_Str - Value isAttribute_Value `protobuf_oneof:"value"` + Value isAttribute_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Attribute) Reset() { @@ -239,23 +238,27 @@ func (x *Attribute) GetName() []byte { return nil } -func (m *Attribute) GetValue() isAttribute_Value { - if m != nil { - return m.Value +func (x *Attribute) GetValue() isAttribute_Value { + if x != nil { + return x.Value } return nil } func (x *Attribute) GetBytes() []byte { - if x, ok := x.GetValue().(*Attribute_Bytes); ok { - return x.Bytes + if x != nil { + if x, ok := x.Value.(*Attribute_Bytes); ok { + return x.Bytes + } } return nil } func (x *Attribute) GetStr() string { - if x, ok := x.GetValue().(*Attribute_Str); ok { - return x.Str + if x != nil { + if x, ok := x.Value.(*Attribute_Str); ok { + return x.Str + } } return "" } @@ -277,14 +280,13 @@ func (*Attribute_Bytes) isAttribute_Value() {} func (*Attribute_Str) isAttribute_Value() {} type BaseNode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Children []*Node `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` - Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Children []*Node `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` // value meaningful only for blocks BlankPreviousLines bool `protobuf:"varint,3,opt,name=blank_previous_lines,json=blankPreviousLines,proto3" json:"blank_previous_lines,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BaseNode) Reset() { @@ -339,11 +341,8 @@ func (x *BaseNode) GetBlankPreviousLines() bool { } type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: // // *Node_Document // *Node_TextBlock @@ -370,7 +369,9 @@ type Node struct { // *Node_Strikethrough // *Node_ContentNode // *Node_Custom - Kind isNode_Kind `protobuf_oneof:"kind"` + Kind isNode_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Node) Reset() { @@ -403,184 +404,234 @@ func (*Node) Descriptor() ([]byte, []int) { return file_ast_v1_ast_proto_rawDescGZIP(), []int{2} } -func (m *Node) GetKind() isNode_Kind { - if m != nil { - return m.Kind +func (x *Node) GetKind() isNode_Kind { + if x != nil { + return x.Kind } return nil } func (x *Node) GetDocument() *Document { - if x, ok := x.GetKind().(*Node_Document); ok { - return x.Document + if x != nil { + if x, ok := x.Kind.(*Node_Document); ok { + return x.Document + } } return nil } func (x *Node) GetTextBlock() *TextBlock { - if x, ok := x.GetKind().(*Node_TextBlock); ok { - return x.TextBlock + if x != nil { + if x, ok := x.Kind.(*Node_TextBlock); ok { + return x.TextBlock + } } return nil } func (x *Node) GetParagraph() *Paragraph { - if x, ok := x.GetKind().(*Node_Paragraph); ok { - return x.Paragraph + if x != nil { + if x, ok := x.Kind.(*Node_Paragraph); ok { + return x.Paragraph + } } return nil } func (x *Node) GetHeading() *Heading { - if x, ok := x.GetKind().(*Node_Heading); ok { - return x.Heading + if x != nil { + if x, ok := x.Kind.(*Node_Heading); ok { + return x.Heading + } } return nil } func (x *Node) GetThematicBreak() *ThematicBreak { - if x, ok := x.GetKind().(*Node_ThematicBreak); ok { - return x.ThematicBreak + if x != nil { + if x, ok := x.Kind.(*Node_ThematicBreak); ok { + return x.ThematicBreak + } } return nil } func (x *Node) GetCodeBlock() *CodeBlock { - if x, ok := x.GetKind().(*Node_CodeBlock); ok { - return x.CodeBlock + if x != nil { + if x, ok := x.Kind.(*Node_CodeBlock); ok { + return x.CodeBlock + } } return nil } func (x *Node) GetFencedCodeBlock() *FencedCodeBlock { - if x, ok := x.GetKind().(*Node_FencedCodeBlock); ok { - return x.FencedCodeBlock + if x != nil { + if x, ok := x.Kind.(*Node_FencedCodeBlock); ok { + return x.FencedCodeBlock + } } return nil } func (x *Node) GetBlockquote() *Blockquote { - if x, ok := x.GetKind().(*Node_Blockquote); ok { - return x.Blockquote + if x != nil { + if x, ok := x.Kind.(*Node_Blockquote); ok { + return x.Blockquote + } } return nil } func (x *Node) GetList() *List { - if x, ok := x.GetKind().(*Node_List); ok { - return x.List + if x != nil { + if x, ok := x.Kind.(*Node_List); ok { + return x.List + } } return nil } func (x *Node) GetListItem() *ListItem { - if x, ok := x.GetKind().(*Node_ListItem); ok { - return x.ListItem + if x != nil { + if x, ok := x.Kind.(*Node_ListItem); ok { + return x.ListItem + } } return nil } func (x *Node) GetHtmlBlock() *HTMLBlock { - if x, ok := x.GetKind().(*Node_HtmlBlock); ok { - return x.HtmlBlock + if x != nil { + if x, ok := x.Kind.(*Node_HtmlBlock); ok { + return x.HtmlBlock + } } return nil } func (x *Node) GetText() *Text { - if x, ok := x.GetKind().(*Node_Text); ok { - return x.Text + if x != nil { + if x, ok := x.Kind.(*Node_Text); ok { + return x.Text + } } return nil } func (x *Node) GetString_() *String { - if x, ok := x.GetKind().(*Node_String_); ok { - return x.String_ + if x != nil { + if x, ok := x.Kind.(*Node_String_); ok { + return x.String_ + } } return nil } func (x *Node) GetCodeSpan() *CodeSpan { - if x, ok := x.GetKind().(*Node_CodeSpan); ok { - return x.CodeSpan + if x != nil { + if x, ok := x.Kind.(*Node_CodeSpan); ok { + return x.CodeSpan + } } return nil } func (x *Node) GetEmphasis() *Emphasis { - if x, ok := x.GetKind().(*Node_Emphasis); ok { - return x.Emphasis + if x != nil { + if x, ok := x.Kind.(*Node_Emphasis); ok { + return x.Emphasis + } } return nil } func (x *Node) GetLinkOrImage() *LinkOrImage { - if x, ok := x.GetKind().(*Node_LinkOrImage); ok { - return x.LinkOrImage + if x != nil { + if x, ok := x.Kind.(*Node_LinkOrImage); ok { + return x.LinkOrImage + } } return nil } func (x *Node) GetAutoLink() *AutoLink { - if x, ok := x.GetKind().(*Node_AutoLink); ok { - return x.AutoLink + if x != nil { + if x, ok := x.Kind.(*Node_AutoLink); ok { + return x.AutoLink + } } return nil } func (x *Node) GetRawHtml() *RawHTML { - if x, ok := x.GetKind().(*Node_RawHtml); ok { - return x.RawHtml + if x != nil { + if x, ok := x.Kind.(*Node_RawHtml); ok { + return x.RawHtml + } } return nil } func (x *Node) GetTable() *Table { - if x, ok := x.GetKind().(*Node_Table); ok { - return x.Table + if x != nil { + if x, ok := x.Kind.(*Node_Table); ok { + return x.Table + } } return nil } func (x *Node) GetTableRow() *TableRow { - if x, ok := x.GetKind().(*Node_TableRow); ok { - return x.TableRow + if x != nil { + if x, ok := x.Kind.(*Node_TableRow); ok { + return x.TableRow + } } return nil } func (x *Node) GetTableCell() *TableCell { - if x, ok := x.GetKind().(*Node_TableCell); ok { - return x.TableCell + if x != nil { + if x, ok := x.Kind.(*Node_TableCell); ok { + return x.TableCell + } } return nil } func (x *Node) GetTaskCheckbox() *TaskCheckbox { - if x, ok := x.GetKind().(*Node_TaskCheckbox); ok { - return x.TaskCheckbox + if x != nil { + if x, ok := x.Kind.(*Node_TaskCheckbox); ok { + return x.TaskCheckbox + } } return nil } func (x *Node) GetStrikethrough() *Strikethrough { - if x, ok := x.GetKind().(*Node_Strikethrough); ok { - return x.Strikethrough + if x != nil { + if x, ok := x.Kind.(*Node_Strikethrough); ok { + return x.Strikethrough + } } return nil } func (x *Node) GetContentNode() *FabricContentNode { - if x, ok := x.GetKind().(*Node_ContentNode); ok { - return x.ContentNode + if x != nil { + if x, ok := x.Kind.(*Node_ContentNode); ok { + return x.ContentNode + } } return nil } func (x *Node) GetCustom() *CustomNode { - if x, ok := x.GetKind().(*Node_Custom); ok { - return x.Custom + if x != nil { + if x, ok := x.Kind.(*Node_Custom); ok { + return x.Custom + } } return nil } @@ -747,11 +798,10 @@ func (*Node_ContentNode) isNode_Kind() {} func (*Node_Custom) isNode_Kind() {} type Document struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Document) Reset() { @@ -792,11 +842,10 @@ func (x *Document) GetBase() *BaseNode { } type TextBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TextBlock) Reset() { @@ -837,11 +886,10 @@ func (x *TextBlock) GetBase() *BaseNode { } type Paragraph struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Paragraph) Reset() { @@ -882,12 +930,11 @@ func (x *Paragraph) GetBase() *BaseNode { } type Heading struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Level uint32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Level uint32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Heading) Reset() { @@ -935,11 +982,10 @@ func (x *Heading) GetLevel() uint32 { } type ThematicBreak struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ThematicBreak) Reset() { @@ -980,12 +1026,11 @@ func (x *ThematicBreak) GetBase() *BaseNode { } type CodeBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Lines [][]byte `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Lines [][]byte `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CodeBlock) Reset() { @@ -1033,13 +1078,12 @@ func (x *CodeBlock) GetLines() [][]byte { } type FencedCodeBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Info *Text `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + Lines [][]byte `protobuf:"bytes,3,rep,name=lines,proto3" json:"lines,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Info *Text `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` - Lines [][]byte `protobuf:"bytes,3,rep,name=lines,proto3" json:"lines,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FencedCodeBlock) Reset() { @@ -1094,11 +1138,10 @@ func (x *FencedCodeBlock) GetLines() [][]byte { } type Blockquote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Blockquote) Reset() { @@ -1139,14 +1182,13 @@ func (x *Blockquote) GetBase() *BaseNode { } type List struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Marker uint32 `protobuf:"varint,2,opt,name=marker,proto3" json:"marker,omitempty"` + IsTight bool `protobuf:"varint,3,opt,name=is_tight,json=isTight,proto3" json:"is_tight,omitempty"` + Start uint32 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Marker uint32 `protobuf:"varint,2,opt,name=marker,proto3" json:"marker,omitempty"` - IsTight bool `protobuf:"varint,3,opt,name=is_tight,json=isTight,proto3" json:"is_tight,omitempty"` - Start uint32 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty"` + sizeCache protoimpl.SizeCache } func (x *List) Reset() { @@ -1208,12 +1250,11 @@ func (x *List) GetStart() uint32 { } type ListItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ListItem) Reset() { @@ -1261,14 +1302,13 @@ func (x *ListItem) GetOffset() int64 { } type HTMLBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Type HTMLBlockType `protobuf:"varint,2,opt,name=type,proto3,enum=ast.v1.HTMLBlockType" json:"type,omitempty"` + Lines [][]byte `protobuf:"bytes,3,rep,name=lines,proto3" json:"lines,omitempty"` + ClosureLine []byte `protobuf:"bytes,4,opt,name=closure_line,json=closureLine,proto3" json:"closure_line,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Type HTMLBlockType `protobuf:"varint,2,opt,name=type,proto3,enum=ast.v1.HTMLBlockType" json:"type,omitempty"` - Lines [][]byte `protobuf:"bytes,3,rep,name=lines,proto3" json:"lines,omitempty"` - ClosureLine []byte `protobuf:"bytes,4,opt,name=closure_line,json=closureLine,proto3" json:"closure_line,omitempty"` + sizeCache protoimpl.SizeCache } func (x *HTMLBlock) Reset() { @@ -1330,15 +1370,14 @@ func (x *HTMLBlock) GetClosureLine() []byte { } type Text struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Segment []byte `protobuf:"bytes,2,opt,name=segment,proto3" json:"segment,omitempty"` + SoftLineBreak bool `protobuf:"varint,3,opt,name=soft_line_break,json=softLineBreak,proto3" json:"soft_line_break,omitempty"` + HardLineBreak bool `protobuf:"varint,4,opt,name=hard_line_break,json=hardLineBreak,proto3" json:"hard_line_break,omitempty"` + Raw bool `protobuf:"varint,5,opt,name=raw,proto3" json:"raw,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Segment []byte `protobuf:"bytes,2,opt,name=segment,proto3" json:"segment,omitempty"` - SoftLineBreak bool `protobuf:"varint,3,opt,name=soft_line_break,json=softLineBreak,proto3" json:"soft_line_break,omitempty"` - HardLineBreak bool `protobuf:"varint,4,opt,name=hard_line_break,json=hardLineBreak,proto3" json:"hard_line_break,omitempty"` - Raw bool `protobuf:"varint,5,opt,name=raw,proto3" json:"raw,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Text) Reset() { @@ -1407,14 +1446,13 @@ func (x *Text) GetRaw() bool { } type String struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Raw bool `protobuf:"varint,3,opt,name=raw,proto3" json:"raw,omitempty"` + Code bool `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Raw bool `protobuf:"varint,3,opt,name=raw,proto3" json:"raw,omitempty"` - Code bool `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"` + sizeCache protoimpl.SizeCache } func (x *String) Reset() { @@ -1476,11 +1514,10 @@ func (x *String) GetCode() bool { } type CodeSpan struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CodeSpan) Reset() { @@ -1521,12 +1558,11 @@ func (x *CodeSpan) GetBase() *BaseNode { } type Emphasis struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Emphasis) Reset() { @@ -1574,14 +1610,13 @@ func (x *Emphasis) GetLevel() int64 { } type LinkOrImage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Destination []byte `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Title []byte `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + IsImage bool `protobuf:"varint,4,opt,name=is_image,json=isImage,proto3" json:"is_image,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Destination []byte `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - Title []byte `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - IsImage bool `protobuf:"varint,4,opt,name=is_image,json=isImage,proto3" json:"is_image,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LinkOrImage) Reset() { @@ -1643,14 +1678,13 @@ func (x *LinkOrImage) GetIsImage() bool { } type AutoLink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Type AutoLinkType `protobuf:"varint,2,opt,name=type,proto3,enum=ast.v1.AutoLinkType" json:"type,omitempty"` + Protocol []byte `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Type AutoLinkType `protobuf:"varint,2,opt,name=type,proto3,enum=ast.v1.AutoLinkType" json:"type,omitempty"` - Protocol []byte `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AutoLink) Reset() { @@ -1712,12 +1746,11 @@ func (x *AutoLink) GetValue() []byte { } type RawHTML struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Segments [][]byte `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Segments [][]byte `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RawHTML) Reset() { @@ -1765,12 +1798,11 @@ func (x *RawHTML) GetSegments() [][]byte { } type Table struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Alignments []CellAlignment `protobuf:"varint,2,rep,packed,name=alignments,proto3,enum=ast.v1.CellAlignment" json:"alignments,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Alignments []CellAlignment `protobuf:"varint,2,rep,packed,name=alignments,proto3,enum=ast.v1.CellAlignment" json:"alignments,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Table) Reset() { @@ -1818,13 +1850,12 @@ func (x *Table) GetAlignments() []CellAlignment { } type TableRow struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Alignments []CellAlignment `protobuf:"varint,2,rep,packed,name=alignments,proto3,enum=ast.v1.CellAlignment" json:"alignments,omitempty"` + IsHeader bool `protobuf:"varint,4,opt,name=is_header,json=isHeader,proto3" json:"is_header,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Alignments []CellAlignment `protobuf:"varint,2,rep,packed,name=alignments,proto3,enum=ast.v1.CellAlignment" json:"alignments,omitempty"` - IsHeader bool `protobuf:"varint,4,opt,name=is_header,json=isHeader,proto3" json:"is_header,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TableRow) Reset() { @@ -1879,12 +1910,11 @@ func (x *TableRow) GetIsHeader() bool { } type TableCell struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Alignment CellAlignment `protobuf:"varint,2,opt,name=alignment,proto3,enum=ast.v1.CellAlignment" json:"alignment,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Alignment CellAlignment `protobuf:"varint,2,opt,name=alignment,proto3,enum=ast.v1.CellAlignment" json:"alignment,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TableCell) Reset() { @@ -1932,12 +1962,11 @@ func (x *TableCell) GetAlignment() CellAlignment { } type TaskCheckbox struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + IsChecked bool `protobuf:"varint,2,opt,name=is_checked,json=isChecked,proto3" json:"is_checked,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - IsChecked bool `protobuf:"varint,2,opt,name=is_checked,json=isChecked,proto3" json:"is_checked,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TaskCheckbox) Reset() { @@ -1985,11 +2014,10 @@ func (x *TaskCheckbox) GetIsChecked() bool { } type Strikethrough struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` unknownFields protoimpl.UnknownFields - - Base *BaseNode `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Strikethrough) Reset() { @@ -2030,14 +2058,13 @@ func (x *Strikethrough) GetBase() *BaseNode { } type CustomNode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Indicates that this block is an inline element IsInline bool `protobuf:"varint,1,opt,name=is_inline,json=isInline,proto3" json:"is_inline,omitempty"` Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` BlankPreviousLines bool `protobuf:"varint,3,opt,name=blank_previous_lines,json=blankPreviousLines,proto3" json:"blank_previous_lines,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CustomNode) Reset() { @@ -2092,15 +2119,14 @@ func (x *CustomNode) GetBlankPreviousLines() bool { } type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // ie "blackstork/builtin" Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` // ie "title" - Plugin string `protobuf:"bytes,2,opt,name=plugin,proto3" json:"plugin,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Plugin string `protobuf:"bytes,2,opt,name=plugin,proto3" json:"plugin,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { @@ -2156,12 +2182,11 @@ func (x *Metadata) GetVersion() string { // Root of the plugin-rendered data type FabricContentNode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Root *BaseNode `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` // direct content, no document node unknownFields protoimpl.UnknownFields - - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - Root *BaseNode `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` // direct content, no document node + sizeCache protoimpl.SizeCache } func (x *FabricContentNode) Reset() { diff --git a/plugin/pluginapi/v1/content.pb.go b/plugin/pluginapi/v1/content.pb.go index 18e7df42..21488d2d 100644 --- a/plugin/pluginapi/v1/content.pb.go +++ b/plugin/pluginapi/v1/content.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/content.proto @@ -71,12 +71,11 @@ func (LocationEffect) EnumDescriptor() ([]byte, []int) { } type Location struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + Effect LocationEffect `protobuf:"varint,2,opt,name=effect,proto3,enum=pluginapi.v1.LocationEffect" json:"effect,omitempty"` unknownFields protoimpl.UnknownFields - - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Effect LocationEffect `protobuf:"varint,2,opt,name=effect,proto3,enum=pluginapi.v1.LocationEffect" json:"effect,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Location) Reset() { @@ -124,12 +123,11 @@ func (x *Location) GetEffect() LocationEffect { } type ContentResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Content *Content `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` unknownFields protoimpl.UnknownFields - - Content *Content `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ContentResult) Reset() { @@ -177,16 +175,15 @@ func (x *ContentResult) GetLocation() *Location { } type Content struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Value: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: // // *Content_Element // *Content_Section // *Content_Empty - Value isContent_Value `protobuf_oneof:"value"` + Value isContent_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Content) Reset() { @@ -219,30 +216,36 @@ func (*Content) Descriptor() ([]byte, []int) { return file_pluginapi_v1_content_proto_rawDescGZIP(), []int{2} } -func (m *Content) GetValue() isContent_Value { - if m != nil { - return m.Value +func (x *Content) GetValue() isContent_Value { + if x != nil { + return x.Value } return nil } func (x *Content) GetElement() *ContentElement { - if x, ok := x.GetValue().(*Content_Element); ok { - return x.Element + if x != nil { + if x, ok := x.Value.(*Content_Element); ok { + return x.Element + } } return nil } func (x *Content) GetSection() *ContentSection { - if x, ok := x.GetValue().(*Content_Section); ok { - return x.Section + if x != nil { + if x, ok := x.Value.(*Content_Section); ok { + return x.Section + } } return nil } func (x *Content) GetEmpty() *ContentEmpty { - if x, ok := x.GetValue().(*Content_Empty); ok { - return x.Empty + if x != nil { + if x, ok := x.Value.(*Content_Empty); ok { + return x.Empty + } } return nil } @@ -270,12 +273,11 @@ func (*Content_Section) isContent_Value() {} func (*Content_Empty) isContent_Value() {} type ContentSection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Children []*Content `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Meta *v1.Metadata `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` unknownFields protoimpl.UnknownFields - - Children []*Content `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` - Meta *v1.Metadata `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ContentSection) Reset() { @@ -323,13 +325,12 @@ func (x *ContentSection) GetMeta() *v1.Metadata { } type ContentElement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Markdown []byte `protobuf:"bytes,1,opt,name=markdown,proto3" json:"markdown,omitempty"` + Ast *v1.FabricContentNode `protobuf:"bytes,2,opt,name=ast,proto3,oneof" json:"ast,omitempty"` + Meta *v1.Metadata `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"` unknownFields protoimpl.UnknownFields - - Markdown []byte `protobuf:"bytes,1,opt,name=markdown,proto3" json:"markdown,omitempty"` - Ast *v1.FabricContentNode `protobuf:"bytes,2,opt,name=ast,proto3,oneof" json:"ast,omitempty"` - Meta *v1.Metadata `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ContentElement) Reset() { @@ -384,9 +385,9 @@ func (x *ContentElement) GetMeta() *v1.Metadata { } type ContentEmpty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ContentEmpty) Reset() { diff --git a/plugin/pluginapi/v1/cty.pb.go b/plugin/pluginapi/v1/cty.pb.go index 489683fa..cfb000b9 100644 --- a/plugin/pluginapi/v1/cty.pb.go +++ b/plugin/pluginapi/v1/cty.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/cty.proto @@ -21,13 +21,10 @@ const ( ) type Cty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Cty with nil data is decoded as cty.NilVal // - // Types that are assignable to Data: + // Types that are valid to be assigned to Data: // // *Cty_Primitive_ // *Cty_Object_ @@ -39,7 +36,9 @@ type Cty struct { // *Cty_Caps // *Cty_Unknown // *Cty_Dyn - Data isCty_Data `protobuf_oneof:"data"` + Data isCty_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cty) Reset() { @@ -72,79 +71,99 @@ func (*Cty) Descriptor() ([]byte, []int) { return file_pluginapi_v1_cty_proto_rawDescGZIP(), []int{0} } -func (m *Cty) GetData() isCty_Data { - if m != nil { - return m.Data +func (x *Cty) GetData() isCty_Data { + if x != nil { + return x.Data } return nil } func (x *Cty) GetPrimitive() *Cty_Primitive { - if x, ok := x.GetData().(*Cty_Primitive_); ok { - return x.Primitive + if x != nil { + if x, ok := x.Data.(*Cty_Primitive_); ok { + return x.Primitive + } } return nil } func (x *Cty) GetObject() *Cty_Object { - if x, ok := x.GetData().(*Cty_Object_); ok { - return x.Object + if x != nil { + if x, ok := x.Data.(*Cty_Object_); ok { + return x.Object + } } return nil } func (x *Cty) GetMap() *Cty_Mapping { - if x, ok := x.GetData().(*Cty_Map); ok { - return x.Map + if x != nil { + if x, ok := x.Data.(*Cty_Map); ok { + return x.Map + } } return nil } func (x *Cty) GetList() *Cty_Sequence { - if x, ok := x.GetData().(*Cty_List); ok { - return x.List + if x != nil { + if x, ok := x.Data.(*Cty_List); ok { + return x.List + } } return nil } func (x *Cty) GetSet() *Cty_Sequence { - if x, ok := x.GetData().(*Cty_Set); ok { - return x.Set + if x != nil { + if x, ok := x.Data.(*Cty_Set); ok { + return x.Set + } } return nil } func (x *Cty) GetTuple() *Cty_Sequence { - if x, ok := x.GetData().(*Cty_Tuple); ok { - return x.Tuple + if x != nil { + if x, ok := x.Data.(*Cty_Tuple); ok { + return x.Tuple + } } return nil } func (x *Cty) GetNull() *CtyType { - if x, ok := x.GetData().(*Cty_Null); ok { - return x.Null + if x != nil { + if x, ok := x.Data.(*Cty_Null); ok { + return x.Null + } } return nil } func (x *Cty) GetCaps() *Cty_Capsule { - if x, ok := x.GetData().(*Cty_Caps); ok { - return x.Caps + if x != nil { + if x, ok := x.Data.(*Cty_Caps); ok { + return x.Caps + } } return nil } func (x *Cty) GetUnknown() *CtyType { - if x, ok := x.GetData().(*Cty_Unknown); ok { - return x.Unknown + if x != nil { + if x, ok := x.Data.(*Cty_Unknown); ok { + return x.Unknown + } } return nil } func (x *Cty) GetDyn() *Cty_Dynamic { - if x, ok := x.GetData().(*Cty_Dyn); ok { - return x.Dyn + if x != nil { + if x, ok := x.Data.(*Cty_Dyn); ok { + return x.Dyn + } } return nil } @@ -218,11 +237,10 @@ func (*Cty_Dyn) isCty_Data() {} // Forces decoding of the inner Cty as a type type CtyType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Type *Cty `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` unknownFields protoimpl.UnknownFields - - Type *Cty `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CtyType) Reset() { @@ -264,11 +282,10 @@ func (x *CtyType) GetType() *Cty { // Forces decoding of the inner Cty as a value type CtyValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value *Cty `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Value *Cty `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CtyValue) Reset() { @@ -309,16 +326,15 @@ func (x *CtyValue) GetValue() *Cty { } type Cty_Primitive struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Data: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Data: // // *Cty_Primitive_Str // *Cty_Primitive_Num // *Cty_Primitive_Bln - Data isCty_Primitive_Data `protobuf_oneof:"data"` + Data isCty_Primitive_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cty_Primitive) Reset() { @@ -351,30 +367,36 @@ func (*Cty_Primitive) Descriptor() ([]byte, []int) { return file_pluginapi_v1_cty_proto_rawDescGZIP(), []int{0, 0} } -func (m *Cty_Primitive) GetData() isCty_Primitive_Data { - if m != nil { - return m.Data +func (x *Cty_Primitive) GetData() isCty_Primitive_Data { + if x != nil { + return x.Data } return nil } func (x *Cty_Primitive) GetStr() string { - if x, ok := x.GetData().(*Cty_Primitive_Str); ok { - return x.Str + if x != nil { + if x, ok := x.Data.(*Cty_Primitive_Str); ok { + return x.Str + } } return "" } func (x *Cty_Primitive) GetNum() []byte { - if x, ok := x.GetData().(*Cty_Primitive_Num); ok { - return x.Num + if x != nil { + if x, ok := x.Data.(*Cty_Primitive_Num); ok { + return x.Num + } } return nil } func (x *Cty_Primitive) GetBln() bool { - if x, ok := x.GetData().(*Cty_Primitive_Bln); ok { - return x.Bln + if x != nil { + if x, ok := x.Data.(*Cty_Primitive_Bln); ok { + return x.Bln + } } return false } @@ -403,11 +425,10 @@ func (*Cty_Primitive_Num) isCty_Primitive_Data() {} func (*Cty_Primitive_Bln) isCty_Primitive_Data() {} type Cty_Object struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data map[string]*Cty_Object_Attr `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Data map[string]*Cty_Object_Attr `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *Cty_Object) Reset() { @@ -448,13 +469,12 @@ func (x *Cty_Object) GetData() map[string]*Cty_Object_Attr { } type Cty_Mapping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data map[string]*Cty `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + Data map[string]*Cty `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Original map is empty, element was added to preserve the type - OnlyType bool `protobuf:"varint,2,opt,name=only_type,json=onlyType,proto3" json:"only_type,omitempty"` + OnlyType bool `protobuf:"varint,2,opt,name=only_type,json=onlyType,proto3" json:"only_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cty_Mapping) Reset() { @@ -502,14 +522,13 @@ func (x *Cty_Mapping) GetOnlyType() bool { } type Cty_Sequence struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []*Cty `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Data []*Cty `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // Original sequence is empty, element added to preserve the type // Not true for empty tuples, since they are valid values - OnlyType bool `protobuf:"varint,2,opt,name=only_type,json=onlyType,proto3" json:"only_type,omitempty"` + OnlyType bool `protobuf:"varint,2,opt,name=only_type,json=onlyType,proto3" json:"only_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cty_Sequence) Reset() { @@ -557,14 +576,13 @@ func (x *Cty_Sequence) GetOnlyType() bool { } type Cty_Capsule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Data: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Data: // // *Cty_Capsule_PluginData - Data isCty_Capsule_Data `protobuf_oneof:"data"` + Data isCty_Capsule_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cty_Capsule) Reset() { @@ -597,16 +615,18 @@ func (*Cty_Capsule) Descriptor() ([]byte, []int) { return file_pluginapi_v1_cty_proto_rawDescGZIP(), []int{0, 4} } -func (m *Cty_Capsule) GetData() isCty_Capsule_Data { - if m != nil { - return m.Data +func (x *Cty_Capsule) GetData() isCty_Capsule_Data { + if x != nil { + return x.Data } return nil } func (x *Cty_Capsule) GetPluginData() *Data { - if x, ok := x.GetData().(*Cty_Capsule_PluginData); ok { - return x.PluginData + if x != nil { + if x, ok := x.Data.(*Cty_Capsule_PluginData); ok { + return x.PluginData + } } return nil } @@ -622,9 +642,9 @@ type Cty_Capsule_PluginData struct { func (*Cty_Capsule_PluginData) isCty_Capsule_Data() {} type Cty_Dynamic struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Cty_Dynamic) Reset() { @@ -658,12 +678,11 @@ func (*Cty_Dynamic) Descriptor() ([]byte, []int) { } type Cty_Object_Attr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data *Cty `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` unknownFields protoimpl.UnknownFields - - Data *Cty `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Cty_Object_Attr) Reset() { diff --git a/plugin/pluginapi/v1/data.pb.go b/plugin/pluginapi/v1/data.pb.go index 3b9b5cec..caf7325a 100644 --- a/plugin/pluginapi/v1/data.pb.go +++ b/plugin/pluginapi/v1/data.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/data.proto @@ -21,18 +21,17 @@ const ( ) type Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Data: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Data: // // *Data_StringVal // *Data_NumberVal // *Data_BoolVal // *Data_ListVal // *Data_MapVal - Data isData_Data `protobuf_oneof:"data"` + Data isData_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Data) Reset() { @@ -65,44 +64,54 @@ func (*Data) Descriptor() ([]byte, []int) { return file_pluginapi_v1_data_proto_rawDescGZIP(), []int{0} } -func (m *Data) GetData() isData_Data { - if m != nil { - return m.Data +func (x *Data) GetData() isData_Data { + if x != nil { + return x.Data } return nil } func (x *Data) GetStringVal() string { - if x, ok := x.GetData().(*Data_StringVal); ok { - return x.StringVal + if x != nil { + if x, ok := x.Data.(*Data_StringVal); ok { + return x.StringVal + } } return "" } func (x *Data) GetNumberVal() float64 { - if x, ok := x.GetData().(*Data_NumberVal); ok { - return x.NumberVal + if x != nil { + if x, ok := x.Data.(*Data_NumberVal); ok { + return x.NumberVal + } } return 0 } func (x *Data) GetBoolVal() bool { - if x, ok := x.GetData().(*Data_BoolVal); ok { - return x.BoolVal + if x != nil { + if x, ok := x.Data.(*Data_BoolVal); ok { + return x.BoolVal + } } return false } func (x *Data) GetListVal() *ListData { - if x, ok := x.GetData().(*Data_ListVal); ok { - return x.ListVal + if x != nil { + if x, ok := x.Data.(*Data_ListVal); ok { + return x.ListVal + } } return nil } func (x *Data) GetMapVal() *MapData { - if x, ok := x.GetData().(*Data_MapVal); ok { - return x.MapVal + if x != nil { + if x, ok := x.Data.(*Data_MapVal); ok { + return x.MapVal + } } return nil } @@ -142,11 +151,10 @@ func (*Data_ListVal) isData_Data() {} func (*Data_MapVal) isData_Data() {} type ListData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value []*Data `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Value []*Data `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ListData) Reset() { @@ -187,11 +195,10 @@ func (x *ListData) GetValue() []*Data { } type MapData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value map[string]*Data `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Value map[string]*Data `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *MapData) Reset() { diff --git a/plugin/pluginapi/v1/dataspec.pb.go b/plugin/pluginapi/v1/dataspec.pb.go index 192caa9e..cc6265bb 100644 --- a/plugin/pluginapi/v1/dataspec.pb.go +++ b/plugin/pluginapi/v1/dataspec.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/dataspec.proto @@ -21,21 +21,20 @@ const ( ) type AttrSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type *CtyType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + DefaultVal *CtyValue `protobuf:"bytes,3,opt,name=default_val,json=defaultVal,proto3" json:"default_val,omitempty"` + ExampleVal *CtyValue `protobuf:"bytes,4,opt,name=example_val,json=exampleVal,proto3" json:"example_val,omitempty"` + Doc string `protobuf:"bytes,5,opt,name=doc,proto3" json:"doc,omitempty"` + Constraints uint32 `protobuf:"varint,7,opt,name=constraints,proto3" json:"constraints,omitempty"` + OneOf []*CtyValue `protobuf:"bytes,8,rep,name=one_of,json=oneOf,proto3" json:"one_of,omitempty"` + MinInclusive *CtyValue `protobuf:"bytes,9,opt,name=min_inclusive,json=minInclusive,proto3" json:"min_inclusive,omitempty"` + MaxInclusive *CtyValue `protobuf:"bytes,10,opt,name=max_inclusive,json=maxInclusive,proto3" json:"max_inclusive,omitempty"` + Deprecated string `protobuf:"bytes,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + Secret bool `protobuf:"varint,12,opt,name=secret,proto3" json:"secret,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type *CtyType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - DefaultVal *CtyValue `protobuf:"bytes,3,opt,name=default_val,json=defaultVal,proto3" json:"default_val,omitempty"` - ExampleVal *CtyValue `protobuf:"bytes,4,opt,name=example_val,json=exampleVal,proto3" json:"example_val,omitempty"` - Doc string `protobuf:"bytes,5,opt,name=doc,proto3" json:"doc,omitempty"` - Constraints uint32 `protobuf:"varint,7,opt,name=constraints,proto3" json:"constraints,omitempty"` - OneOf []*CtyValue `protobuf:"bytes,8,rep,name=one_of,json=oneOf,proto3" json:"one_of,omitempty"` - MinInclusive *CtyValue `protobuf:"bytes,9,opt,name=min_inclusive,json=minInclusive,proto3" json:"min_inclusive,omitempty"` - MaxInclusive *CtyValue `protobuf:"bytes,10,opt,name=max_inclusive,json=maxInclusive,proto3" json:"max_inclusive,omitempty"` - Deprecated string `protobuf:"bytes,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - Secret bool `protobuf:"varint,12,opt,name=secret,proto3" json:"secret,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AttrSpec) Reset() { @@ -146,10 +145,7 @@ func (x *AttrSpec) GetSecret() bool { } type BlockSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` HeadersSpec []*BlockSpec_NameMatcher `protobuf:"bytes,1,rep,name=headers_spec,json=headersSpec,proto3" json:"headers_spec,omitempty"` Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` Repeatable bool `protobuf:"varint,3,opt,name=repeatable,proto3" json:"repeatable,omitempty"` @@ -158,6 +154,8 @@ type BlockSpec struct { AttrSpecs []*AttrSpec `protobuf:"bytes,6,rep,name=attr_specs,json=attrSpecs,proto3" json:"attr_specs,omitempty"` AllowUnspecifiedBlocks bool `protobuf:"varint,7,opt,name=allow_unspecified_blocks,json=allowUnspecifiedBlocks,proto3" json:"allow_unspecified_blocks,omitempty"` AllowUnspecifiedAttributes bool `protobuf:"varint,8,opt,name=allow_unspecified_attributes,json=allowUnspecifiedAttributes,proto3" json:"allow_unspecified_attributes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BlockSpec) Reset() { @@ -247,15 +245,14 @@ func (x *BlockSpec) GetAllowUnspecifiedAttributes() bool { } type Attr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + NameRange *Range `protobuf:"bytes,2,opt,name=name_range,json=nameRange,proto3" json:"name_range,omitempty"` + Value *CtyValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + ValueRange *Range `protobuf:"bytes,4,opt,name=value_range,json=valueRange,proto3" json:"value_range,omitempty"` + Secret bool `protobuf:"varint,5,opt,name=secret,proto3" json:"secret,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - NameRange *Range `protobuf:"bytes,2,opt,name=name_range,json=nameRange,proto3" json:"name_range,omitempty"` - Value *CtyValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - ValueRange *Range `protobuf:"bytes,4,opt,name=value_range,json=valueRange,proto3" json:"value_range,omitempty"` - Secret bool `protobuf:"varint,5,opt,name=secret,proto3" json:"secret,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Attr) Reset() { @@ -324,15 +321,14 @@ func (x *Attr) GetSecret() bool { } type Block struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Header []string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` + HeaderRanges []*Range `protobuf:"bytes,2,rep,name=header_ranges,json=headerRanges,proto3" json:"header_ranges,omitempty"` + Attributes map[string]*Attr `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"` + ContentsRange *Range `protobuf:"bytes,5,opt,name=contents_range,json=contentsRange,proto3" json:"contents_range,omitempty"` unknownFields protoimpl.UnknownFields - - Header []string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` - HeaderRanges []*Range `protobuf:"bytes,2,rep,name=header_ranges,json=headerRanges,proto3" json:"header_ranges,omitempty"` - Attributes map[string]*Attr `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"` - ContentsRange *Range `protobuf:"bytes,5,opt,name=contents_range,json=contentsRange,proto3" json:"contents_range,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Block) Reset() { @@ -401,14 +397,13 @@ func (x *Block) GetContentsRange() *Range { } type BlockSpec_NameMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Matcher: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Matcher: // // *BlockSpec_NameMatcher_Exact_ - Matcher isBlockSpec_NameMatcher_Matcher `protobuf_oneof:"matcher"` + Matcher isBlockSpec_NameMatcher_Matcher `protobuf_oneof:"matcher"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BlockSpec_NameMatcher) Reset() { @@ -441,16 +436,18 @@ func (*BlockSpec_NameMatcher) Descriptor() ([]byte, []int) { return file_pluginapi_v1_dataspec_proto_rawDescGZIP(), []int{1, 0} } -func (m *BlockSpec_NameMatcher) GetMatcher() isBlockSpec_NameMatcher_Matcher { - if m != nil { - return m.Matcher +func (x *BlockSpec_NameMatcher) GetMatcher() isBlockSpec_NameMatcher_Matcher { + if x != nil { + return x.Matcher } return nil } func (x *BlockSpec_NameMatcher) GetExact() *BlockSpec_NameMatcher_Exact { - if x, ok := x.GetMatcher().(*BlockSpec_NameMatcher_Exact_); ok { - return x.Exact + if x != nil { + if x, ok := x.Matcher.(*BlockSpec_NameMatcher_Exact_); ok { + return x.Exact + } } return nil } @@ -466,11 +463,10 @@ type BlockSpec_NameMatcher_Exact_ struct { func (*BlockSpec_NameMatcher_Exact_) isBlockSpec_NameMatcher_Matcher() {} type BlockSpec_NameMatcher_Exact struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Matches []string `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` unknownFields protoimpl.UnknownFields - - Matches []string `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BlockSpec_NameMatcher_Exact) Reset() { diff --git a/plugin/pluginapi/v1/hcl.pb.go b/plugin/pluginapi/v1/hcl.pb.go index 25abdd7c..7f6c1c2e 100644 --- a/plugin/pluginapi/v1/hcl.pb.go +++ b/plugin/pluginapi/v1/hcl.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/hcl.proto @@ -21,13 +21,12 @@ const ( ) type Pos struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` + Column int64 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` + Byte int64 `protobuf:"varint,3,opt,name=byte,proto3" json:"byte,omitempty"` unknownFields protoimpl.UnknownFields - - Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` - Column int64 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` - Byte int64 `protobuf:"varint,3,opt,name=byte,proto3" json:"byte,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Pos) Reset() { @@ -82,13 +81,12 @@ func (x *Pos) GetByte() int64 { } type Range struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + Start *Pos `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` + End *Pos `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields - - Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` - Start *Pos `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` - End *Pos `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Range) Reset() { @@ -143,15 +141,14 @@ func (x *Range) GetEnd() *Pos { } type Diagnostic struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Severity int64 `protobuf:"varint,1,opt,name=severity,proto3" json:"severity,omitempty"` + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` + Subject *Range `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + Context *Range `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` unknownFields protoimpl.UnknownFields - - Severity int64 `protobuf:"varint,1,opt,name=severity,proto3" json:"severity,omitempty"` - Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` - Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` - Subject *Range `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - Context *Range `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Diagnostic) Reset() { diff --git a/plugin/pluginapi/v1/plugin.pb.go b/plugin/pluginapi/v1/plugin.pb.go index abbf2c1e..6fcb5e0e 100644 --- a/plugin/pluginapi/v1/plugin.pb.go +++ b/plugin/pluginapi/v1/plugin.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/plugin.proto @@ -21,9 +21,9 @@ const ( ) type GetSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetSchemaRequest) Reset() { @@ -57,11 +57,10 @@ func (*GetSchemaRequest) Descriptor() ([]byte, []int) { } type GetSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` unknownFields protoimpl.UnknownFields - - Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSchemaResponse) Reset() { @@ -102,13 +101,12 @@ func (x *GetSchemaResponse) GetSchema() *Schema { } type RetrieveDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Args *Block `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + Config *Block `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` unknownFields protoimpl.UnknownFields - - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Args *Block `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` - Config *Block `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RetrieveDataRequest) Reset() { @@ -163,12 +161,11 @@ func (x *RetrieveDataRequest) GetConfig() *Block { } type RetrieveDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data *Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` unknownFields protoimpl.UnknownFields - - Data *Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RetrieveDataResponse) Reset() { @@ -216,15 +213,14 @@ func (x *RetrieveDataResponse) GetDiagnostics() []*Diagnostic { } type ProvideContentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` + Args *Block `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + Config *Block `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + DataContext *MapData `protobuf:"bytes,4,opt,name=data_context,json=dataContext,proto3" json:"data_context,omitempty"` + ContentId uint32 `protobuf:"varint,5,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"` unknownFields protoimpl.UnknownFields - - Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - Args *Block `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` - Config *Block `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` - DataContext *MapData `protobuf:"bytes,4,opt,name=data_context,json=dataContext,proto3" json:"data_context,omitempty"` - ContentId uint32 `protobuf:"varint,5,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ProvideContentRequest) Reset() { @@ -293,12 +289,11 @@ func (x *ProvideContentRequest) GetContentId() uint32 { } type ProvideContentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Result *ContentResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` unknownFields protoimpl.UnknownFields - - Result *ContentResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ProvideContentResponse) Reset() { @@ -346,16 +341,15 @@ func (x *ProvideContentResponse) GetDiagnostics() []*Diagnostic { } type PublishRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Publisher string `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"` + Args *Block `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + Config *Block `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + DataContext *MapData `protobuf:"bytes,4,opt,name=data_context,json=dataContext,proto3" json:"data_context,omitempty"` + Format OutputFormat `protobuf:"varint,5,opt,name=format,proto3,enum=pluginapi.v1.OutputFormat" json:"format,omitempty"` + DocumentName string `protobuf:"bytes,6,opt,name=document_name,json=documentName,proto3" json:"document_name,omitempty"` unknownFields protoimpl.UnknownFields - - Publisher string `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"` - Args *Block `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` - Config *Block `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` - DataContext *MapData `protobuf:"bytes,4,opt,name=data_context,json=dataContext,proto3" json:"data_context,omitempty"` - Format OutputFormat `protobuf:"varint,5,opt,name=format,proto3,enum=pluginapi.v1.OutputFormat" json:"format,omitempty"` - DocumentName string `protobuf:"bytes,6,opt,name=document_name,json=documentName,proto3" json:"document_name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PublishRequest) Reset() { @@ -431,11 +425,10 @@ func (x *PublishRequest) GetDocumentName() string { } type PublishResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` unknownFields protoimpl.UnknownFields - - Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PublishResponse) Reset() { diff --git a/plugin/pluginapi/v1/schema.pb.go b/plugin/pluginapi/v1/schema.pb.go index 96614fb0..15306c93 100644 --- a/plugin/pluginapi/v1/schema.pb.go +++ b/plugin/pluginapi/v1/schema.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: pluginapi/v1/schema.proto @@ -122,18 +122,17 @@ func (OutputFormat) EnumDescriptor() ([]byte, []int) { } type Schema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // Plugin components - DataSources map[string]*DataSourceSchema `protobuf:"bytes,3,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ContentProviders map[string]*ContentProviderSchema `protobuf:"bytes,4,rep,name=content_providers,json=contentProviders,proto3" json:"content_providers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Publishers map[string]*PublisherSchema `protobuf:"bytes,7,rep,name=publishers,proto3" json:"publishers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DataSources map[string]*DataSourceSchema `protobuf:"bytes,3,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ContentProviders map[string]*ContentProviderSchema `protobuf:"bytes,4,rep,name=content_providers,json=contentProviders,proto3" json:"content_providers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Publishers map[string]*PublisherSchema `protobuf:"bytes,7,rep,name=publishers,proto3" json:"publishers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Doc string `protobuf:"bytes,5,opt,name=doc,proto3" json:"doc,omitempty"` Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Schema) Reset() { @@ -216,14 +215,13 @@ func (x *Schema) GetTags() []string { } type DataSourceSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Args *BlockSpec `protobuf:"bytes,3,opt,name=args,proto3" json:"args,omitempty"` + Config *BlockSpec `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` + Doc string `protobuf:"bytes,5,opt,name=doc,proto3" json:"doc,omitempty"` + Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` unknownFields protoimpl.UnknownFields - - Args *BlockSpec `protobuf:"bytes,3,opt,name=args,proto3" json:"args,omitempty"` - Config *BlockSpec `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` - Doc string `protobuf:"bytes,5,opt,name=doc,proto3" json:"doc,omitempty"` - Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DataSourceSchema) Reset() { @@ -285,15 +283,14 @@ func (x *DataSourceSchema) GetTags() []string { } type ContentProviderSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Args *BlockSpec `protobuf:"bytes,4,opt,name=args,proto3" json:"args,omitempty"` - Config *BlockSpec `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"` - InvocationOrder InvocationOrder `protobuf:"varint,3,opt,name=invocation_order,json=invocationOrder,proto3,enum=pluginapi.v1.InvocationOrder" json:"invocation_order,omitempty"` - Doc string `protobuf:"bytes,6,opt,name=doc,proto3" json:"doc,omitempty"` - Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Args *BlockSpec `protobuf:"bytes,4,opt,name=args,proto3" json:"args,omitempty"` + Config *BlockSpec `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"` + InvocationOrder InvocationOrder `protobuf:"varint,3,opt,name=invocation_order,json=invocationOrder,proto3,enum=pluginapi.v1.InvocationOrder" json:"invocation_order,omitempty"` + Doc string `protobuf:"bytes,6,opt,name=doc,proto3" json:"doc,omitempty"` + Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ContentProviderSchema) Reset() { @@ -362,15 +359,14 @@ func (x *ContentProviderSchema) GetTags() []string { } type PublisherSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Args *BlockSpec `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` - Config *BlockSpec `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` - Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"` - Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` - AllowedFormats []OutputFormat `protobuf:"varint,5,rep,packed,name=allowed_formats,json=allowedFormats,proto3,enum=pluginapi.v1.OutputFormat" json:"allowed_formats,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Args *BlockSpec `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` + Config *BlockSpec `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"` + Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` + AllowedFormats []OutputFormat `protobuf:"varint,5,rep,packed,name=allowed_formats,json=allowedFormats,proto3,enum=pluginapi.v1.OutputFormat" json:"allowed_formats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PublisherSchema) Reset() {