From 682c23b232dfdf3571d7ad1a0cf2c7ab6a881192 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 09:43:28 -0800
Subject: [PATCH 01/16] Fix goreleaser.
---
.gon-arm64.json | 2 +-
.goreleaser.yaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gon-arm64.json b/.gon-arm64.json
index 02e7d758..359619c4 100644
--- a/.gon-arm64.json
+++ b/.gon-arm64.json
@@ -1,5 +1,5 @@
{
- "source": ["./dist/macos-arm64_darwin_arm64/baton-databricks"],
+ "source": ["./dist/macos-arm64_darwin_arm64_v8.0/baton-databricks"],
"bundle_id": "com.conductorone.baton-databricks",
"apple_id": {
"username" : "justin.gallardo@conductorone.com"
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 5bbca915..cfdce4c0 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -36,7 +36,7 @@ builds:
hooks:
post:
- gon .gon-arm64.json
- - mv dist/baton-databricks-darwin-arm64.signed.zip dist/macos-arm64_darwin_arm64/baton-databricks
+ - mv dist/baton-databricks-darwin-arm64.signed.zip dist/macos-arm64_darwin_arm64_v8.0/baton-databricks
archives:
- id: linux-archive
builds:
From 3eeb3de6b1e4789d2af7b2a8f86ae81342acf9e4 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 10:18:24 -0800
Subject: [PATCH 02/16] Add account and workspace hostnames to config.
---
cmd/baton-databricks/main.go | 5 +++++
pkg/config/schema.go | 12 ++++++++++++
2 files changed, 17 insertions(+)
diff --git a/cmd/baton-databricks/main.go b/cmd/baton-databricks/main.go
index 04bd858c..7cb88413 100644
--- a/cmd/baton-databricks/main.go
+++ b/cmd/baton-databricks/main.go
@@ -106,9 +106,14 @@ func getConnector(ctx context.Context, cfg *viper.Viper) (types.ConnectorServer,
return nil, err
}
+ hostname := cfg.GetString(config.HostnameField.FieldName)
+ accountHostname := cfg.GetString(config.AccountHostnameField.FieldName)
+
auth := prepareClientAuth(ctx, cfg)
cb, err := connector.New(
ctx,
+ hostname,
+ accountHostname,
cfg.GetString(config.AccountIdField.FieldName),
auth,
cfg.GetStringSlice(config.WorkspacesField.FieldName),
diff --git a/pkg/config/schema.go b/pkg/config/schema.go
index 22c0c912..528ee310 100644
--- a/pkg/config/schema.go
+++ b/pkg/config/schema.go
@@ -9,11 +9,21 @@ import (
)
var (
+ AccountHostnameField = field.StringField(
+ "account-hostname",
+ field.WithDescription("The hostname used to connect to the Databricks account API"),
+ field.WithDefaultValue("accounts.cloud.databricks.com"),
+ )
AccountIdField = field.StringField(
"account-id",
field.WithDescription("The Databricks account ID used to connect to the Databricks Account and Workspace API"),
field.WithRequired(true),
)
+ HostnameField = field.StringField(
+ "hostname",
+ field.WithDescription("The Databricks hostname used to connect to the Databricks API"),
+ field.WithDefaultValue("cloud.databricks.com"),
+ )
DatabricksClientIdField = field.StringField(
"databricks-client-id",
field.WithDescription("The Databricks service principal's client ID used to connect to the Databricks Account and Workspace API"),
@@ -39,9 +49,11 @@ var (
field.WithDescription("The Databricks access tokens scoped to specific workspaces used to connect to the Databricks Workspace API"),
)
configurationFields = []field.SchemaField{
+ AccountHostnameField,
AccountIdField,
DatabricksClientIdField,
DatabricksClientSecretField,
+ HostnameField,
PasswordField,
TokensField,
UsernameField,
From 839640b0d00e8ad18fd9b0fbc8556197335e37e9 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 10:21:01 -0800
Subject: [PATCH 03/16] Don't rename the workspace name in the json response.
---
pkg/connector/connector.go | 4 ++--
pkg/connector/workspaces.go | 10 +++++-----
pkg/databricks/models.go | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go
index 10aa1c5d..6e31e9cd 100644
--- a/pkg/connector/connector.go
+++ b/pkg/connector/connector.go
@@ -80,11 +80,11 @@ func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, err
}
for _, workspace := range workspaces {
- d.client.SetWorkspaceConfig(workspace.Host)
+ d.client.SetWorkspaceConfig(workspace.DeploymentName)
_, _, err := d.client.ListRoles(ctx, "", "")
if err != nil && !isAccAPIAvailable {
- return nil, fmt.Errorf("databricks-connector: failed to validate credentials for workspace %s: %w", workspace.Host, err)
+ return nil, fmt.Errorf("databricks-connector: failed to validate credentials for workspace %s: %w", workspace.DeploymentName, err)
}
isWSAPIAvailable = true
diff --git a/pkg/connector/workspaces.go b/pkg/connector/workspaces.go
index b52d76f8..714eb2bb 100644
--- a/pkg/connector/workspaces.go
+++ b/pkg/connector/workspaces.go
@@ -30,9 +30,9 @@ func (w *workspaceBuilder) ResourceType(ctx context.Context) *v2.ResourceType {
func minimalWorkspaceResource(ctx context.Context, workspace *databricks.Workspace, parent *v2.ResourceId) (*v2.Resource, error) {
resource, err := rs.NewGroupResource(
- workspace.Host,
+ workspace.DeploymentName,
workspaceResourceType,
- workspace.Host,
+ workspace.DeploymentName,
nil,
rs.WithParentResourceID(parent),
rs.WithAnnotation(
@@ -58,7 +58,7 @@ func workspaceResource(ctx context.Context, workspace *databricks.Workspace, par
resource, err := rs.NewGroupResource(
workspace.Name,
workspaceResourceType,
- workspace.Host,
+ workspace.DeploymentName,
[]rs.GroupTraitOption{
rs.WithGroupProfile(profile),
},
@@ -90,7 +90,7 @@ func (w *workspaceBuilder) List(ctx context.Context, parentResourceID *v2.Resour
for _, workspace := range workspaces {
// If workspaces are specified, skip all the workspaces that are not in the list.
- if _, ok := w.workspaces[workspace.Host]; !ok && len(w.workspaces) > 0 {
+ if _, ok := w.workspaces[workspace.DeploymentName]; !ok && len(w.workspaces) > 0 {
continue
}
@@ -106,7 +106,7 @@ func (w *workspaceBuilder) List(ctx context.Context, parentResourceID *v2.Resour
} else {
for workspace := range w.workspaces {
ws := &databricks.Workspace{
- Host: workspace,
+ DeploymentName: workspace,
}
wr, err := minimalWorkspaceResource(ctx, ws, parentResourceID)
diff --git a/pkg/databricks/models.go b/pkg/databricks/models.go
index 8fb31f74..0bb3aa8d 100644
--- a/pkg/databricks/models.go
+++ b/pkg/databricks/models.go
@@ -115,10 +115,10 @@ func (s ServicePrincipal) HaveEntitlement(entitlement string) bool {
}
type Workspace struct {
- ID int `json:"workspace_id"`
- Name string `json:"workspace_name"`
- Status string `json:"workspace_status"`
- Host string `json:"deployment_name"`
+ ID int `json:"workspace_id"`
+ Name string `json:"workspace_name"`
+ Status string `json:"workspace_status"`
+ DeploymentName string `json:"deployment_name"`
}
type WorkspacePrincipal struct {
From bf67f83029d9cdc0e8c6ded9cd7985f44cc426da Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 10:26:01 -0800
Subject: [PATCH 04/16] Start to hook up new config options.
---
pkg/connector/connector.go | 7 ++++++-
pkg/databricks/client.go | 24 ++++++++++++------------
pkg/databricks/config.go | 30 ++++++++++++++++++++++--------
3 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go
index 6e31e9cd..09a6f245 100644
--- a/pkg/connector/connector.go
+++ b/pkg/connector/connector.go
@@ -106,6 +106,8 @@ func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, err
// New returns a new instance of the connector.
func New(
ctx context.Context,
+ hostname,
+ accountHostname,
accountID string,
auth databricks.Auth,
workspaces []string,
@@ -115,7 +117,10 @@ func New(
return nil, err
}
- client := databricks.NewClient(httpClient, accountID, auth)
+ client, err := databricks.NewClient(ctx, httpClient, hostname, accountHostname, accountID, auth)
+ if err != nil {
+ return nil, err
+ }
if client.IsTokenAuth() {
client.SetWorkspaceConfig(workspaces[0])
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index 044f2593..42a894e9 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -42,19 +42,19 @@ type Client struct {
cfg Config
auth Auth
etag string
- acc string
+ accountId string
isAccAPIAvailable bool
isWSAPIAvailable bool
}
-func NewClient(httpClient *http.Client, accountID string, auth Auth) *Client {
- cli := uhttp.NewBaseHttpClient(httpClient)
+func NewClient(ctx context.Context, httpClient *http.Client, hostname, accountHostname, accountID string, auth Auth) (*Client, error) {
+ cli, err := uhttp.NewBaseHttpClientWithContext(ctx, httpClient)
return &Client{
httpClient: cli,
auth: auth,
- acc: accountID,
- }
+ accountId: accountID,
+ }, err
}
func (c *Client) IsWorkspaceAPIAvailable() bool {
@@ -90,7 +90,7 @@ func (c *Client) SetWorkspaceConfig(workspace string) {
return
}
- c.cfg = NewWorkspaceConfig(c.acc, workspace)
+ c.cfg = NewWorkspaceConfig("", c.accountId, workspace)
c.baseUrl = c.cfg.BaseUrl()
if tokenAuth, ok := c.auth.(*TokenAuth); ok {
@@ -103,7 +103,7 @@ func (c *Client) SetAccountConfig() {
return
}
- c.cfg = NewAccountConfig(c.acc)
+ c.cfg = NewAccountConfig("", c.accountId)
c.baseUrl = c.cfg.BaseUrl()
}
@@ -117,7 +117,7 @@ func (c *Client) UpdateEtag(etag string) {
}
func (c *Client) GetAccountId() string {
- return c.acc
+ return c.accountId
}
type ListResponse[T any] struct {
@@ -473,7 +473,7 @@ func (c *Client) ListRoles(
return nil, nil, fmt.Errorf("failed to prepare url to fetch roles: %w", err)
}
- resourcePayload, err := url.JoinPath("accounts", c.acc, resourceType, resourceId)
+ resourcePayload, err := url.JoinPath("accounts", c.accountId, resourceType, resourceId)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare resource payload: %w", err)
}
@@ -511,7 +511,7 @@ func (c *Client) ListWorkspaces(
func (c *Client) prepareURLForWorkspaceMembers(params ...string) (*url.URL, error) {
u := *c.baseUrl
- baseEndpoint := fmt.Sprintf("%s/%s", AccountsEndpoint, c.acc)
+ baseEndpoint := fmt.Sprintf("%s/%s", AccountsEndpoint, c.accountId)
path, err := url.JoinPath(baseEndpoint, params...)
if err != nil {
return nil, err
@@ -616,7 +616,7 @@ func (c *Client) ListRuleSets(
return nil, nil, fmt.Errorf("failed to prepare url to fetch rule sets: %w", err)
}
- resourcePayload, err := url.JoinPath("accounts", c.acc, resourceType, resourceId, "ruleSets", "default")
+ resourcePayload, err := url.JoinPath("accounts", c.accountId, resourceType, resourceId, "ruleSets", "default")
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare resource payload: %w", err)
}
@@ -644,7 +644,7 @@ func (c *Client) UpdateRuleSets(
return nil, fmt.Errorf("failed to prepare url to fetch rule sets: %w", err)
}
- resourcePayload, err := url.JoinPath("accounts", c.acc, resourceType, resourceId, "ruleSets", "default")
+ resourcePayload, err := url.JoinPath("accounts", c.accountId, resourceType, resourceId, "ruleSets", "default")
if err != nil {
return nil, fmt.Errorf("failed to prepare resource payload: %w", err)
}
diff --git a/pkg/databricks/config.go b/pkg/databricks/config.go
index 79e51cf1..0a63565f 100644
--- a/pkg/databricks/config.go
+++ b/pkg/databricks/config.go
@@ -12,24 +12,31 @@ type Config interface {
// Account Config for account API.
type AccountConfig struct {
- acc string
+ accountId string
+ accountHostname string
}
-func NewAccountConfig(acc string) *AccountConfig {
- return &AccountConfig{acc}
+func NewAccountConfig(accountHostname, accountId string) *AccountConfig {
+ if accountHostname == "" {
+ accountHostname = AccountBaseHost
+ }
+ return &AccountConfig{
+ accountId,
+ accountHostname,
+ }
}
func (c *AccountConfig) BaseUrl() *url.URL {
return &url.URL{
Scheme: "https",
- Host: AccountBaseHost,
+ Host: c.accountHostname,
}
}
func (c AccountConfig) ResolvePath(base *url.URL, endpoint string) (*url.URL, error) {
u := *base
- baseEndpoint := fmt.Sprintf("%s/%s", AccountsEndpoint, c.acc)
+ baseEndpoint := fmt.Sprintf("%s/%s", AccountsEndpoint, c.accountId)
var pathParts []string
@@ -57,10 +64,17 @@ func (c AccountConfig) ResolvePath(base *url.URL, endpoint string) (*url.URL, er
// Workspace Config for workspace API.
type WorkspaceConfig struct {
workspace string
+ hostname string
}
-func NewWorkspaceConfig(acc, workspace string) *WorkspaceConfig {
- return &WorkspaceConfig{workspace}
+func NewWorkspaceConfig(hostname, accountId, workspace string) *WorkspaceConfig {
+ if hostname == "" {
+ hostname = WorkspaceBaseHost
+ }
+ return &WorkspaceConfig{
+ workspace,
+ hostname,
+ }
}
func (c *WorkspaceConfig) Workspace() string {
@@ -70,7 +84,7 @@ func (c *WorkspaceConfig) Workspace() string {
func (c *WorkspaceConfig) BaseUrl() *url.URL {
return &url.URL{
Scheme: "https",
- Host: fmt.Sprintf(WorkspaceBaseHost, c.workspace),
+ Host: fmt.Sprintf(c.hostname, c.workspace),
}
}
From bb6fd43e360f7636010527b0768a888daa89ea1c Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 13:00:18 -0800
Subject: [PATCH 05/16] Upgrade baton-sdk to v0.2.47.
---
go.mod | 2 +-
go.sum | 7 +-
.../internal/connector/noop_ticketing.go | 8 +
.../pb/c1/connector/v2/connector.pb.go | 486 ++++---
.../c1/connector/v2/connector.pb.validate.go | 274 ++++
.../pb/c1/connector/v2/connector_grpc.pb.go | 36 +
.../pb/c1/connector/v2/entitlement.pb.go | 66 +-
.../connector/v2/entitlement.pb.validate.go | 8 +-
.../baton-sdk/pb/c1/connector/v2/grant.pb.go | 156 +--
.../pb/c1/connector/v2/grant.pb.validate.go | 8 +-
.../pb/c1/connector/v2/resource.pb.go | 634 ++++-----
.../c1/connector/v2/resource.pb.validate.go | 16 +-
.../baton-sdk/pb/c1/connector/v2/ticket.pb.go | 532 ++++++--
.../pb/c1/connector/v2/ticket.pb.validate.go | 562 ++++++++
.../pb/c1/connector/v2/ticket_grpc.pb.go | 72 +
.../pb/c1/connectorapi/baton/v1/baton.pb.go | 1153 ++++++++++-------
.../baton/v1/baton.pb.validate.go | 354 +++++
.../baton-sdk/pkg/cli/commands.go | 10 +-
.../baton-sdk/pkg/config/config.go | 17 +-
.../pkg/connectorbuilder/connectorbuilder.go | 89 +-
.../baton-sdk/pkg/connectorrunner/runner.go | 19 +-
.../pkg/dotc1z/manager/local/local.go | 2 +-
.../pkg/field/default_relationships.go | 2 +
.../baton-sdk/pkg/field/defaults.go | 16 +-
.../baton-sdk/pkg/logging/logging.go | 8 +
.../baton-sdk/pkg/pagination/pagination.go | 8 +
.../conductorone/baton-sdk/pkg/sdk/version.go | 2 +-
.../baton-sdk/pkg/sync/expand/cycle.go | 7 +
.../baton-sdk/pkg/sync/expand/graph.go | 31 +-
.../conductorone/baton-sdk/pkg/sync/syncer.go | 32 +-
.../pkg/tasks/c1api/bulk_create_tickets.go | 66 +
.../pkg/tasks/c1api/bulk_get_tickets.go | 66 +
.../baton-sdk/pkg/tasks/c1api/manager.go | 4 +
.../baton-sdk/pkg/tasks/local/ticket.go | 120 ++
.../conductorone/baton-sdk/pkg/tasks/tasks.go | 8 +
.../baton-sdk/pkg/types/tasks/tasks.go | 6 +
.../pkg/types/ticket/custom_fields.go | 4 +-
.../baton-sdk/pkg/uhttp/client.go | 55 +
.../baton-sdk/pkg/uhttp/contenttype.go | 5 +-
.../baton-sdk/pkg/uhttp/dbcache.go | 475 +++++++
.../baton-sdk/pkg/uhttp/gocache.go | 309 +++--
.../baton-sdk/pkg/uhttp/wrapper.go | 169 +--
vendor/modules.txt | 2 +-
43 files changed, 4502 insertions(+), 1404 deletions(-)
create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go
create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go
create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go
diff --git a/go.mod b/go.mod
index e2d52199..0a47f1b2 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/conductorone/baton-databricks
go 1.21
require (
- github.com/conductorone/baton-sdk v0.2.35
+ github.com/conductorone/baton-sdk v0.2.47
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/spf13/viper v1.19.0
go.uber.org/zap v1.27.0
diff --git a/go.sum b/go.sum
index 58644aa1..8aa950bd 100644
--- a/go.sum
+++ b/go.sum
@@ -52,8 +52,8 @@ github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/conductorone/baton-sdk v0.2.35 h1:aSdNvlM5HMti8WdhotrXTHWs+b+BmSqMxtGwsSUFxjY=
-github.com/conductorone/baton-sdk v0.2.35/go.mod h1:hmd/Oz3DPIKD+9QmkusZaA18ZoiinnTDdrxh2skcdUc=
+github.com/conductorone/baton-sdk v0.2.47 h1:JdpPpUmCO4jW1z0mLE5JW53RHG3eldoOygln3rE0Gfg=
+github.com/conductorone/baton-sdk v0.2.47/go.mod h1:CYyNk1kPIEgZmc3Z16TmpS1l3KbkNSjyJk16KuQw+JM=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -141,8 +141,9 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/mattn/go-sqlite3 v1.14.7 h1:fxWBnXkxfM6sRiuH3bqJ4CfzZojMOLVc0UTsTglEghA=
github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
+github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
+github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_ticketing.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_ticketing.go
index 33a33b45..fc3c7068 100644
--- a/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_ticketing.go
+++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_ticketing.go
@@ -24,3 +24,11 @@ func (n noopTicketing) ListTicketSchemas(ctx context.Context, request *v2.Ticket
func (n noopTicketing) GetTicketSchema(ctx context.Context, request *v2.TicketsServiceGetTicketSchemaRequest) (*v2.TicketsServiceGetTicketSchemaResponse, error) {
return nil, errors.New("ticketing is not enabled")
}
+
+func (n noopTicketing) BulkCreateTickets(ctx context.Context, request *v2.TicketsServiceBulkCreateTicketsRequest) (*v2.TicketsServiceBulkCreateTicketsResponse, error) {
+ return nil, errors.New("ticketing is not enabled")
+}
+
+func (n noopTicketing) BulkGetTickets(ctx context.Context, request *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error) {
+ return nil, errors.New("ticketing is not enabled")
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
index cd68169f..2426fc14 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
@@ -26,11 +26,15 @@ const (
type Capability int32
const (
- Capability_CAPABILITY_UNSPECIFIED Capability = 0
- Capability_CAPABILITY_PROVISION Capability = 1
- Capability_CAPABILITY_SYNC Capability = 2
- Capability_CAPABILITY_EVENT_FEED Capability = 3
- Capability_CAPABILITY_TICKETING Capability = 4
+ Capability_CAPABILITY_UNSPECIFIED Capability = 0
+ Capability_CAPABILITY_PROVISION Capability = 1
+ Capability_CAPABILITY_SYNC Capability = 2
+ Capability_CAPABILITY_EVENT_FEED Capability = 3
+ Capability_CAPABILITY_TICKETING Capability = 4
+ Capability_CAPABILITY_ACCOUNT_PROVISIONING Capability = 5
+ Capability_CAPABILITY_CREDENTIAL_ROTATION Capability = 6
+ Capability_CAPABILITY_RESOURCE_CREATE Capability = 7
+ Capability_CAPABILITY_RESOURCE_DELETE Capability = 8
)
// Enum value maps for Capability.
@@ -41,13 +45,21 @@ var (
2: "CAPABILITY_SYNC",
3: "CAPABILITY_EVENT_FEED",
4: "CAPABILITY_TICKETING",
+ 5: "CAPABILITY_ACCOUNT_PROVISIONING",
+ 6: "CAPABILITY_CREDENTIAL_ROTATION",
+ 7: "CAPABILITY_RESOURCE_CREATE",
+ 8: "CAPABILITY_RESOURCE_DELETE",
}
Capability_value = map[string]int32{
- "CAPABILITY_UNSPECIFIED": 0,
- "CAPABILITY_PROVISION": 1,
- "CAPABILITY_SYNC": 2,
- "CAPABILITY_EVENT_FEED": 3,
- "CAPABILITY_TICKETING": 4,
+ "CAPABILITY_UNSPECIFIED": 0,
+ "CAPABILITY_PROVISION": 1,
+ "CAPABILITY_SYNC": 2,
+ "CAPABILITY_EVENT_FEED": 3,
+ "CAPABILITY_TICKETING": 4,
+ "CAPABILITY_ACCOUNT_PROVISIONING": 5,
+ "CAPABILITY_CREDENTIAL_ROTATION": 6,
+ "CAPABILITY_RESOURCE_CREATE": 7,
+ "CAPABILITY_RESOURCE_DELETE": 8,
}
)
@@ -78,6 +90,100 @@ func (Capability) EnumDescriptor() ([]byte, []int) {
return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{0}
}
+type ConnectorServiceCleanupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+}
+
+func (x *ConnectorServiceCleanupRequest) Reset() {
+ *x = ConnectorServiceCleanupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConnectorServiceCleanupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConnectorServiceCleanupRequest) ProtoMessage() {}
+
+func (x *ConnectorServiceCleanupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
+ 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 ConnectorServiceCleanupRequest.ProtoReflect.Descriptor instead.
+func (*ConnectorServiceCleanupRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ConnectorServiceCleanupRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type ConnectorServiceCleanupResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+}
+
+func (x *ConnectorServiceCleanupResponse) Reset() {
+ *x = ConnectorServiceCleanupResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConnectorServiceCleanupResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConnectorServiceCleanupResponse) ProtoMessage() {}
+
+func (x *ConnectorServiceCleanupResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
+ 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 ConnectorServiceCleanupResponse.ProtoReflect.Descriptor instead.
+func (*ConnectorServiceCleanupResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ConnectorServiceCleanupResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
type ConnectorMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -96,7 +202,7 @@ type ConnectorMetadata struct {
func (x *ConnectorMetadata) Reset() {
*x = ConnectorMetadata{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -109,7 +215,7 @@ func (x *ConnectorMetadata) String() string {
func (*ConnectorMetadata) ProtoMessage() {}
func (x *ConnectorMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -122,7 +228,7 @@ func (x *ConnectorMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorMetadata.ProtoReflect.Descriptor instead.
func (*ConnectorMetadata) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{0}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{2}
}
func (x *ConnectorMetadata) GetDisplayName() string {
@@ -193,7 +299,7 @@ type ConnectorCapabilities struct {
func (x *ConnectorCapabilities) Reset() {
*x = ConnectorCapabilities{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -206,7 +312,7 @@ func (x *ConnectorCapabilities) String() string {
func (*ConnectorCapabilities) ProtoMessage() {}
func (x *ConnectorCapabilities) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -219,7 +325,7 @@ func (x *ConnectorCapabilities) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorCapabilities.ProtoReflect.Descriptor instead.
func (*ConnectorCapabilities) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{1}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{3}
}
func (x *ConnectorCapabilities) GetResourceTypeCapabilities() []*ResourceTypeCapability {
@@ -248,7 +354,7 @@ type ResourceTypeCapability struct {
func (x *ResourceTypeCapability) Reset() {
*x = ResourceTypeCapability{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -261,7 +367,7 @@ func (x *ResourceTypeCapability) String() string {
func (*ResourceTypeCapability) ProtoMessage() {}
func (x *ResourceTypeCapability) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -274,7 +380,7 @@ func (x *ResourceTypeCapability) ProtoReflect() protoreflect.Message {
// Deprecated: Use ResourceTypeCapability.ProtoReflect.Descriptor instead.
func (*ResourceTypeCapability) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{2}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{4}
}
func (x *ResourceTypeCapability) GetResourceType() *ResourceType {
@@ -300,7 +406,7 @@ type ConnectorServiceGetMetadataRequest struct {
func (x *ConnectorServiceGetMetadataRequest) Reset() {
*x = ConnectorServiceGetMetadataRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -313,7 +419,7 @@ func (x *ConnectorServiceGetMetadataRequest) String() string {
func (*ConnectorServiceGetMetadataRequest) ProtoMessage() {}
func (x *ConnectorServiceGetMetadataRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -326,7 +432,7 @@ func (x *ConnectorServiceGetMetadataRequest) ProtoReflect() protoreflect.Message
// Deprecated: Use ConnectorServiceGetMetadataRequest.ProtoReflect.Descriptor instead.
func (*ConnectorServiceGetMetadataRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{3}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{5}
}
type ConnectorServiceGetMetadataResponse struct {
@@ -340,7 +446,7 @@ type ConnectorServiceGetMetadataResponse struct {
func (x *ConnectorServiceGetMetadataResponse) Reset() {
*x = ConnectorServiceGetMetadataResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -353,7 +459,7 @@ func (x *ConnectorServiceGetMetadataResponse) String() string {
func (*ConnectorServiceGetMetadataResponse) ProtoMessage() {}
func (x *ConnectorServiceGetMetadataResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -366,7 +472,7 @@ func (x *ConnectorServiceGetMetadataResponse) ProtoReflect() protoreflect.Messag
// Deprecated: Use ConnectorServiceGetMetadataResponse.ProtoReflect.Descriptor instead.
func (*ConnectorServiceGetMetadataResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{4}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{6}
}
func (x *ConnectorServiceGetMetadataResponse) GetMetadata() *ConnectorMetadata {
@@ -385,7 +491,7 @@ type ConnectorServiceValidateRequest struct {
func (x *ConnectorServiceValidateRequest) Reset() {
*x = ConnectorServiceValidateRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -398,7 +504,7 @@ func (x *ConnectorServiceValidateRequest) String() string {
func (*ConnectorServiceValidateRequest) ProtoMessage() {}
func (x *ConnectorServiceValidateRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -411,7 +517,7 @@ func (x *ConnectorServiceValidateRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorServiceValidateRequest.ProtoReflect.Descriptor instead.
func (*ConnectorServiceValidateRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{5}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{7}
}
// NOTE(morgabra) We're expecting correct grpc.Status responses
@@ -427,7 +533,7 @@ type ConnectorServiceValidateResponse struct {
func (x *ConnectorServiceValidateResponse) Reset() {
*x = ConnectorServiceValidateResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -440,7 +546,7 @@ func (x *ConnectorServiceValidateResponse) String() string {
func (*ConnectorServiceValidateResponse) ProtoMessage() {}
func (x *ConnectorServiceValidateResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -453,7 +559,7 @@ func (x *ConnectorServiceValidateResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorServiceValidateResponse.ProtoReflect.Descriptor instead.
func (*ConnectorServiceValidateResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{6}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{8}
}
func (x *ConnectorServiceValidateResponse) GetAnnotations() []*anypb.Any {
@@ -478,104 +584,130 @@ var file_c1_connector_v2_connector_proto_rawDesc = []byte{
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75,
0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x22, 0xbf, 0x03, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c,
- 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa,
- 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c,
- 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x75,
- 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x20,
- 0x01, 0x28, 0x80, 0x08, 0x3a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0xd0, 0x01,
- 0x01, 0x88, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a,
- 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73,
- 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x04,
- 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73,
- 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x31, 0x0a, 0x07, 0x70,
- 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
- 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x36,
- 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20,
+ 0x6f, 0x22, 0x58, 0x0a, 0x1e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x59, 0x0a, 0x1f, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
+ 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a,
- 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62,
- 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
- 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x69, 0x65, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x65, 0x0a,
- 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63,
- 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
- 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x18, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
- 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02,
- 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x79, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
- 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62,
- 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x43, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x65,
- 0x0a, 0x23, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x21, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x20, 0x43, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69,
- 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x8c, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
- 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
- 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
- 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52,
- 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x50,
- 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x19,
- 0x0a, 0x15, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45,
- 0x4e, 0x54, 0x5f, 0x46, 0x45, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50,
- 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x54, 0x49, 0x4e,
- 0x47, 0x10, 0x04, 0x32, 0xfd, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbf, 0x03, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x0c,
+ 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0b,
+ 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x68,
+ 0x65, 0x6c, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa,
+ 0x42, 0x17, 0x72, 0x15, 0x20, 0x01, 0x28, 0x80, 0x08, 0x3a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x73,
+ 0x3a, 0x2f, 0x2f, 0xd0, 0x01, 0x01, 0x88, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x6c, 0x70, 0x55,
+ 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f,
+ 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f,
+ 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66,
+ 0x69, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0c,
+ 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69,
+ 0x65, 0x73, 0x12, 0x65, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
+ 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70,
+ 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9d, 0x01,
+ 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0c,
+ 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
+ 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x24, 0x0a,
+ 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x22, 0x65, 0x0a, 0x23, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x21, 0x0a, 0x1f, 0x43, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a,
+ 0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x95, 0x02, 0x0a, 0x0a, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41,
+ 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49,
+ 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x13,
+ 0x0a, 0x0f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e,
+ 0x43, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x45, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18,
+ 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x49, 0x43,
+ 0x4b, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x41, 0x50, 0x41,
+ 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50,
+ 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x22, 0x0a,
+ 0x1e, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x44,
+ 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10,
+ 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
+ 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10,
+ 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
+ 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10,
+ 0x08, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47,
- 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31,
0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
- 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62,
- 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
+ 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
+ 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
+ 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
+ 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -591,42 +723,48 @@ func file_c1_connector_v2_connector_proto_rawDescGZIP() []byte {
}
var file_c1_connector_v2_connector_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_c1_connector_v2_connector_proto_goTypes = []interface{}{
(Capability)(0), // 0: c1.connector.v2.Capability
- (*ConnectorMetadata)(nil), // 1: c1.connector.v2.ConnectorMetadata
- (*ConnectorCapabilities)(nil), // 2: c1.connector.v2.ConnectorCapabilities
- (*ResourceTypeCapability)(nil), // 3: c1.connector.v2.ResourceTypeCapability
- (*ConnectorServiceGetMetadataRequest)(nil), // 4: c1.connector.v2.ConnectorServiceGetMetadataRequest
- (*ConnectorServiceGetMetadataResponse)(nil), // 5: c1.connector.v2.ConnectorServiceGetMetadataResponse
- (*ConnectorServiceValidateRequest)(nil), // 6: c1.connector.v2.ConnectorServiceValidateRequest
- (*ConnectorServiceValidateResponse)(nil), // 7: c1.connector.v2.ConnectorServiceValidateResponse
- (*AssetRef)(nil), // 8: c1.connector.v2.AssetRef
- (*structpb.Struct)(nil), // 9: google.protobuf.Struct
+ (*ConnectorServiceCleanupRequest)(nil), // 1: c1.connector.v2.ConnectorServiceCleanupRequest
+ (*ConnectorServiceCleanupResponse)(nil), // 2: c1.connector.v2.ConnectorServiceCleanupResponse
+ (*ConnectorMetadata)(nil), // 3: c1.connector.v2.ConnectorMetadata
+ (*ConnectorCapabilities)(nil), // 4: c1.connector.v2.ConnectorCapabilities
+ (*ResourceTypeCapability)(nil), // 5: c1.connector.v2.ResourceTypeCapability
+ (*ConnectorServiceGetMetadataRequest)(nil), // 6: c1.connector.v2.ConnectorServiceGetMetadataRequest
+ (*ConnectorServiceGetMetadataResponse)(nil), // 7: c1.connector.v2.ConnectorServiceGetMetadataResponse
+ (*ConnectorServiceValidateRequest)(nil), // 8: c1.connector.v2.ConnectorServiceValidateRequest
+ (*ConnectorServiceValidateResponse)(nil), // 9: c1.connector.v2.ConnectorServiceValidateResponse
(*anypb.Any)(nil), // 10: google.protobuf.Any
- (*ResourceType)(nil), // 11: c1.connector.v2.ResourceType
+ (*AssetRef)(nil), // 11: c1.connector.v2.AssetRef
+ (*structpb.Struct)(nil), // 12: google.protobuf.Struct
+ (*ResourceType)(nil), // 13: c1.connector.v2.ResourceType
}
var file_c1_connector_v2_connector_proto_depIdxs = []int32{
- 8, // 0: c1.connector.v2.ConnectorMetadata.icon:type_name -> c1.connector.v2.AssetRef
- 8, // 1: c1.connector.v2.ConnectorMetadata.logo:type_name -> c1.connector.v2.AssetRef
- 9, // 2: c1.connector.v2.ConnectorMetadata.profile:type_name -> google.protobuf.Struct
- 10, // 3: c1.connector.v2.ConnectorMetadata.annotations:type_name -> google.protobuf.Any
- 2, // 4: c1.connector.v2.ConnectorMetadata.capabilities:type_name -> c1.connector.v2.ConnectorCapabilities
- 3, // 5: c1.connector.v2.ConnectorCapabilities.resource_type_capabilities:type_name -> c1.connector.v2.ResourceTypeCapability
- 0, // 6: c1.connector.v2.ConnectorCapabilities.connector_capabilities:type_name -> c1.connector.v2.Capability
- 11, // 7: c1.connector.v2.ResourceTypeCapability.resource_type:type_name -> c1.connector.v2.ResourceType
- 0, // 8: c1.connector.v2.ResourceTypeCapability.capabilities:type_name -> c1.connector.v2.Capability
- 1, // 9: c1.connector.v2.ConnectorServiceGetMetadataResponse.metadata:type_name -> c1.connector.v2.ConnectorMetadata
- 10, // 10: c1.connector.v2.ConnectorServiceValidateResponse.annotations:type_name -> google.protobuf.Any
- 4, // 11: c1.connector.v2.ConnectorService.GetMetadata:input_type -> c1.connector.v2.ConnectorServiceGetMetadataRequest
- 6, // 12: c1.connector.v2.ConnectorService.Validate:input_type -> c1.connector.v2.ConnectorServiceValidateRequest
- 5, // 13: c1.connector.v2.ConnectorService.GetMetadata:output_type -> c1.connector.v2.ConnectorServiceGetMetadataResponse
- 7, // 14: c1.connector.v2.ConnectorService.Validate:output_type -> c1.connector.v2.ConnectorServiceValidateResponse
- 13, // [13:15] is the sub-list for method output_type
- 11, // [11:13] is the sub-list for method input_type
- 11, // [11:11] is the sub-list for extension type_name
- 11, // [11:11] is the sub-list for extension extendee
- 0, // [0:11] is the sub-list for field type_name
+ 10, // 0: c1.connector.v2.ConnectorServiceCleanupRequest.annotations:type_name -> google.protobuf.Any
+ 10, // 1: c1.connector.v2.ConnectorServiceCleanupResponse.annotations:type_name -> google.protobuf.Any
+ 11, // 2: c1.connector.v2.ConnectorMetadata.icon:type_name -> c1.connector.v2.AssetRef
+ 11, // 3: c1.connector.v2.ConnectorMetadata.logo:type_name -> c1.connector.v2.AssetRef
+ 12, // 4: c1.connector.v2.ConnectorMetadata.profile:type_name -> google.protobuf.Struct
+ 10, // 5: c1.connector.v2.ConnectorMetadata.annotations:type_name -> google.protobuf.Any
+ 4, // 6: c1.connector.v2.ConnectorMetadata.capabilities:type_name -> c1.connector.v2.ConnectorCapabilities
+ 5, // 7: c1.connector.v2.ConnectorCapabilities.resource_type_capabilities:type_name -> c1.connector.v2.ResourceTypeCapability
+ 0, // 8: c1.connector.v2.ConnectorCapabilities.connector_capabilities:type_name -> c1.connector.v2.Capability
+ 13, // 9: c1.connector.v2.ResourceTypeCapability.resource_type:type_name -> c1.connector.v2.ResourceType
+ 0, // 10: c1.connector.v2.ResourceTypeCapability.capabilities:type_name -> c1.connector.v2.Capability
+ 3, // 11: c1.connector.v2.ConnectorServiceGetMetadataResponse.metadata:type_name -> c1.connector.v2.ConnectorMetadata
+ 10, // 12: c1.connector.v2.ConnectorServiceValidateResponse.annotations:type_name -> google.protobuf.Any
+ 6, // 13: c1.connector.v2.ConnectorService.GetMetadata:input_type -> c1.connector.v2.ConnectorServiceGetMetadataRequest
+ 8, // 14: c1.connector.v2.ConnectorService.Validate:input_type -> c1.connector.v2.ConnectorServiceValidateRequest
+ 1, // 15: c1.connector.v2.ConnectorService.Cleanup:input_type -> c1.connector.v2.ConnectorServiceCleanupRequest
+ 7, // 16: c1.connector.v2.ConnectorService.GetMetadata:output_type -> c1.connector.v2.ConnectorServiceGetMetadataResponse
+ 9, // 17: c1.connector.v2.ConnectorService.Validate:output_type -> c1.connector.v2.ConnectorServiceValidateResponse
+ 2, // 18: c1.connector.v2.ConnectorService.Cleanup:output_type -> c1.connector.v2.ConnectorServiceCleanupResponse
+ 16, // [16:19] is the sub-list for method output_type
+ 13, // [13:16] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
}
func init() { file_c1_connector_v2_connector_proto_init() }
@@ -638,7 +776,7 @@ func file_c1_connector_v2_connector_proto_init() {
file_c1_connector_v2_resource_proto_init()
if !protoimpl.UnsafeEnabled {
file_c1_connector_v2_connector_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorMetadata); i {
+ switch v := v.(*ConnectorServiceCleanupRequest); i {
case 0:
return &v.state
case 1:
@@ -650,7 +788,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorCapabilities); i {
+ switch v := v.(*ConnectorServiceCleanupResponse); i {
case 0:
return &v.state
case 1:
@@ -662,7 +800,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypeCapability); i {
+ switch v := v.(*ConnectorMetadata); i {
case 0:
return &v.state
case 1:
@@ -674,7 +812,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceGetMetadataRequest); i {
+ switch v := v.(*ConnectorCapabilities); i {
case 0:
return &v.state
case 1:
@@ -686,7 +824,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceGetMetadataResponse); i {
+ switch v := v.(*ResourceTypeCapability); i {
case 0:
return &v.state
case 1:
@@ -698,7 +836,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceValidateRequest); i {
+ switch v := v.(*ConnectorServiceGetMetadataRequest); i {
case 0:
return &v.state
case 1:
@@ -710,6 +848,30 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConnectorServiceGetMetadataResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_connector_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConnectorServiceValidateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_connector_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConnectorServiceValidateResponse); i {
case 0:
return &v.state
@@ -728,7 +890,7 @@ func file_c1_connector_v2_connector_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_c1_connector_v2_connector_proto_rawDesc,
NumEnums: 1,
- NumMessages: 7,
+ NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
index 5bc18431..21a7378d 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
@@ -35,6 +35,280 @@ var (
_ = sort.Sort
)
+// Validate checks the field values on ConnectorServiceCleanupRequest with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ConnectorServiceCleanupRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ConnectorServiceCleanupRequest with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// ConnectorServiceCleanupRequestMultiError, or nil if none found.
+func (m *ConnectorServiceCleanupRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ConnectorServiceCleanupRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConnectorServiceCleanupRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConnectorServiceCleanupRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConnectorServiceCleanupRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ConnectorServiceCleanupRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ConnectorServiceCleanupRequestMultiError is an error wrapping multiple
+// validation errors returned by ConnectorServiceCleanupRequest.ValidateAll()
+// if the designated constraints aren't met.
+type ConnectorServiceCleanupRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ConnectorServiceCleanupRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ConnectorServiceCleanupRequestMultiError) AllErrors() []error { return m }
+
+// ConnectorServiceCleanupRequestValidationError is the validation error
+// returned by ConnectorServiceCleanupRequest.Validate if the designated
+// constraints aren't met.
+type ConnectorServiceCleanupRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ConnectorServiceCleanupRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ConnectorServiceCleanupRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ConnectorServiceCleanupRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ConnectorServiceCleanupRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ConnectorServiceCleanupRequestValidationError) ErrorName() string {
+ return "ConnectorServiceCleanupRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ConnectorServiceCleanupRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sConnectorServiceCleanupRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ConnectorServiceCleanupRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ConnectorServiceCleanupRequestValidationError{}
+
+// Validate checks the field values on ConnectorServiceCleanupResponse with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ConnectorServiceCleanupResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ConnectorServiceCleanupResponse with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// ConnectorServiceCleanupResponseMultiError, or nil if none found.
+func (m *ConnectorServiceCleanupResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ConnectorServiceCleanupResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConnectorServiceCleanupResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConnectorServiceCleanupResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConnectorServiceCleanupResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ConnectorServiceCleanupResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ConnectorServiceCleanupResponseMultiError is an error wrapping multiple
+// validation errors returned by ConnectorServiceCleanupResponse.ValidateAll()
+// if the designated constraints aren't met.
+type ConnectorServiceCleanupResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ConnectorServiceCleanupResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ConnectorServiceCleanupResponseMultiError) AllErrors() []error { return m }
+
+// ConnectorServiceCleanupResponseValidationError is the validation error
+// returned by ConnectorServiceCleanupResponse.Validate if the designated
+// constraints aren't met.
+type ConnectorServiceCleanupResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ConnectorServiceCleanupResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ConnectorServiceCleanupResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ConnectorServiceCleanupResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ConnectorServiceCleanupResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ConnectorServiceCleanupResponseValidationError) ErrorName() string {
+ return "ConnectorServiceCleanupResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ConnectorServiceCleanupResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sConnectorServiceCleanupResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ConnectorServiceCleanupResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ConnectorServiceCleanupResponseValidationError{}
+
// Validate checks the field values on ConnectorMetadata with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go
index 3380ee5a..cfc2822e 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go
@@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7
type ConnectorServiceClient interface {
GetMetadata(ctx context.Context, in *ConnectorServiceGetMetadataRequest, opts ...grpc.CallOption) (*ConnectorServiceGetMetadataResponse, error)
Validate(ctx context.Context, in *ConnectorServiceValidateRequest, opts ...grpc.CallOption) (*ConnectorServiceValidateResponse, error)
+ Cleanup(ctx context.Context, in *ConnectorServiceCleanupRequest, opts ...grpc.CallOption) (*ConnectorServiceCleanupResponse, error)
}
type connectorServiceClient struct {
@@ -52,12 +53,22 @@ func (c *connectorServiceClient) Validate(ctx context.Context, in *ConnectorServ
return out, nil
}
+func (c *connectorServiceClient) Cleanup(ctx context.Context, in *ConnectorServiceCleanupRequest, opts ...grpc.CallOption) (*ConnectorServiceCleanupResponse, error) {
+ out := new(ConnectorServiceCleanupResponse)
+ err := c.cc.Invoke(ctx, "/c1.connector.v2.ConnectorService/Cleanup", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// ConnectorServiceServer is the server API for ConnectorService service.
// All implementations should embed UnimplementedConnectorServiceServer
// for forward compatibility
type ConnectorServiceServer interface {
GetMetadata(context.Context, *ConnectorServiceGetMetadataRequest) (*ConnectorServiceGetMetadataResponse, error)
Validate(context.Context, *ConnectorServiceValidateRequest) (*ConnectorServiceValidateResponse, error)
+ Cleanup(context.Context, *ConnectorServiceCleanupRequest) (*ConnectorServiceCleanupResponse, error)
}
// UnimplementedConnectorServiceServer should be embedded to have forward compatible implementations.
@@ -70,6 +81,9 @@ func (UnimplementedConnectorServiceServer) GetMetadata(context.Context, *Connect
func (UnimplementedConnectorServiceServer) Validate(context.Context, *ConnectorServiceValidateRequest) (*ConnectorServiceValidateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented")
}
+func (UnimplementedConnectorServiceServer) Cleanup(context.Context, *ConnectorServiceCleanupRequest) (*ConnectorServiceCleanupResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Cleanup not implemented")
+}
// UnsafeConnectorServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConnectorServiceServer will
@@ -118,6 +132,24 @@ func _ConnectorService_Validate_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
+func _ConnectorService_Cleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ConnectorServiceCleanupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ConnectorServiceServer).Cleanup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/c1.connector.v2.ConnectorService/Cleanup",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ConnectorServiceServer).Cleanup(ctx, req.(*ConnectorServiceCleanupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
// ConnectorService_ServiceDesc is the grpc.ServiceDesc for ConnectorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -133,6 +165,10 @@ var ConnectorService_ServiceDesc = grpc.ServiceDesc{
MethodName: "Validate",
Handler: _ConnectorService_Validate_Handler,
},
+ {
+ MethodName: "Cleanup",
+ Handler: _ConnectorService_Cleanup_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "c1/connector/v2/connector.proto",
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go
index 9c067a45..4e9b2c65 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go
@@ -353,7 +353,7 @@ var file_c1_connector_v2_entitlement_proto_rawDesc = []byte{
0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x4d, 0x45, 0x4e, 0x54,
0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x5f, 0x56, 0x41,
0x4c, 0x55, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02,
- 0x22, 0xf2, 0x01, 0x0a, 0x2a, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x22, 0xf3, 0x01, 0x0a, 0x2a, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
@@ -362,40 +362,40 @@ var file_c1_connector_v2_entitlement_proto_rawDesc = []byte{
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73,
0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05,
0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12,
- 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0,
- 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xce, 0x01, 0x0a, 0x2b, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73,
- 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,
- 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52,
- 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36,
- 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
+ 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40,
+ 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xa5, 0x01, 0x0a, 0x13, 0x45, 0x6e, 0x74, 0x69, 0x74,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d,
- 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36,
- 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
- 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d,
- 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x2b, 0x45, 0x6e, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69,
+ 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74,
+ 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01,
+ 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xa5, 0x01, 0x0a, 0x13, 0x45, 0x6e, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x8d, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x45,
+ 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go
index 95da9a21..0d6527dd 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go
@@ -366,10 +366,10 @@ func (m *EntitlementsServiceListEntitlementsRequest) validate(all bool) error {
if m.GetPageToken() != "" {
- if l := len(m.GetPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetPageToken()); l < 1 || l > 1048576 {
err := EntitlementsServiceListEntitlementsRequestValidationError{
field: "PageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
@@ -555,10 +555,10 @@ func (m *EntitlementsServiceListEntitlementsResponse) validate(all bool) error {
if m.GetNextPageToken() != "" {
- if l := len(m.GetNextPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetNextPageToken()); l < 1 || l > 1048576 {
err := EntitlementsServiceListEntitlementsResponseValidationError{
field: "NextPageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go
index bd316c69..164c96a8 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go
@@ -585,7 +585,7 @@ var file_c1_connector_v2_grant_proto_rawDesc = []byte{
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x22, 0xf0, 0x01, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x22, 0xf1, 0x01, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
@@ -593,92 +593,92 @@ var file_c1_connector_v2_grant_proto_rawDesc = []byte{
0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa,
- 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a,
+ 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a,
0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01,
- 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x1f, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x6c,
- 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65,
- 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42,
- 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78,
- 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x1f, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61,
- 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e,
- 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
- 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x12, 0x41, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08,
- 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69,
- 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x20,
- 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e,
- 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74,
- 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x20, 0x47, 0x72, 0x61,
- 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a,
- 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47,
- 0x72, 0x61, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05,
- 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01,
+ 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x1f, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x04,
+ 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa,
+ 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x1f, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05,
+ 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e,
+ 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5b, 0x0a,
- 0x21, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8a, 0x01,
+ 0x0a, 0x20, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x80, 0x01, 0x0a, 0x0d, 0x47,
- 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x0a,
- 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x67, 0x72,
+ 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61,
- 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72,
- 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72,
- 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47,
- 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x01,
- 0x0a, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x30,
+ 0x6e, 0x74, 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x20, 0x47,
+ 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x36, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
- 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x31, 0x2e,
+ 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
+ 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0x5b, 0x0a, 0x21, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x80, 0x01, 0x0a,
+ 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f,
+ 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47,
+ 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74,
+ 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73,
+ 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32,
+ 0xf4, 0x01, 0x0a, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74,
+ 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f,
- 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12,
+ 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e,
+ 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63,
+ 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go
index 02b76497..76079a38 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go
@@ -511,10 +511,10 @@ func (m *GrantsServiceListGrantsRequest) validate(all bool) error {
if m.GetPageToken() != "" {
- if l := len(m.GetPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetPageToken()); l < 1 || l > 1048576 {
err := GrantsServiceListGrantsRequestValidationError{
field: "PageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
@@ -697,10 +697,10 @@ func (m *GrantsServiceListGrantsResponse) validate(all bool) error {
if m.GetNextPageToken() != "" {
- if l := len(m.GetNextPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetNextPageToken()); l < 1 || l > 1048576 {
err := GrantsServiceListGrantsResponseValidationError{
field: "NextPageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
index 3fa6432c..71e73fe0 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
@@ -1896,7 +1896,7 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{
0x54, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x52, 0x41, 0x49,
0x54, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, 0x41,
0x49, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x52, 0x41,
- 0x49, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x04, 0x22, 0xf0, 0x01, 0x0a, 0x2c, 0x52, 0x65, 0x73,
+ 0x49, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x04, 0x22, 0xf1, 0x01, 0x0a, 0x2c, 0x52, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72,
@@ -1905,113 +1905,56 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{
0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x09,
0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42,
0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67,
- 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08,
- 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f,
- 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x2d,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a,
- 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74,
- 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08,
- 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
- 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
- 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
- 0x4e, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22,
- 0x85, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12,
- 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x50,
- 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72,
- 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a,
- 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72,
- 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22,
- 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0e,
- 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
- 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44,
- 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49,
+ 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09,
+ 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x01, 0x0a,
+ 0x2d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31,
+ 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73,
+ 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72,
+ 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,
+ 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x4e, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x22, 0x85, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0b, 0x41, 0x63,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x65, 0x6d, 0x61,
- 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f,
- 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x06, 0x65,
- 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6c,
- 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03,
- 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73,
- 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66,
- 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x07,
- 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
- 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,
- 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xb1,
- 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x70,
- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
- 0x72, 0x64, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73,
- 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, 0x08, 0x52,
- 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
- 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x15, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64,
+ 0x22, 0x50, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c,
+ 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64,
+ 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12,
0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65,
@@ -2022,224 +1965,281 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{
0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e,
0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11,
0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
- 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73,
- 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a,
- 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
- 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
- 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18,
- 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15,
- 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35,
- 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
- 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
- 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
- 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
- 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e,
- 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x73,
- 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12,
- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a,
- 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79,
- 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e,
- 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
- 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a,
- 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b,
- 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c,
- 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
- 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6a, 0x77, 0x6b,
- 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a,
- 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x08,
- 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
- 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72,
- 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69,
- 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
+ 0x73, 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45,
+ 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65,
+ 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0b,
+ 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x65,
+ 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63,
+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52,
+ 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a,
+ 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03,
+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73,
+ 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72,
+ 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21,
+ 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
+ 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79,
+ 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d,
+ 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
+ 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73,
+ 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61,
+ 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28,
+ 0x08, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
+ 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a,
+ 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66,
+ 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51,
+ 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11,
+ 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65,
- 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0c,
- 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01,
- 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36,
- 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20,
+ 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63,
+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
+ 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65,
+ 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
+ 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
+ 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52,
+ 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a,
- 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c,
- 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64,
- 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x0f,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
- 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22,
- 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53,
- 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
- 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37,
+ 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f,
+ 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
+ 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61,
+ 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65,
+ 0x73, 0x75, 0x6c, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73,
+ 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x61, 0x74,
+ 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
+ 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
+ 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72,
+ 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69,
+ 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12,
+ 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x5f, 0x70, 0x75,
+ 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
+ 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c,
+ 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6a,
+ 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
+ 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b,
+ 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79,
+ 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x08, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42,
+ 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a, 0x08, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30,
+ 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08,
+ 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa,
+ 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x51,
+ 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e,
+ 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
+ 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
+ 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52,
- 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10,
- 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f,
- 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c,
- 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x50, 0x52, 0x49, 0x4e, 0x43,
- 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22, 0xc0, 0x02, 0x0a, 0x24, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c,
- 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa,
- 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72,
- 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x27,
- 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70,
- 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f,
- 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a,
- 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65,
- 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc5, 0x01,
- 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70,
- 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x0d,
- 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
- 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c,
- 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x50, 0x52, 0x49,
+ 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22, 0xc1, 0x02, 0x0a,
+ 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69,
- 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64,
+ 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52,
+ 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa,
+ 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69,
+ 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78,
+ 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0,
+ 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01,
+ 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79,
+ 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92, 0x01, 0x0a, 0x10,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a,
- 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01,
- 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61,
- 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f,
- 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28,
- 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
- 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
- 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74,
- 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61,
- 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e,
+ 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34,
- 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75,
- 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64,
- 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61,
+ 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
+ 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67,
+ 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
index 22573695..1af7d070 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
@@ -312,10 +312,10 @@ func (m *ResourceTypesServiceListResourceTypesRequest) validate(all bool) error
if m.GetPageToken() != "" {
- if l := len(m.GetPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetPageToken()); l < 1 || l > 1048576 {
err := ResourceTypesServiceListResourceTypesRequestValidationError{
field: "PageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
@@ -502,10 +502,10 @@ func (m *ResourceTypesServiceListResourceTypesResponse) validate(all bool) error
if m.GetNextPageToken() != "" {
- if l := len(m.GetNextPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetNextPageToken()); l < 1 || l > 1048576 {
err := ResourceTypesServiceListResourceTypesResponseValidationError{
field: "NextPageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
@@ -3209,10 +3209,10 @@ func (m *ResourcesServiceListResourcesRequest) validate(all bool) error {
if m.GetPageToken() != "" {
- if l := len(m.GetPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetPageToken()); l < 1 || l > 1048576 {
err := ResourcesServiceListResourcesRequestValidationError{
field: "PageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
@@ -3397,10 +3397,10 @@ func (m *ResourcesServiceListResourcesResponse) validate(all bool) error {
if m.GetNextPageToken() != "" {
- if l := len(m.GetNextPageToken()); l < 1 || l > 4096 {
+ if l := len(m.GetNextPageToken()); l < 1 || l > 1048576 {
err := ResourcesServiceListResourcesResponseValidationError{
field: "NextPageToken",
- reason: "value length must be between 1 and 4096 bytes, inclusive",
+ reason: "value length must be between 1 and 1048576 bytes, inclusive",
}
if !all {
return err
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go
index 0cb85b10..f1f2b7c9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go
@@ -1551,6 +1551,7 @@ func (x *TicketsServiceCreateTicketRequest) GetAnnotations() []*anypb.Any {
return nil
}
+// TODO(lauren) maybe the error should be a separate proto so we can store retryable error
type TicketsServiceCreateTicketResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1558,6 +1559,7 @@ type TicketsServiceCreateTicketResponse struct {
Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *TicketsServiceCreateTicketResponse) Reset() {
@@ -1606,6 +1608,13 @@ func (x *TicketsServiceCreateTicketResponse) GetAnnotations() []*anypb.Any {
return nil
}
+func (x *TicketsServiceCreateTicketResponse) GetError() string {
+ if x != nil {
+ return x.Error
+ }
+ return ""
+}
+
type TicketsServiceGetTicketRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1668,6 +1677,7 @@ type TicketsServiceGetTicketResponse struct {
Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *TicketsServiceGetTicketResponse) Reset() {
@@ -1716,6 +1726,201 @@ func (x *TicketsServiceGetTicketResponse) GetAnnotations() []*anypb.Any {
return nil
}
+func (x *TicketsServiceGetTicketResponse) GetError() string {
+ if x != nil {
+ return x.Error
+ }
+ return ""
+}
+
+type TicketsServiceBulkCreateTicketsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TicketRequests []*TicketsServiceCreateTicketRequest `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+}
+
+func (x *TicketsServiceBulkCreateTicketsRequest) Reset() {
+ *x = TicketsServiceBulkCreateTicketsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TicketsServiceBulkCreateTicketsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TicketsServiceBulkCreateTicketsRequest) ProtoMessage() {}
+
+func (x *TicketsServiceBulkCreateTicketsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[24]
+ 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 TicketsServiceBulkCreateTicketsRequest.ProtoReflect.Descriptor instead.
+func (*TicketsServiceBulkCreateTicketsRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_ticket_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *TicketsServiceBulkCreateTicketsRequest) GetTicketRequests() []*TicketsServiceCreateTicketRequest {
+ if x != nil {
+ return x.TicketRequests
+ }
+ return nil
+}
+
+type TicketsServiceBulkCreateTicketsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Tickets []*TicketsServiceCreateTicketResponse `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
+}
+
+func (x *TicketsServiceBulkCreateTicketsResponse) Reset() {
+ *x = TicketsServiceBulkCreateTicketsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TicketsServiceBulkCreateTicketsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TicketsServiceBulkCreateTicketsResponse) ProtoMessage() {}
+
+func (x *TicketsServiceBulkCreateTicketsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[25]
+ 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 TicketsServiceBulkCreateTicketsResponse.ProtoReflect.Descriptor instead.
+func (*TicketsServiceBulkCreateTicketsResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_ticket_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *TicketsServiceBulkCreateTicketsResponse) GetTickets() []*TicketsServiceCreateTicketResponse {
+ if x != nil {
+ return x.Tickets
+ }
+ return nil
+}
+
+type TicketsServiceBulkGetTicketsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TicketRequests []*TicketsServiceGetTicketRequest `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+}
+
+func (x *TicketsServiceBulkGetTicketsRequest) Reset() {
+ *x = TicketsServiceBulkGetTicketsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TicketsServiceBulkGetTicketsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TicketsServiceBulkGetTicketsRequest) ProtoMessage() {}
+
+func (x *TicketsServiceBulkGetTicketsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[26]
+ 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 TicketsServiceBulkGetTicketsRequest.ProtoReflect.Descriptor instead.
+func (*TicketsServiceBulkGetTicketsRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_ticket_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *TicketsServiceBulkGetTicketsRequest) GetTicketRequests() []*TicketsServiceGetTicketRequest {
+ if x != nil {
+ return x.TicketRequests
+ }
+ return nil
+}
+
+type TicketsServiceBulkGetTicketsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Tickets []*TicketsServiceGetTicketResponse `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
+}
+
+func (x *TicketsServiceBulkGetTicketsResponse) Reset() {
+ *x = TicketsServiceBulkGetTicketsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TicketsServiceBulkGetTicketsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TicketsServiceBulkGetTicketsResponse) ProtoMessage() {}
+
+func (x *TicketsServiceBulkGetTicketsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[27]
+ 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 TicketsServiceBulkGetTicketsResponse.ProtoReflect.Descriptor instead.
+func (*TicketsServiceBulkGetTicketsResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_ticket_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *TicketsServiceBulkGetTicketsResponse) GetTickets() []*TicketsServiceGetTicketResponse {
+ if x != nil {
+ return x.Tickets
+ }
+ return nil
+}
+
var File_c1_connector_v2_ticket_proto protoreflect.FileDescriptor
var file_c1_connector_v2_ticket_proto_rawDesc = []byte{
@@ -2054,7 +2259,7 @@ var file_c1_connector_v2_ticket_proto_rawDesc = []byte{
0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x22, 0x54, 0x69, 0x63, 0x6b,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x22, 0x54, 0x69, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f,
0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
@@ -2063,59 +2268,110 @@ var file_c1_connector_v2_ticket_proto_rawDesc = []byte{
0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x68, 0x0a, 0x1e, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b,
- 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x1f, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06,
- 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
- 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x85,
- 0x04, 0x0a, 0x0e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x77, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x68, 0x0a,
+ 0x1e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47,
+ 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1f, 0x54, 0x69, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x74,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x85, 0x01, 0x0a, 0x26, 0x54,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x75, 0x6c,
+ 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x73, 0x22, 0x78, 0x0a, 0x27, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a,
+ 0x07, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x52, 0x07, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x7f, 0x0a, 0x23,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x75,
+ 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x74,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x72, 0x0a,
+ 0x24, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42,
+ 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74,
+ 0x73, 0x32, 0x8d, 0x06, 0x0a, 0x0e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65,
+ 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a,
+ 0x09, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01,
+ 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73,
+ 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b,
- 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x09, 0x47, 0x65,
- 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
- 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x42, 0x75,
+ 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12,
+ 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b,
- 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x4c,
- 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73,
- 0x12, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b,
- 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69,
- 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
- 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36,
- 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
- 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47,
- 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e,
- 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63,
- 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x0e, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x47,
+ 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
}
var (
@@ -2130,7 +2386,7 @@ func file_c1_connector_v2_ticket_proto_rawDescGZIP() []byte {
return file_c1_connector_v2_ticket_proto_rawDescData
}
-var file_c1_connector_v2_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
+var file_c1_connector_v2_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
var file_c1_connector_v2_ticket_proto_goTypes = []interface{}{
(*TicketSchema)(nil), // 0: c1.connector.v2.TicketSchema
(*TicketCustomField)(nil), // 1: c1.connector.v2.TicketCustomField
@@ -2149,26 +2405,30 @@ var file_c1_connector_v2_ticket_proto_goTypes = []interface{}{
(*TicketsServiceGetTicketSchemaResponse)(nil), // 14: c1.connector.v2.TicketsServiceGetTicketSchemaResponse
(*TicketsServiceListTicketSchemasRequest)(nil), // 15: c1.connector.v2.TicketsServiceListTicketSchemasRequest
(*TicketsServiceListTicketSchemasResponse)(nil), // 16: c1.connector.v2.TicketsServiceListTicketSchemasResponse
- (*Ticket)(nil), // 17: c1.connector.v2.Ticket
- (*TicketType)(nil), // 18: c1.connector.v2.TicketType
- (*TicketRequest)(nil), // 19: c1.connector.v2.TicketRequest
- (*TicketsServiceCreateTicketRequest)(nil), // 20: c1.connector.v2.TicketsServiceCreateTicketRequest
- (*TicketsServiceCreateTicketResponse)(nil), // 21: c1.connector.v2.TicketsServiceCreateTicketResponse
- (*TicketsServiceGetTicketRequest)(nil), // 22: c1.connector.v2.TicketsServiceGetTicketRequest
- (*TicketsServiceGetTicketResponse)(nil), // 23: c1.connector.v2.TicketsServiceGetTicketResponse
- nil, // 24: c1.connector.v2.TicketSchema.CustomFieldsEntry
- nil, // 25: c1.connector.v2.Ticket.CustomFieldsEntry
- nil, // 26: c1.connector.v2.TicketRequest.CustomFieldsEntry
- (*anypb.Any)(nil), // 27: google.protobuf.Any
- (*wrapperspb.FloatValue)(nil), // 28: google.protobuf.FloatValue
- (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp
- (*Resource)(nil), // 30: c1.connector.v2.Resource
+ (*Ticket)(nil), // 17: c1.connector.v2.Ticket
+ (*TicketType)(nil), // 18: c1.connector.v2.TicketType
+ (*TicketRequest)(nil), // 19: c1.connector.v2.TicketRequest
+ (*TicketsServiceCreateTicketRequest)(nil), // 20: c1.connector.v2.TicketsServiceCreateTicketRequest
+ (*TicketsServiceCreateTicketResponse)(nil), // 21: c1.connector.v2.TicketsServiceCreateTicketResponse
+ (*TicketsServiceGetTicketRequest)(nil), // 22: c1.connector.v2.TicketsServiceGetTicketRequest
+ (*TicketsServiceGetTicketResponse)(nil), // 23: c1.connector.v2.TicketsServiceGetTicketResponse
+ (*TicketsServiceBulkCreateTicketsRequest)(nil), // 24: c1.connector.v2.TicketsServiceBulkCreateTicketsRequest
+ (*TicketsServiceBulkCreateTicketsResponse)(nil), // 25: c1.connector.v2.TicketsServiceBulkCreateTicketsResponse
+ (*TicketsServiceBulkGetTicketsRequest)(nil), // 26: c1.connector.v2.TicketsServiceBulkGetTicketsRequest
+ (*TicketsServiceBulkGetTicketsResponse)(nil), // 27: c1.connector.v2.TicketsServiceBulkGetTicketsResponse
+ nil, // 28: c1.connector.v2.TicketSchema.CustomFieldsEntry
+ nil, // 29: c1.connector.v2.Ticket.CustomFieldsEntry
+ nil, // 30: c1.connector.v2.TicketRequest.CustomFieldsEntry
+ (*anypb.Any)(nil), // 31: google.protobuf.Any
+ (*wrapperspb.FloatValue)(nil), // 32: google.protobuf.FloatValue
+ (*timestamppb.Timestamp)(nil), // 33: google.protobuf.Timestamp
+ (*Resource)(nil), // 34: c1.connector.v2.Resource
}
var file_c1_connector_v2_ticket_proto_depIdxs = []int32{
18, // 0: c1.connector.v2.TicketSchema.types:type_name -> c1.connector.v2.TicketType
12, // 1: c1.connector.v2.TicketSchema.statuses:type_name -> c1.connector.v2.TicketStatus
- 24, // 2: c1.connector.v2.TicketSchema.custom_fields:type_name -> c1.connector.v2.TicketSchema.CustomFieldsEntry
- 27, // 3: c1.connector.v2.TicketSchema.annotations:type_name -> google.protobuf.Any
+ 28, // 2: c1.connector.v2.TicketSchema.custom_fields:type_name -> c1.connector.v2.TicketSchema.CustomFieldsEntry
+ 31, // 3: c1.connector.v2.TicketSchema.annotations:type_name -> google.protobuf.Any
2, // 4: c1.connector.v2.TicketCustomField.string_value:type_name -> c1.connector.v2.TicketCustomFieldStringValue
3, // 5: c1.connector.v2.TicketCustomField.string_values:type_name -> c1.connector.v2.TicketCustomFieldStringValues
4, // 6: c1.connector.v2.TicketCustomField.bool_value:type_name -> c1.connector.v2.TicketCustomFieldBoolValue
@@ -2178,60 +2438,68 @@ var file_c1_connector_v2_ticket_proto_depIdxs = []int32{
9, // 10: c1.connector.v2.TicketCustomField.pick_object_value:type_name -> c1.connector.v2.TicketCustomFieldPickObjectValue
10, // 11: c1.connector.v2.TicketCustomField.pick_multiple_object_values:type_name -> c1.connector.v2.TicketCustomFieldPickMultipleObjectValues
5, // 12: c1.connector.v2.TicketCustomField.number_value:type_name -> c1.connector.v2.TicketCustomFieldNumberValue
- 27, // 13: c1.connector.v2.TicketCustomField.annotations:type_name -> google.protobuf.Any
- 28, // 14: c1.connector.v2.TicketCustomFieldNumberValue.value:type_name -> google.protobuf.FloatValue
- 28, // 15: c1.connector.v2.TicketCustomFieldNumberValue.default_value:type_name -> google.protobuf.FloatValue
- 29, // 16: c1.connector.v2.TicketCustomFieldTimestampValue.value:type_name -> google.protobuf.Timestamp
- 29, // 17: c1.connector.v2.TicketCustomFieldTimestampValue.default_value:type_name -> google.protobuf.Timestamp
+ 31, // 13: c1.connector.v2.TicketCustomField.annotations:type_name -> google.protobuf.Any
+ 32, // 14: c1.connector.v2.TicketCustomFieldNumberValue.value:type_name -> google.protobuf.FloatValue
+ 32, // 15: c1.connector.v2.TicketCustomFieldNumberValue.default_value:type_name -> google.protobuf.FloatValue
+ 33, // 16: c1.connector.v2.TicketCustomFieldTimestampValue.value:type_name -> google.protobuf.Timestamp
+ 33, // 17: c1.connector.v2.TicketCustomFieldTimestampValue.default_value:type_name -> google.protobuf.Timestamp
11, // 18: c1.connector.v2.TicketCustomFieldPickObjectValue.value:type_name -> c1.connector.v2.TicketCustomFieldObjectValue
11, // 19: c1.connector.v2.TicketCustomFieldPickObjectValue.allowed_values:type_name -> c1.connector.v2.TicketCustomFieldObjectValue
11, // 20: c1.connector.v2.TicketCustomFieldPickObjectValue.default_value:type_name -> c1.connector.v2.TicketCustomFieldObjectValue
11, // 21: c1.connector.v2.TicketCustomFieldPickMultipleObjectValues.values:type_name -> c1.connector.v2.TicketCustomFieldObjectValue
11, // 22: c1.connector.v2.TicketCustomFieldPickMultipleObjectValues.allowed_values:type_name -> c1.connector.v2.TicketCustomFieldObjectValue
11, // 23: c1.connector.v2.TicketCustomFieldPickMultipleObjectValues.default_values:type_name -> c1.connector.v2.TicketCustomFieldObjectValue
- 27, // 24: c1.connector.v2.TicketsServiceGetTicketSchemaRequest.annotations:type_name -> google.protobuf.Any
+ 31, // 24: c1.connector.v2.TicketsServiceGetTicketSchemaRequest.annotations:type_name -> google.protobuf.Any
0, // 25: c1.connector.v2.TicketsServiceGetTicketSchemaResponse.schema:type_name -> c1.connector.v2.TicketSchema
- 27, // 26: c1.connector.v2.TicketsServiceGetTicketSchemaResponse.annotations:type_name -> google.protobuf.Any
- 27, // 27: c1.connector.v2.TicketsServiceListTicketSchemasRequest.annotations:type_name -> google.protobuf.Any
+ 31, // 26: c1.connector.v2.TicketsServiceGetTicketSchemaResponse.annotations:type_name -> google.protobuf.Any
+ 31, // 27: c1.connector.v2.TicketsServiceListTicketSchemasRequest.annotations:type_name -> google.protobuf.Any
0, // 28: c1.connector.v2.TicketsServiceListTicketSchemasResponse.list:type_name -> c1.connector.v2.TicketSchema
- 27, // 29: c1.connector.v2.TicketsServiceListTicketSchemasResponse.annotations:type_name -> google.protobuf.Any
- 30, // 30: c1.connector.v2.Ticket.assignees:type_name -> c1.connector.v2.Resource
- 30, // 31: c1.connector.v2.Ticket.reporter:type_name -> c1.connector.v2.Resource
+ 31, // 29: c1.connector.v2.TicketsServiceListTicketSchemasResponse.annotations:type_name -> google.protobuf.Any
+ 34, // 30: c1.connector.v2.Ticket.assignees:type_name -> c1.connector.v2.Resource
+ 34, // 31: c1.connector.v2.Ticket.reporter:type_name -> c1.connector.v2.Resource
12, // 32: c1.connector.v2.Ticket.status:type_name -> c1.connector.v2.TicketStatus
18, // 33: c1.connector.v2.Ticket.type:type_name -> c1.connector.v2.TicketType
- 25, // 34: c1.connector.v2.Ticket.custom_fields:type_name -> c1.connector.v2.Ticket.CustomFieldsEntry
- 29, // 35: c1.connector.v2.Ticket.created_at:type_name -> google.protobuf.Timestamp
- 29, // 36: c1.connector.v2.Ticket.updated_at:type_name -> google.protobuf.Timestamp
- 29, // 37: c1.connector.v2.Ticket.completed_at:type_name -> google.protobuf.Timestamp
- 30, // 38: c1.connector.v2.Ticket.requested_for:type_name -> c1.connector.v2.Resource
+ 29, // 34: c1.connector.v2.Ticket.custom_fields:type_name -> c1.connector.v2.Ticket.CustomFieldsEntry
+ 33, // 35: c1.connector.v2.Ticket.created_at:type_name -> google.protobuf.Timestamp
+ 33, // 36: c1.connector.v2.Ticket.updated_at:type_name -> google.protobuf.Timestamp
+ 33, // 37: c1.connector.v2.Ticket.completed_at:type_name -> google.protobuf.Timestamp
+ 34, // 38: c1.connector.v2.Ticket.requested_for:type_name -> c1.connector.v2.Resource
12, // 39: c1.connector.v2.TicketRequest.status:type_name -> c1.connector.v2.TicketStatus
18, // 40: c1.connector.v2.TicketRequest.type:type_name -> c1.connector.v2.TicketType
- 26, // 41: c1.connector.v2.TicketRequest.custom_fields:type_name -> c1.connector.v2.TicketRequest.CustomFieldsEntry
- 30, // 42: c1.connector.v2.TicketRequest.requested_for:type_name -> c1.connector.v2.Resource
+ 30, // 41: c1.connector.v2.TicketRequest.custom_fields:type_name -> c1.connector.v2.TicketRequest.CustomFieldsEntry
+ 34, // 42: c1.connector.v2.TicketRequest.requested_for:type_name -> c1.connector.v2.Resource
19, // 43: c1.connector.v2.TicketsServiceCreateTicketRequest.request:type_name -> c1.connector.v2.TicketRequest
0, // 44: c1.connector.v2.TicketsServiceCreateTicketRequest.schema:type_name -> c1.connector.v2.TicketSchema
- 27, // 45: c1.connector.v2.TicketsServiceCreateTicketRequest.annotations:type_name -> google.protobuf.Any
+ 31, // 45: c1.connector.v2.TicketsServiceCreateTicketRequest.annotations:type_name -> google.protobuf.Any
17, // 46: c1.connector.v2.TicketsServiceCreateTicketResponse.ticket:type_name -> c1.connector.v2.Ticket
- 27, // 47: c1.connector.v2.TicketsServiceCreateTicketResponse.annotations:type_name -> google.protobuf.Any
- 27, // 48: c1.connector.v2.TicketsServiceGetTicketRequest.annotations:type_name -> google.protobuf.Any
+ 31, // 47: c1.connector.v2.TicketsServiceCreateTicketResponse.annotations:type_name -> google.protobuf.Any
+ 31, // 48: c1.connector.v2.TicketsServiceGetTicketRequest.annotations:type_name -> google.protobuf.Any
17, // 49: c1.connector.v2.TicketsServiceGetTicketResponse.ticket:type_name -> c1.connector.v2.Ticket
- 27, // 50: c1.connector.v2.TicketsServiceGetTicketResponse.annotations:type_name -> google.protobuf.Any
- 1, // 51: c1.connector.v2.TicketSchema.CustomFieldsEntry.value:type_name -> c1.connector.v2.TicketCustomField
- 1, // 52: c1.connector.v2.Ticket.CustomFieldsEntry.value:type_name -> c1.connector.v2.TicketCustomField
- 1, // 53: c1.connector.v2.TicketRequest.CustomFieldsEntry.value:type_name -> c1.connector.v2.TicketCustomField
- 20, // 54: c1.connector.v2.TicketsService.CreateTicket:input_type -> c1.connector.v2.TicketsServiceCreateTicketRequest
- 22, // 55: c1.connector.v2.TicketsService.GetTicket:input_type -> c1.connector.v2.TicketsServiceGetTicketRequest
- 15, // 56: c1.connector.v2.TicketsService.ListTicketSchemas:input_type -> c1.connector.v2.TicketsServiceListTicketSchemasRequest
- 13, // 57: c1.connector.v2.TicketsService.GetTicketSchema:input_type -> c1.connector.v2.TicketsServiceGetTicketSchemaRequest
- 21, // 58: c1.connector.v2.TicketsService.CreateTicket:output_type -> c1.connector.v2.TicketsServiceCreateTicketResponse
- 23, // 59: c1.connector.v2.TicketsService.GetTicket:output_type -> c1.connector.v2.TicketsServiceGetTicketResponse
- 16, // 60: c1.connector.v2.TicketsService.ListTicketSchemas:output_type -> c1.connector.v2.TicketsServiceListTicketSchemasResponse
- 14, // 61: c1.connector.v2.TicketsService.GetTicketSchema:output_type -> c1.connector.v2.TicketsServiceGetTicketSchemaResponse
- 58, // [58:62] is the sub-list for method output_type
- 54, // [54:58] is the sub-list for method input_type
- 54, // [54:54] is the sub-list for extension type_name
- 54, // [54:54] is the sub-list for extension extendee
- 0, // [0:54] is the sub-list for field type_name
+ 31, // 50: c1.connector.v2.TicketsServiceGetTicketResponse.annotations:type_name -> google.protobuf.Any
+ 20, // 51: c1.connector.v2.TicketsServiceBulkCreateTicketsRequest.ticket_requests:type_name -> c1.connector.v2.TicketsServiceCreateTicketRequest
+ 21, // 52: c1.connector.v2.TicketsServiceBulkCreateTicketsResponse.tickets:type_name -> c1.connector.v2.TicketsServiceCreateTicketResponse
+ 22, // 53: c1.connector.v2.TicketsServiceBulkGetTicketsRequest.ticket_requests:type_name -> c1.connector.v2.TicketsServiceGetTicketRequest
+ 23, // 54: c1.connector.v2.TicketsServiceBulkGetTicketsResponse.tickets:type_name -> c1.connector.v2.TicketsServiceGetTicketResponse
+ 1, // 55: c1.connector.v2.TicketSchema.CustomFieldsEntry.value:type_name -> c1.connector.v2.TicketCustomField
+ 1, // 56: c1.connector.v2.Ticket.CustomFieldsEntry.value:type_name -> c1.connector.v2.TicketCustomField
+ 1, // 57: c1.connector.v2.TicketRequest.CustomFieldsEntry.value:type_name -> c1.connector.v2.TicketCustomField
+ 20, // 58: c1.connector.v2.TicketsService.CreateTicket:input_type -> c1.connector.v2.TicketsServiceCreateTicketRequest
+ 22, // 59: c1.connector.v2.TicketsService.GetTicket:input_type -> c1.connector.v2.TicketsServiceGetTicketRequest
+ 15, // 60: c1.connector.v2.TicketsService.ListTicketSchemas:input_type -> c1.connector.v2.TicketsServiceListTicketSchemasRequest
+ 13, // 61: c1.connector.v2.TicketsService.GetTicketSchema:input_type -> c1.connector.v2.TicketsServiceGetTicketSchemaRequest
+ 24, // 62: c1.connector.v2.TicketsService.BulkCreateTickets:input_type -> c1.connector.v2.TicketsServiceBulkCreateTicketsRequest
+ 26, // 63: c1.connector.v2.TicketsService.BulkGetTickets:input_type -> c1.connector.v2.TicketsServiceBulkGetTicketsRequest
+ 21, // 64: c1.connector.v2.TicketsService.CreateTicket:output_type -> c1.connector.v2.TicketsServiceCreateTicketResponse
+ 23, // 65: c1.connector.v2.TicketsService.GetTicket:output_type -> c1.connector.v2.TicketsServiceGetTicketResponse
+ 16, // 66: c1.connector.v2.TicketsService.ListTicketSchemas:output_type -> c1.connector.v2.TicketsServiceListTicketSchemasResponse
+ 14, // 67: c1.connector.v2.TicketsService.GetTicketSchema:output_type -> c1.connector.v2.TicketsServiceGetTicketSchemaResponse
+ 25, // 68: c1.connector.v2.TicketsService.BulkCreateTickets:output_type -> c1.connector.v2.TicketsServiceBulkCreateTicketsResponse
+ 27, // 69: c1.connector.v2.TicketsService.BulkGetTickets:output_type -> c1.connector.v2.TicketsServiceBulkGetTicketsResponse
+ 64, // [64:70] is the sub-list for method output_type
+ 58, // [58:64] is the sub-list for method input_type
+ 58, // [58:58] is the sub-list for extension type_name
+ 58, // [58:58] is the sub-list for extension extendee
+ 0, // [0:58] is the sub-list for field type_name
}
func init() { file_c1_connector_v2_ticket_proto_init() }
@@ -2529,6 +2797,54 @@ func file_c1_connector_v2_ticket_proto_init() {
return nil
}
}
+ file_c1_connector_v2_ticket_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TicketsServiceBulkCreateTicketsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_ticket_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TicketsServiceBulkCreateTicketsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_ticket_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TicketsServiceBulkGetTicketsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_ticket_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TicketsServiceBulkGetTicketsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
file_c1_connector_v2_ticket_proto_msgTypes[1].OneofWrappers = []interface{}{
(*TicketCustomField_StringValue)(nil),
@@ -2547,7 +2863,7 @@ func file_c1_connector_v2_ticket_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_c1_connector_v2_ticket_proto_rawDesc,
NumEnums: 0,
- NumMessages: 27,
+ NumMessages: 31,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go
index cd16ad94..a39776d8 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go
@@ -3948,6 +3948,8 @@ func (m *TicketsServiceCreateTicketResponse) validate(all bool) error {
}
+ // no validation rules for Error
+
if len(errors) > 0 {
return TicketsServiceCreateTicketResponseMultiError(errors)
}
@@ -4254,6 +4256,8 @@ func (m *TicketsServiceGetTicketResponse) validate(all bool) error {
}
+ // no validation rules for Error
+
if len(errors) > 0 {
return TicketsServiceGetTicketResponseMultiError(errors)
}
@@ -4334,3 +4338,561 @@ var _ interface {
Cause() error
ErrorName() string
} = TicketsServiceGetTicketResponseValidationError{}
+
+// Validate checks the field values on TicketsServiceBulkCreateTicketsRequest
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *TicketsServiceBulkCreateTicketsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TicketsServiceBulkCreateTicketsRequest with the rules defined in the proto
+// definition for this message. If any rules are violated, the result is a
+// list of violation errors wrapped in
+// TicketsServiceBulkCreateTicketsRequestMultiError, or nil if none found.
+func (m *TicketsServiceBulkCreateTicketsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TicketsServiceBulkCreateTicketsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTicketRequests() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TicketsServiceBulkCreateTicketsRequestValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TicketsServiceBulkCreateTicketsRequestValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TicketsServiceBulkCreateTicketsRequestValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TicketsServiceBulkCreateTicketsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TicketsServiceBulkCreateTicketsRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// TicketsServiceBulkCreateTicketsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TicketsServiceBulkCreateTicketsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TicketsServiceBulkCreateTicketsRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TicketsServiceBulkCreateTicketsRequestMultiError) AllErrors() []error { return m }
+
+// TicketsServiceBulkCreateTicketsRequestValidationError is the validation
+// error returned by TicketsServiceBulkCreateTicketsRequest.Validate if the
+// designated constraints aren't met.
+type TicketsServiceBulkCreateTicketsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TicketsServiceBulkCreateTicketsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TicketsServiceBulkCreateTicketsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TicketsServiceBulkCreateTicketsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TicketsServiceBulkCreateTicketsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TicketsServiceBulkCreateTicketsRequestValidationError) ErrorName() string {
+ return "TicketsServiceBulkCreateTicketsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TicketsServiceBulkCreateTicketsRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTicketsServiceBulkCreateTicketsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TicketsServiceBulkCreateTicketsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TicketsServiceBulkCreateTicketsRequestValidationError{}
+
+// Validate checks the field values on TicketsServiceBulkCreateTicketsResponse
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *TicketsServiceBulkCreateTicketsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TicketsServiceBulkCreateTicketsResponse with the rules defined in the proto
+// definition for this message. If any rules are violated, the result is a
+// list of violation errors wrapped in
+// TicketsServiceBulkCreateTicketsResponseMultiError, or nil if none found.
+func (m *TicketsServiceBulkCreateTicketsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TicketsServiceBulkCreateTicketsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTickets() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TicketsServiceBulkCreateTicketsResponseValidationError{
+ field: fmt.Sprintf("Tickets[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TicketsServiceBulkCreateTicketsResponseValidationError{
+ field: fmt.Sprintf("Tickets[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TicketsServiceBulkCreateTicketsResponseValidationError{
+ field: fmt.Sprintf("Tickets[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TicketsServiceBulkCreateTicketsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TicketsServiceBulkCreateTicketsResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// TicketsServiceBulkCreateTicketsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type TicketsServiceBulkCreateTicketsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TicketsServiceBulkCreateTicketsResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TicketsServiceBulkCreateTicketsResponseMultiError) AllErrors() []error { return m }
+
+// TicketsServiceBulkCreateTicketsResponseValidationError is the validation
+// error returned by TicketsServiceBulkCreateTicketsResponse.Validate if the
+// designated constraints aren't met.
+type TicketsServiceBulkCreateTicketsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TicketsServiceBulkCreateTicketsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TicketsServiceBulkCreateTicketsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TicketsServiceBulkCreateTicketsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TicketsServiceBulkCreateTicketsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TicketsServiceBulkCreateTicketsResponseValidationError) ErrorName() string {
+ return "TicketsServiceBulkCreateTicketsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TicketsServiceBulkCreateTicketsResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTicketsServiceBulkCreateTicketsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TicketsServiceBulkCreateTicketsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TicketsServiceBulkCreateTicketsResponseValidationError{}
+
+// Validate checks the field values on TicketsServiceBulkGetTicketsRequest with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *TicketsServiceBulkGetTicketsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TicketsServiceBulkGetTicketsRequest
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// TicketsServiceBulkGetTicketsRequestMultiError, or nil if none found.
+func (m *TicketsServiceBulkGetTicketsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TicketsServiceBulkGetTicketsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTicketRequests() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TicketsServiceBulkGetTicketsRequestValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TicketsServiceBulkGetTicketsRequestValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TicketsServiceBulkGetTicketsRequestValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TicketsServiceBulkGetTicketsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TicketsServiceBulkGetTicketsRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// TicketsServiceBulkGetTicketsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TicketsServiceBulkGetTicketsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TicketsServiceBulkGetTicketsRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TicketsServiceBulkGetTicketsRequestMultiError) AllErrors() []error { return m }
+
+// TicketsServiceBulkGetTicketsRequestValidationError is the validation error
+// returned by TicketsServiceBulkGetTicketsRequest.Validate if the designated
+// constraints aren't met.
+type TicketsServiceBulkGetTicketsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TicketsServiceBulkGetTicketsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TicketsServiceBulkGetTicketsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TicketsServiceBulkGetTicketsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TicketsServiceBulkGetTicketsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TicketsServiceBulkGetTicketsRequestValidationError) ErrorName() string {
+ return "TicketsServiceBulkGetTicketsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TicketsServiceBulkGetTicketsRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTicketsServiceBulkGetTicketsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TicketsServiceBulkGetTicketsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TicketsServiceBulkGetTicketsRequestValidationError{}
+
+// Validate checks the field values on TicketsServiceBulkGetTicketsResponse
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *TicketsServiceBulkGetTicketsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TicketsServiceBulkGetTicketsResponse
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// TicketsServiceBulkGetTicketsResponseMultiError, or nil if none found.
+func (m *TicketsServiceBulkGetTicketsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TicketsServiceBulkGetTicketsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTickets() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TicketsServiceBulkGetTicketsResponseValidationError{
+ field: fmt.Sprintf("Tickets[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TicketsServiceBulkGetTicketsResponseValidationError{
+ field: fmt.Sprintf("Tickets[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TicketsServiceBulkGetTicketsResponseValidationError{
+ field: fmt.Sprintf("Tickets[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TicketsServiceBulkGetTicketsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TicketsServiceBulkGetTicketsResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// TicketsServiceBulkGetTicketsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type TicketsServiceBulkGetTicketsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TicketsServiceBulkGetTicketsResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TicketsServiceBulkGetTicketsResponseMultiError) AllErrors() []error { return m }
+
+// TicketsServiceBulkGetTicketsResponseValidationError is the validation error
+// returned by TicketsServiceBulkGetTicketsResponse.Validate if the designated
+// constraints aren't met.
+type TicketsServiceBulkGetTicketsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TicketsServiceBulkGetTicketsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TicketsServiceBulkGetTicketsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TicketsServiceBulkGetTicketsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TicketsServiceBulkGetTicketsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TicketsServiceBulkGetTicketsResponseValidationError) ErrorName() string {
+ return "TicketsServiceBulkGetTicketsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TicketsServiceBulkGetTicketsResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTicketsServiceBulkGetTicketsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TicketsServiceBulkGetTicketsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TicketsServiceBulkGetTicketsResponseValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go
index a8adbc66..6601b037 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go
@@ -26,6 +26,8 @@ type TicketsServiceClient interface {
GetTicket(ctx context.Context, in *TicketsServiceGetTicketRequest, opts ...grpc.CallOption) (*TicketsServiceGetTicketResponse, error)
ListTicketSchemas(ctx context.Context, in *TicketsServiceListTicketSchemasRequest, opts ...grpc.CallOption) (*TicketsServiceListTicketSchemasResponse, error)
GetTicketSchema(ctx context.Context, in *TicketsServiceGetTicketSchemaRequest, opts ...grpc.CallOption) (*TicketsServiceGetTicketSchemaResponse, error)
+ BulkCreateTickets(ctx context.Context, in *TicketsServiceBulkCreateTicketsRequest, opts ...grpc.CallOption) (*TicketsServiceBulkCreateTicketsResponse, error)
+ BulkGetTickets(ctx context.Context, in *TicketsServiceBulkGetTicketsRequest, opts ...grpc.CallOption) (*TicketsServiceBulkGetTicketsResponse, error)
}
type ticketsServiceClient struct {
@@ -72,6 +74,24 @@ func (c *ticketsServiceClient) GetTicketSchema(ctx context.Context, in *TicketsS
return out, nil
}
+func (c *ticketsServiceClient) BulkCreateTickets(ctx context.Context, in *TicketsServiceBulkCreateTicketsRequest, opts ...grpc.CallOption) (*TicketsServiceBulkCreateTicketsResponse, error) {
+ out := new(TicketsServiceBulkCreateTicketsResponse)
+ err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/BulkCreateTickets", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *ticketsServiceClient) BulkGetTickets(ctx context.Context, in *TicketsServiceBulkGetTicketsRequest, opts ...grpc.CallOption) (*TicketsServiceBulkGetTicketsResponse, error) {
+ out := new(TicketsServiceBulkGetTicketsResponse)
+ err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/BulkGetTickets", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// TicketsServiceServer is the server API for TicketsService service.
// All implementations should embed UnimplementedTicketsServiceServer
// for forward compatibility
@@ -80,6 +100,8 @@ type TicketsServiceServer interface {
GetTicket(context.Context, *TicketsServiceGetTicketRequest) (*TicketsServiceGetTicketResponse, error)
ListTicketSchemas(context.Context, *TicketsServiceListTicketSchemasRequest) (*TicketsServiceListTicketSchemasResponse, error)
GetTicketSchema(context.Context, *TicketsServiceGetTicketSchemaRequest) (*TicketsServiceGetTicketSchemaResponse, error)
+ BulkCreateTickets(context.Context, *TicketsServiceBulkCreateTicketsRequest) (*TicketsServiceBulkCreateTicketsResponse, error)
+ BulkGetTickets(context.Context, *TicketsServiceBulkGetTicketsRequest) (*TicketsServiceBulkGetTicketsResponse, error)
}
// UnimplementedTicketsServiceServer should be embedded to have forward compatible implementations.
@@ -98,6 +120,12 @@ func (UnimplementedTicketsServiceServer) ListTicketSchemas(context.Context, *Tic
func (UnimplementedTicketsServiceServer) GetTicketSchema(context.Context, *TicketsServiceGetTicketSchemaRequest) (*TicketsServiceGetTicketSchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTicketSchema not implemented")
}
+func (UnimplementedTicketsServiceServer) BulkCreateTickets(context.Context, *TicketsServiceBulkCreateTicketsRequest) (*TicketsServiceBulkCreateTicketsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method BulkCreateTickets not implemented")
+}
+func (UnimplementedTicketsServiceServer) BulkGetTickets(context.Context, *TicketsServiceBulkGetTicketsRequest) (*TicketsServiceBulkGetTicketsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method BulkGetTickets not implemented")
+}
// UnsafeTicketsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TicketsServiceServer will
@@ -182,6 +210,42 @@ func _TicketsService_GetTicketSchema_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
+func _TicketsService_BulkCreateTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(TicketsServiceBulkCreateTicketsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(TicketsServiceServer).BulkCreateTickets(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/c1.connector.v2.TicketsService/BulkCreateTickets",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(TicketsServiceServer).BulkCreateTickets(ctx, req.(*TicketsServiceBulkCreateTicketsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _TicketsService_BulkGetTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(TicketsServiceBulkGetTicketsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(TicketsServiceServer).BulkGetTickets(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/c1.connector.v2.TicketsService/BulkGetTickets",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(TicketsServiceServer).BulkGetTickets(ctx, req.(*TicketsServiceBulkGetTicketsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
// TicketsService_ServiceDesc is the grpc.ServiceDesc for TicketsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -205,6 +269,14 @@ var TicketsService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetTicketSchema",
Handler: _TicketsService_GetTicketSchema_Handler,
},
+ {
+ MethodName: "BulkCreateTickets",
+ Handler: _TicketsService_BulkCreateTickets_Handler,
+ },
+ {
+ MethodName: "BulkGetTickets",
+ Handler: _TicketsService_BulkGetTickets_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "c1/connector/v2/ticket.proto",
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go
index a783d782..480e36f3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go
@@ -103,6 +103,8 @@ type Task struct {
// *Task_CreateTicketTask_
// *Task_ListTicketSchemas
// *Task_GetTicket
+ // *Task_BulkCreateTickets
+ // *Task_BulkGetTickets
TaskType isTask_TaskType `protobuf_oneof:"task_type"`
Debug bool `protobuf:"varint,3,opt,name=debug,proto3" json:"debug,omitempty"`
}
@@ -251,6 +253,20 @@ func (x *Task) GetGetTicket() *Task_GetTicketTask {
return nil
}
+func (x *Task) GetBulkCreateTickets() *Task_BulkCreateTicketsTask {
+ if x, ok := x.GetTaskType().(*Task_BulkCreateTickets); ok {
+ return x.BulkCreateTickets
+ }
+ return nil
+}
+
+func (x *Task) GetBulkGetTickets() *Task_BulkGetTicketsTask {
+ if x, ok := x.GetTaskType().(*Task_BulkGetTickets); ok {
+ return x.BulkGetTickets
+ }
+ return nil
+}
+
func (x *Task) GetDebug() bool {
if x != nil {
return x.Debug
@@ -314,6 +330,14 @@ type Task_GetTicket struct {
GetTicket *Task_GetTicketTask `protobuf:"bytes,112,opt,name=get_ticket,json=getTicket,proto3,oneof"`
}
+type Task_BulkCreateTickets struct {
+ BulkCreateTickets *Task_BulkCreateTicketsTask `protobuf:"bytes,113,opt,name=bulk_create_tickets,json=bulkCreateTickets,proto3,oneof"`
+}
+
+type Task_BulkGetTickets struct {
+ BulkGetTickets *Task_BulkGetTicketsTask `protobuf:"bytes,114,opt,name=bulk_get_tickets,json=bulkGetTickets,proto3,oneof"`
+}
+
func (*Task_None) isTask_TaskType() {}
func (*Task_Hello) isTask_TaskType() {}
@@ -340,6 +364,10 @@ func (*Task_ListTicketSchemas) isTask_TaskType() {}
func (*Task_GetTicket) isTask_TaskType() {}
+func (*Task_BulkCreateTickets) isTask_TaskType() {}
+
+func (*Task_BulkGetTickets) isTask_TaskType() {}
+
type BatonServiceHelloRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1703,6 +1731,100 @@ func (x *Task_CreateTicketTask) GetAnnotations() []*anypb.Any {
return nil
}
+type Task_BulkCreateTicketsTask struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TicketRequests []*Task_CreateTicketTask `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+}
+
+func (x *Task_BulkCreateTicketsTask) Reset() {
+ *x = Task_BulkCreateTicketsTask{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Task_BulkCreateTicketsTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Task_BulkCreateTicketsTask) ProtoMessage() {}
+
+func (x *Task_BulkCreateTicketsTask) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
+ 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 Task_BulkCreateTicketsTask.ProtoReflect.Descriptor instead.
+func (*Task_BulkCreateTicketsTask) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 11}
+}
+
+func (x *Task_BulkCreateTicketsTask) GetTicketRequests() []*Task_CreateTicketTask {
+ if x != nil {
+ return x.TicketRequests
+ }
+ return nil
+}
+
+type Task_BulkGetTicketsTask struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TicketRequests []*Task_GetTicketTask `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+}
+
+func (x *Task_BulkGetTicketsTask) Reset() {
+ *x = Task_BulkGetTicketsTask{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Task_BulkGetTicketsTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Task_BulkGetTicketsTask) ProtoMessage() {}
+
+func (x *Task_BulkGetTicketsTask) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
+ 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 Task_BulkGetTicketsTask.ProtoReflect.Descriptor instead.
+func (*Task_BulkGetTicketsTask) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 12}
+}
+
+func (x *Task_BulkGetTicketsTask) GetTicketRequests() []*Task_GetTicketTask {
+ if x != nil {
+ return x.TicketRequests
+ }
+ return nil
+}
+
type Task_ListTicketSchemasTask struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1714,7 +1836,7 @@ type Task_ListTicketSchemasTask struct {
func (x *Task_ListTicketSchemasTask) Reset() {
*x = Task_ListTicketSchemasTask{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1727,7 +1849,7 @@ func (x *Task_ListTicketSchemasTask) String() string {
func (*Task_ListTicketSchemasTask) ProtoMessage() {}
func (x *Task_ListTicketSchemasTask) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1740,7 +1862,7 @@ func (x *Task_ListTicketSchemasTask) ProtoReflect() protoreflect.Message {
// Deprecated: Use Task_ListTicketSchemasTask.ProtoReflect.Descriptor instead.
func (*Task_ListTicketSchemasTask) Descriptor() ([]byte, []int) {
- return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 11}
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 13}
}
func (x *Task_ListTicketSchemasTask) GetAnnotations() []*anypb.Any {
@@ -1762,7 +1884,7 @@ type Task_GetTicketTask struct {
func (x *Task_GetTicketTask) Reset() {
*x = Task_GetTicketTask{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1775,7 +1897,7 @@ func (x *Task_GetTicketTask) String() string {
func (*Task_GetTicketTask) ProtoMessage() {}
func (x *Task_GetTicketTask) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1788,7 +1910,7 @@ func (x *Task_GetTicketTask) ProtoReflect() protoreflect.Message {
// Deprecated: Use Task_GetTicketTask.ProtoReflect.Descriptor instead.
func (*Task_GetTicketTask) Descriptor() ([]byte, []int) {
- return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 12}
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 14}
}
func (x *Task_GetTicketTask) GetTicketId() string {
@@ -1818,7 +1940,7 @@ type BatonServiceHelloRequest_BuildInfo struct {
func (x *BatonServiceHelloRequest_BuildInfo) Reset() {
*x = BatonServiceHelloRequest_BuildInfo{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1831,7 +1953,7 @@ func (x *BatonServiceHelloRequest_BuildInfo) String() string {
func (*BatonServiceHelloRequest_BuildInfo) ProtoMessage() {}
func (x *BatonServiceHelloRequest_BuildInfo) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1886,7 +2008,7 @@ type BatonServiceHelloRequest_OSInfo struct {
func (x *BatonServiceHelloRequest_OSInfo) Reset() {
*x = BatonServiceHelloRequest_OSInfo{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1899,7 +2021,7 @@ func (x *BatonServiceHelloRequest_OSInfo) String() string {
func (*BatonServiceHelloRequest_OSInfo) ProtoMessage() {}
func (x *BatonServiceHelloRequest_OSInfo) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1984,7 +2106,7 @@ type BatonServiceUploadAssetRequest_UploadMetadata struct {
func (x *BatonServiceUploadAssetRequest_UploadMetadata) Reset() {
*x = BatonServiceUploadAssetRequest_UploadMetadata{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1997,7 +2119,7 @@ func (x *BatonServiceUploadAssetRequest_UploadMetadata) String() string {
func (*BatonServiceUploadAssetRequest_UploadMetadata) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest_UploadMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2046,7 +2168,7 @@ type BatonServiceUploadAssetRequest_UploadData struct {
func (x *BatonServiceUploadAssetRequest_UploadData) Reset() {
*x = BatonServiceUploadAssetRequest_UploadData{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2059,7 +2181,7 @@ func (x *BatonServiceUploadAssetRequest_UploadData) String() string {
func (*BatonServiceUploadAssetRequest_UploadData) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest_UploadData) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2094,7 +2216,7 @@ type BatonServiceUploadAssetRequest_UploadEOF struct {
func (x *BatonServiceUploadAssetRequest_UploadEOF) Reset() {
*x = BatonServiceUploadAssetRequest_UploadEOF{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2107,7 +2229,7 @@ func (x *BatonServiceUploadAssetRequest_UploadEOF) String() string {
func (*BatonServiceUploadAssetRequest_UploadEOF) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest_UploadEOF) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2151,7 +2273,7 @@ type BatonServiceFinishTaskRequest_Error struct {
func (x *BatonServiceFinishTaskRequest_Error) Reset() {
*x = BatonServiceFinishTaskRequest_Error{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2164,7 +2286,7 @@ func (x *BatonServiceFinishTaskRequest_Error) String() string {
func (*BatonServiceFinishTaskRequest_Error) ProtoMessage() {}
func (x *BatonServiceFinishTaskRequest_Error) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2214,7 +2336,7 @@ type BatonServiceFinishTaskRequest_Success struct {
func (x *BatonServiceFinishTaskRequest_Success) Reset() {
*x = BatonServiceFinishTaskRequest_Success{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2227,7 +2349,7 @@ func (x *BatonServiceFinishTaskRequest_Success) String() string {
func (*BatonServiceFinishTaskRequest_Success) ProtoMessage() {}
func (x *BatonServiceFinishTaskRequest_Success) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2282,7 +2404,7 @@ var file_c1_connectorapi_baton_v1_baton_proto_rawDesc = []byte{
0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
- 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x18,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x1b,
0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
@@ -2355,391 +2477,418 @@ var file_c1_connectorapi_baton_v1_baton_proto_rawDesc = []byte{
0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54,
0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73,
- 0x6b, 0x48, 0x00, 0x52, 0x09, 0x67, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x14,
- 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64,
- 0x65, 0x62, 0x75, 0x67, 0x1a, 0x42, 0x0a, 0x08, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b,
- 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x09, 0x48, 0x65, 0x6c, 0x6c,
- 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a,
- 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7e, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65,
- 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
- 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35,
- 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74,
- 0x61, 0x72, 0x74, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a, 0x09, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54,
- 0x61, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x72, 0x0a, 0x0a, 0x52,
- 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61,
- 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74,
- 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
+ 0x6b, 0x48, 0x00, 0x52, 0x09, 0x67, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x66,
+ 0x0a, 0x13, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61,
+ 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42, 0x75, 0x6c, 0x6b,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
+ 0x6b, 0x48, 0x00, 0x52, 0x11, 0x62, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x67,
+ 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
+ 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b,
+ 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54,
+ 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x1a, 0x42, 0x0a, 0x08, 0x4e,
+ 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a,
- 0xf9, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75,
- 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73,
- 0x6b, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x52, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c,
- 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64,
- 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x1a, 0xfa, 0x01, 0x0a,
- 0x15, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
- 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xd5, 0x01, 0x0a, 0x10, 0x43, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x45,
- 0x0a, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f,
- 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54,
- 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x74, 0x69, 0x63,
- 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x1a, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54,
- 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64,
- 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x73, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54,
- 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14,
- 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c,
- 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52,
- 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54,
- 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x42, 0x0b, 0x0a,
- 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xf3, 0x07, 0x0a, 0x18, 0x42,
- 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f,
- 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10,
- 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07,
- 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xfa,
- 0x42, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d,
- 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x7c, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
- 0x12, 0x65, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
- 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c,
- 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e,
- 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x62, 0x75,
- 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69, 0x6e,
- 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x53, 0x49,
- 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6f,
- 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5b, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52,
- 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa,
- 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e,
- 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10,
- 0x01, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x6c, 0x61, 0x6e, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x07,
- 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61,
- 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x61,
- 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, 0x0a,
- 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
- 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12,
- 0x1a, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07,
- 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x08, 0x70,
- 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa,
- 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66,
- 0x6f, 0x72, 0x6d, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f,
- 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa,
- 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66,
- 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x6c,
- 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52,
- 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12,
- 0x31, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
- 0x18, 0x80, 0x02, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0b, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x63,
- 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
- 0x18, 0x80, 0x02, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x12,
- 0x3f, 0x0a, 0x15, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
- 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x14, 0x76, 0x69, 0x72, 0x74,
- 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
- 0x22, 0x53, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a,
+ 0x43, 0x0a, 0x09, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c,
+ 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7e, 0x0a, 0x0d,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a,
0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x1a, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02,
- 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x42, 0x61, 0x74,
- 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
- 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x09,
- 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74,
- 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61,
- 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
- 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61,
- 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
- 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb8,
- 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48,
- 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f,
- 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b,
- 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52,
- 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a,
+ 0x09, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72,
+ 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69,
+ 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x1a, 0x72, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b,
+ 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xf9, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c,
+ 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
+ 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a,
+ 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63,
+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45,
+ 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
+ 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a,
+ 0x52, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x49, 0x64, 0x1a, 0xfa, 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72,
+ 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a,
+ 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52,
+ 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63,
+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50,
+ 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65,
+ 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73,
+ 0x1a, 0xd5, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65,
+ 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d,
+ 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x52, 0x0c, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x15, 0x42, 0x75, 0x6c, 0x6b,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
+ 0x6b, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x12, 0x42,
+ 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
+ 0x6b, 0x12, 0x55, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73,
+ 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
- 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x42, 0x61,
- 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62,
- 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x6e,
- 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d,
- 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x1c, 0x0a,
- 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x05, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a,
- 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63, 0x31,
+ 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0x73, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41,
+ 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+ 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44,
+ 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
+ 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53,
+ 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12,
+ 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48,
+ 0x45, 0x44, 0x10, 0x04, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70,
+ 0x65, 0x22, 0xf3, 0x07, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23,
+ 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73,
+ 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xfa, 0x42, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61,
+ 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x7c, 0x24, 0x52,
+ 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64,
+ 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x31,
0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61,
0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61,
- 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x56, 0x0a, 0x03, 0x65, 0x6f, 0x66, 0x18,
- 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
- 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c,
- 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
- 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, 0x48, 0x00, 0x52, 0x03, 0x65, 0x6f, 0x66,
- 0x1a, 0xaa, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
+ 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
+ 0x02, 0x10, 0x01, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c,
+ 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
+ 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5b, 0x0a, 0x12,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42,
+ 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x09,
+ 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x6c, 0x61, 0x6e,
+ 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x6c, 0x61, 0x6e,
+ 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b,
+ 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
+ 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x33,
+ 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
+ 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, 0x0a, 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26,
+ 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x68, 0x6f,
+ 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x02,
+ 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02,
- 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b,
- 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13,
- 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32,
- 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2d, 0x0a,
- 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x04, 0x64,
- 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x7a, 0x06,
- 0x10, 0x01, 0x18, 0x80, 0x80, 0x40, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x7f, 0x0a, 0x09,
- 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, 0x12, 0x30, 0x0a, 0x0f, 0x73, 0x68, 0x61,
- 0x32, 0x35, 0x36, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x68, 0x20, 0x52, 0x0e, 0x73, 0x68, 0x61,
- 0x32, 0x35, 0x36, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a, 0x0a,
- 0x03, 0x6d, 0x73, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x59, 0x0a, 0x1f, 0x42, 0x61, 0x74,
- 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41,
- 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x05, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52,
+ 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x6c,
+ 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02,
+ 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61,
+ 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72,
+ 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
+ 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c,
+ 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e,
+ 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0b, 0x6b, 0x65, 0x72,
+ 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e,
+ 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x12, 0x3f, 0x0a, 0x15, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61,
+ 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80,
+ 0x02, 0x52, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x53, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x6f, 0x6e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x1a,
+ 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54,
+ 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f,
+ 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07,
+ 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22,
+ 0x83, 0x02, 0x0a, 0x1b, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x32, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e,
+ 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74,
+ 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x6c,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x6e,
+ 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x0a,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74,
0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42,
0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
- 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2a,
- 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x55, 0x0a, 0x05, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01,
+ 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74,
+ 0x62, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74,
+ 0x62, 0x65, 0x61, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c,
+ 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x05, 0x0a, 0x1e, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61,
+ 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a,
+ 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x47, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73,
+ 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61,
+ 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
+ 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c,
+ 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12,
+ 0x56, 0x0a, 0x03, 0x65, 0x6f, 0x66, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
+ 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46,
+ 0x48, 0x00, 0x52, 0x03, 0x65, 0x6f, 0x66, 0x1a, 0xaa, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f,
+ 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f,
+ 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07,
+ 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12,
+ 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
+ 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
+ 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa,
+ 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2d, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61,
+ 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
+ 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x7a, 0x06, 0x10, 0x01, 0x18, 0x80, 0x80, 0x40, 0x52, 0x04, 0x64,
+ 0x61, 0x74, 0x61, 0x1a, 0x7f, 0x0a, 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46,
+ 0x12, 0x30, 0x0a, 0x0f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b,
+ 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02,
+ 0x68, 0x20, 0x52, 0x0e, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73,
+ 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa,
+ 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01,
+ 0x22, 0x59, 0x0a, 0x1f, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x05, 0x0a, 0x1d,
+ 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69,
+ 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a,
+ 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74,
+ 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d,
+ 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74,
+ 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
+ 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x12, 0x55, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
+ 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f,
+ 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61,
+ 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48,
+ 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63,
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
- 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x65, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61,
- 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
- 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0xa0,
- 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x5f,
- 0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x73, 0x74, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0xa0, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
+ 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79,
+ 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08,
+ 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x7d, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08,
+ 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x58, 0x0a, 0x1e, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
+ 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
- 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
- 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x1a, 0x7d, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10,
- 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30,
- 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x42, 0x12, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
- 0x03, 0xf8, 0x42, 0x01, 0x22, 0x58, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
- 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x17,
- 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72, 0x74,
- 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x80, 0x06, 0x0a, 0x0c, 0x42, 0x61,
- 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x05, 0x48, 0x65,
- 0x6c, 0x6c, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42,
- 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
- 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48,
- 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78,
- 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
- 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72,
- 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
- 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61,
- 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e,
- 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e,
- 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
- 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46,
- 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65,
+ 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30,
+ 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x32, 0x80, 0x06, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x12, 0x72, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
+ 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b,
+ 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f,
- 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61,
- 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a,
- 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x38, 0x2e, 0x63,
+ 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
+ 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65,
+ 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x7e, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x2e, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
- 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70,
- 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65,
- 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72,
+ 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x81, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x37,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
+ 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
- 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e,
- 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69,
- 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35,
- 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, 0x6f,
- 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x74,
- 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46,
+ 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73,
+ 0x73, 0x65, 0x74, 0x12, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61,
+ 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e,
+ 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x0e,
+ 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2f,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
+ 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44,
+ 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74,
+ 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67,
+ 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2755,7 +2904,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP() []byte {
}
var file_c1_connectorapi_baton_v1_baton_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_c1_connectorapi_baton_v1_baton_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
+var file_c1_connectorapi_baton_v1_baton_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []interface{}{
(Task_Status)(0), // 0: c1.connectorapi.baton.v1.Task.Status
(*Task)(nil), // 1: c1.connectorapi.baton.v1.Task
@@ -2782,29 +2931,31 @@ var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []interface{}{
(*Task_DeleteResourceTask)(nil), // 22: c1.connectorapi.baton.v1.Task.DeleteResourceTask
(*Task_RotateCredentialsTask)(nil), // 23: c1.connectorapi.baton.v1.Task.RotateCredentialsTask
(*Task_CreateTicketTask)(nil), // 24: c1.connectorapi.baton.v1.Task.CreateTicketTask
- (*Task_ListTicketSchemasTask)(nil), // 25: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask
- (*Task_GetTicketTask)(nil), // 26: c1.connectorapi.baton.v1.Task.GetTicketTask
- (*BatonServiceHelloRequest_BuildInfo)(nil), // 27: c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
- (*BatonServiceHelloRequest_OSInfo)(nil), // 28: c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
- (*BatonServiceUploadAssetRequest_UploadMetadata)(nil), // 29: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
- (*BatonServiceUploadAssetRequest_UploadData)(nil), // 30: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
- (*BatonServiceUploadAssetRequest_UploadEOF)(nil), // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
- (*BatonServiceFinishTaskRequest_Error)(nil), // 32: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
- (*BatonServiceFinishTaskRequest_Success)(nil), // 33: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
- (*v2.ConnectorMetadata)(nil), // 34: c1.connector.v2.ConnectorMetadata
- (*anypb.Any)(nil), // 35: google.protobuf.Any
- (*durationpb.Duration)(nil), // 36: google.protobuf.Duration
- (*status.Status)(nil), // 37: google.rpc.Status
- (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp
- (*v2.Entitlement)(nil), // 39: c1.connector.v2.Entitlement
- (*v2.Resource)(nil), // 40: c1.connector.v2.Resource
- (*v2.Grant)(nil), // 41: c1.connector.v2.Grant
- (*v2.AccountInfo)(nil), // 42: c1.connector.v2.AccountInfo
- (*v2.CredentialOptions)(nil), // 43: c1.connector.v2.CredentialOptions
- (*v2.EncryptionConfig)(nil), // 44: c1.connector.v2.EncryptionConfig
- (*v2.ResourceId)(nil), // 45: c1.connector.v2.ResourceId
- (*v2.TicketRequest)(nil), // 46: c1.connector.v2.TicketRequest
- (*v2.TicketSchema)(nil), // 47: c1.connector.v2.TicketSchema
+ (*Task_BulkCreateTicketsTask)(nil), // 25: c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask
+ (*Task_BulkGetTicketsTask)(nil), // 26: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask
+ (*Task_ListTicketSchemasTask)(nil), // 27: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask
+ (*Task_GetTicketTask)(nil), // 28: c1.connectorapi.baton.v1.Task.GetTicketTask
+ (*BatonServiceHelloRequest_BuildInfo)(nil), // 29: c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
+ (*BatonServiceHelloRequest_OSInfo)(nil), // 30: c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
+ (*BatonServiceUploadAssetRequest_UploadMetadata)(nil), // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
+ (*BatonServiceUploadAssetRequest_UploadData)(nil), // 32: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
+ (*BatonServiceUploadAssetRequest_UploadEOF)(nil), // 33: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
+ (*BatonServiceFinishTaskRequest_Error)(nil), // 34: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
+ (*BatonServiceFinishTaskRequest_Success)(nil), // 35: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
+ (*v2.ConnectorMetadata)(nil), // 36: c1.connector.v2.ConnectorMetadata
+ (*anypb.Any)(nil), // 37: google.protobuf.Any
+ (*durationpb.Duration)(nil), // 38: google.protobuf.Duration
+ (*status.Status)(nil), // 39: google.rpc.Status
+ (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
+ (*v2.Entitlement)(nil), // 41: c1.connector.v2.Entitlement
+ (*v2.Resource)(nil), // 42: c1.connector.v2.Resource
+ (*v2.Grant)(nil), // 43: c1.connector.v2.Grant
+ (*v2.AccountInfo)(nil), // 44: c1.connector.v2.AccountInfo
+ (*v2.CredentialOptions)(nil), // 45: c1.connector.v2.CredentialOptions
+ (*v2.EncryptionConfig)(nil), // 46: c1.connector.v2.EncryptionConfig
+ (*v2.ResourceId)(nil), // 47: c1.connector.v2.ResourceId
+ (*v2.TicketRequest)(nil), // 48: c1.connector.v2.TicketRequest
+ (*v2.TicketSchema)(nil), // 49: c1.connector.v2.TicketSchema
}
var file_c1_connectorapi_baton_v1_baton_proto_depIdxs = []int32{
0, // 0: c1.connectorapi.baton.v1.Task.status:type_name -> c1.connectorapi.baton.v1.Task.Status
@@ -2819,75 +2970,79 @@ var file_c1_connectorapi_baton_v1_baton_proto_depIdxs = []int32{
23, // 9: c1.connectorapi.baton.v1.Task.rotate_credentials:type_name -> c1.connectorapi.baton.v1.Task.RotateCredentialsTask
17, // 10: c1.connectorapi.baton.v1.Task.event_feed:type_name -> c1.connectorapi.baton.v1.Task.EventFeedTask
24, // 11: c1.connectorapi.baton.v1.Task.create_ticket_task:type_name -> c1.connectorapi.baton.v1.Task.CreateTicketTask
- 25, // 12: c1.connectorapi.baton.v1.Task.list_ticket_schemas:type_name -> c1.connectorapi.baton.v1.Task.ListTicketSchemasTask
- 26, // 13: c1.connectorapi.baton.v1.Task.get_ticket:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask
- 27, // 14: c1.connectorapi.baton.v1.BatonServiceHelloRequest.build_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
- 28, // 15: c1.connectorapi.baton.v1.BatonServiceHelloRequest.os_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
- 34, // 16: c1.connectorapi.baton.v1.BatonServiceHelloRequest.connector_metadata:type_name -> c1.connector.v2.ConnectorMetadata
- 35, // 17: c1.connectorapi.baton.v1.BatonServiceHelloRequest.annotations:type_name -> google.protobuf.Any
- 35, // 18: c1.connectorapi.baton.v1.BatonServiceHelloResponse.annotations:type_name -> google.protobuf.Any
- 1, // 19: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.task:type_name -> c1.connectorapi.baton.v1.Task
- 36, // 20: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_poll:type_name -> google.protobuf.Duration
- 36, // 21: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_heartbeat:type_name -> google.protobuf.Duration
- 35, // 22: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.annotations:type_name -> google.protobuf.Any
- 35, // 23: c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest.annotations:type_name -> google.protobuf.Any
- 36, // 24: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.next_heartbeat:type_name -> google.protobuf.Duration
- 35, // 25: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.annotations:type_name -> google.protobuf.Any
- 29, // 26: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.metadata:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
- 30, // 27: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.data:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
- 31, // 28: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.eof:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
- 35, // 29: c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse.annotations:type_name -> google.protobuf.Any
- 37, // 30: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.status:type_name -> google.rpc.Status
- 32, // 31: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.error:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
- 33, // 32: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.success:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
- 35, // 33: c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse.annotations:type_name -> google.protobuf.Any
- 35, // 34: c1.connectorapi.baton.v1.Task.NoneTask.annotations:type_name -> google.protobuf.Any
- 35, // 35: c1.connectorapi.baton.v1.Task.HelloTask.annotations:type_name -> google.protobuf.Any
- 35, // 36: c1.connectorapi.baton.v1.Task.SyncFullTask.annotations:type_name -> google.protobuf.Any
- 35, // 37: c1.connectorapi.baton.v1.Task.EventFeedTask.annotations:type_name -> google.protobuf.Any
- 38, // 38: c1.connectorapi.baton.v1.Task.EventFeedTask.start_at:type_name -> google.protobuf.Timestamp
- 39, // 39: c1.connectorapi.baton.v1.Task.GrantTask.entitlement:type_name -> c1.connector.v2.Entitlement
- 40, // 40: c1.connectorapi.baton.v1.Task.GrantTask.principal:type_name -> c1.connector.v2.Resource
- 35, // 41: c1.connectorapi.baton.v1.Task.GrantTask.annotations:type_name -> google.protobuf.Any
- 36, // 42: c1.connectorapi.baton.v1.Task.GrantTask.duration:type_name -> google.protobuf.Duration
- 41, // 43: c1.connectorapi.baton.v1.Task.RevokeTask.grant:type_name -> c1.connector.v2.Grant
- 35, // 44: c1.connectorapi.baton.v1.Task.RevokeTask.annotations:type_name -> google.protobuf.Any
- 42, // 45: c1.connectorapi.baton.v1.Task.CreateAccountTask.account_info:type_name -> c1.connector.v2.AccountInfo
- 43, // 46: c1.connectorapi.baton.v1.Task.CreateAccountTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 44, // 47: c1.connectorapi.baton.v1.Task.CreateAccountTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 40, // 48: c1.connectorapi.baton.v1.Task.CreateResourceTask.resource:type_name -> c1.connector.v2.Resource
- 45, // 49: c1.connectorapi.baton.v1.Task.DeleteResourceTask.resource_id:type_name -> c1.connector.v2.ResourceId
- 45, // 50: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.resource_id:type_name -> c1.connector.v2.ResourceId
- 43, // 51: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 44, // 52: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 46, // 53: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_request:type_name -> c1.connector.v2.TicketRequest
- 47, // 54: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_schema:type_name -> c1.connector.v2.TicketSchema
- 35, // 55: c1.connectorapi.baton.v1.Task.CreateTicketTask.annotations:type_name -> google.protobuf.Any
- 35, // 56: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask.annotations:type_name -> google.protobuf.Any
- 35, // 57: c1.connectorapi.baton.v1.Task.GetTicketTask.annotations:type_name -> google.protobuf.Any
- 35, // 58: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata.annotations:type_name -> google.protobuf.Any
- 35, // 59: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF.annotations:type_name -> google.protobuf.Any
- 35, // 60: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.annotations:type_name -> google.protobuf.Any
- 35, // 61: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.response:type_name -> google.protobuf.Any
- 35, // 62: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.annotations:type_name -> google.protobuf.Any
- 35, // 63: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.response:type_name -> google.protobuf.Any
- 2, // 64: c1.connectorapi.baton.v1.BatonService.Hello:input_type -> c1.connectorapi.baton.v1.BatonServiceHelloRequest
- 4, // 65: c1.connectorapi.baton.v1.BatonService.GetTask:input_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskRequest
- 6, // 66: c1.connectorapi.baton.v1.BatonService.Heartbeat:input_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest
- 10, // 67: c1.connectorapi.baton.v1.BatonService.FinishTask:input_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest
- 8, // 68: c1.connectorapi.baton.v1.BatonService.UploadAsset:input_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest
- 12, // 69: c1.connectorapi.baton.v1.BatonService.StartDebugging:input_type -> c1.connectorapi.baton.v1.StartDebuggingRequest
- 3, // 70: c1.connectorapi.baton.v1.BatonService.Hello:output_type -> c1.connectorapi.baton.v1.BatonServiceHelloResponse
- 5, // 71: c1.connectorapi.baton.v1.BatonService.GetTask:output_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskResponse
- 7, // 72: c1.connectorapi.baton.v1.BatonService.Heartbeat:output_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse
- 11, // 73: c1.connectorapi.baton.v1.BatonService.FinishTask:output_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse
- 9, // 74: c1.connectorapi.baton.v1.BatonService.UploadAsset:output_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse
- 13, // 75: c1.connectorapi.baton.v1.BatonService.StartDebugging:output_type -> c1.connectorapi.baton.v1.StartDebuggingResponse
- 70, // [70:76] is the sub-list for method output_type
- 64, // [64:70] is the sub-list for method input_type
- 64, // [64:64] is the sub-list for extension type_name
- 64, // [64:64] is the sub-list for extension extendee
- 0, // [0:64] is the sub-list for field type_name
+ 27, // 12: c1.connectorapi.baton.v1.Task.list_ticket_schemas:type_name -> c1.connectorapi.baton.v1.Task.ListTicketSchemasTask
+ 28, // 13: c1.connectorapi.baton.v1.Task.get_ticket:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask
+ 25, // 14: c1.connectorapi.baton.v1.Task.bulk_create_tickets:type_name -> c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask
+ 26, // 15: c1.connectorapi.baton.v1.Task.bulk_get_tickets:type_name -> c1.connectorapi.baton.v1.Task.BulkGetTicketsTask
+ 29, // 16: c1.connectorapi.baton.v1.BatonServiceHelloRequest.build_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
+ 30, // 17: c1.connectorapi.baton.v1.BatonServiceHelloRequest.os_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
+ 36, // 18: c1.connectorapi.baton.v1.BatonServiceHelloRequest.connector_metadata:type_name -> c1.connector.v2.ConnectorMetadata
+ 37, // 19: c1.connectorapi.baton.v1.BatonServiceHelloRequest.annotations:type_name -> google.protobuf.Any
+ 37, // 20: c1.connectorapi.baton.v1.BatonServiceHelloResponse.annotations:type_name -> google.protobuf.Any
+ 1, // 21: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.task:type_name -> c1.connectorapi.baton.v1.Task
+ 38, // 22: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_poll:type_name -> google.protobuf.Duration
+ 38, // 23: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_heartbeat:type_name -> google.protobuf.Duration
+ 37, // 24: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.annotations:type_name -> google.protobuf.Any
+ 37, // 25: c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest.annotations:type_name -> google.protobuf.Any
+ 38, // 26: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.next_heartbeat:type_name -> google.protobuf.Duration
+ 37, // 27: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.annotations:type_name -> google.protobuf.Any
+ 31, // 28: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.metadata:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
+ 32, // 29: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.data:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
+ 33, // 30: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.eof:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
+ 37, // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse.annotations:type_name -> google.protobuf.Any
+ 39, // 32: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.status:type_name -> google.rpc.Status
+ 34, // 33: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.error:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
+ 35, // 34: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.success:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
+ 37, // 35: c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse.annotations:type_name -> google.protobuf.Any
+ 37, // 36: c1.connectorapi.baton.v1.Task.NoneTask.annotations:type_name -> google.protobuf.Any
+ 37, // 37: c1.connectorapi.baton.v1.Task.HelloTask.annotations:type_name -> google.protobuf.Any
+ 37, // 38: c1.connectorapi.baton.v1.Task.SyncFullTask.annotations:type_name -> google.protobuf.Any
+ 37, // 39: c1.connectorapi.baton.v1.Task.EventFeedTask.annotations:type_name -> google.protobuf.Any
+ 40, // 40: c1.connectorapi.baton.v1.Task.EventFeedTask.start_at:type_name -> google.protobuf.Timestamp
+ 41, // 41: c1.connectorapi.baton.v1.Task.GrantTask.entitlement:type_name -> c1.connector.v2.Entitlement
+ 42, // 42: c1.connectorapi.baton.v1.Task.GrantTask.principal:type_name -> c1.connector.v2.Resource
+ 37, // 43: c1.connectorapi.baton.v1.Task.GrantTask.annotations:type_name -> google.protobuf.Any
+ 38, // 44: c1.connectorapi.baton.v1.Task.GrantTask.duration:type_name -> google.protobuf.Duration
+ 43, // 45: c1.connectorapi.baton.v1.Task.RevokeTask.grant:type_name -> c1.connector.v2.Grant
+ 37, // 46: c1.connectorapi.baton.v1.Task.RevokeTask.annotations:type_name -> google.protobuf.Any
+ 44, // 47: c1.connectorapi.baton.v1.Task.CreateAccountTask.account_info:type_name -> c1.connector.v2.AccountInfo
+ 45, // 48: c1.connectorapi.baton.v1.Task.CreateAccountTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 46, // 49: c1.connectorapi.baton.v1.Task.CreateAccountTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 42, // 50: c1.connectorapi.baton.v1.Task.CreateResourceTask.resource:type_name -> c1.connector.v2.Resource
+ 47, // 51: c1.connectorapi.baton.v1.Task.DeleteResourceTask.resource_id:type_name -> c1.connector.v2.ResourceId
+ 47, // 52: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.resource_id:type_name -> c1.connector.v2.ResourceId
+ 45, // 53: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 46, // 54: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 48, // 55: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_request:type_name -> c1.connector.v2.TicketRequest
+ 49, // 56: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_schema:type_name -> c1.connector.v2.TicketSchema
+ 37, // 57: c1.connectorapi.baton.v1.Task.CreateTicketTask.annotations:type_name -> google.protobuf.Any
+ 24, // 58: c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.CreateTicketTask
+ 28, // 59: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask
+ 37, // 60: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask.annotations:type_name -> google.protobuf.Any
+ 37, // 61: c1.connectorapi.baton.v1.Task.GetTicketTask.annotations:type_name -> google.protobuf.Any
+ 37, // 62: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata.annotations:type_name -> google.protobuf.Any
+ 37, // 63: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF.annotations:type_name -> google.protobuf.Any
+ 37, // 64: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.annotations:type_name -> google.protobuf.Any
+ 37, // 65: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.response:type_name -> google.protobuf.Any
+ 37, // 66: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.annotations:type_name -> google.protobuf.Any
+ 37, // 67: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.response:type_name -> google.protobuf.Any
+ 2, // 68: c1.connectorapi.baton.v1.BatonService.Hello:input_type -> c1.connectorapi.baton.v1.BatonServiceHelloRequest
+ 4, // 69: c1.connectorapi.baton.v1.BatonService.GetTask:input_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskRequest
+ 6, // 70: c1.connectorapi.baton.v1.BatonService.Heartbeat:input_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest
+ 10, // 71: c1.connectorapi.baton.v1.BatonService.FinishTask:input_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest
+ 8, // 72: c1.connectorapi.baton.v1.BatonService.UploadAsset:input_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest
+ 12, // 73: c1.connectorapi.baton.v1.BatonService.StartDebugging:input_type -> c1.connectorapi.baton.v1.StartDebuggingRequest
+ 3, // 74: c1.connectorapi.baton.v1.BatonService.Hello:output_type -> c1.connectorapi.baton.v1.BatonServiceHelloResponse
+ 5, // 75: c1.connectorapi.baton.v1.BatonService.GetTask:output_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskResponse
+ 7, // 76: c1.connectorapi.baton.v1.BatonService.Heartbeat:output_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse
+ 11, // 77: c1.connectorapi.baton.v1.BatonService.FinishTask:output_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse
+ 9, // 78: c1.connectorapi.baton.v1.BatonService.UploadAsset:output_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse
+ 13, // 79: c1.connectorapi.baton.v1.BatonService.StartDebugging:output_type -> c1.connectorapi.baton.v1.StartDebuggingResponse
+ 74, // [74:80] is the sub-list for method output_type
+ 68, // [68:74] is the sub-list for method input_type
+ 68, // [68:68] is the sub-list for extension type_name
+ 68, // [68:68] is the sub-list for extension extendee
+ 0, // [0:68] is the sub-list for field type_name
}
func init() { file_c1_connectorapi_baton_v1_baton_proto_init() }
@@ -3185,7 +3340,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_ListTicketSchemasTask); i {
+ switch v := v.(*Task_BulkCreateTicketsTask); i {
case 0:
return &v.state
case 1:
@@ -3197,7 +3352,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_GetTicketTask); i {
+ switch v := v.(*Task_BulkGetTicketsTask); i {
case 0:
return &v.state
case 1:
@@ -3209,7 +3364,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHelloRequest_BuildInfo); i {
+ switch v := v.(*Task_ListTicketSchemasTask); i {
case 0:
return &v.state
case 1:
@@ -3221,7 +3376,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHelloRequest_OSInfo); i {
+ switch v := v.(*Task_GetTicketTask); i {
case 0:
return &v.state
case 1:
@@ -3233,7 +3388,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest_UploadMetadata); i {
+ switch v := v.(*BatonServiceHelloRequest_BuildInfo); i {
case 0:
return &v.state
case 1:
@@ -3245,7 +3400,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest_UploadData); i {
+ switch v := v.(*BatonServiceHelloRequest_OSInfo); i {
case 0:
return &v.state
case 1:
@@ -3257,7 +3412,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest_UploadEOF); i {
+ switch v := v.(*BatonServiceUploadAssetRequest_UploadMetadata); i {
case 0:
return &v.state
case 1:
@@ -3269,7 +3424,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceFinishTaskRequest_Error); i {
+ switch v := v.(*BatonServiceUploadAssetRequest_UploadData); i {
case 0:
return &v.state
case 1:
@@ -3281,6 +3436,30 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
}
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BatonServiceUploadAssetRequest_UploadEOF); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BatonServiceFinishTaskRequest_Error); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatonServiceFinishTaskRequest_Success); i {
case 0:
return &v.state
@@ -3307,6 +3486,8 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
(*Task_CreateTicketTask_)(nil),
(*Task_ListTicketSchemas)(nil),
(*Task_GetTicket)(nil),
+ (*Task_BulkCreateTickets)(nil),
+ (*Task_BulkGetTickets)(nil),
}
file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7].OneofWrappers = []interface{}{
(*BatonServiceUploadAssetRequest_Metadata)(nil),
@@ -3323,7 +3504,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_c1_connectorapi_baton_v1_baton_proto_rawDesc,
NumEnums: 1,
- NumMessages: 33,
+ NumMessages: 35,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go
index ab18837d..ea260418 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go
@@ -596,6 +596,88 @@ func (m *Task) validate(all bool) error {
}
}
+ case *Task_BulkCreateTickets:
+ if v == nil {
+ err := TaskValidationError{
+ field: "TaskType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetBulkCreateTickets()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "BulkCreateTickets",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "BulkCreateTickets",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBulkCreateTickets()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TaskValidationError{
+ field: "BulkCreateTickets",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Task_BulkGetTickets:
+ if v == nil {
+ err := TaskValidationError{
+ field: "TaskType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetBulkGetTickets()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "BulkGetTickets",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "BulkGetTickets",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBulkGetTickets()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TaskValidationError{
+ field: "BulkGetTickets",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
default:
_ = v // ensures v is used
}
@@ -4559,6 +4641,278 @@ var _ interface {
ErrorName() string
} = Task_CreateTicketTaskValidationError{}
+// Validate checks the field values on Task_BulkCreateTicketsTask with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Task_BulkCreateTicketsTask) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Task_BulkCreateTicketsTask with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Task_BulkCreateTicketsTaskMultiError, or nil if none found.
+func (m *Task_BulkCreateTicketsTask) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Task_BulkCreateTicketsTask) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTicketRequests() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_BulkCreateTicketsTaskValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_BulkCreateTicketsTaskValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_BulkCreateTicketsTaskValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Task_BulkCreateTicketsTaskMultiError(errors)
+ }
+
+ return nil
+}
+
+// Task_BulkCreateTicketsTaskMultiError is an error wrapping multiple
+// validation errors returned by Task_BulkCreateTicketsTask.ValidateAll() if
+// the designated constraints aren't met.
+type Task_BulkCreateTicketsTaskMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Task_BulkCreateTicketsTaskMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Task_BulkCreateTicketsTaskMultiError) AllErrors() []error { return m }
+
+// Task_BulkCreateTicketsTaskValidationError is the validation error returned
+// by Task_BulkCreateTicketsTask.Validate if the designated constraints aren't met.
+type Task_BulkCreateTicketsTaskValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Task_BulkCreateTicketsTaskValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Task_BulkCreateTicketsTaskValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Task_BulkCreateTicketsTaskValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Task_BulkCreateTicketsTaskValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Task_BulkCreateTicketsTaskValidationError) ErrorName() string {
+ return "Task_BulkCreateTicketsTaskValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Task_BulkCreateTicketsTaskValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTask_BulkCreateTicketsTask.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Task_BulkCreateTicketsTaskValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Task_BulkCreateTicketsTaskValidationError{}
+
+// Validate checks the field values on Task_BulkGetTicketsTask with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Task_BulkGetTicketsTask) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Task_BulkGetTicketsTask with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Task_BulkGetTicketsTaskMultiError, or nil if none found.
+func (m *Task_BulkGetTicketsTask) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Task_BulkGetTicketsTask) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTicketRequests() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_BulkGetTicketsTaskValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_BulkGetTicketsTaskValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_BulkGetTicketsTaskValidationError{
+ field: fmt.Sprintf("TicketRequests[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Task_BulkGetTicketsTaskMultiError(errors)
+ }
+
+ return nil
+}
+
+// Task_BulkGetTicketsTaskMultiError is an error wrapping multiple validation
+// errors returned by Task_BulkGetTicketsTask.ValidateAll() if the designated
+// constraints aren't met.
+type Task_BulkGetTicketsTaskMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Task_BulkGetTicketsTaskMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Task_BulkGetTicketsTaskMultiError) AllErrors() []error { return m }
+
+// Task_BulkGetTicketsTaskValidationError is the validation error returned by
+// Task_BulkGetTicketsTask.Validate if the designated constraints aren't met.
+type Task_BulkGetTicketsTaskValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Task_BulkGetTicketsTaskValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Task_BulkGetTicketsTaskValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Task_BulkGetTicketsTaskValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Task_BulkGetTicketsTaskValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Task_BulkGetTicketsTaskValidationError) ErrorName() string {
+ return "Task_BulkGetTicketsTaskValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Task_BulkGetTicketsTaskValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTask_BulkGetTicketsTask.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Task_BulkGetTicketsTaskValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Task_BulkGetTicketsTaskValidationError{}
+
// Validate checks the field values on Task_ListTicketSchemasTask with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go
index ac89fb59..c4c261a3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go
@@ -140,6 +140,10 @@ func MakeMainCommand(
opts = append(opts,
connectorrunner.WithTicketingEnabled(),
connectorrunner.WithCreateTicket(v.GetString("ticket-template-path")))
+ case v.GetBool("bulk-create-ticket"):
+ opts = append(opts,
+ connectorrunner.WithTicketingEnabled(),
+ connectorrunner.WithBulkCreateTicket(v.GetString("bulk-ticket-template-path")))
case v.GetBool("list-ticket-schemas"):
opts = append(opts,
connectorrunner.WithTicketingEnabled(),
@@ -243,6 +247,8 @@ func MakeGRPCServerCommand(
copts = append(copts, connector.WithProvisioningEnabled())
case v.GetBool("create-ticket"):
copts = append(copts, connector.WithTicketingEnabled())
+ case v.GetBool("bulk-create-ticket"):
+ copts = append(copts, connector.WithTicketingEnabled())
case v.GetBool("list-ticket-schemas"):
copts = append(copts, connector.WithTicketingEnabled())
case v.GetBool("get-ticket"):
@@ -265,7 +271,9 @@ func MakeGRPCServerCommand(
return err
}
- // NOTE (shackra): I don't understand this goroutine
+ // Avoid zombie processes. If the parent dies, this
+ // will cause Stdin on the child to close, and then
+ // the child will exit itself.
go func() {
in := make([]byte, 1)
_, err := os.Stdin.Read(in)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go b/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go
index 291192df..d2d4f249 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go
@@ -43,13 +43,24 @@ func DefineConfiguration(
v.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
v.AutomaticEnv()
+ confschema := schema
+ confschema.Fields = append(field.DefaultFields, confschema.Fields...)
+ // Ensure unique fields
+ uniqueFields := make(map[string]field.SchemaField)
+ for _, f := range confschema.Fields {
+ uniqueFields[f.FieldName] = f
+ }
+ confschema.Fields = make([]field.SchemaField, 0, len(uniqueFields))
+ for _, f := range uniqueFields {
+ confschema.Fields = append(confschema.Fields, f)
+ }
// setup CLI with cobra
mainCMD := &cobra.Command{
Use: connectorName,
Short: connectorName,
SilenceErrors: true,
SilenceUsage: true,
- RunE: cli.MakeMainCommand(ctx, connectorName, v, schema, connector, options...),
+ RunE: cli.MakeMainCommand(ctx, connectorName, v, confschema, connector, options...),
}
// set persistent flags only on the main subcommand
err = setFlagsAndConstraints(mainCMD, field.NewConfiguration(field.DefaultFields, field.DefaultRelationships...))
@@ -67,7 +78,7 @@ func DefineConfiguration(
Use: "_connector-service",
Short: "Start the connector service",
Hidden: true,
- RunE: cli.MakeGRPCServerCommand(ctx, connectorName, v, schema, connector),
+ RunE: cli.MakeGRPCServerCommand(ctx, connectorName, v, confschema, connector),
}
err = setFlagsAndConstraints(grpcServerCmd, schema)
if err != nil {
@@ -78,7 +89,7 @@ func DefineConfiguration(
capabilitiesCmd := &cobra.Command{
Use: "capabilities",
Short: "Get connector capabilities",
- RunE: cli.MakeCapabilitiesCommand(ctx, connectorName, v, schema, connector),
+ RunE: cli.MakeCapabilitiesCommand(ctx, connectorName, v, confschema, connector),
}
err = setFlagsAndConstraints(capabilitiesCmd, schema)
if err != nil {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
index a66b6ec5..6513b234 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
+ "slices"
"sort"
"time"
@@ -70,6 +71,8 @@ type TicketManager interface {
CreateTicket(ctx context.Context, ticket *v2.Ticket, schema *v2.TicketSchema) (*v2.Ticket, annotations.Annotations, error)
GetTicketSchema(ctx context.Context, schemaID string) (*v2.TicketSchema, annotations.Annotations, error)
ListTicketSchemas(ctx context.Context, pToken *pagination.Token) ([]*v2.TicketSchema, string, annotations.Annotations, error)
+ BulkCreateTickets(context.Context, *v2.TicketsServiceBulkCreateTicketsRequest) (*v2.TicketsServiceBulkCreateTicketsResponse, error)
+ BulkGetTickets(context.Context, *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error)
}
type ConnectorBuilder interface {
@@ -93,6 +96,58 @@ type builderImpl struct {
nowFunc func() time.Time
}
+func (b *builderImpl) BulkCreateTickets(ctx context.Context, request *v2.TicketsServiceBulkCreateTicketsRequest) (*v2.TicketsServiceBulkCreateTicketsResponse, error) {
+ start := b.nowFunc()
+ tt := tasks.BulkCreateTicketsType
+ if b.ticketManager == nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: ticket manager not implemented")
+ }
+
+ reqBody := request.GetTicketRequests()
+ if len(reqBody) == 0 {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: request body had no items")
+ }
+
+ ticketsResponse, err := b.ticketManager.BulkCreateTickets(ctx, request)
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: creating tickets failed: %w", err)
+ }
+
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return &v2.TicketsServiceBulkCreateTicketsResponse{
+ Tickets: ticketsResponse.GetTickets(),
+ }, nil
+}
+
+func (b *builderImpl) BulkGetTickets(ctx context.Context, request *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error) {
+ start := b.nowFunc()
+ tt := tasks.BulkGetTicketsType
+ if b.ticketManager == nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: ticket manager not implemented")
+ }
+
+ reqBody := request.GetTicketRequests()
+ if len(reqBody) == 0 {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: request body had no items")
+ }
+
+ ticketsResponse, err := b.ticketManager.BulkGetTickets(ctx, request)
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: fetching tickets failed: %w", err)
+ }
+
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return &v2.TicketsServiceBulkGetTicketsResponse{
+ Tickets: ticketsResponse.GetTickets(),
+ }, nil
+}
+
func (b *builderImpl) ListTicketSchemas(ctx context.Context, request *v2.TicketsServiceListTicketSchemasRequest) (*v2.TicketsServiceListTicketSchemasResponse, error) {
start := b.nowFunc()
tt := tasks.ListTicketSchemasType
@@ -352,13 +407,6 @@ func (b *builderImpl) ListResourceTypes(
tt := tasks.ListResourceTypesType
var out []*v2.ResourceType
- l := ctxzap.Extract(ctx)
- // Clear all http caches at the start of a sync. This must be run in the child process, which is why it's in this function and not in syncer.go
- err := uhttp.ClearCaches(ctx)
- if err != nil {
- l.Warn("error clearing http caches", zap.Error(err))
- }
-
for _, rb := range b.resourceBuilders {
out = append(out, rb.ResourceType(ctx))
}
@@ -506,6 +554,21 @@ func getCapabilities(ctx context.Context, b *builderImpl) *v2.ConnectorCapabilit
resourceTypeCapability.Capabilities = append(resourceTypeCapability.Capabilities, v2.Capability_CAPABILITY_PROVISION)
connectorCaps[v2.Capability_CAPABILITY_PROVISION] = struct{}{}
}
+ if _, ok := rb.(AccountManager); ok {
+ resourceTypeCapability.Capabilities = append(resourceTypeCapability.Capabilities, v2.Capability_CAPABILITY_ACCOUNT_PROVISIONING)
+ connectorCaps[v2.Capability_CAPABILITY_ACCOUNT_PROVISIONING] = struct{}{}
+ }
+
+ if _, ok := rb.(CredentialManager); ok {
+ resourceTypeCapability.Capabilities = append(resourceTypeCapability.Capabilities, v2.Capability_CAPABILITY_CREDENTIAL_ROTATION)
+ connectorCaps[v2.Capability_CAPABILITY_CREDENTIAL_ROTATION] = struct{}{}
+ }
+
+ if _, ok := rb.(ResourceManager); ok {
+ resourceTypeCapability.Capabilities = append(resourceTypeCapability.Capabilities, v2.Capability_CAPABILITY_RESOURCE_CREATE, v2.Capability_CAPABILITY_RESOURCE_DELETE)
+ connectorCaps[v2.Capability_CAPABILITY_RESOURCE_CREATE] = struct{}{}
+ connectorCaps[v2.Capability_CAPABILITY_RESOURCE_DELETE] = struct{}{}
+ }
resourceTypeCapabilities = append(resourceTypeCapabilities, resourceTypeCapability)
}
sort.Slice(resourceTypeCapabilities, func(i, j int) bool {
@@ -524,6 +587,7 @@ func getCapabilities(ctx context.Context, b *builderImpl) *v2.ConnectorCapabilit
for c := range connectorCaps {
caps = append(caps, c)
}
+ slices.Sort(caps)
return &v2.ConnectorCapabilities{
ResourceTypeCapabilities: resourceTypeCapabilities,
@@ -731,6 +795,17 @@ func (b *builderImpl) RotateCredential(ctx context.Context, request *v2.RotateCr
}, nil
}
+func (b *builderImpl) Cleanup(ctx context.Context, request *v2.ConnectorServiceCleanupRequest) (*v2.ConnectorServiceCleanupResponse, error) {
+ l := ctxzap.Extract(ctx)
+ // Clear all http caches at the end of a sync. This must be run in the child process, which is why it's in this function and not in syncer.go
+ err := uhttp.ClearCaches(ctx)
+ if err != nil {
+ l.Warn("error clearing http caches", zap.Error(err))
+ }
+ resp := &v2.ConnectorServiceCleanupResponse{}
+ return resp, err
+}
+
func (b *builderImpl) CreateAccount(ctx context.Context, request *v2.CreateAccountRequest) (*v2.CreateAccountResponse, error) {
start := b.nowFunc()
tt := tasks.CreateAccountType
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go
index f57889fd..1c1082ca 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go
@@ -245,6 +245,10 @@ type createTicketConfig struct {
templatePath string
}
+type bulkCreateTicketConfig struct {
+ templatePath string
+}
+
type grantConfig struct {
entitlementID string
principalType string
@@ -291,6 +295,7 @@ type runnerConfig struct {
deleteResourceConfig *deleteResourceConfig
rotateCredentialsConfig *rotateCredentialsConfig
createTicketConfig *createTicketConfig
+ bulkCreateTicketConfig *bulkCreateTicketConfig
listTicketSchemasConfig *listTicketSchemasConfig
getTicketConfig *getTicketConfig
skipFullSync bool
@@ -485,6 +490,16 @@ func WithCreateTicket(templatePath string) Option {
}
}
+func WithBulkCreateTicket(templatePath string) Option {
+ return func(ctx context.Context, cfg *runnerConfig) error {
+ cfg.onDemand = true
+ cfg.bulkCreateTicketConfig = &bulkCreateTicketConfig{
+ templatePath: templatePath,
+ }
+ return nil
+ }
+}
+
func WithListTicketSchemas() Option {
return func(ctx context.Context, cfg *runnerConfig) error {
cfg.onDemand = true
@@ -549,7 +564,7 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op
runner.cw = cw
if cfg.onDemand {
- if cfg.c1zPath == "" && cfg.eventFeedConfig == nil && cfg.createTicketConfig == nil && cfg.listTicketSchemasConfig == nil && cfg.getTicketConfig == nil {
+ if cfg.c1zPath == "" && cfg.eventFeedConfig == nil && cfg.createTicketConfig == nil && cfg.listTicketSchemasConfig == nil && cfg.getTicketConfig == nil && cfg.bulkCreateTicketConfig == nil {
return nil, errors.New("c1zPath must be set when in on-demand mode")
}
@@ -584,6 +599,8 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op
tm = local.NewListTicketSchema(ctx)
case cfg.getTicketConfig != nil:
tm = local.NewGetTicket(ctx, cfg.getTicketConfig.ticketID)
+ case cfg.bulkCreateTicketConfig != nil:
+ tm = local.NewBulkTicket(ctx, cfg.bulkCreateTicketConfig.templatePath)
default:
tm, err = local.NewSyncer(ctx, cfg.c1zPath, local.WithTmpDir(cfg.tempDir))
if err != nil {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go
index 8232c26c..00296878 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go
@@ -84,7 +84,7 @@ func (l *localManager) LoadC1Z(ctx context.Context) (*dotc1z.C1File, error) {
zap.String("temp_path", l.tmpPath),
)
- return dotc1z.NewC1ZFile(ctx, l.tmpPath, dotc1z.WithTmpDir(l.tmpDir))
+ return dotc1z.NewC1ZFile(ctx, l.tmpPath, dotc1z.WithTmpDir(l.tmpDir), dotc1z.WithPragma("journal_mode", "WAL"))
}
// SaveC1Z saves the C1Z file to the local file system.
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go
index 35271405..d1df00f0 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go
@@ -4,6 +4,7 @@ var DefaultRelationships = []SchemaFieldRelationship{
FieldsRequiredTogether(grantEntitlementField, grantPrincipalField),
FieldsRequiredTogether(clientIDField, clientSecretField),
FieldsRequiredTogether(createTicketField, ticketTemplatePathField),
+ FieldsRequiredTogether(bulkCreateTicketField, bulkTicketTemplatePathField),
FieldsRequiredTogether(getTicketField, ticketIDField),
FieldsMutuallyExclusive(
grantEntitlementField,
@@ -15,6 +16,7 @@ var DefaultRelationships = []SchemaFieldRelationship{
createTicketField,
getTicketField,
ListTicketSchemasField,
+ bulkCreateTicketField,
),
FieldsMutuallyExclusive(
grantEntitlementField,
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go
index 5a246f98..1ba36a3a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go
@@ -3,12 +3,14 @@ package field
import "github.com/conductorone/baton-sdk/pkg/logging"
var (
- createTicketField = BoolField("create-ticket", WithHidden(true), WithDescription("Create ticket"), WithPersistent(true))
- getTicketField = BoolField("get-ticket", WithHidden(true), WithDescription("Get ticket"), WithPersistent(true))
- ListTicketSchemasField = BoolField("list-ticket-schemas", WithHidden(true), WithDescription("List ticket schemas"), WithPersistent(true))
- provisioningField = BoolField("provisioning", WithShortHand("p"), WithDescription("This must be set in order for provisioning actions to be enabled"), WithPersistent(true))
- TicketingField = BoolField("ticketing", WithDescription("This must be set to enable ticketing support"), WithPersistent(true))
- c1zTmpDirField = StringField("c1z-temp-dir", WithHidden(true), WithDescription("The directory to store temporary files in. It must exist, "+
+ createTicketField = BoolField("create-ticket", WithHidden(true), WithDescription("Create ticket"), WithPersistent(true))
+ bulkCreateTicketField = BoolField("bulk-create-ticket", WithHidden(true), WithDescription("Bulk create tickets"), WithPersistent(true))
+ bulkTicketTemplatePathField = StringField("bulk-ticket-template-path", WithHidden(true), WithDescription("A JSON file describing the ticket to create"), WithPersistent(true))
+ getTicketField = BoolField("get-ticket", WithHidden(true), WithDescription("Get ticket"), WithPersistent(true))
+ ListTicketSchemasField = BoolField("list-ticket-schemas", WithHidden(true), WithDescription("List ticket schemas"), WithPersistent(true))
+ provisioningField = BoolField("provisioning", WithShortHand("p"), WithDescription("This must be set in order for provisioning actions to be enabled"), WithPersistent(true))
+ TicketingField = BoolField("ticketing", WithDescription("This must be set to enable ticketing support"), WithPersistent(true))
+ c1zTmpDirField = StringField("c1z-temp-dir", WithHidden(true), WithDescription("The directory to store temporary files in. It must exist, "+
"and write access is required. Defaults to the OS temporary directory."), WithPersistent(true))
clientIDField = StringField("client-id", WithDescription("The client ID used to authenticate with ConductorOne"), WithPersistent(true))
clientSecretField = StringField("client-secret", WithDescription("The client secret used to authenticate with ConductorOne"), WithPersistent(true))
@@ -34,6 +36,8 @@ var (
// DefaultFields list the default fields expected in every single connector.
var DefaultFields = []SchemaField{
createTicketField,
+ bulkCreateTicketField,
+ bulkTicketTemplatePathField,
getTicketField,
ListTicketSchemasField,
provisioningField,
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/logging/logging.go b/vendor/github.com/conductorone/baton-sdk/pkg/logging/logging.go
index 50c6fe36..33578389 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/logging/logging.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/logging/logging.go
@@ -43,6 +43,14 @@ func WithOutputPaths(paths []string) Option {
}
}
+// WithInitialFields allows the logger to be configured with static fields at creation time.
+// This is useful for setting fields that are constant across all log messages.
+func WithInitialFields(fields map[string]interface{}) Option {
+ return func(c *zap.Config) {
+ c.InitialFields = fields
+ }
+}
+
// Init creates a new zap logger and attaches it to the provided context.
func Init(ctx context.Context, opts ...Option) (context.Context, error) {
zc := zap.NewProductionConfig()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go
index 74082b65..a714ca99 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go
@@ -93,6 +93,14 @@ func (pb *Bag) Next(pageToken string) error {
// Next pops the current token, and pushes a copy of it with an updated page token.
func (pb *Bag) NextToken(pageToken string) (string, error) {
+ // assume that `pb` was passed an empty token
+ if pb.currentState == nil {
+ pb.currentState = &PageState{
+ Token: pageToken,
+ }
+ return pb.Marshal()
+ }
+
st := pb.pop()
if st == nil {
return "", fmt.Errorf("no active page state")
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
index ed9800c8..479ffa09 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
@@ -1,3 +1,3 @@
package sdk
-const Version = "v0.2.34"
+const Version = "v0.2.46"
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/cycle.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/cycle.go
index bea170c2..867cd6fb 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/cycle.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/cycle.go
@@ -8,6 +8,9 @@ import (
// exists. Returns nil if no cycle exists. If there is a single
// node pointing to itself, that will count as a cycle.
func (g *EntitlementGraph) GetFirstCycle() []int {
+ if g.HasNoCycles {
+ return nil
+ }
visited := mapset.NewSet[int]()
for nodeID := range g.Nodes {
cycle, hasCycle := g.cycleDetectionHelper(nodeID, visited, []int{})
@@ -87,8 +90,12 @@ func (g *EntitlementGraph) removeNode(nodeID int) {
// FixCycles if any cycles of nodes exist, merge all nodes in that cycle into a
// single node and then repeat. Iteration ends when there are no more cycles.
func (g *EntitlementGraph) FixCycles() error {
+ if g.HasNoCycles {
+ return nil
+ }
cycle := g.GetFirstCycle()
if cycle == nil {
+ g.HasNoCycles = true
return nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go
index dbdce819..c399e7ed 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go
@@ -8,27 +8,29 @@ import (
"go.uber.org/zap"
)
+// JSON tags for actions, edges, and nodes are short to minimize size of serialized data when checkpointing
+
type EntitlementGraphAction struct {
- SourceEntitlementID string `json:"source_entitlement_id"`
- DescendantEntitlementID string `json:"descendant_entitlement_id"`
- Shallow bool `json:"shallow"`
- ResourceTypeIDs []string `json:"resource_types_ids"`
- PageToken string `json:"page_token"`
+ SourceEntitlementID string `json:"sid"`
+ DescendantEntitlementID string `json:"did"`
+ Shallow bool `json:"s"`
+ ResourceTypeIDs []string `json:"rtids"`
+ PageToken string `json:"pt"`
}
type Edge struct {
- EdgeID int `json:"edge_id"`
- SourceID int `json:"source_id"`
- DestinationID int `json:"destination_id"`
- IsExpanded bool `json:"expanded"`
- IsShallow bool `json:"shallow"`
- ResourceTypeIDs []string `json:"resource_type_ids"`
+ EdgeID int `json:"id"`
+ SourceID int `json:"sid"`
+ DestinationID int `json:"did"`
+ IsExpanded bool `json:"e"`
+ IsShallow bool `json:"s"`
+ ResourceTypeIDs []string `json:"rtids"`
}
// Node represents a list of entitlements. It is the base element of the graph.
type Node struct {
Id int `json:"id"`
- EntitlementIDs []string `json:"entitlementIds"` // List of entitlements.
+ EntitlementIDs []string `json:"eids"` // List of entitlements.
}
// EntitlementGraph - a directed graph representing the relationships between
@@ -47,6 +49,7 @@ type EntitlementGraph struct {
Loaded bool `json:"loaded"`
Depth int `json:"depth"`
Actions []EntitlementGraphAction `json:"actions"`
+ HasNoCycles bool `json:"has_no_cycles"`
}
func NewEntitlementGraph(_ context.Context) *EntitlementGraph {
@@ -56,6 +59,7 @@ func NewEntitlementGraph(_ context.Context) *EntitlementGraph {
EntitlementsToNodes: make(map[string]int),
Nodes: make(map[int]Node),
SourcesToDestinations: make(map[int]map[int]int),
+ HasNoCycles: false,
}
}
@@ -155,6 +159,7 @@ func (g *EntitlementGraph) AddEntitlement(entitlement *v2.Entitlement) {
if found != nil {
return
}
+ g.HasNoCycles = false // Reset this since we're changing the graph.
// Start at 1 in case we don't initialize something and try to get node 0.
g.NextNodeID++
@@ -265,6 +270,8 @@ func (g *EntitlementGraph) AddEdge(
g.DestinationsToSources[dstNode.Id] = make(map[int]int)
}
+ g.HasNoCycles = false // Reset this since we're changing the graph.
+
// Start at 1 in case we don't initialize something and try to get edge 0.
g.NextEdgeID++
edge := Edge{
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
index 63ad39dd..99bd5c89 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
@@ -44,22 +44,29 @@ type Syncer interface {
// syncer orchestrates a connector sync and stores the results using the provided datasource.Writer.
type syncer struct {
- c1zManager manager.Manager
- c1zPath string
- store connectorstore.Writer
- connector types.ConnectorClient
- state State
- runDuration time.Duration
- transitionHandler func(s Action)
- progressHandler func(p *Progress)
- tmpDir string
- skipFullSync bool
+ c1zManager manager.Manager
+ c1zPath string
+ store connectorstore.Writer
+ connector types.ConnectorClient
+ state State
+ runDuration time.Duration
+ transitionHandler func(s Action)
+ progressHandler func(p *Progress)
+ tmpDir string
+ skipFullSync bool
+ lastCheckPointTime time.Time
skipEGForResourceType map[string]bool
}
+const minCheckpointInterval = 10 * time.Second
+
// Checkpoint marshals the current state and stores it.
func (s *syncer) Checkpoint(ctx context.Context) error {
+ if !s.lastCheckPointTime.IsZero() && time.Since(s.lastCheckPointTime) < minCheckpointInterval {
+ return nil
+ }
+ s.lastCheckPointTime = time.Now()
checkpoint, err := s.state.Marshal()
if err != nil {
return err
@@ -295,6 +302,11 @@ func (s *syncer) Sync(ctx context.Context) error {
return err
}
+ _, err = s.connector.Cleanup(ctx, &v2.ConnectorServiceCleanupRequest{})
+ if err != nil {
+ l.Error("error clearing connector caches", zap.Error(err))
+ }
+
return nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go
new file mode 100644
index 00000000..3baab42d
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go
@@ -0,0 +1,66 @@
+package c1api
+
+import (
+ "context"
+ "errors"
+
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+
+ v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
+ v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
+ "github.com/conductorone/baton-sdk/pkg/types"
+)
+
+type bulkCreateTicketTaskHelpers interface {
+ ConnectorClient() types.ConnectorClient
+ FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error
+}
+
+type bulkCreateTicketTaskHandler struct {
+ task *v1.Task
+ helpers bulkCreateTicketTaskHelpers
+}
+
+func (c *bulkCreateTicketTaskHandler) HandleTask(ctx context.Context) error {
+ l := ctxzap.Extract(ctx)
+
+ t := c.task.GetBulkCreateTickets()
+ if t == nil || len(t.GetTicketRequests()) == 0 {
+ l.Error("bulk create ticket task was nil or missing ticket requests", zap.Any("bulk_create_ticket_task", t))
+ return c.helpers.FinishTask(ctx, nil, nil, errors.Join(errors.New("malformed bulk create ticket task"), ErrTaskNonRetryable))
+ }
+
+ ticketRequests := make([]*v2.TicketsServiceCreateTicketRequest, 0)
+ for _, createTicketTask := range t.GetTicketRequests() {
+ ticketRequests = append(ticketRequests, &v2.TicketsServiceCreateTicketRequest{
+ Request: createTicketTask.GetTicketRequest(),
+ Schema: createTicketTask.GetTicketSchema(),
+ Annotations: createTicketTask.GetAnnotations(),
+ })
+ }
+
+ cc := c.helpers.ConnectorClient()
+ resp, err := cc.BulkCreateTickets(ctx, &v2.TicketsServiceBulkCreateTicketsRequest{
+ TicketRequests: ticketRequests,
+ })
+ if err != nil {
+ l.Error("failed bulk creating tickets", zap.Error(err))
+ return c.helpers.FinishTask(ctx, nil, nil, err)
+ }
+
+ if len(resp.GetTickets()) != len(t.GetTicketRequests()) {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.Join(errors.New("connector returned incorrect number of tickets"), ErrTaskNonRetryable))
+ }
+
+ return c.helpers.FinishTask(ctx, resp, nil, nil)
+}
+
+func newBulkCreateTicketTaskHandler(task *v1.Task, helpers bulkCreateTicketTaskHelpers) *bulkCreateTicketTaskHandler {
+ return &bulkCreateTicketTaskHandler{
+ task: task,
+ helpers: helpers,
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go
new file mode 100644
index 00000000..38bc09cb
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go
@@ -0,0 +1,66 @@
+package c1api
+
+import (
+ "context"
+ "errors"
+
+ v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
+ v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
+ "github.com/conductorone/baton-sdk/pkg/types"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+)
+
+type bulkGetTicketsTaskHelpers interface {
+ ConnectorClient() types.ConnectorClient
+ FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error
+}
+
+type bulkGetTicketTaskHandler struct {
+ task *v1.Task
+ helpers bulkGetTicketsTaskHelpers
+}
+
+func (c *bulkGetTicketTaskHandler) HandleTask(ctx context.Context) error {
+ l := ctxzap.Extract(ctx)
+
+ cc := c.helpers.ConnectorClient()
+
+ t := c.task.GetBulkGetTickets()
+ if t == nil || len(t.GetTicketRequests()) == 0 {
+ l.Error("bulk get ticket task was nil or missing tickets", zap.Any("bulk_get_tickets_task", t))
+ return c.helpers.FinishTask(ctx, nil, nil, errors.Join(errors.New("malformed bulk get tickets task"), ErrTaskNonRetryable))
+ }
+
+ ticketRequests := make([]*v2.TicketsServiceGetTicketRequest, 0)
+ for _, getTicketTask := range t.GetTicketRequests() {
+ ticketRequests = append(ticketRequests, &v2.TicketsServiceGetTicketRequest{
+ Id: getTicketTask.GetTicketId(),
+ Annotations: getTicketTask.GetAnnotations(),
+ })
+ }
+
+ resp, err := cc.BulkGetTickets(ctx, &v2.TicketsServiceBulkGetTicketsRequest{
+ TicketRequests: ticketRequests,
+ })
+ if err != nil {
+ return c.helpers.FinishTask(ctx, nil, nil, err)
+ }
+
+ if len(resp.GetTickets()) != len(t.GetTicketRequests()) {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.Join(errors.New("connector returned incorrect number of tickets"), ErrTaskNonRetryable))
+ }
+
+ l.Debug("BulkGetTickets response", zap.Any("resp", resp))
+
+ return c.helpers.FinishTask(ctx, resp, nil, nil)
+}
+
+func newBulkGetTicketTaskHandler(task *v1.Task, helpers bulkGetTicketsTaskHelpers) *bulkGetTicketTaskHandler {
+ return &bulkGetTicketTaskHandler{
+ task: task,
+ helpers: helpers,
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go
index 633e10dc..a7660576 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go
@@ -256,6 +256,10 @@ func (c *c1ApiTaskManager) Process(ctx context.Context, task *v1.Task, cc types.
handler = newGetTicketTaskHandler(task, tHelpers)
case taskTypes.StartDebugging:
handler = newStartDebugging(c)
+ case taskTypes.BulkCreateTicketsType:
+ handler = newBulkCreateTicketTaskHandler(task, tHelpers)
+ case taskTypes.BulkGetTicketsType:
+ handler = newBulkGetTicketTaskHandler(task, tHelpers)
default:
return c.finishTask(ctx, task, nil, nil, errors.New("unsupported task type"))
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go
index 2e8e2c62..e3ab56d4 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go
@@ -18,6 +18,126 @@ import (
sdkTicket "github.com/conductorone/baton-sdk/pkg/types/ticket"
)
+type localBulkCreateTicket struct {
+ o sync.Once
+
+ templatePath string
+}
+
+type bulkCreateTicketTemplate struct {
+ Tickets []ticketTemplate `json:"tickets"`
+}
+
+func (m *localBulkCreateTicket) loadTicketTemplate(ctx context.Context) (*bulkCreateTicketTemplate, error) {
+ tbytes, err := os.ReadFile(m.templatePath)
+ if err != nil {
+ return nil, err
+ }
+
+ template := &bulkCreateTicketTemplate{}
+ err = json.Unmarshal(tbytes, template)
+ if err != nil {
+ return nil, err
+ }
+
+ return template, nil
+}
+
+func (m *localBulkCreateTicket) GetTempDir() string {
+ return ""
+}
+
+func (m *localBulkCreateTicket) ShouldDebug() bool {
+ return false
+}
+
+func (m *localBulkCreateTicket) Next(ctx context.Context) (*v1.Task, time.Duration, error) {
+ var task *v1.Task
+ m.o.Do(func() {
+ task = &v1.Task{
+ TaskType: &v1.Task_BulkCreateTickets{
+ BulkCreateTickets: &v1.Task_BulkCreateTicketsTask{},
+ },
+ }
+ })
+ return task, 0, nil
+}
+
+func (m *localBulkCreateTicket) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ l := ctxzap.Extract(ctx)
+
+ templates, err := m.loadTicketTemplate(ctx)
+ if err != nil {
+ return err
+ }
+
+ ticketReqs := make([]*v2.TicketsServiceCreateTicketRequest, 0)
+ for _, template := range templates.Tickets {
+ schema, err := cc.GetTicketSchema(ctx, &v2.TicketsServiceGetTicketSchemaRequest{
+ Id: template.SchemaID,
+ })
+ if err != nil {
+ return err
+ }
+
+ ticketRequestBody := &v2.TicketRequest{
+ DisplayName: template.DisplayName,
+ Description: template.Description,
+ Labels: template.Labels,
+ }
+
+ if template.StatusId != "" {
+ ticketRequestBody.Status = &v2.TicketStatus{
+ Id: template.StatusId,
+ }
+ }
+
+ if template.RequestedForId != "" {
+ rt := resource.NewResourceType("User", []v2.ResourceType_Trait{v2.ResourceType_TRAIT_USER})
+ requestedUser, err := resource.NewUserResource(template.RequestedForId, rt, template.RequestedForId, []resource.UserTraitOption{})
+ if err != nil {
+ return err
+ }
+ ticketRequestBody.RequestedFor = requestedUser
+ }
+
+ cfs := make(map[string]*v2.TicketCustomField)
+ for k, v := range template.CustomFields {
+ newCfs, err := sdkTicket.CustomFieldForSchemaField(k, schema.Schema, v)
+ if err != nil {
+ return err
+ }
+ cfs[k] = newCfs
+ }
+ ticketRequestBody.CustomFields = cfs
+
+ ticketReqs = append(ticketReqs, &v2.TicketsServiceCreateTicketRequest{
+ Request: ticketRequestBody,
+ Schema: schema.GetSchema(),
+ })
+ }
+
+ bulkTicketReq := &v2.TicketsServiceBulkCreateTicketsRequest{
+ TicketRequests: ticketReqs,
+ }
+
+ resp, err := cc.BulkCreateTickets(ctx, bulkTicketReq)
+ if err != nil {
+ return err
+ }
+
+ l.Info("created tickets", zap.Any("resp", resp))
+
+ return nil
+}
+
+// NewBulkTicket returns a task manager that queues a bulk create ticket task.
+func NewBulkTicket(ctx context.Context, templatePath string) tasks.Manager {
+ return &localBulkCreateTicket{
+ templatePath: templatePath,
+ }
+}
+
type localCreateTicket struct {
o sync.Once
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go
index 96567873..891c9d4c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go
@@ -54,6 +54,10 @@ func Is(task *v1.Task, target taskTypes.TaskType) bool {
_, ok = task.GetTaskType().(*v1.Task_ListTicketSchemas)
case taskTypes.GetTicketType:
_, ok = task.GetTaskType().(*v1.Task_GetTicket)
+ case taskTypes.BulkCreateTicketsType:
+ _, ok = task.GetTaskType().(*v1.Task_BulkCreateTickets)
+ case taskTypes.BulkGetTicketsType:
+ _, ok = task.GetTaskType().(*v1.Task_BulkGetTickets)
default:
return false
}
@@ -93,6 +97,10 @@ func GetType(task *v1.Task) taskTypes.TaskType {
return taskTypes.ListTicketSchemasType
case *v1.Task_GetTicket:
return taskTypes.GetTicketType
+ case *v1.Task_BulkCreateTickets:
+ return taskTypes.BulkCreateTicketsType
+ case *v1.Task_BulkGetTickets:
+ return taskTypes.BulkGetTicketsType
default:
return taskTypes.UnknownType
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go
index fe3a0c65..ad89817a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go
@@ -46,6 +46,10 @@ func (tt TaskType) String() string {
return "list_events"
case StartDebugging:
return "set_log_file_event"
+ case BulkCreateTicketsType:
+ return "bulk_create_tickets"
+ case BulkGetTicketsType:
+ return "bulk_get_tickets"
default:
return "unknown"
}
@@ -74,4 +78,6 @@ const (
GetMetadataType
ListEventsType
StartDebugging
+ BulkCreateTicketsType
+ BulkGetTicketsType
)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/ticket/custom_fields.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/ticket/custom_fields.go
index 6a54a827..fd3d6b94 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/types/ticket/custom_fields.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/ticket/custom_fields.go
@@ -276,7 +276,7 @@ func GetCustomFieldValue(field *v2.TicketCustomField) (interface{}, error) {
case *v2.TicketCustomField_PickMultipleObjectValues:
objVals := v.PickMultipleObjectValues.GetValues()
if len(objVals) == 0 {
- return objVals, nil
+ return nil, nil
}
return objVals, nil
@@ -337,7 +337,7 @@ func GetDefaultCustomFieldValue(field *v2.TicketCustomField) (interface{}, error
case *v2.TicketCustomField_PickMultipleObjectValues:
objVals := v.PickMultipleObjectValues.GetDefaultValues()
if len(objVals) == 0 {
- return objVals, nil
+ return nil, nil
}
return objVals, nil
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/client.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/client.go
index 6b800c58..68605695 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/client.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/client.go
@@ -2,8 +2,12 @@ package uhttp
import (
"context"
+ "crypto/sha256"
"crypto/tls"
+ "fmt"
"net/http"
+ "sort"
+ "strings"
"time"
"go.uber.org/zap"
@@ -72,3 +76,54 @@ func NewClient(ctx context.Context, options ...Option) (*http.Client, error) {
httpClient.Transport = t
return httpClient, nil
}
+
+type icache interface {
+ Get(req *http.Request) (*http.Response, error)
+ Set(req *http.Request, value *http.Response) error
+ Clear(ctx context.Context) error
+ Stats(ctx context.Context) CacheStats
+}
+
+// CreateCacheKey generates a cache key based on the request URL, query parameters, and headers.
+func CreateCacheKey(req *http.Request) (string, error) {
+ if req == nil {
+ return "", fmt.Errorf("request is nil")
+ }
+ var sortedParams []string
+ // Normalize the URL path
+ path := strings.ToLower(req.URL.Path)
+ // Combine the path with sorted query parameters
+ queryParams := req.URL.Query()
+ for k, v := range queryParams {
+ for _, value := range v {
+ sortedParams = append(sortedParams, fmt.Sprintf("%s=%s", k, value))
+ }
+ }
+
+ sort.Strings(sortedParams)
+ queryString := strings.Join(sortedParams, "&")
+ // Include relevant headers in the cache key
+ var headerParts []string
+ for key, values := range req.Header {
+ for _, value := range values {
+ if key == "Accept" || key == "Content-Type" || key == "Cookie" || key == "Range" {
+ headerParts = append(headerParts, fmt.Sprintf("%s=%s", key, value))
+ }
+ }
+ }
+
+ sort.Strings(headerParts)
+ headersString := strings.Join(headerParts, "&")
+ // Create a unique string for the cache key
+ cacheString := fmt.Sprintf("%s?%s&headers=%s", path, queryString, headersString)
+
+ // Hash the cache string to create a key
+ hash := sha256.New()
+ _, err := hash.Write([]byte(cacheString))
+ if err != nil {
+ return "", err
+ }
+
+ cacheKey := fmt.Sprintf("%x", hash.Sum(nil))
+ return cacheKey, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/contenttype.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/contenttype.go
index cbad9818..3fcab1b4 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/contenttype.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/contenttype.go
@@ -1,6 +1,8 @@
package uhttp
-import "strings"
+import (
+ "strings"
+)
var xmlContentTypes []string = []string{
"text/xml",
@@ -8,6 +10,7 @@ var xmlContentTypes []string = []string{
}
func IsJSONContentType(contentType string) bool {
+ contentType = strings.TrimSpace(strings.ToLower(contentType))
return strings.HasPrefix(contentType, "application") &&
strings.Contains(contentType, "json")
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go
new file mode 100644
index 00000000..5b08851b
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go
@@ -0,0 +1,475 @@
+package uhttp
+
+import (
+ "bufio"
+ "bytes"
+ "context"
+ "database/sql"
+ "errors"
+ "fmt"
+ "net/http"
+ "net/http/httputil"
+ "os"
+ "path/filepath"
+ "time"
+
+ "github.com/doug-martin/goqu/v9"
+ // NOTE: required to register the dialect for goqu.
+ //
+ // If you remove this import, goqu.Dialect("sqlite3") will
+ // return a copy of the default dialect, which is not what we want,
+ // and allocates a ton of memory.
+ _ "github.com/doug-martin/goqu/v9/dialect/sqlite3"
+ _ "github.com/glebarez/go-sqlite"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+)
+
+type DBCache struct {
+ rawDb *sql.DB
+ db *goqu.Database
+ // Cleanup interval, close and remove db
+ waitDuration time.Duration
+ // Cache duration for removing expired keys
+ expirationTime time.Duration
+ // Database path
+ location string
+ // Enable statistics(hits, misses)
+ stats bool
+}
+
+type CacheRow struct {
+ Key string
+ Value []byte
+ Expires time.Time
+ LastAccess time.Time
+ Url string
+}
+
+const (
+ failStartTransaction = "Failed to start a transaction"
+ errQueryingTable = "Error querying cache table"
+ failRollback = "Failed to rollback transaction"
+ failInsert = "Failed to insert response data into cache table"
+ failScanResponse = "Failed to scan rows for cached response"
+ cacheTTLThreshold = 60
+ cacheTTLMultiplier int64 = 5
+)
+
+var errNilConnection = errors.New("database connection is nil")
+
+var defaultWaitDuration = cacheTTLThreshold * time.Second // Default Cleanup interval, 60 seconds
+
+const tableName = "http_cache"
+
+// TODO (ggreer): obey c1z-temp-dir CLI arg or environment variable
+func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
+ var (
+ err error
+ dc = &DBCache{
+ waitDuration: defaultWaitDuration, // Default Cleanup interval, 60 seconds
+ stats: true,
+ expirationTime: time.Duration(cfg.TTL) * time.Second,
+ }
+ )
+ l := ctxzap.Extract(ctx)
+ dc, err = dc.load(ctx)
+ if err != nil {
+ l.Warn("Failed to open database", zap.Error(err))
+ return nil, err
+ }
+
+ // Create cache table and index
+ _, err = dc.db.ExecContext(ctx, `
+ CREATE TABLE IF NOT EXISTS http_cache(
+ key TEXT PRIMARY KEY,
+ value BLOB,
+ expires INT,
+ lastAccess TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ url TEXT
+ );
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_cache_key ON http_cache (key);
+ CREATE INDEX IF NOT EXISTS expires ON http_cache (expires);
+ CREATE INDEX IF NOT EXISTS lastAccess ON http_cache (lastAccess);
+ CREATE TABLE IF NOT EXISTS http_stats(
+ id INTEGER PRIMARY KEY,
+ key TEXT,
+ hits INT DEFAULT 0,
+ misses INT DEFAULT 0
+ );
+ DELETE FROM http_cache;
+ DELETE FROM http_stats;`)
+ if err != nil {
+ l.Warn("Failed to create cache table in database", zap.Error(err))
+ return nil, err
+ }
+
+ if cfg.TTL <= 0 {
+ l.Debug("Cache TTL is 0. Disabling cache.")
+ return nil, nil
+ }
+
+ if cfg.TTL > cacheTTLThreshold {
+ dc.waitDuration = time.Duration(cfg.TTL*cacheTTLMultiplier) * time.Second // set as a fraction of the Cache TTL
+ }
+
+ go func(waitDuration, expirationTime time.Duration) {
+ ctxWithTimeout, cancel := context.WithTimeout(
+ ctx,
+ waitDuration,
+ )
+ defer cancel()
+ // TODO: I think this should be wait duration
+ ticker := time.NewTicker(expirationTime)
+ defer ticker.Stop()
+ for {
+ select {
+ case <-ctxWithTimeout.Done():
+ // ctx done, shutting down cache cleanup routine
+ ticker.Stop()
+ err := dc.cleanup(ctx)
+ if err != nil {
+ l.Warn("shutting down cache failed", zap.Error(err))
+ }
+ return
+ case <-ticker.C:
+ err := dc.deleteExpired(ctx)
+ if err != nil {
+ l.Warn("Failed to delete expired cache entries", zap.Error(err))
+ }
+ }
+ }
+ }(dc.waitDuration, dc.expirationTime)
+
+ return dc, nil
+}
+
+func (d *DBCache) load(ctx context.Context) (*DBCache, error) {
+ l := ctxzap.Extract(ctx)
+ cacheDir, err := os.UserCacheDir()
+ if err != nil {
+ l.Warn("Failed to read user cache directory", zap.Error(err))
+ return nil, err
+ }
+
+ file := filepath.Join(cacheDir, "lcache.db")
+ d.location = file
+
+ l.Debug("Opening database", zap.String("location", file))
+ rawDB, err := sql.Open("sqlite", file)
+ if err != nil {
+ return nil, err
+ }
+ l.Debug("Opened database", zap.String("location", file))
+
+ d.db = goqu.New("sqlite3", rawDB)
+ d.rawDb = rawDB
+ return d, nil
+}
+
+func (d *DBCache) removeDB(ctx context.Context) error {
+ _, err := os.Stat(d.location)
+ if errors.Is(err, os.ErrNotExist) {
+ return fmt.Errorf("file not found %s", d.location)
+ }
+
+ err = d.close(ctx)
+ if err != nil {
+ return err
+ }
+
+ err = os.Remove(d.location)
+ if err != nil {
+ ctxzap.Extract(ctx).Warn("error removing cache database", zap.Error(err))
+ return err
+ }
+
+ return nil
+}
+
+// Get returns cached response (if exists).
+func (d *DBCache) Get(req *http.Request) (*http.Response, error) {
+ var (
+ isFound bool = false
+ resp *http.Response
+ )
+ key, err := CreateCacheKey(req)
+ if err != nil {
+ return nil, err
+ }
+ ctx := req.Context()
+ l := ctxzap.Extract(ctx)
+
+ entry, err := d.pick(ctx, key)
+ if err == nil && len(entry) > 0 {
+ r := bufio.NewReader(bytes.NewReader(entry))
+ resp, err = http.ReadResponse(r, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ isFound = true
+ }
+
+ field := "misses"
+ if isFound {
+ field = "hits"
+ }
+ err = d.updateStats(ctx, field, key)
+ if err != nil {
+ l.Warn("Failed to update cache stats", zap.Error(err), zap.String("field", field))
+ }
+
+ return resp, nil
+}
+
+func (d *DBCache) pick(ctx context.Context, key string) ([]byte, error) {
+ if d.db == nil {
+ return nil, errNilConnection
+ }
+
+ l := ctxzap.Extract(ctx)
+ ds := goqu.From(tableName).Select("value").Where(goqu.Ex{"key": key})
+ query, args, err := ds.ToSQL()
+ if err != nil {
+ l.Warn("Failed to create select statement", zap.Error(err))
+ return nil, err
+ }
+
+ var value []byte
+ row := d.db.QueryRowContext(ctx, query, args...)
+ err = row.Scan(&value)
+ if err != nil && !errors.Is(err, sql.ErrNoRows) {
+ l.Warn(errQueryingTable, zap.Error(err), zap.String("sql", query), zap.Any("args", args))
+ return nil, err
+ }
+
+ return value, nil
+}
+
+// Set stores and save response in the db.
+func (d *DBCache) Set(req *http.Request, value *http.Response) error {
+ key, err := CreateCacheKey(req)
+ if err != nil {
+ return err
+ }
+ cacheableResponse, err := httputil.DumpResponse(value, true)
+ if err != nil {
+ return err
+ }
+
+ url := req.URL.String()
+
+ err = d.insert(req.Context(),
+ key,
+ cacheableResponse,
+ url,
+ )
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (d *DBCache) cleanup(ctx context.Context) error {
+ l := ctxzap.Extract(ctx)
+ stats, err := d.getStats(ctx)
+ if err != nil {
+ l.Warn("error getting stats", zap.Error(err))
+ return err
+ }
+
+ l.Debug("summary and stats", zap.Any("stats", stats))
+ return d.removeDB(ctx)
+}
+
+// Insert data into the cache table.
+func (d *DBCache) insert(ctx context.Context, key string, bytes []byte, url string) error {
+ if d.db == nil {
+ return errNilConnection
+ }
+
+ l := ctxzap.Extract(ctx)
+
+ tx, err := d.db.Begin()
+ if err != nil {
+ l.Warn(failStartTransaction, zap.Error(err))
+ return err
+ }
+
+ ds := goqu.Insert(tableName).Rows(
+ CacheRow{
+ Key: key,
+ Value: bytes,
+ Expires: time.Now().Add(d.expirationTime),
+ Url: url,
+ },
+ )
+ ds = ds.OnConflict(goqu.DoUpdate("key", CacheRow{
+ Key: key,
+ Value: bytes,
+ Expires: time.Now().Add(d.expirationTime),
+ Url: url,
+ }))
+ insertSQL, args, err := ds.ToSQL()
+ if err != nil {
+ l.Warn("Failed to create insert statement", zap.Error(err))
+ return err
+ }
+ _, err = tx.ExecContext(ctx, insertSQL, args...)
+ if err != nil {
+ if errtx := tx.Rollback(); errtx != nil {
+ l.Warn(failRollback, zap.Error(errtx))
+ }
+
+ l.Warn(failInsert, zap.Error(err), zap.String("sql", insertSQL))
+ return err
+ }
+
+ err = tx.Commit()
+ if err != nil {
+ if errtx := tx.Rollback(); errtx != nil {
+ l.Warn(failRollback, zap.Error(errtx))
+ }
+
+ l.Warn(failInsert, zap.Error(err), zap.String("sql", insertSQL))
+ return err
+ }
+
+ return nil
+}
+
+// Delete all expired items from the cache.
+func (d *DBCache) deleteExpired(ctx context.Context) error {
+ if d.db == nil {
+ return errNilConnection
+ }
+
+ l := ctxzap.Extract(ctx)
+ tx, err := d.db.Begin()
+ if err != nil {
+ l.Warn(failStartTransaction, zap.Error(err))
+ return err
+ }
+
+ _, err = d.db.ExecContext(ctx, "DELETE FROM http_cache WHERE expires < ?", time.Now().UnixNano())
+ if err != nil {
+ if errtx := tx.Rollback(); errtx != nil {
+ l.Warn(failRollback, zap.Error(errtx))
+ }
+
+ l.Warn("Failed to delete expired cache entries", zap.Error(err))
+ return err
+ }
+
+ err = tx.Commit()
+ if err != nil {
+ if errtx := tx.Rollback(); errtx != nil {
+ l.Warn(failRollback, zap.Error(errtx))
+ }
+ l.Warn("Failed to commit after deleting expired cache entries", zap.Error(err))
+ }
+
+ return err
+}
+
+func (d *DBCache) close(ctx context.Context) error {
+ if d.rawDb == nil {
+ return errNilConnection
+ }
+
+ err := d.rawDb.Close()
+ if err != nil {
+ ctxzap.Extract(ctx).Warn("Failed to close database connection", zap.Error(err))
+ }
+
+ return err
+}
+
+func (d *DBCache) updateStats(ctx context.Context, field, key string) error {
+ if !d.stats {
+ return nil
+ }
+
+ if d.db == nil {
+ return errNilConnection
+ }
+ l := ctxzap.Extract(ctx)
+ tx, err := d.db.Begin()
+ if err != nil {
+ l.Warn(failStartTransaction, zap.Error(err))
+ return err
+ }
+
+ _, err = d.db.ExecContext(ctx, fmt.Sprintf("INSERT INTO http_stats(key, %s) values(?, 1)", field), key)
+ if err != nil {
+ if errtx := tx.Rollback(); errtx != nil {
+ l.Warn(failRollback, zap.Error(errtx))
+ }
+
+ l.Warn("error updating "+field, zap.Error(err))
+ return err
+ }
+
+ err = tx.Commit()
+ if err != nil {
+ if errtx := tx.Rollback(); errtx != nil {
+ l.Warn(failRollback, zap.Error(errtx))
+ }
+
+ l.Warn("Failed to update "+field, zap.Error(err))
+ return err
+ }
+
+ return nil
+}
+
+func (d *DBCache) getStats(ctx context.Context) (CacheStats, error) {
+ var (
+ hits int64
+ misses int64
+ )
+ if d.db == nil {
+ return CacheStats{}, errNilConnection
+ }
+
+ l := ctxzap.Extract(ctx)
+ rows, err := d.db.QueryContext(ctx, `
+ SELECT
+ sum(hits) total_hits,
+ sum(misses) total_misses
+ FROM http_stats
+ `)
+ if err != nil {
+ l.Warn(errQueryingTable, zap.Error(err))
+ return CacheStats{}, err
+ }
+
+ defer rows.Close()
+ for rows.Next() {
+ err = rows.Scan(&hits, &misses)
+ if err != nil {
+ l.Warn(failScanResponse, zap.Error(err))
+ return CacheStats{}, err
+ }
+ }
+
+ return CacheStats{
+ Hits: hits,
+ Misses: misses,
+ }, nil
+}
+
+func (d *DBCache) Stats(ctx context.Context) CacheStats {
+ stats, err := d.getStats(ctx)
+ if err != nil {
+ return CacheStats{}
+ }
+ return stats
+}
+
+func (d *DBCache) Clear(ctx context.Context) error {
+ // TODO: Implement
+ return nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go
index 7fbf0b04..9674694f 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go
@@ -4,12 +4,12 @@ import (
"bufio"
"bytes"
"context"
- "crypto/sha256"
+ "errors"
"fmt"
"net/http"
"net/http/httputil"
- "sort"
- "strings"
+ "os"
+ "strconv"
"time"
bigCache "github.com/allegro/bigcache/v3"
@@ -17,27 +17,204 @@ import (
"go.uber.org/zap"
)
+const (
+ cacheTTLMaximum = 31536000 // 31536000 seconds = one year
+ cacheTTLDefault = 3600 // 3600 seconds = one hour
+ defaultCacheSize = 5 // MB
+)
+
+type CacheBehavior string
+
+const (
+ CacheBehaviorDefault CacheBehavior = "default"
+ // On the first time setting a value, make it empty. Get will return not found, so uhttp Do() will set it again.
+ // Then actually set the value. This effectively makes the cache only cache things that have been requested more than once.
+ CacheBehaviorSparse CacheBehavior = "sparse"
+)
+
+type CacheBackend string
+
+const (
+ CacheBackendDB CacheBackend = "db"
+ CacheBackendMemory CacheBackend = "memory"
+ CacheBackendNoop CacheBackend = "noop"
+)
+
+type CacheConfig struct {
+ LogDebug bool
+ TTL int64 // If 0, cache is disabled
+ MaxSize int // MB
+ Behavior CacheBehavior
+ Backend CacheBackend
+}
+
+type CacheStats struct {
+ Hits int64
+ Misses int64
+}
+
+type ContextKey struct{}
+
type GoCache struct {
rootLibrary *bigCache.BigCache
+ behavior CacheBehavior
}
-func NewGoCache(ctx context.Context, cfg CacheConfig) (GoCache, error) {
+type NoopCache struct {
+ counter int64
+}
+
+func NewNoopCache(ctx context.Context) *NoopCache {
+ return &NoopCache{}
+}
+
+func (g *NoopCache) Get(req *http.Request) (*http.Response, error) {
+ // This isn't threadsafe but who cares? It's the noop cache.
+ g.counter++
+ return nil, nil
+}
+
+func (n *NoopCache) Set(req *http.Request, value *http.Response) error {
+ return nil
+}
+
+func (n *NoopCache) Clear(ctx context.Context) error {
+ return nil
+}
+
+func (n *NoopCache) Stats(ctx context.Context) CacheStats {
+ return CacheStats{
+ Hits: 0,
+ Misses: n.counter,
+ }
+}
+
+func (cc *CacheConfig) ToString() string {
+ return fmt.Sprintf("Backend: %v, TTL: %d, MaxSize: %dMB, LogDebug: %t, Behavior: %v", cc.Backend, cc.TTL, cc.MaxSize, cc.LogDebug, cc.Behavior)
+}
+
+func DefaultCacheConfig() CacheConfig {
+ return CacheConfig{
+ TTL: cacheTTLDefault,
+ MaxSize: defaultCacheSize,
+ LogDebug: false,
+ Behavior: CacheBehaviorDefault,
+ Backend: CacheBackendMemory,
+ }
+}
+
+func NewCacheConfigFromEnv() *CacheConfig {
+ config := DefaultCacheConfig()
+
+ cacheMaxSize, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_MAX_SIZE"), 10, 64)
+ if err == nil {
+ config.MaxSize = int(cacheMaxSize)
+ }
+
+ // read the `BATON_HTTP_CACHE_TTL` environment variable and return
+ // the value as a number of seconds between 0 and an arbitrary maximum. Note:
+ // this means that passing a value of `-1` will set the TTL to zero rather than
+ // infinity.
+ cacheTTL, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_TTL"), 10, 64)
+ if err == nil {
+ config.TTL = min(cacheTTLMaximum, max(0, cacheTTL))
+ }
+
+ cacheBackend := os.Getenv("BATON_HTTP_CACHE_BACKEND")
+ switch cacheBackend {
+ case "db":
+ config.Backend = CacheBackendDB
+ case "memory":
+ config.Backend = CacheBackendMemory
+ case "noop":
+ config.Backend = CacheBackendNoop
+ }
+
+ cacheBehavior := os.Getenv("BATON_HTTP_CACHE_BEHAVIOR")
+ switch cacheBehavior {
+ case "sparse":
+ config.Behavior = CacheBehaviorSparse
+ case "default":
+ config.Behavior = CacheBehaviorDefault
+ }
+
+ disableCache, err := strconv.ParseBool(os.Getenv("BATON_DISABLE_HTTP_CACHE"))
+ if err != nil {
+ disableCache = false
+ }
+ if disableCache {
+ config.Backend = CacheBackendNoop
+ }
+
+ return &config
+}
+
+func NewCacheConfigFromCtx(ctx context.Context) (*CacheConfig, error) {
+ defaultConfig := DefaultCacheConfig()
+ if v := ctx.Value(ContextKey{}); v != nil {
+ ctxConfig, ok := v.(CacheConfig)
+ if !ok {
+ return nil, fmt.Errorf("error casting config values from context")
+ }
+ return &ctxConfig, nil
+ }
+ return &defaultConfig, nil
+}
+
+func NewHttpCache(ctx context.Context, config *CacheConfig) (icache, error) {
l := ctxzap.Extract(ctx)
- if cfg.DisableCache {
- l.Debug("http cache disabled")
- return GoCache{}, nil
+
+ if config == nil {
+ config = NewCacheConfigFromEnv()
+ }
+
+ l.Info("http cache config", zap.String("config", config.ToString()))
+
+ if config.TTL <= 0 {
+ l.Debug("CacheTTL is <=0, disabling cache.", zap.Int64("CacheTTL", config.TTL))
+ return NewNoopCache(ctx), nil
+ }
+
+ switch config.Backend {
+ case CacheBackendNoop:
+ l.Debug("Using noop cache")
+ return NewNoopCache(ctx), nil
+ case CacheBackendMemory:
+ l.Debug("Using in-memory cache")
+ memCache, err := NewGoCache(ctx, *config)
+ if err != nil {
+ l.Error("error creating http cache (in-memory)", zap.Error(err), zap.Any("config", *config))
+ return nil, err
+ }
+ return memCache, nil
+ case CacheBackendDB:
+ l.Debug("Using db cache")
+ dbCache, err := NewDBCache(ctx, *config)
+ if err != nil {
+ l.Error("error creating http cache (db-cache)", zap.Error(err), zap.Any("config", *config))
+ return nil, err
+ }
+ return dbCache, nil
}
- config := bigCache.DefaultConfig(time.Duration(cfg.CacheTTL) * time.Second)
+
+ return NewNoopCache(ctx), nil
+}
+
+func NewGoCache(ctx context.Context, cfg CacheConfig) (*GoCache, error) {
+ l := ctxzap.Extract(ctx)
+ gc := GoCache{}
+ gc.behavior = cfg.Behavior
+ config := bigCache.DefaultConfig(time.Duration(cfg.TTL) * time.Second)
config.Verbose = cfg.LogDebug
config.Shards = 4
- config.HardMaxCacheSize = cfg.CacheMaxSize // value in MB, 0 value means no size limit
+ config.HardMaxCacheSize = cfg.MaxSize // value in MB, 0 value means no size limit
cache, err := bigCache.New(ctx, config)
if err != nil {
- l.Error("http cache initialization error", zap.Error(err))
- return GoCache{}, err
+ l.Error("bigcache initialization error", zap.Error(err))
+ return nil, err
}
- l.Debug("http cache config",
+ l.Debug("bigcache config",
zap.Dict("config",
zap.Int("Shards", config.Shards),
zap.Duration("LifeWindow", config.LifeWindow),
@@ -48,96 +225,82 @@ func NewGoCache(ctx context.Context, cfg CacheConfig) (GoCache, error) {
zap.Bool("Verbose", config.Verbose),
zap.Int("HardMaxCacheSize", config.HardMaxCacheSize),
))
- gc := GoCache{
- rootLibrary: cache,
- }
+ gc.rootLibrary = cache
- return gc, nil
+ return &gc, nil
}
-func (g *GoCache) Statistics() bigCache.Stats {
+func (g *GoCache) Stats(ctx context.Context) CacheStats {
if g.rootLibrary == nil {
- return bigCache.Stats{}
+ return CacheStats{}
+ }
+ stats := g.rootLibrary.Stats()
+ return CacheStats{
+ Hits: stats.Hits,
+ Misses: stats.Misses,
}
-
- return g.rootLibrary.Stats()
}
-// CreateCacheKey generates a cache key based on the request URL, query parameters, and headers.
-// The key is a SHA-256 hash of the normalized URL path, sorted query parameters, and relevant headers.
-func CreateCacheKey(req *http.Request) (string, error) {
- // Normalize the URL path
- path := strings.ToLower(req.URL.Path)
-
- // Combine the path with sorted query parameters
- queryParams := req.URL.Query()
- var sortedParams []string
- for k, v := range queryParams {
- for _, value := range v {
- sortedParams = append(sortedParams, fmt.Sprintf("%s=%s", k, value))
- }
+func (g *GoCache) Get(req *http.Request) (*http.Response, error) {
+ if g.rootLibrary == nil {
+ return nil, nil
}
- sort.Strings(sortedParams)
- queryString := strings.Join(sortedParams, "&")
-
- // Include relevant headers in the cache key
- var headerParts []string
- for key, values := range req.Header {
- for _, value := range values {
- if key == "Accept" || key == "Authorization" || key == "Cookie" || key == "Range" {
- headerParts = append(headerParts, fmt.Sprintf("%s=%s", key, value))
- }
- }
+ key, err := CreateCacheKey(req)
+ if err != nil {
+ return nil, err
}
- sort.Strings(headerParts)
- headersString := strings.Join(headerParts, "&")
-
- // Create a unique string for the cache key
- cacheString := fmt.Sprintf("%s?%s&headers=%s", path, queryString, headersString)
-
- // Hash the cache string to create a key
- hash := sha256.New()
- _, err := hash.Write([]byte(cacheString))
+ entry, err := g.rootLibrary.Get(key)
if err != nil {
- return "", err
+ if errors.Is(err, bigCache.ErrEntryNotFound) {
+ return nil, nil
+ }
+ return nil, err
}
- cacheKey := fmt.Sprintf("%x", hash.Sum(nil))
- return cacheKey, nil
-}
-
-func (g *GoCache) Get(key string) (*http.Response, error) {
- if g.rootLibrary == nil {
+ if len(entry) == 0 {
return nil, nil
}
- entry, err := g.rootLibrary.Get(key)
- if err == nil {
- r := bufio.NewReader(bytes.NewReader(entry))
- resp, err := http.ReadResponse(r, nil)
- if err != nil {
- return nil, err
- }
-
- return resp, nil
+ r := bufio.NewReader(bytes.NewReader(entry))
+ resp, err := http.ReadResponse(r, nil)
+ if err != nil {
+ return nil, err
}
- return nil, nil
+ return resp, nil
}
-func (g *GoCache) Set(key string, value *http.Response) error {
+func (g *GoCache) Set(req *http.Request, value *http.Response) error {
if g.rootLibrary == nil {
return nil
}
- cacheableResponse, err := httputil.DumpResponse(value, true)
+ key, err := CreateCacheKey(req)
if err != nil {
return err
}
- err = g.rootLibrary.Set(key, cacheableResponse)
+ newValue, err := httputil.DumpResponse(value, true)
+ if err != nil {
+ return err
+ }
+
+ // If in sparse mode, the first time we call set on a key we make the value empty bytes.
+ // Subsequent calls to set actually set the value.
+ if g.behavior == CacheBehaviorSparse {
+ _, err := g.rootLibrary.Get(key)
+ if err != nil && !errors.Is(err, bigCache.ErrEntryNotFound) {
+ return err
+ }
+
+ if errors.Is(err, bigCache.ErrEntryNotFound) {
+ newValue = []byte{}
+ }
+ }
+
+ err = g.rootLibrary.Set(key, newValue)
if err != nil {
return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
index 377ca9e1..02e494bf 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
@@ -10,15 +10,16 @@ import (
"io"
"net/http"
"net/url"
- "os"
- "strconv"
+ "time"
- v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
- "github.com/conductorone/baton-sdk/pkg/ratelimit"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ uRateLimit "go.uber.org/ratelimit"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
+
+ v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
+ "github.com/conductorone/baton-sdk/pkg/ratelimit"
)
const (
@@ -28,10 +29,10 @@ const (
applicationFormUrlencoded = "application/x-www-form-urlencoded"
applicationVndApiJSON = "application/vnd.api+json"
acceptHeader = "Accept"
- cacheTTLMaximum = 31536000 // 31536000 seconds = one year
- cacheTTLDefault = 3600 // 3600 seconds = one hour
)
+const maxBodySize = 4096
+
type WrapperResponse struct {
Header http.Header
Body []byte
@@ -39,14 +40,40 @@ type WrapperResponse struct {
StatusCode int
}
+type rateLimiterOption struct {
+ rate int
+ per time.Duration
+}
+
+func (o rateLimiterOption) Apply(c *BaseHttpClient) {
+ opts := []uRateLimit.Option{}
+ if o.per > 0 {
+ opts = append(opts, uRateLimit.Per(o.per))
+ }
+ c.rateLimiter = uRateLimit.New(o.rate, opts...)
+}
+
+// WithRateLimiter returns a WrapperOption that sets the rate limiter for the http client.
+// `rate` is the number of requests allowed per `per` duration.
+// `per` is the duration in which the rate limit is enforced.
+// Example: WithRateLimiter(10, time.Second) will allow 10 requests per second.
+func WithRateLimiter(rate int, per time.Duration) WrapperOption {
+ return rateLimiterOption{rate: rate, per: per}
+}
+
+type WrapperOption interface {
+ Apply(*BaseHttpClient)
+}
+
// Keep a handle on all caches so we can clear them later.
-var caches []GoCache
+var caches []icache
func ClearCaches(ctx context.Context) error {
l := ctxzap.Extract(ctx)
l.Debug("clearing caches")
var err error
for _, cache := range caches {
+ l.Debug("clearing cache", zap.String("cache", fmt.Sprintf("%T", cache)), zap.Any("stats", cache.Stats(ctx)))
err = cache.Clear(ctx)
if err != nil {
err = errors.Join(err, err)
@@ -63,81 +90,43 @@ type (
}
BaseHttpClient struct {
HttpClient *http.Client
- baseHttpCache GoCache
+ rateLimiter uRateLimit.Limiter
+ baseHttpCache icache
}
DoOption func(resp *WrapperResponse) error
RequestOption func() (io.ReadWriter, map[string]string, error)
- ContextKey struct{}
- CacheConfig struct {
- LogDebug bool
- CacheTTL int32
- CacheMaxSize int
- DisableCache bool
- }
)
-func NewBaseHttpClient(httpClient *http.Client) *BaseHttpClient {
+func NewBaseHttpClient(httpClient *http.Client, opts ...WrapperOption) *BaseHttpClient {
ctx := context.TODO()
- client, err := NewBaseHttpClientWithContext(ctx, httpClient)
+ client, err := NewBaseHttpClientWithContext(ctx, httpClient, opts...)
if err != nil {
return nil
}
return client
}
-// getCacheTTL read the `BATON_HTTP_CACHE_TTL` environment variable and return
-// the value as a number of seconds between 0 and an arbitrary maximum. Note:
-// this means that passing a value of `-1` will set the TTL to zero rather than
-// infinity.
-func getCacheTTL() int32 {
- cacheTTL, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_TTL"), 10, 64)
- if err != nil {
- cacheTTL = cacheTTLDefault // seconds
- }
-
- cacheTTL = min(cacheTTLMaximum, max(0, cacheTTL))
-
- //nolint:gosec // No risk of overflow because we have a low maximum.
- return int32(cacheTTL)
-}
-
-func NewBaseHttpClientWithContext(ctx context.Context, httpClient *http.Client) (*BaseHttpClient, error) {
+func NewBaseHttpClientWithContext(ctx context.Context, httpClient *http.Client, opts ...WrapperOption) (*BaseHttpClient, error) {
l := ctxzap.Extract(ctx)
- disableCache, err := strconv.ParseBool(os.Getenv("BATON_DISABLE_HTTP_CACHE"))
- if err != nil {
- disableCache = false
- }
- cacheMaxSize, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_MAX_SIZE"), 10, 64)
- if err != nil {
- cacheMaxSize = 128 // MB
- }
- var (
- config = CacheConfig{
- LogDebug: l.Level().Enabled(zap.DebugLevel),
- CacheTTL: getCacheTTL(), // seconds
- CacheMaxSize: int(cacheMaxSize), // MB
- DisableCache: disableCache,
- }
- ok bool
- )
- if v := ctx.Value(ContextKey{}); v != nil {
- if config, ok = v.(CacheConfig); !ok {
- return nil, fmt.Errorf("error casting config values from context")
- }
- }
- cache, err := NewGoCache(ctx, config)
+ cache, err := NewHttpCache(ctx, nil)
if err != nil {
l.Error("error creating http cache", zap.Error(err))
return nil, err
}
- caches = append(caches, cache)
-
- return &BaseHttpClient{
+ cli := &BaseHttpClient{
HttpClient: httpClient,
baseHttpCache: cache,
- }, nil
+ }
+
+ caches = append(caches, cache)
+
+ for _, opt := range opts {
+ opt.Apply(cli)
+ }
+
+ return cli, nil
}
// WithJSONResponse is a wrapper that marshals the returned response body into
@@ -145,20 +134,33 @@ func NewBaseHttpClientWithContext(ctx context.Context, httpClient *http.Client)
// status code 204 No Content), then pass a `nil` to `response`.
func WithJSONResponse(response interface{}) DoOption {
return func(resp *WrapperResponse) error {
- if !IsJSONContentType(resp.Header.Get(ContentType)) {
- return fmt.Errorf("unexpected content type for json response: %s", resp.Header.Get(ContentType))
+ contentHeader := resp.Header.Get(ContentType)
+
+ if !IsJSONContentType(contentHeader) {
+ if len(resp.Body) != 0 {
+ // we want to see the body regardless
+ return fmt.Errorf("unexpected content type for JSON response: %s. status code: %d. body: «%s»", contentHeader, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ }
+ return fmt.Errorf("unexpected content type for JSON response: %s. status code: %d", contentHeader, resp.StatusCode)
}
if response == nil && len(resp.Body) == 0 {
return nil
}
err := json.Unmarshal(resp.Body, response)
if err != nil {
- return fmt.Errorf("failed to unmarshal json response: %w. body %v", err, resp.Body)
+ return fmt.Errorf("failed to unmarshal json response: %w. status code: %d. body %v", err, resp.StatusCode, logBody(resp.Body, maxBodySize))
}
return nil
}
}
+func logBody(body []byte, size int) string {
+ if len(body) > size {
+ return string(body[:size]) + " ..."
+ }
+ return string(body)
+}
+
type ErrorResponse interface {
Message() string
}
@@ -169,13 +171,15 @@ func WithErrorResponse(resource ErrorResponse) DoOption {
return nil
}
- if !IsJSONContentType(resp.Header.Get(ContentType)) {
- return fmt.Errorf("%v", string(resp.Body))
+ contentHeader := resp.Header.Get(ContentType)
+
+ if !IsJSONContentType(contentHeader) {
+ return fmt.Errorf("unexpected content type for JSON error response: %s. status code: %d. body: «%s»", contentHeader, resp.StatusCode, logBody(resp.Body, maxBodySize))
}
// Decode the JSON response body into the ErrorResponse
if err := json.Unmarshal(resp.Body, &resource); err != nil {
- return status.Error(codes.Unknown, "Request failed with unknown error")
+ return fmt.Errorf("failed to unmarshal JSON error response: %w. status code: %d. body %v", err, resp.StatusCode, logBody(resp.Body, maxBodySize))
}
// Construct a more detailed error message
@@ -249,25 +253,25 @@ func WrapErrorsWithRateLimitInfo(preferredCode codes.Code, resp *http.Response,
func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Response, error) {
var (
- cacheKey string
- err error
- resp *http.Response
+ err error
+ resp *http.Response
)
l := ctxzap.Extract(req.Context())
- if req.Method == http.MethodGet {
- cacheKey, err = CreateCacheKey(req)
- if err != nil {
- return nil, err
- }
- resp, err = c.baseHttpCache.Get(cacheKey)
+ // If a rate limiter is defined, take a token before making the request.
+ if c.rateLimiter != nil {
+ c.rateLimiter.Take()
+ }
+
+ if req.Method == http.MethodGet {
+ resp, err = c.baseHttpCache.Get(req)
if err != nil {
return nil, err
}
if resp == nil {
- l.Debug("http cache miss", zap.String("cacheKey", cacheKey), zap.String("url", req.URL.String()))
+ l.Debug("http cache miss", zap.String("url", req.URL.String()))
} else {
- l.Debug("http cache hit", zap.String("cacheKey", cacheKey), zap.String("url", req.URL.String()))
+ l.Debug("http cache hit", zap.String("url", req.URL.String()))
}
}
@@ -290,7 +294,10 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
- return nil, err
+ if len(body) > 0 {
+ resp.Body = io.NopCloser(bytes.NewBuffer(body))
+ }
+ return resp, err
}
// Replace resp.Body with a no-op closer so nobody has to worry about closing the reader.
@@ -335,9 +342,9 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo
}
if req.Method == http.MethodGet && resp.StatusCode == http.StatusOK {
- cacheErr := c.baseHttpCache.Set(cacheKey, resp)
+ cacheErr := c.baseHttpCache.Set(req, resp)
if cacheErr != nil {
- l.Warn("error setting cache", zap.String("cacheKey", cacheKey), zap.String("url", req.URL.String()), zap.Error(cacheErr))
+ l.Warn("error setting cache", zap.String("url", req.URL.String()), zap.Error(cacheErr))
}
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 6b1db081..fc4f02b9 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -144,7 +144,7 @@ github.com/aws/smithy-go/waiter
# github.com/benbjohnson/clock v1.3.5
## explicit; go 1.15
github.com/benbjohnson/clock
-# github.com/conductorone/baton-sdk v0.2.35
+# github.com/conductorone/baton-sdk v0.2.47
## explicit; go 1.21
github.com/conductorone/baton-sdk/internal/connector
github.com/conductorone/baton-sdk/pb/c1/c1z/v1
From 3adbb1b3d3fc53c0b60677c5b473568429545287 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 13:01:34 -0800
Subject: [PATCH 06/16] Better variable names. Don't export some of these
constants, because we're going to delete them soon.
---
pkg/connector/account.go | 17 ++++------
pkg/databricks/client.go | 69 ++++++++++++++++++++--------------------
pkg/databricks/config.go | 24 +++++++-------
3 files changed, 53 insertions(+), 57 deletions(-)
diff --git a/pkg/connector/account.go b/pkg/connector/account.go
index b05f9f17..cbe669ca 100644
--- a/pkg/connector/account.go
+++ b/pkg/connector/account.go
@@ -43,12 +43,13 @@ func (a *accountBuilder) ResourceType(ctx context.Context) *v2.ResourceType {
return accountResourceType
}
-func accountResource(ctx context.Context, accID string, accAPIAvailable bool) (*v2.Resource, error) {
+func (a *accountBuilder) accountResource(_ context.Context) (*v2.Resource, error) {
+ accountId := a.client.GetAccountId()
children := []protoreflect.ProtoMessage{
&v2.ChildResourceType{ResourceTypeId: workspaceResourceType.Id},
}
- if accAPIAvailable {
+ if a.client.IsAccountAPIAvailable() {
children = append(children,
&v2.ChildResourceType{ResourceTypeId: userResourceType.Id},
&v2.ChildResourceType{ResourceTypeId: groupResourceType.Id},
@@ -58,9 +59,9 @@ func accountResource(ctx context.Context, accID string, accAPIAvailable bool) (*
}
resource, err := rs.NewResource(
- accID,
+ accountId,
accountResourceType,
- accID,
+ accountId,
rs.WithAnnotation(children...),
)
@@ -72,16 +73,12 @@ func accountResource(ctx context.Context, accID string, accAPIAvailable bool) (*
}
func (a *accountBuilder) List(ctx context.Context, parentResourceID *v2.ResourceId, pToken *pagination.Token) ([]*v2.Resource, string, annotations.Annotations, error) {
- var rv []*v2.Resource
-
- ur, err := accountResource(ctx, a.client.GetAccountId(), a.client.IsAccountAPIAvailable())
+ ur, err := a.accountResource(ctx)
if err != nil {
return nil, "", nil, err
}
- rv = append(rv, ur)
-
- return rv, "", nil, nil
+ return []*v2.Resource{ur}, "", nil, nil
}
// Entitlements returns slice of entitlements for marketplace admins under account.
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index 42a894e9..6a7536bc 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -12,28 +12,27 @@ import (
)
const (
- Base = "cloud.databricks.com"
- APIEndpoint = "/api/2.0"
- JSONContentType = "application/json"
+ base = "cloud.databricks.com"
+ apiEndpoint = "/api/2.0"
// Helper endpoints.
- PreviewEndpoint = "/preview"
- AccessControlEndpoint = "/access-control"
- SCIMEndpoint = "/scim/v2"
- AccountsEndpoint = "/accounts"
+ previewEndpoint = "/preview"
+ accessControlEndpoint = "/access-control"
+ scimEndpoint = "/scim/v2"
+ accountsEndpoint = "/accounts"
// Base hosts.
- AccountBaseHost = "accounts." + Base + APIEndpoint
- WorkspaceBaseHost = "%s." + Base + APIEndpoint + PreviewEndpoint
+ accountBaseHost = "accounts." + base + apiEndpoint
+ workspaceBaseHost = "%s." + base + apiEndpoint + previewEndpoint
// Resource endpoints.
- UsersEndpoint = "/Users"
- GroupsEndpoint = "/Groups"
- ServicePrincipalsEndpoint = "/ServicePrincipals"
- RolesEndpoint = "/assignable-roles"
- RuleSetsEndpoint = "/rule-sets"
- WorkspacesEndpoint = "/workspaces"
- WorkspaceAssignmentsEndpoint = "/permissionassignments"
+ usersEndpoint = "/Users"
+ groupsEndpoint = "/Groups"
+ servicePrincipalsEndpoint = "/ServicePrincipals"
+ rolesEndpoint = "/assignable-roles"
+ ruleSetsEndpoint = "/rule-sets"
+ workspacesEndpoint = "/workspaces"
+ workspaceAssignmentsEndpoint = "/permissionassignments"
)
type Client struct {
@@ -135,7 +134,7 @@ func (c *Client) ListUsers(
error,
) {
var res ListResponse[User]
- u, err := c.cfg.ResolvePath(c.baseUrl, UsersEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, usersEndpoint)
if err != nil {
return nil, 0, nil, fmt.Errorf("failed to prepare url to fetch users: %w", err)
}
@@ -157,7 +156,7 @@ func (c *Client) GetUser(
error,
) {
var res *User
- u, err := c.cfg.ResolvePath(c.baseUrl, UsersEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, usersEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch users: %w", err)
}
@@ -173,7 +172,7 @@ func (c *Client) GetUser(
}
func (c *Client) UpdateUser(ctx context.Context, user *User) (*v2.RateLimitDescription, error) {
- u, err := c.cfg.ResolvePath(c.baseUrl, UsersEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, usersEndpoint)
if err != nil {
return nil, fmt.Errorf("failed to prepare url to fetch users: %w", err)
}
@@ -243,7 +242,7 @@ func (c *Client) ListGroups(
error,
) {
var res ListResponse[Group]
- u, err := c.cfg.ResolvePath(c.baseUrl, GroupsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, groupsEndpoint)
if err != nil {
return nil, 0, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
}
@@ -265,7 +264,7 @@ func (c *Client) GetGroup(
error,
) {
var res *Group
- u, err := c.cfg.ResolvePath(c.baseUrl, GroupsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, groupsEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
}
@@ -281,7 +280,7 @@ func (c *Client) GetGroup(
}
func (c *Client) UpdateGroup(ctx context.Context, group *Group) (*v2.RateLimitDescription, error) {
- u, err := c.cfg.ResolvePath(c.baseUrl, GroupsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, groupsEndpoint)
if err != nil {
return nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
}
@@ -351,7 +350,7 @@ func (c *Client) ListServicePrincipals(
error,
) {
var res ListResponse[ServicePrincipal]
- u, err := c.cfg.ResolvePath(c.baseUrl, ServicePrincipalsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, servicePrincipalsEndpoint)
if err != nil {
return nil, 0, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
}
@@ -373,7 +372,7 @@ func (c *Client) GetServicePrincipal(
error,
) {
var res *ServicePrincipal
- u, err := c.cfg.ResolvePath(c.baseUrl, ServicePrincipalsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, servicePrincipalsEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
}
@@ -395,7 +394,7 @@ func (c *Client) UpdateServicePrincipal(
*v2.RateLimitDescription,
error,
) {
- u, err := c.cfg.ResolvePath(c.baseUrl, ServicePrincipalsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, servicePrincipalsEndpoint)
if err != nil {
return nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
}
@@ -468,7 +467,7 @@ func (c *Client) ListRoles(
Roles []Role `json:"roles"`
}
- u, err := c.cfg.ResolvePath(c.baseUrl, RolesEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, rolesEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch roles: %w", err)
}
@@ -495,7 +494,7 @@ func (c *Client) ListWorkspaces(
) {
var res []Workspace
- u, err := c.cfg.ResolvePath(c.baseUrl, WorkspacesEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, workspacesEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch workspaces: %w", err)
}
@@ -511,7 +510,7 @@ func (c *Client) ListWorkspaces(
func (c *Client) prepareURLForWorkspaceMembers(params ...string) (*url.URL, error) {
u := *c.baseUrl
- baseEndpoint := fmt.Sprintf("%s/%s", AccountsEndpoint, c.accountId)
+ baseEndpoint := fmt.Sprintf("%s/%s", accountsEndpoint, c.accountId)
path, err := url.JoinPath(baseEndpoint, params...)
if err != nil {
return nil, err
@@ -534,7 +533,7 @@ func (c *Client) ListWorkspaceMembers(
}
id := strconv.Itoa(workspaceID)
- u, err := c.prepareURLForWorkspaceMembers(WorkspacesEndpoint, id, WorkspaceAssignmentsEndpoint)
+ u, err := c.prepareURLForWorkspaceMembers(workspacesEndpoint, id, workspaceAssignmentsEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch workspace members: %w", err)
}
@@ -557,9 +556,9 @@ func (c *Client) CreateOrUpdateWorkspaceMember(
) {
wID := strconv.Itoa(int(workspaceID))
u, err := c.prepareURLForWorkspaceMembers(
- WorkspacesEndpoint,
+ workspacesEndpoint,
wID,
- WorkspaceAssignmentsEndpoint,
+ workspaceAssignmentsEndpoint,
"principals",
principalID,
)
@@ -584,9 +583,9 @@ func (c *Client) RemoveWorkspaceMember(
wID := strconv.Itoa(int(workspaceID))
u, err := c.prepareURLForWorkspaceMembers(
- WorkspacesEndpoint,
+ workspacesEndpoint,
wID,
- WorkspaceAssignmentsEndpoint,
+ workspaceAssignmentsEndpoint,
"principals",
principalID,
)
@@ -611,7 +610,7 @@ func (c *Client) ListRuleSets(
Etag string `json:"etag"`
}
- u, err := c.cfg.ResolvePath(c.baseUrl, RuleSetsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, ruleSetsEndpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to prepare url to fetch rule sets: %w", err)
}
@@ -639,7 +638,7 @@ func (c *Client) UpdateRuleSets(
*v2.RateLimitDescription,
error,
) {
- u, err := c.cfg.ResolvePath(c.baseUrl, RuleSetsEndpoint)
+ u, err := c.cfg.ResolvePath(c.baseUrl, ruleSetsEndpoint)
if err != nil {
return nil, fmt.Errorf("failed to prepare url to fetch rule sets: %w", err)
}
diff --git a/pkg/databricks/config.go b/pkg/databricks/config.go
index 0a63565f..7d01e927 100644
--- a/pkg/databricks/config.go
+++ b/pkg/databricks/config.go
@@ -18,7 +18,7 @@ type AccountConfig struct {
func NewAccountConfig(accountHostname, accountId string) *AccountConfig {
if accountHostname == "" {
- accountHostname = AccountBaseHost
+ accountHostname = accountBaseHost
}
return &AccountConfig{
accountId,
@@ -36,16 +36,16 @@ func (c *AccountConfig) BaseUrl() *url.URL {
func (c AccountConfig) ResolvePath(base *url.URL, endpoint string) (*url.URL, error) {
u := *base
- baseEndpoint := fmt.Sprintf("%s/%s", AccountsEndpoint, c.accountId)
+ baseEndpoint := fmt.Sprintf("%s/%s", accountsEndpoint, c.accountId)
var pathParts []string
switch endpoint {
- case UsersEndpoint, GroupsEndpoint, ServicePrincipalsEndpoint:
- pathParts = []string{baseEndpoint, SCIMEndpoint, endpoint}
- case RolesEndpoint, RuleSetsEndpoint:
- pathParts = []string{PreviewEndpoint, baseEndpoint, AccessControlEndpoint, endpoint}
- case WorkspacesEndpoint:
+ case usersEndpoint, groupsEndpoint, servicePrincipalsEndpoint:
+ pathParts = []string{baseEndpoint, scimEndpoint, endpoint}
+ case rolesEndpoint, ruleSetsEndpoint:
+ pathParts = []string{previewEndpoint, baseEndpoint, accessControlEndpoint, endpoint}
+ case workspacesEndpoint:
pathParts = []string{baseEndpoint, endpoint}
default:
return nil, fmt.Errorf("unknown endpoint %s", endpoint)
@@ -69,7 +69,7 @@ type WorkspaceConfig struct {
func NewWorkspaceConfig(hostname, accountId, workspace string) *WorkspaceConfig {
if hostname == "" {
- hostname = WorkspaceBaseHost
+ hostname = workspaceBaseHost
}
return &WorkspaceConfig{
workspace,
@@ -94,10 +94,10 @@ func (c WorkspaceConfig) ResolvePath(base *url.URL, endpoint string) (*url.URL,
var pathParts []string
switch endpoint {
- case UsersEndpoint, GroupsEndpoint, ServicePrincipalsEndpoint:
- pathParts = []string{SCIMEndpoint, endpoint}
- case RolesEndpoint, RuleSetsEndpoint:
- pathParts = []string{AccountsEndpoint, AccessControlEndpoint, endpoint}
+ case usersEndpoint, groupsEndpoint, servicePrincipalsEndpoint:
+ pathParts = []string{scimEndpoint, endpoint}
+ case rolesEndpoint, ruleSetsEndpoint:
+ pathParts = []string{accountsEndpoint, accessControlEndpoint, endpoint}
default:
return nil, fmt.Errorf("unknown endpoint %s", endpoint)
}
From 7e7bc50d7ac5bdddffde364c9e5c2d0a5ea90869 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 13:05:41 -0800
Subject: [PATCH 07/16] Mention that some of these paths are case sensitive.
---
pkg/databricks/client.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index 6a7536bc..b3c5b82b 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -25,7 +25,7 @@ const (
accountBaseHost = "accounts." + base + apiEndpoint
workspaceBaseHost = "%s." + base + apiEndpoint + previewEndpoint
- // Resource endpoints.
+ // Resource endpoints. Some of these are case sensitive.
usersEndpoint = "/Users"
groupsEndpoint = "/Groups"
servicePrincipalsEndpoint = "/ServicePrincipals"
From 2e5f29f8f13ec3ae14585071f3dbd8eaf498e264 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 13:11:16 -0800
Subject: [PATCH 08/16] Upgrade github action versions. Omit CLI flags in CI
test, as env vars will work just fine.
---
.github/workflows/capabilities.yaml | 2 +-
.github/workflows/ci.yaml | 12 ++++++------
.github/workflows/main.yaml | 8 ++++----
.github/workflows/release.yaml | 8 ++++----
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/capabilities.yaml b/.github/workflows/capabilities.yaml
index ba4703a5..a816d73a 100644
--- a/.github/workflows/capabilities.yaml
+++ b/.github/workflows/capabilities.yaml
@@ -16,7 +16,7 @@ jobs:
token: ${{ secrets.RELENG_GITHUB_TOKEN }}
- name: Setup Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 4c2aec2b..019a0105 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -5,11 +5,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Run linters
uses: golangci/golangci-lint-action@v6
with:
@@ -24,11 +24,11 @@ jobs:
steps:
- name: Install Go
if: success()
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: go tests
run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json)
- name: annotate go tests
@@ -54,7 +54,7 @@ jobs:
CONNECTOR_PRINCIPAL: '5346803201281760'
steps:
- name: Install Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Checkout code
@@ -64,4 +64,4 @@ jobs:
- name: Build baton-databricks
run: go build ./cmd/baton-databricks
- name: Run baton-databricks
- run: ./baton-databricks --account-id ${{ env.BATON_ACCOUNT_ID }} --workspaces ${{ env.BATON_WORKSPACES }} --workspace-tokens ${{ env.BATON_WORKSPACE_TOKENS }}
\ No newline at end of file
+ run: ./baton-databricks
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 25006b6a..040f737e 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Run linters
uses: golangci/golangci-lint-action@v6
with:
@@ -27,11 +27,11 @@ jobs:
steps:
- name: Install Go
if: success()
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: go tests
run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json)
- name: annotate go tests
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 0d3e36c0..b12bc22a 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -10,11 +10,11 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Set up Gon
@@ -37,11 +37,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
- uses: actions/setup-go@v4
+ uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Docker Login
From 40ad0cc7d754ace1ee357146de29f3f73031a9c1 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 13:11:26 -0800
Subject: [PATCH 09/16] Remove unused function.
---
pkg/databricks/client.go | 5 -----
1 file changed, 5 deletions(-)
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index b3c5b82b..b9731ca4 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -73,11 +73,6 @@ func (c *Client) GetCurrentConfig() Config {
return c.cfg
}
-func (c *Client) IsAccountConfig() bool {
- _, ok := c.cfg.(*AccountConfig)
- return ok
-}
-
func (c *Client) IsTokenAuth() bool {
_, ok := c.auth.(*TokenAuth)
return ok
From d8b4a7067f1999b6ab0cd182ed0dc623c12c57c8 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 13:15:28 -0800
Subject: [PATCH 10/16] Use uhttp.WithJSONResponse().
---
pkg/databricks/request.go | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/pkg/databricks/request.go b/pkg/databricks/request.go
index 6542e0b8..6a3e2f7d 100644
--- a/pkg/databricks/request.go
+++ b/pkg/databricks/request.go
@@ -55,12 +55,6 @@ func parseJSON(body io.Reader, res interface{}) error {
return nil
}
-func WithJSONResponse(response interface{}) uhttp.DoOption {
- return func(resp *uhttp.WrapperResponse) error {
- return json.Unmarshal(resp.Body, response)
- }
-}
-
func (c *Client) doRequest(
ctx context.Context,
urlAddress *url.URL,
@@ -106,7 +100,7 @@ func (c *Client) doRequest(
ratelimitData := &v2.RateLimitDescription{}
resp, err := c.httpClient.Do(
req,
- WithJSONResponse(&response),
+ uhttp.WithJSONResponse(&response),
uhttp.WithRatelimitData(ratelimitData),
)
if resp == nil {
From 078713dbc4f3717fbe8ea0bec1134f846aa22a0e Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 16:42:40 -0800
Subject: [PATCH 11/16] Upgrade baton-sdk to v0.2.48.
---
go.mod | 2 +-
go.sum | 4 +-
.../conductorone/baton-sdk/pkg/sdk/version.go | 2 +-
.../baton-sdk/pkg/uhttp/wrapper.go | 38 ++++++++++++++++++-
vendor/modules.txt | 2 +-
5 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/go.mod b/go.mod
index 0a47f1b2..fdf75b4f 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/conductorone/baton-databricks
go 1.21
require (
- github.com/conductorone/baton-sdk v0.2.47
+ github.com/conductorone/baton-sdk v0.2.48
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/spf13/viper v1.19.0
go.uber.org/zap v1.27.0
diff --git a/go.sum b/go.sum
index 8aa950bd..347d5720 100644
--- a/go.sum
+++ b/go.sum
@@ -52,8 +52,8 @@ github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/conductorone/baton-sdk v0.2.47 h1:JdpPpUmCO4jW1z0mLE5JW53RHG3eldoOygln3rE0Gfg=
-github.com/conductorone/baton-sdk v0.2.47/go.mod h1:CYyNk1kPIEgZmc3Z16TmpS1l3KbkNSjyJk16KuQw+JM=
+github.com/conductorone/baton-sdk v0.2.48 h1:P8Xql5ViTmZcGYgOOfCUx97d8Mkh8gaNIQ3W/VlNXSI=
+github.com/conductorone/baton-sdk v0.2.48/go.mod h1:CYyNk1kPIEgZmc3Z16TmpS1l3KbkNSjyJk16KuQw+JM=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
index 479ffa09..6e022c14 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
@@ -1,3 +1,3 @@
package sdk
-const Version = "v0.2.46"
+const Version = "v0.2.47"
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
index 02e494bf..bb2628d4 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
@@ -10,6 +10,7 @@ import (
"io"
"net/http"
"net/url"
+ "syscall"
"time"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
@@ -154,6 +155,20 @@ func WithJSONResponse(response interface{}) DoOption {
}
}
+// Ignore content type header and always try to parse the response as JSON.
+func WithAlwaysJSONResponse(response interface{}) DoOption {
+ return func(resp *WrapperResponse) error {
+ if response == nil && len(resp.Body) == 0 {
+ return nil
+ }
+ err := json.Unmarshal(resp.Body, response)
+ if err != nil {
+ return fmt.Errorf("failed to unmarshal json response: %w. status code: %d. body %v", err, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ }
+ return nil
+ }
+}
+
func logBody(body []byte, size int) string {
if len(body) > size {
return string(body[:size]) + " ..."
@@ -234,6 +249,17 @@ func WithResponse(response interface{}) DoOption {
}
}
+func WrapErrors(preferredCode codes.Code, statusMsg string, errs ...error) error {
+ st := status.New(preferredCode, statusMsg)
+
+ if len(errs) == 0 {
+ return st.Err()
+ }
+
+ allErrs := append([]error{st.Err()}, errs...)
+ return errors.Join(allErrs...)
+}
+
func WrapErrorsWithRateLimitInfo(preferredCode codes.Code, resp *http.Response, errs ...error) error {
st := status.New(preferredCode, resp.Status)
@@ -281,7 +307,10 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo
var urlErr *url.Error
if errors.As(err, &urlErr) {
if urlErr.Timeout() {
- return nil, status.Error(codes.DeadlineExceeded, fmt.Sprintf("request timeout: %v", urlErr.URL))
+ return nil, WrapErrors(codes.DeadlineExceeded, fmt.Sprintf("request timeout: %v", urlErr.URL), urlErr)
+ }
+ if urlErr.Temporary() {
+ return nil, WrapErrors(codes.Unavailable, fmt.Sprintf("temporary error: %v", urlErr.URL), urlErr)
}
}
if errors.Is(err, context.DeadlineExceeded) {
@@ -297,6 +326,13 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo
if len(body) > 0 {
resp.Body = io.NopCloser(bytes.NewBuffer(body))
}
+ // Turn certain body read errors into grpc statuses so we retry
+ if errors.Is(err, io.ErrUnexpectedEOF) {
+ return resp, WrapErrors(codes.Unavailable, "unexpected EOF", err)
+ }
+ if errors.Is(err, syscall.ECONNRESET) {
+ return resp, WrapErrors(codes.Unavailable, "connection reset", err)
+ }
return resp, err
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index fc4f02b9..7d05efeb 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -144,7 +144,7 @@ github.com/aws/smithy-go/waiter
# github.com/benbjohnson/clock v1.3.5
## explicit; go 1.15
github.com/benbjohnson/clock
-# github.com/conductorone/baton-sdk v0.2.47
+# github.com/conductorone/baton-sdk v0.2.48
## explicit; go 1.21
github.com/conductorone/baton-sdk/internal/connector
github.com/conductorone/baton-sdk/pb/c1/c1z/v1
From 9b03486d6a3ef979030ceaa2e60124811469d367 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Tue, 3 Dec 2024 16:45:35 -0800
Subject: [PATCH 12/16] Make client code make sense.
---
pkg/connector/account.go | 12 +-
pkg/connector/connector.go | 19 +-
pkg/connector/groups.go | 49 ++--
pkg/connector/roles.go | 42 ++--
pkg/connector/service-principals.go | 38 ++--
pkg/connector/users.go | 6 +-
pkg/connector/workspaces.go | 16 +-
pkg/databricks/client.go | 340 ++++++++++++----------------
pkg/databricks/config.go | 113 ---------
pkg/databricks/request.go | 10 +-
10 files changed, 234 insertions(+), 411 deletions(-)
delete mode 100644 pkg/databricks/config.go
diff --git a/pkg/connector/account.go b/pkg/connector/account.go
index cbe669ca..54c3760d 100644
--- a/pkg/connector/account.go
+++ b/pkg/connector/account.go
@@ -113,12 +113,10 @@ func (a *accountBuilder) Grants(ctx context.Context, resource *v2.Resource, pTok
return nil, "", nil, nil
}
- a.client.SetAccountConfig()
-
var rv []*v2.Grant
// list rule sets for the account
- ruleSets, _, err := a.client.ListRuleSets(ctx, "", "")
+ ruleSets, _, err := a.client.ListRuleSets(ctx, "", "", "")
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to list rule sets for account %s: %w", resource.Id.Resource, err)
}
@@ -164,7 +162,7 @@ func (a *accountBuilder) Grant(ctx context.Context, principal *v2.Resource, enti
}
accID := entitlement.Resource.Id.Resource
- ruleSets, _, err := a.client.ListRuleSets(ctx, "", "")
+ ruleSets, _, err := a.client.ListRuleSets(ctx, "", "", "")
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for account %s: %w", accID, err)
}
@@ -205,7 +203,7 @@ func (a *accountBuilder) Grant(ctx context.Context, principal *v2.Resource, enti
})
}
- _, err = a.client.UpdateRuleSets(ctx, "", "", ruleSets)
+ _, err = a.client.UpdateRuleSets(ctx, "", "", "", ruleSets)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update rule sets for account %s: %w", accID, err)
}
@@ -230,7 +228,7 @@ func (a *accountBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotatio
}
accID := entitlement.Resource.Id.Resource
- ruleSets, _, err := a.client.ListRuleSets(ctx, "", "")
+ ruleSets, _, err := a.client.ListRuleSets(ctx, "", "", "")
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for account %s: %w", accID, err)
}
@@ -275,7 +273,7 @@ func (a *accountBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotatio
}
}
- _, err = a.client.UpdateRuleSets(ctx, "", "", ruleSets)
+ _, err = a.client.UpdateRuleSets(ctx, "", "", "", ruleSets)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update rule sets for account %s: %w", accID, err)
}
diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go
index 09a6f245..2716fd8c 100644
--- a/pkg/connector/connector.go
+++ b/pkg/connector/connector.go
@@ -46,13 +46,12 @@ func (d *Databricks) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error
// to be sure that they are valid. Since this connector works with two APIs and can have different types of credentials
// it is important to validate that the connector is properly configured before attempting to sync.
func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, error) {
- cfg := d.client.GetCurrentConfig()
isAccAPIAvailable := false
isWSAPIAvailable := false
// Check if we can list users from Account API (unless we are using token auth specific to a single workspace).
if !d.client.IsTokenAuth() {
- _, _, err := d.client.ListRoles(ctx, "", "")
+ _, _, err := d.client.ListRoles(ctx, "", "", "")
if err == nil {
isAccAPIAvailable = true
}
@@ -61,9 +60,7 @@ func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, err
// Validate that credentials are valid for each targeted workspace.
if len(d.workspaces) > 0 {
for _, workspace := range d.workspaces {
- d.client.SetWorkspaceConfig(workspace)
-
- _, _, err := d.client.ListRoles(ctx, "", "")
+ _, _, err := d.client.ListRoles(ctx, workspace, "", "")
if err != nil && !isAccAPIAvailable {
return nil, fmt.Errorf("databricks-connector: failed to validate credentials for workspace %s: %w", workspace, err)
}
@@ -80,9 +77,7 @@ func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, err
}
for _, workspace := range workspaces {
- d.client.SetWorkspaceConfig(workspace.DeploymentName)
-
- _, _, err := d.client.ListRoles(ctx, "", "")
+ _, _, err := d.client.ListRoles(ctx, workspace.DeploymentName, "", "")
if err != nil && !isAccAPIAvailable {
return nil, fmt.Errorf("databricks-connector: failed to validate credentials for workspace %s: %w", workspace.DeploymentName, err)
}
@@ -96,8 +91,6 @@ func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, err
return nil, fmt.Errorf("databricks-connector: failed to validate credentials")
}
- // Restore the original config.
- d.client.UpdateConfig(cfg)
d.client.UpdateAvailability(isAccAPIAvailable, isWSAPIAvailable)
return nil, nil
@@ -122,12 +115,6 @@ func New(
return nil, err
}
- if client.IsTokenAuth() {
- client.SetWorkspaceConfig(workspaces[0])
- } else {
- client.SetAccountConfig()
- }
-
return &Databricks{
client,
workspaces,
diff --git a/pkg/connector/groups.go b/pkg/connector/groups.go
index c5f37039..bb2eb630 100644
--- a/pkg/connector/groups.go
+++ b/pkg/connector/groups.go
@@ -82,10 +82,9 @@ func (g *groupBuilder) List(ctx context.Context, parentResourceID *v2.ResourceId
return nil, "", nil, nil
}
+ workspaceId := ""
if parentResourceID.ResourceType == workspaceResourceType.Id {
- g.client.SetWorkspaceConfig(parentResourceID.Resource)
- } else {
- g.client.SetAccountConfig()
+ workspaceId = parentResourceID.Resource
}
bag, page, err := parsePageToken(pg.Token, &v2.ResourceId{ResourceType: groupResourceType.Id})
@@ -95,6 +94,7 @@ func (g *groupBuilder) List(ctx context.Context, parentResourceID *v2.ResourceId
groups, total, _, err := g.client.ListGroups(
ctx,
+ workspaceId,
databricks.NewPaginationVars(page, ResourcesPageSize),
databricks.NewGroupAttrVars(),
)
@@ -130,10 +130,9 @@ func (g *groupBuilder) List(ctx context.Context, parentResourceID *v2.ResourceId
func (g *groupBuilder) Entitlements(_ context.Context, resource *v2.Resource, _ *pagination.Token) ([]*v2.Entitlement, string, annotations.Annotations, error) {
var rv []*v2.Entitlement
+ var workspaceId string
if resource.GetParentResourceId().GetResourceType() == workspaceResourceType.Id {
- g.client.SetWorkspaceConfig(resource.ParentResourceId.Resource)
- } else {
- g.client.SetAccountConfig()
+ workspaceId = resource.ParentResourceId.Resource
}
// membership entitlement - for group members
@@ -152,7 +151,7 @@ func (g *groupBuilder) Entitlements(_ context.Context, resource *v2.Resource, _
// role permissions entitlements
// get all assignable roles for this specific group resource
- roles, _, err := g.client.ListRoles(context.Background(), GroupsType, groupId.Resource)
+ roles, _, err := g.client.ListRoles(context.Background(), workspaceId, GroupsType, groupId.Resource)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to list roles for group %s: %w", groupId.Resource, err)
}
@@ -185,12 +184,10 @@ func (g *groupBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
return nil, "", nil, err
}
+ var workspaceId string
isWorkspaceGroup := parentId.ResourceType == workspaceResourceType.Id
-
if isWorkspaceGroup {
- g.client.SetWorkspaceConfig(parentId.Resource)
- } else {
- g.client.SetAccountConfig()
+ workspaceId = parentId.Resource
}
// membership grants
@@ -229,7 +226,7 @@ func (g *groupBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
}
// role permissions grants
- ruleSets, _, err := g.client.ListRuleSets(ctx, GroupsType, groupId.Resource)
+ ruleSets, _, err := g.client.ListRuleSets(ctx, workspaceId, GroupsType, groupId.Resource)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to list role rule sets for group %s: %w", resource.Id.Resource, err)
}
@@ -275,10 +272,9 @@ func (g *groupBuilder) Grant(ctx context.Context, principal *v2.Resource, entitl
return nil, fmt.Errorf("databricks-connector: failed to parse principal resource id: %w", err)
}
+ var workspaceId string
if parentId.ResourceType == workspaceResourceType.Id {
- g.client.SetWorkspaceConfig(parentId.Resource)
- } else {
- g.client.SetAccountConfig()
+ workspaceId = parentId.Resource
}
parentGroupId, groupId, err := parseResourceId(entitlement.Resource.Id.Resource)
@@ -286,12 +282,12 @@ func (g *groupBuilder) Grant(ctx context.Context, principal *v2.Resource, entitl
return nil, fmt.Errorf("databricks-connector: failed to parse group resource id: %w", err)
}
if parentGroupId != nil && parentGroupId.ResourceType == workspaceResourceType.Id {
- g.client.SetWorkspaceConfig(parentGroupId.Resource)
+ workspaceId = parentGroupId.Resource
}
// If the entitlement is a member entitlement
if entitlement.Slug == groupMemberEntitlement {
- group, _, err := g.client.GetGroup(ctx, groupId.Resource)
+ group, _, err := g.client.GetGroup(ctx, workspaceId, groupId.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get group %s: %w", groupId.Resource, err)
}
@@ -313,7 +309,7 @@ func (g *groupBuilder) Grant(ctx context.Context, principal *v2.Resource, entitl
ID: principal.Id.Resource,
})
- _, err = g.client.UpdateGroup(ctx, group)
+ _, err = g.client.UpdateGroup(ctx, workspaceId, group)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update group %s: %w", groupId.Resource, err)
}
@@ -322,7 +318,7 @@ func (g *groupBuilder) Grant(ctx context.Context, principal *v2.Resource, entitl
}
// If the entitlement is a role permission entitlement
- ruleSets, _, err := g.client.ListRuleSets(ctx, GroupsType, groupId.Resource)
+ ruleSets, _, err := g.client.ListRuleSets(ctx, workspaceId, GroupsType, groupId.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for group %s (%s): %w", principal.Id.Resource, groupId.Resource, err)
}
@@ -361,7 +357,7 @@ func (g *groupBuilder) Grant(ctx context.Context, principal *v2.Resource, entitl
})
}
- _, err = g.client.UpdateRuleSets(ctx, GroupsType, groupId.Resource, ruleSets)
+ _, err = g.client.UpdateRuleSets(ctx, workspaceId, GroupsType, groupId.Resource, ruleSets)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update rule sets for group %s (%s): %w", principal.Id.Resource, groupId.Resource, err)
}
@@ -396,14 +392,13 @@ func (g *groupBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotations
parentID := parentResourceId.GetResource()
parentType := parentResourceId.GetResourceType()
+ var workspaceId string
if parentType == workspaceResourceType.Id {
- g.client.SetWorkspaceConfig(parentID)
- } else {
- g.client.SetAccountConfig()
+ workspaceId = parentID
}
if entitlement.Slug == groupMemberEntitlement {
- group, _, err := g.client.GetGroup(ctx, groupId.Resource)
+ group, _, err := g.client.GetGroup(ctx, workspaceId, groupId.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get group %s: %w", groupId.Resource, err)
}
@@ -415,12 +410,12 @@ func (g *groupBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotations
}
}
- _, err = g.client.UpdateGroup(ctx, group)
+ _, err = g.client.UpdateGroup(ctx, workspaceId, group)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update group %s: %w", groupId.Resource, err)
}
} else {
- ruleSets, _, err := g.client.ListRuleSets(ctx, GroupsType, groupId.Resource)
+ ruleSets, _, err := g.client.ListRuleSets(ctx, workspaceId, GroupsType, groupId.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for group %s (%s): %w", principal.Id.Resource, groupId.Resource, err)
}
@@ -466,7 +461,7 @@ func (g *groupBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotations
return nil, nil
}
- _, err = g.client.UpdateRuleSets(ctx, GroupsType, groupId.Resource, ruleSets)
+ _, err = g.client.UpdateRuleSets(ctx, workspaceId, GroupsType, groupId.Resource, ruleSets)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update rule sets for group %s (%s): %w", principal.Id.Resource, groupId.Resource, err)
}
diff --git a/pkg/connector/roles.go b/pkg/connector/roles.go
index 6ade9a24..8ecea3e7 100644
--- a/pkg/connector/roles.go
+++ b/pkg/connector/roles.go
@@ -148,11 +148,10 @@ func (r *roleBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
isWorkspaceRole := parentType == workspaceResourceType.Id
+ var workspaceId string
// If the role is a workspace role, we need to update the client config to use the workspace API.
if isWorkspaceRole {
- r.client.SetWorkspaceConfig(parentID)
- } else {
- r.client.SetAccountConfig()
+ workspaceId = parentID
}
roleName, ok := rs.GetProfileStringValue(roleTrait.Profile, "role_name")
@@ -181,6 +180,7 @@ func (r *roleBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
case userResourceType.Id:
users, total, _, err := r.client.ListUsers(
ctx,
+ workspaceId,
databricks.NewPaginationVars(page, ResourcesPageSize),
databricks.NewUserRolesAttrVars(),
)
@@ -216,6 +216,7 @@ func (r *roleBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
case groupResourceType.Id:
groups, total, _, err := r.client.ListGroups(
ctx,
+ workspaceId,
databricks.NewPaginationVars(page, ResourcesPageSize),
databricks.NewGroupRolesAttrVars(),
)
@@ -248,6 +249,7 @@ func (r *roleBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
case servicePrincipalResourceType.Id:
servicePrincipals, total, _, err := r.client.ListServicePrincipals(
ctx,
+ workspaceId,
databricks.NewPaginationVars(page, ResourcesPageSize),
databricks.NewServicePrincipalRolesAttrVars(),
)
@@ -317,49 +319,48 @@ func (r *roleBuilder) Grant(ctx context.Context, principal *v2.Resource, entitle
isWorkspaceRole := parentType == workspaceResourceType.Id
permissionName := entitlement.Resource.Id.Resource
+ var workspaceId string
if isWorkspaceRole {
- r.client.SetWorkspaceConfig(parentID)
+ workspaceId = parentID
permissionName = prepareWorkspaceRole(permissionName)
- } else {
- r.client.SetAccountConfig()
}
switch principal.Id.ResourceType {
case userResourceType.Id:
- u, _, err := r.client.GetUser(ctx, principal.Id.Resource)
+ u, _, err := r.client.GetUser(ctx, workspaceId, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get user: %w", err)
}
addPermissions(isWorkspaceRole, &u.Permissions, permissionName)
- _, err = r.client.UpdateUser(ctx, u)
+ _, err = r.client.UpdateUser(ctx, workspaceId, u)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to add role: %w", err)
}
case groupResourceType.Id:
- g, _, err := r.client.GetGroup(ctx, principal.Id.Resource)
+ g, _, err := r.client.GetGroup(ctx, workspaceId, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get group: %w", err)
}
addPermissions(isWorkspaceRole, &g.Permissions, permissionName)
- _, err = r.client.UpdateGroup(ctx, g)
+ _, err = r.client.UpdateGroup(ctx, workspaceId, g)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to add role: %w", err)
}
case servicePrincipalResourceType.Id:
- sp, _, err := r.client.GetServicePrincipal(ctx, principal.Id.Resource)
+ sp, _, err := r.client.GetServicePrincipal(ctx, workspaceId, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get service principal: %w", err)
}
addPermissions(isWorkspaceRole, &sp.Permissions, permissionName)
- _, err = r.client.UpdateServicePrincipal(ctx, sp)
+ _, err = r.client.UpdateServicePrincipal(ctx, workspaceId, sp)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to add role: %w", err)
}
@@ -399,49 +400,48 @@ func (r *roleBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotations.
isWorkspaceRole := parentType == workspaceResourceType.Id
permissionName := entitlement.Resource.Id.Resource
+ var workspaceId string
if isWorkspaceRole {
- r.client.SetWorkspaceConfig(parentID)
+ workspaceId = parentID
permissionName = prepareWorkspaceRole(permissionName)
- } else {
- r.client.SetAccountConfig()
}
switch principal.Id.ResourceType {
case userResourceType.Id:
- u, _, err := r.client.GetUser(ctx, principal.Id.Resource)
+ u, _, err := r.client.GetUser(ctx, workspaceId, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get user: %w", err)
}
removePermissions(isWorkspaceRole, &u.Permissions, permissionName)
- _, err = r.client.UpdateUser(ctx, u)
+ _, err = r.client.UpdateUser(ctx, workspaceId, u)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to remove role: %w", err)
}
case groupResourceType.Id:
- g, _, err := r.client.GetGroup(ctx, principal.Id.Resource)
+ g, _, err := r.client.GetGroup(ctx, workspaceId, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get group: %w", err)
}
removePermissions(isWorkspaceRole, &g.Permissions, permissionName)
- _, err = r.client.UpdateGroup(ctx, g)
+ _, err = r.client.UpdateGroup(ctx, workspaceId, g)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to remove role: %w", err)
}
case servicePrincipalResourceType.Id:
- sp, _, err := r.client.GetServicePrincipal(ctx, principal.Id.Resource)
+ sp, _, err := r.client.GetServicePrincipal(ctx, workspaceId, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to get service principal: %w", err)
}
removePermissions(isWorkspaceRole, &sp.Permissions, permissionName)
- _, err = r.client.UpdateServicePrincipal(ctx, sp)
+ _, err = r.client.UpdateServicePrincipal(ctx, workspaceId, sp)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to remove role: %w", err)
}
diff --git a/pkg/connector/service-principals.go b/pkg/connector/service-principals.go
index cae38ae0..751a12c4 100644
--- a/pkg/connector/service-principals.go
+++ b/pkg/connector/service-principals.go
@@ -66,10 +66,9 @@ func (s *servicePrincipalBuilder) List(ctx context.Context, parentResourceID *v2
return nil, "", nil, nil
}
+ var workspaceId string
if parentResourceID.ResourceType == workspaceResourceType.Id {
- s.client.SetWorkspaceConfig(parentResourceID.Resource)
- } else {
- s.client.SetAccountConfig()
+ workspaceId = parentResourceID.Resource
}
bag, page, err := parsePageToken(pToken.Token, &v2.ResourceId{ResourceType: servicePrincipalResourceType.Id})
@@ -79,6 +78,7 @@ func (s *servicePrincipalBuilder) List(ctx context.Context, parentResourceID *v2
servicePrincipals, total, _, err := s.client.ListServicePrincipals(
ctx,
+ workspaceId,
databricks.NewPaginationVars(page, ResourcesPageSize),
databricks.NewServicePrincipalAttrVars(),
)
@@ -121,10 +121,9 @@ func (s *servicePrincipalBuilder) Entitlements(_ context.Context, resource *v2.R
return nil, "", nil, fmt.Errorf("databricks-connector: failed to get parent info from group profile: %w", err)
}
+ var workspaceId string
if parentType == workspaceResourceType.Id {
- s.client.SetWorkspaceConfig(parentID)
- } else {
- s.client.SetAccountConfig()
+ workspaceId = parentID
}
applicationId, ok := rs.GetProfileStringValue(groupTrait.Profile, "application_id")
@@ -134,7 +133,7 @@ func (s *servicePrincipalBuilder) Entitlements(_ context.Context, resource *v2.R
// role permissions entitlements
// get all assignable roles for this specific service principal resource
- roles, _, err := s.client.ListRoles(context.Background(), ServicePrincipalsType, applicationId)
+ roles, _, err := s.client.ListRoles(context.Background(), workspaceId, ServicePrincipalsType, applicationId)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to list roles for service principal %s (%s): %w", resource.Id.Resource, applicationId, err)
}
@@ -165,10 +164,9 @@ func (s *servicePrincipalBuilder) Grants(ctx context.Context, resource *v2.Resou
return nil, "", nil, fmt.Errorf("databricks-connector: failed to get parent info from group profile: %w", err)
}
+ var workspaceId string
if parentType == workspaceResourceType.Id {
- s.client.SetWorkspaceConfig(parentID)
- } else {
- s.client.SetAccountConfig()
+ workspaceId = parentID
}
applicationId, ok := rs.GetProfileStringValue(groupTrait.Profile, "application_id")
@@ -176,7 +174,7 @@ func (s *servicePrincipalBuilder) Grants(ctx context.Context, resource *v2.Resou
return nil, "", nil, fmt.Errorf("databricks-connector: failed to get application_id from service principal profile")
}
- ruleSets, _, err := s.client.ListRuleSets(ctx, ServicePrincipalsType, applicationId)
+ ruleSets, _, err := s.client.ListRuleSets(ctx, workspaceId, ServicePrincipalsType, applicationId)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to list rule sets for service principal %s (%s): %w", resource.Id.Resource, applicationId, err)
}
@@ -229,10 +227,9 @@ func (s *servicePrincipalBuilder) Grant(ctx context.Context, principal *v2.Resou
return nil, fmt.Errorf("databricks-connector: failed to get parent info from group profile: %w", err)
}
+ var workspaceId string
if parentType == workspaceResourceType.Id {
- s.client.SetWorkspaceConfig(parentID)
- } else {
- s.client.SetAccountConfig()
+ workspaceId = parentID
}
applicationId, ok := rs.GetProfileStringValue(groupTrait.Profile, "application_id")
@@ -240,7 +237,7 @@ func (s *servicePrincipalBuilder) Grant(ctx context.Context, principal *v2.Resou
return nil, fmt.Errorf("databricks-connector: failed to get application_id from service principal profile")
}
- ruleSets, _, err := s.client.ListRuleSets(ctx, ServicePrincipalsType, applicationId)
+ ruleSets, _, err := s.client.ListRuleSets(ctx, workspaceId, ServicePrincipalsType, applicationId)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for service principal %s (%s): %w", principal.Id.Resource, applicationId, err)
}
@@ -279,7 +276,7 @@ func (s *servicePrincipalBuilder) Grant(ctx context.Context, principal *v2.Resou
})
}
- _, err = s.client.UpdateRuleSets(ctx, ServicePrincipalsType, applicationId, ruleSets)
+ _, err = s.client.UpdateRuleSets(ctx, workspaceId, ServicePrincipalsType, applicationId, ruleSets)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update rule sets for service principal %s (%s): %w", principal.Id.Resource, applicationId, err)
}
@@ -313,10 +310,9 @@ func (s *servicePrincipalBuilder) Revoke(ctx context.Context, grant *v2.Grant) (
return nil, fmt.Errorf("databricks-connector: failed to get parent info from group profile: %w", err)
}
+ var workspaceId string
if parentType == workspaceResourceType.Id {
- s.client.SetWorkspaceConfig(parentID)
- } else {
- s.client.SetAccountConfig()
+ workspaceId = parentID
}
applicationId, ok := rs.GetProfileStringValue(groupTrait.Profile, "application_id")
@@ -324,7 +320,7 @@ func (s *servicePrincipalBuilder) Revoke(ctx context.Context, grant *v2.Grant) (
return nil, fmt.Errorf("databricks-connector: failed to get application_id from service principal profile")
}
- ruleSets, _, err := s.client.ListRuleSets(ctx, ServicePrincipalsType, applicationId)
+ ruleSets, _, err := s.client.ListRuleSets(ctx, workspaceId, ServicePrincipalsType, applicationId)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for service principal %s (%s): %w", principal.Id.Resource, applicationId, err)
}
@@ -371,7 +367,7 @@ func (s *servicePrincipalBuilder) Revoke(ctx context.Context, grant *v2.Grant) (
return nil, nil
}
- _, err = s.client.UpdateRuleSets(ctx, ServicePrincipalsType, applicationId, ruleSets)
+ _, err = s.client.UpdateRuleSets(ctx, workspaceId, ServicePrincipalsType, applicationId, ruleSets)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to update rule sets for service principal %s (%s): %w", principal.Id.Resource, applicationId, err)
}
diff --git a/pkg/connector/users.go b/pkg/connector/users.go
index f1a7dd58..40187dfa 100644
--- a/pkg/connector/users.go
+++ b/pkg/connector/users.go
@@ -89,10 +89,9 @@ func (u *userBuilder) List(ctx context.Context, parentResourceID *v2.ResourceId,
return nil, "", nil, nil
}
+ var workspaceId string
if parentResourceID.ResourceType == workspaceResourceType.Id {
- u.client.SetWorkspaceConfig(parentResourceID.Resource)
- } else {
- u.client.SetAccountConfig()
+ workspaceId = parentResourceID.Resource
}
bag, page, err := parsePageToken(pToken.Token, &v2.ResourceId{ResourceType: userResourceType.Id})
@@ -102,6 +101,7 @@ func (u *userBuilder) List(ctx context.Context, parentResourceID *v2.ResourceId,
users, total, _, err := u.client.ListUsers(
ctx,
+ workspaceId,
databricks.NewPaginationVars(page, ResourcesPageSize),
databricks.NewUserAttrVars(),
)
diff --git a/pkg/connector/workspaces.go b/pkg/connector/workspaces.go
index 714eb2bb..f114e635 100644
--- a/pkg/connector/workspaces.go
+++ b/pkg/connector/workspaces.go
@@ -3,6 +3,7 @@ package connector
import (
"context"
"fmt"
+ "strconv"
"github.com/conductorone/baton-databricks/pkg/databricks"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
@@ -50,7 +51,7 @@ func minimalWorkspaceResource(ctx context.Context, workspace *databricks.Workspa
return resource, nil
}
-func workspaceResource(ctx context.Context, workspace *databricks.Workspace, parent *v2.ResourceId) (*v2.Resource, error) {
+func workspaceResource(_ context.Context, workspace *databricks.Workspace, parent *v2.ResourceId) (*v2.Resource, error) {
profile := map[string]interface{}{
"workspace_id": workspace.ID,
}
@@ -128,8 +129,6 @@ func (w *workspaceBuilder) Entitlements(_ context.Context, resource *v2.Resource
return nil, "", nil, nil
}
- w.client.SetAccountConfig()
-
var rv []*v2.Entitlement
memberAssignmentOptions := []ent.EntitlementOption{
@@ -150,8 +149,6 @@ func (w *workspaceBuilder) Grants(ctx context.Context, resource *v2.Resource, pT
return nil, "", nil, nil
}
- w.client.SetAccountConfig()
-
groupTrait, err := rs.GetGroupTrait(resource)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to get group trait: %w", err)
@@ -162,7 +159,8 @@ func (w *workspaceBuilder) Grants(ctx context.Context, resource *v2.Resource, pT
return nil, "", nil, fmt.Errorf("databricks-connector: failed to get workspace ID: %w", err)
}
- assignments, _, err := w.client.ListWorkspaceMembers(ctx, int(workspaceID))
+ workspace := strconv.Itoa(int(workspaceID))
+ assignments, _, err := w.client.ListWorkspaceMembers(ctx, workspace)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to list workspace members: %w", err)
}
@@ -218,7 +216,8 @@ func (w *workspaceBuilder) Grant(ctx context.Context, principal *v2.Resource, en
return nil, fmt.Errorf("databricks-connector: failed to get workspace ID: %w", err)
}
- _, err = w.client.CreateOrUpdateWorkspaceMember(ctx, workspaceID, principal.Id.Resource)
+ workspace := strconv.Itoa(int(workspaceID))
+ _, err = w.client.CreateOrUpdateWorkspaceMember(ctx, workspace, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to create or update workspace member: %w", err)
}
@@ -252,7 +251,8 @@ func (w *workspaceBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotat
return nil, fmt.Errorf("databricks-connector: failed to get workspace ID: %w", err)
}
- _, err = w.client.RemoveWorkspaceMember(ctx, workspaceID, principal.Id.Resource)
+ workspace := strconv.Itoa(int(workspaceID))
+ _, err = w.client.RemoveWorkspaceMember(ctx, workspace, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to create or update workspace member: %w", err)
}
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index b9731ca4..069af211 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -5,57 +5,77 @@ import (
"fmt"
"net/http"
"net/url"
- "strconv"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"github.com/conductorone/baton-sdk/pkg/uhttp"
)
const (
- base = "cloud.databricks.com"
- apiEndpoint = "/api/2.0"
-
- // Helper endpoints.
- previewEndpoint = "/preview"
- accessControlEndpoint = "/access-control"
- scimEndpoint = "/scim/v2"
- accountsEndpoint = "/accounts"
-
- // Base hosts.
- accountBaseHost = "accounts." + base + apiEndpoint
- workspaceBaseHost = "%s." + base + apiEndpoint + previewEndpoint
-
- // Resource endpoints. Some of these are case sensitive.
- usersEndpoint = "/Users"
- groupsEndpoint = "/Groups"
- servicePrincipalsEndpoint = "/ServicePrincipals"
- rolesEndpoint = "/assignable-roles"
- ruleSetsEndpoint = "/rule-sets"
- workspacesEndpoint = "/workspaces"
- workspaceAssignmentsEndpoint = "/permissionassignments"
+ defaultHost = "cloud.databricks.com"
+
+ // Some of these are case sensitive.
+ usersEndpoint = "/api/2.0/preview/scim/v2/Users"
+ groupsEndpoint = "/api/2.0/preview/scim/v2/Groups"
+ servicePrincipalsEndpoint = "/api/2.0/preview/scim/v2/ServicePrincipals"
+ rolesEndpoint = "/api/2.0/preview/accounts/access-control/assignable-roles"
+ ruleSetsEndpoint = "/api/2.0/preview/accounts/access-control/rule-sets"
+
+ accountUsersEndpoint = "/api/2.0/accounts/%s/scim/v2/Users"
+ accountGroupsEndpoint = "/api/2.0/accounts/%s/scim/v2/Groups"
+ accountServicePrincipalsEndpoint = "/api/2.0/accounts/%s/scim/v2/ServicePrincipals"
+ accountRolesEndpoint = "/api/2.0/preview/accounts/%s/access-control/assignable-roles"
+ accountRuleSetsEndpoint = "/api/2.0/preview/accounts/%s/access-control/rule-sets"
+
+ accountWorkspacesEndpoint = "/api/2.0/accounts/%s/workspaces"
+ accountWorkspaceAssignmentsEndpoint = "/api/2.0/accounts/%s/workspaces/%s/permissionassignments"
)
type Client struct {
- httpClient *uhttp.BaseHttpClient
- baseUrl *url.URL
- cfg Config
- auth Auth
- etag string
- accountId string
+ httpClient *uhttp.BaseHttpClient
+ baseUrl *url.URL
+ accountBaseUrl *url.URL
+ auth Auth
+ etag string
+ accountId string
isAccAPIAvailable bool
isWSAPIAvailable bool
}
func NewClient(ctx context.Context, httpClient *http.Client, hostname, accountHostname, accountID string, auth Auth) (*Client, error) {
+ if hostname == "" {
+ hostname = defaultHost
+ }
+ baseUrl := &url.URL{
+ Scheme: "https",
+ Host: hostname,
+ }
+
+ if accountHostname == "" {
+ accountHostname = "accounts." + defaultHost
+ }
+ accountBaseUrl := &url.URL{
+ Scheme: "https",
+ Host: accountHostname,
+ }
+
cli, err := uhttp.NewBaseHttpClientWithContext(ctx, httpClient)
return &Client{
- httpClient: cli,
- auth: auth,
- accountId: accountID,
+ httpClient: cli,
+ auth: auth,
+ accountId: accountID,
+ accountBaseUrl: accountBaseUrl,
+ baseUrl: baseUrl,
}, err
}
+func (c *Client) workspaceUrl(workspaceId string) *url.URL {
+ return &url.URL{
+ Scheme: "https",
+ Host: workspaceId + "." + c.baseUrl.Host,
+ }
+}
+
func (c *Client) IsWorkspaceAPIAvailable() bool {
return c.isWSAPIAvailable
}
@@ -69,43 +89,11 @@ func (c *Client) UpdateAvailability(accAPI, wsAPI bool) {
c.isWSAPIAvailable = wsAPI
}
-func (c *Client) GetCurrentConfig() Config {
- return c.cfg
-}
-
func (c *Client) IsTokenAuth() bool {
_, ok := c.auth.(*TokenAuth)
return ok
}
-func (c *Client) SetWorkspaceConfig(workspace string) {
- wc, ok := c.cfg.(*WorkspaceConfig)
- if ok && wc.Workspace() == workspace {
- return
- }
-
- c.cfg = NewWorkspaceConfig("", c.accountId, workspace)
- c.baseUrl = c.cfg.BaseUrl()
-
- if tokenAuth, ok := c.auth.(*TokenAuth); ok {
- tokenAuth.SetWorkspace(workspace)
- }
-}
-
-func (c *Client) SetAccountConfig() {
- if _, ok := c.cfg.(*AccountConfig); ok {
- return
- }
-
- c.cfg = NewAccountConfig("", c.accountId)
- c.baseUrl = c.cfg.BaseUrl()
-}
-
-func (c *Client) UpdateConfig(cfg Config) {
- c.cfg = cfg
- c.baseUrl = c.cfg.BaseUrl()
-}
-
func (c *Client) UpdateEtag(etag string) {
c.etag = etag
}
@@ -121,6 +109,7 @@ type ListResponse[T any] struct {
func (c *Client) ListUsers(
ctx context.Context,
+ workspaceId string,
vars ...Vars,
) (
[]User,
@@ -128,12 +117,14 @@ func (c *Client) ListUsers(
*v2.RateLimitDescription,
error,
) {
- var res ListResponse[User]
- u, err := c.cfg.ResolvePath(c.baseUrl, usersEndpoint)
- if err != nil {
- return nil, 0, nil, fmt.Errorf("failed to prepare url to fetch users: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountUsersEndpoint, c.accountId))
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(usersEndpoint)
}
+ var res ListResponse[User]
ratelimitData, err := c.Get(ctx, u, &res, vars...)
if err != nil {
return nil, 0, ratelimitData, err
@@ -144,20 +135,21 @@ func (c *Client) ListUsers(
func (c *Client) GetUser(
ctx context.Context,
- userID string,
+ workspaceId string,
+ userId string,
) (
*User,
*v2.RateLimitDescription,
error,
) {
- var res *User
- u, err := c.cfg.ResolvePath(c.baseUrl, usersEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch users: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountUsersEndpoint, c.accountId), userId)
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(usersEndpoint, userId)
}
- u.Path = fmt.Sprintf("%s/%s", u.Path, userID)
-
+ var res *User
ratelimitData, err := c.Get(ctx, u, &res)
if err != nil {
return nil, ratelimitData, err
@@ -166,14 +158,14 @@ func (c *Client) GetUser(
return res, ratelimitData, nil
}
-func (c *Client) UpdateUser(ctx context.Context, user *User) (*v2.RateLimitDescription, error) {
- u, err := c.cfg.ResolvePath(c.baseUrl, usersEndpoint)
- if err != nil {
- return nil, fmt.Errorf("failed to prepare url to fetch users: %w", err)
+func (c *Client) UpdateUser(ctx context.Context, workspaceId string, user *User) (*v2.RateLimitDescription, error) {
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountUsersEndpoint, c.accountId), user.ID)
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(usersEndpoint, user.ID)
}
- u.Path = fmt.Sprintf("%s/%s", u.Path, user.ID)
-
return c.Put(ctx, u, user, nil)
}
@@ -187,6 +179,7 @@ func (c *Client) FindUserID(
) {
users, _, ratelimitData, err := c.ListUsers(
ctx,
+ "",
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("userName eq '%s'", username)),
)
@@ -212,6 +205,7 @@ func (c *Client) FindUsername(
) {
users, _, ratelimitData, err := c.ListUsers(
ctx,
+ "",
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("id eq '%s'", userID)),
)
@@ -229,6 +223,7 @@ func (c *Client) FindUsername(
func (c *Client) ListGroups(
ctx context.Context,
+ workspaceId string,
vars ...Vars,
) (
[]Group,
@@ -236,12 +231,14 @@ func (c *Client) ListGroups(
*v2.RateLimitDescription,
error,
) {
- var res ListResponse[Group]
- u, err := c.cfg.ResolvePath(c.baseUrl, groupsEndpoint)
- if err != nil {
- return nil, 0, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountGroupsEndpoint, c.accountId))
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(groupsEndpoint)
}
+ var res ListResponse[Group]
ratelimitData, err := c.Get(ctx, u, &res, vars...)
if err != nil {
return nil, 0, ratelimitData, err
@@ -250,22 +247,19 @@ func (c *Client) ListGroups(
return res.Resources, res.Total, ratelimitData, nil
}
-func (c *Client) GetGroup(
- ctx context.Context,
- groupID string,
-) (
+func (c *Client) GetGroup(ctx context.Context, workspaceId, groupId string) (
*Group,
*v2.RateLimitDescription,
error,
) {
- var res *Group
- u, err := c.cfg.ResolvePath(c.baseUrl, groupsEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountGroupsEndpoint, c.accountId), groupId)
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(groupsEndpoint, groupId)
}
- u.Path = fmt.Sprintf("%s/%s", u.Path, groupID)
-
+ var res *Group
ratelimitData, err := c.Get(ctx, u, &res)
if err != nil {
return nil, ratelimitData, err
@@ -274,14 +268,14 @@ func (c *Client) GetGroup(
return res, ratelimitData, nil
}
-func (c *Client) UpdateGroup(ctx context.Context, group *Group) (*v2.RateLimitDescription, error) {
- u, err := c.cfg.ResolvePath(c.baseUrl, groupsEndpoint)
- if err != nil {
- return nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
+func (c *Client) UpdateGroup(ctx context.Context, workspaceId string, group *Group) (*v2.RateLimitDescription, error) {
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountGroupsEndpoint, c.accountId), group.ID)
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(groupsEndpoint, group.ID)
}
- u.Path = fmt.Sprintf("%s/%s", u.Path, group.ID)
-
return c.Put(ctx, u, group, nil)
}
@@ -295,6 +289,7 @@ func (c *Client) FindGroupID(
) {
groups, _, ratelimitData, err := c.ListGroups(
ctx,
+ "",
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("displayName eq '%s'", displayName)),
)
@@ -320,6 +315,7 @@ func (c *Client) FindGroupDisplayName(
) {
groups, _, ratelimitData, err := c.ListGroups(
ctx,
+ "",
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("id eq '%s'", groupID)),
)
@@ -337,6 +333,7 @@ func (c *Client) FindGroupDisplayName(
func (c *Client) ListServicePrincipals(
ctx context.Context,
+ workspaceId string,
vars ...Vars,
) (
[]ServicePrincipal,
@@ -344,12 +341,14 @@ func (c *Client) ListServicePrincipals(
*v2.RateLimitDescription,
error,
) {
- var res ListResponse[ServicePrincipal]
- u, err := c.cfg.ResolvePath(c.baseUrl, servicePrincipalsEndpoint)
- if err != nil {
- return nil, 0, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountServicePrincipalsEndpoint, c.accountId))
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(servicePrincipalsEndpoint)
}
+ var res ListResponse[ServicePrincipal]
ratelimitData, err := c.Get(ctx, u, &res, vars...)
if err != nil {
return nil, 0, ratelimitData, err
@@ -360,42 +359,39 @@ func (c *Client) ListServicePrincipals(
func (c *Client) GetServicePrincipal(
ctx context.Context,
+ workspaceId string,
servicePrincipalID string,
) (
*ServicePrincipal,
*v2.RateLimitDescription,
error,
) {
- var res *ServicePrincipal
- u, err := c.cfg.ResolvePath(c.baseUrl, servicePrincipalsEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountServicePrincipalsEndpoint, c.accountId), servicePrincipalID)
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(servicePrincipalsEndpoint, servicePrincipalID)
}
- u.Path = fmt.Sprintf("%s/%s", u.Path, servicePrincipalID)
-
+ var res *ServicePrincipal
ratelimitData, err := c.Get(ctx, u, &res)
- if err != nil {
- return nil, ratelimitData, err
- }
-
- return res, ratelimitData, nil
+ return res, ratelimitData, err
}
func (c *Client) UpdateServicePrincipal(
ctx context.Context,
+ workspaceId string,
servicePrincipal *ServicePrincipal,
) (
*v2.RateLimitDescription,
error,
) {
- u, err := c.cfg.ResolvePath(c.baseUrl, servicePrincipalsEndpoint)
- if err != nil {
- return nil, fmt.Errorf("failed to prepare url to fetch groups: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountServicePrincipalsEndpoint, c.accountId), servicePrincipal.ID)
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(servicePrincipalsEndpoint, servicePrincipal.ID)
}
-
- u.Path = fmt.Sprintf("%s/%s", u.Path, servicePrincipal.ID)
-
return c.Put(ctx, u, servicePrincipal, nil)
}
@@ -409,6 +405,7 @@ func (c *Client) FindServicePrincipalID(
) {
servicePrincipals, _, ratelimitData, err := c.ListServicePrincipals(
ctx,
+ "",
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("applicationId eq '%s'", appID)),
)
@@ -434,6 +431,7 @@ func (c *Client) FindServicePrincipalAppID(
) {
servicePrincipals, _, ratelimitData, err := c.ListServicePrincipals(
ctx,
+ "",
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("id eq '%s'", servicePrincipalID)),
)
@@ -451,6 +449,7 @@ func (c *Client) FindServicePrincipalAppID(
func (c *Client) ListRoles(
ctx context.Context,
+ workspaceId string,
resourceType string,
resourceId string,
) (
@@ -462,9 +461,11 @@ func (c *Client) ListRoles(
Roles []Role `json:"roles"`
}
- u, err := c.cfg.ResolvePath(c.baseUrl, rolesEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch roles: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountRolesEndpoint, c.accountId))
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(rolesEndpoint)
}
resourcePayload, err := url.JoinPath("accounts", c.accountId, resourceType, resourceId)
@@ -489,11 +490,7 @@ func (c *Client) ListWorkspaces(
) {
var res []Workspace
- u, err := c.cfg.ResolvePath(c.baseUrl, workspacesEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch workspaces: %w", err)
- }
-
+ u := c.accountBaseUrl.JoinPath(fmt.Sprintf(accountWorkspacesEndpoint, c.accountId))
ratelimitData, err := c.Get(ctx, u, &res)
if err != nil {
return nil, ratelimitData, err
@@ -502,22 +499,9 @@ func (c *Client) ListWorkspaces(
return res, ratelimitData, nil
}
-func (c *Client) prepareURLForWorkspaceMembers(params ...string) (*url.URL, error) {
- u := *c.baseUrl
-
- baseEndpoint := fmt.Sprintf("%s/%s", accountsEndpoint, c.accountId)
- path, err := url.JoinPath(baseEndpoint, params...)
- if err != nil {
- return nil, err
- }
- u.Path = path
-
- return &u, nil
-}
-
func (c *Client) ListWorkspaceMembers(
ctx context.Context,
- workspaceID int,
+ workspaceId string,
) (
[]WorkspaceAssignment,
*v2.RateLimitDescription,
@@ -527,12 +511,7 @@ func (c *Client) ListWorkspaceMembers(
Assignments []WorkspaceAssignment `json:"permission_assignments"`
}
- id := strconv.Itoa(workspaceID)
- u, err := c.prepareURLForWorkspaceMembers(workspacesEndpoint, id, workspaceAssignmentsEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch workspace members: %w", err)
- }
-
+ u := c.accountBaseUrl.JoinPath(fmt.Sprintf(accountWorkspaceAssignmentsEndpoint, c.accountId, workspaceId))
ratelimitData, err := c.Get(ctx, u, &res)
if err != nil {
return nil, ratelimitData, err
@@ -543,24 +522,13 @@ func (c *Client) ListWorkspaceMembers(
func (c *Client) CreateOrUpdateWorkspaceMember(
ctx context.Context,
- workspaceID int64,
- principalID string,
+ workspaceId string,
+ principalId string,
) (
*v2.RateLimitDescription,
error,
) {
- wID := strconv.Itoa(int(workspaceID))
- u, err := c.prepareURLForWorkspaceMembers(
- workspacesEndpoint,
- wID,
- workspaceAssignmentsEndpoint,
- "principals",
- principalID,
- )
- if err != nil {
- return nil, fmt.Errorf("failed to prepare url to create workspace member: %w", err)
- }
-
+ u := c.accountBaseUrl.JoinPath(fmt.Sprintf(accountWorkspaceAssignmentsEndpoint, c.accountId, workspaceId), "principals", principalId)
payload := struct {
Permission []string `json:"permissions"`
}{
@@ -572,27 +540,16 @@ func (c *Client) CreateOrUpdateWorkspaceMember(
func (c *Client) RemoveWorkspaceMember(
ctx context.Context,
- workspaceID int64,
- principalID string,
+ workspaceId string,
+ principalId string,
) (*v2.RateLimitDescription, error) {
- wID := strconv.Itoa(int(workspaceID))
-
- u, err := c.prepareURLForWorkspaceMembers(
- workspacesEndpoint,
- wID,
- workspaceAssignmentsEndpoint,
- "principals",
- principalID,
- )
- if err != nil {
- return nil, fmt.Errorf("failed to prepare url to create workspace member: %w", err)
- }
-
+ u := c.accountBaseUrl.JoinPath(fmt.Sprintf(accountWorkspaceAssignmentsEndpoint, c.accountId, workspaceId), "principals", principalId)
return c.Put(ctx, u, nil, nil)
}
func (c *Client) ListRuleSets(
ctx context.Context,
+ workspaceId string,
resourceType string,
resourceId string,
) (
@@ -600,14 +557,11 @@ func (c *Client) ListRuleSets(
*v2.RateLimitDescription,
error,
) {
- var res struct {
- RuleSets []RuleSet `json:"grant_rules"`
- Etag string `json:"etag"`
- }
-
- u, err := c.cfg.ResolvePath(c.baseUrl, ruleSetsEndpoint)
- if err != nil {
- return nil, nil, fmt.Errorf("failed to prepare url to fetch rule sets: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountRuleSetsEndpoint, c.accountId))
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(ruleSetsEndpoint)
}
resourcePayload, err := url.JoinPath("accounts", c.accountId, resourceType, resourceId, "ruleSets", "default")
@@ -615,6 +569,10 @@ func (c *Client) ListRuleSets(
return nil, nil, fmt.Errorf("failed to prepare resource payload: %w", err)
}
+ var res struct {
+ RuleSets []RuleSet `json:"grant_rules"`
+ Etag string `json:"etag"`
+ }
ratelimitData, err := c.Get(ctx, u, &res, NewNameVars(resourcePayload, c.etag))
if err != nil {
return nil, ratelimitData, err
@@ -627,15 +585,17 @@ func (c *Client) ListRuleSets(
func (c *Client) UpdateRuleSets(
ctx context.Context,
- resourceType, resourceId string,
+ workspaceId, resourceType, resourceId string,
ruleSets []RuleSet,
) (
*v2.RateLimitDescription,
error,
) {
- u, err := c.cfg.ResolvePath(c.baseUrl, ruleSetsEndpoint)
- if err != nil {
- return nil, fmt.Errorf("failed to prepare url to fetch rule sets: %w", err)
+ var u *url.URL
+ if workspaceId == "" {
+ u = c.accountBaseUrl.JoinPath(fmt.Sprintf(accountRuleSetsEndpoint, c.accountId))
+ } else {
+ u = c.workspaceUrl(workspaceId).JoinPath(ruleSetsEndpoint)
}
resourcePayload, err := url.JoinPath("accounts", c.accountId, resourceType, resourceId, "ruleSets", "default")
diff --git a/pkg/databricks/config.go b/pkg/databricks/config.go
deleted file mode 100644
index 7d01e927..00000000
--- a/pkg/databricks/config.go
+++ /dev/null
@@ -1,113 +0,0 @@
-package databricks
-
-import (
- "fmt"
- "net/url"
-)
-
-type Config interface {
- BaseUrl() *url.URL
- ResolvePath(base *url.URL, endpoint string) (*url.URL, error)
-}
-
-// Account Config for account API.
-type AccountConfig struct {
- accountId string
- accountHostname string
-}
-
-func NewAccountConfig(accountHostname, accountId string) *AccountConfig {
- if accountHostname == "" {
- accountHostname = accountBaseHost
- }
- return &AccountConfig{
- accountId,
- accountHostname,
- }
-}
-
-func (c *AccountConfig) BaseUrl() *url.URL {
- return &url.URL{
- Scheme: "https",
- Host: c.accountHostname,
- }
-}
-
-func (c AccountConfig) ResolvePath(base *url.URL, endpoint string) (*url.URL, error) {
- u := *base
-
- baseEndpoint := fmt.Sprintf("%s/%s", accountsEndpoint, c.accountId)
-
- var pathParts []string
-
- switch endpoint {
- case usersEndpoint, groupsEndpoint, servicePrincipalsEndpoint:
- pathParts = []string{baseEndpoint, scimEndpoint, endpoint}
- case rolesEndpoint, ruleSetsEndpoint:
- pathParts = []string{previewEndpoint, baseEndpoint, accessControlEndpoint, endpoint}
- case workspacesEndpoint:
- pathParts = []string{baseEndpoint, endpoint}
- default:
- return nil, fmt.Errorf("unknown endpoint %s", endpoint)
- }
-
- path, err := url.JoinPath(pathParts[0], pathParts[1:]...)
- if err != nil {
- return nil, err
- }
-
- u.Path = path
-
- return &u, nil
-}
-
-// Workspace Config for workspace API.
-type WorkspaceConfig struct {
- workspace string
- hostname string
-}
-
-func NewWorkspaceConfig(hostname, accountId, workspace string) *WorkspaceConfig {
- if hostname == "" {
- hostname = workspaceBaseHost
- }
- return &WorkspaceConfig{
- workspace,
- hostname,
- }
-}
-
-func (c *WorkspaceConfig) Workspace() string {
- return c.workspace
-}
-
-func (c *WorkspaceConfig) BaseUrl() *url.URL {
- return &url.URL{
- Scheme: "https",
- Host: fmt.Sprintf(c.hostname, c.workspace),
- }
-}
-
-func (c WorkspaceConfig) ResolvePath(base *url.URL, endpoint string) (*url.URL, error) {
- u := *base
-
- var pathParts []string
-
- switch endpoint {
- case usersEndpoint, groupsEndpoint, servicePrincipalsEndpoint:
- pathParts = []string{scimEndpoint, endpoint}
- case rolesEndpoint, ruleSetsEndpoint:
- pathParts = []string{accountsEndpoint, accessControlEndpoint, endpoint}
- default:
- return nil, fmt.Errorf("unknown endpoint %s", endpoint)
- }
-
- path, err := url.JoinPath(pathParts[0], pathParts[1:]...)
- if err != nil {
- return nil, err
- }
-
- u.Path = path
-
- return &u, nil
-}
diff --git a/pkg/databricks/request.go b/pkg/databricks/request.go
index 6a3e2f7d..7f888157 100644
--- a/pkg/databricks/request.go
+++ b/pkg/databricks/request.go
@@ -100,7 +100,7 @@ func (c *Client) doRequest(
ratelimitData := &v2.RateLimitDescription{}
resp, err := c.httpClient.Do(
req,
- uhttp.WithJSONResponse(&response),
+ uhttp.WithAlwaysJSONResponse(&response),
uhttp.WithRatelimitData(ratelimitData),
)
if resp == nil {
@@ -113,18 +113,18 @@ func (c *Client) doRequest(
return ratelimitData, nil
}
- var res struct {
+ var errorResponse struct {
Detail string `json:"detail"`
Message string `json:"message"`
}
- if err := parseJSON(resp.Body, &res); err != nil {
+ if err := parseJSON(resp.Body, &errorResponse); err != nil {
return nil, err
}
return ratelimitData, fmt.Errorf(
"unexpected status code %d: %s %s",
resp.StatusCode,
- res.Detail,
- res.Message,
+ errorResponse.Detail,
+ errorResponse.Message,
)
}
From 0dbe89d57eef9ce68cdf2e9233103feac74d6091 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Fri, 20 Dec 2024 12:18:18 -0800
Subject: [PATCH 13/16] Upgrade baton-sdk to v0.2.58.
---
go.mod | 6 +-
go.sum | 12 +-
.../allegro/bigcache/v3/.codecov.yml | 28 -
.../github.com/allegro/bigcache/v3/.gitignore | 11 -
.../github.com/allegro/bigcache/v3/README.md | 204 -----
.../allegro/bigcache/v3/bigcache.go | 270 -------
.../github.com/allegro/bigcache/v3/bytes.go | 11 -
.../allegro/bigcache/v3/bytes_appengine.go | 7 -
.../github.com/allegro/bigcache/v3/clock.go | 14 -
.../github.com/allegro/bigcache/v3/config.go | 97 ---
.../allegro/bigcache/v3/encoding.go | 83 --
.../bigcache/v3/entry_not_found_error.go | 8 -
vendor/github.com/allegro/bigcache/v3/fnv.go | 28 -
vendor/github.com/allegro/bigcache/v3/hash.go | 8 -
.../allegro/bigcache/v3/iterator.go | 146 ----
.../github.com/allegro/bigcache/v3/logger.go | 30 -
.../allegro/bigcache/v3/queue/bytes_queue.go | 269 -------
.../github.com/allegro/bigcache/v3/shard.go | 454 -----------
.../github.com/allegro/bigcache/v3/stats.go | 15 -
.../github.com/allegro/bigcache/v3/utils.go | 23 -
.../baton-sdk/internal/connector/connector.go | 1 +
.../pb/c1/connector/v2/connector.pb.go | 638 +++++++++++----
.../c1/connector/v2/connector.pb.validate.go | 403 ++++++++++
.../pb/c1/connector/v2/resource.pb.go | 758 +++++++++++-------
.../c1/connector/v2/resource.pb.validate.go | 289 +++++++
.../pkg/connectorbuilder/connectorbuilder.go | 73 +-
.../baton-sdk/pkg/crypto/providers/jwk/jwk.go | 1 +
.../baton-sdk/pkg/dotc1z/entitlements.go | 25 +-
.../baton-sdk/pkg/dotc1z/grants.go | 36 +-
.../baton-sdk/pkg/dotc1z/resouce_types.go | 18 +-
.../baton-sdk/pkg/dotc1z/resources.go | 36 +-
.../baton-sdk/pkg/dotc1z/sql_helpers.go | 38 +-
.../conductorone/baton-sdk/pkg/sdk/version.go | 2 +-
.../baton-sdk/pkg/sync/expand/graph.go | 22 +-
.../conductorone/baton-sdk/pkg/sync/syncer.go | 181 ++++-
.../baton-sdk/pkg/uhttp/dbcache.go | 20 +-
.../baton-sdk/pkg/uhttp/gocache.go | 138 +---
.../baton-sdk/pkg/uhttp/wrapper.go | 3 +
vendor/github.com/dolthub/maphash/.gitignore | 2 +
.../bigcache/v3 => dolthub/maphash}/LICENSE | 4 +-
vendor/github.com/dolthub/maphash/README.md | 4 +
vendor/github.com/dolthub/maphash/hasher.go | 48 ++
vendor/github.com/dolthub/maphash/runtime.go | 111 +++
vendor/github.com/gammazero/deque/.gitignore | 26 +
vendor/github.com/gammazero/deque/LICENSE | 21 +
vendor/github.com/gammazero/deque/README.md | 80 ++
vendor/github.com/gammazero/deque/deque.go | 420 ++++++++++
vendor/github.com/gammazero/deque/doc.go | 38 +
vendor/github.com/maypok86/otter/.gitignore | 22 +
.../github.com/maypok86/otter/.golangci.yml | 103 +++
vendor/github.com/maypok86/otter/CHANGELOG.md | 98 +++
.../maypok86/otter/CODE_OF_CONDUCT.md | 128 +++
.../github.com/maypok86/otter/CONTRIBUTING.md | 23 +
vendor/github.com/maypok86/otter/LICENSE | 201 +++++
vendor/github.com/maypok86/otter/Makefile | 56 ++
vendor/github.com/maypok86/otter/README.md | 191 +++++
vendor/github.com/maypok86/otter/builder.go | 311 +++++++
vendor/github.com/maypok86/otter/cache.go | 165 ++++
vendor/github.com/maypok86/otter/entry.go | 82 ++
vendor/github.com/maypok86/otter/extension.go | 89 ++
.../maypok86/otter/internal/core/cache.go | 533 ++++++++++++
.../maypok86/otter/internal/core/task.go | 126 +++
.../otter/internal/expiry/disabled.go | 35 +
.../maypok86/otter/internal/expiry/fixed.go | 47 ++
.../maypok86/otter/internal/expiry/queue.go | 89 ++
.../otter/internal/expiry/variable.go | 181 +++++
.../otter/internal/generated/node/b.go | 144 ++++
.../otter/internal/generated/node/bc.go | 148 ++++
.../otter/internal/generated/node/be.go | 160 ++++
.../otter/internal/generated/node/bec.go | 164 ++++
.../otter/internal/generated/node/manager.go | 143 ++++
.../otter/internal/hashtable/bucket.go | 81 ++
.../maypok86/otter/internal/hashtable/map.go | 551 +++++++++++++
.../maypok86/otter/internal/lossy/buffer.go | 143 ++++
.../maypok86/otter/internal/queue/growable.go | 135 ++++
.../maypok86/otter/internal/s3fifo/ghost.go | 77 ++
.../maypok86/otter/internal/s3fifo/main.go | 87 ++
.../maypok86/otter/internal/s3fifo/policy.go | 106 +++
.../maypok86/otter/internal/s3fifo/queue.go | 75 ++
.../maypok86/otter/internal/s3fifo/small.go | 89 ++
.../maypok86/otter/internal/stats/counter.go | 108 +++
.../maypok86/otter/internal/stats/stats.go | 143 ++++
.../otter/internal/unixtime/unixtime.go | 93 +++
.../maypok86/otter/internal/xmath/power.go | 30 +
.../otter/internal/xruntime/runtime.go | 25 +
.../otter/internal/xruntime/runtime_1.22.go | 26 +
.../otter/internal/xruntime/xruntime.go | 36 +
vendor/github.com/maypok86/otter/stats.go | 95 +++
vendor/modules.txt | 26 +-
89 files changed, 7955 insertions(+), 2370 deletions(-)
delete mode 100644 vendor/github.com/allegro/bigcache/v3/.codecov.yml
delete mode 100644 vendor/github.com/allegro/bigcache/v3/.gitignore
delete mode 100644 vendor/github.com/allegro/bigcache/v3/README.md
delete mode 100644 vendor/github.com/allegro/bigcache/v3/bigcache.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/bytes.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/bytes_appengine.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/clock.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/config.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/encoding.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/fnv.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/hash.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/iterator.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/logger.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/shard.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/stats.go
delete mode 100644 vendor/github.com/allegro/bigcache/v3/utils.go
create mode 100644 vendor/github.com/dolthub/maphash/.gitignore
rename vendor/github.com/{allegro/bigcache/v3 => dolthub/maphash}/LICENSE (99%)
create mode 100644 vendor/github.com/dolthub/maphash/README.md
create mode 100644 vendor/github.com/dolthub/maphash/hasher.go
create mode 100644 vendor/github.com/dolthub/maphash/runtime.go
create mode 100644 vendor/github.com/gammazero/deque/.gitignore
create mode 100644 vendor/github.com/gammazero/deque/LICENSE
create mode 100644 vendor/github.com/gammazero/deque/README.md
create mode 100644 vendor/github.com/gammazero/deque/deque.go
create mode 100644 vendor/github.com/gammazero/deque/doc.go
create mode 100644 vendor/github.com/maypok86/otter/.gitignore
create mode 100644 vendor/github.com/maypok86/otter/.golangci.yml
create mode 100644 vendor/github.com/maypok86/otter/CHANGELOG.md
create mode 100644 vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md
create mode 100644 vendor/github.com/maypok86/otter/CONTRIBUTING.md
create mode 100644 vendor/github.com/maypok86/otter/LICENSE
create mode 100644 vendor/github.com/maypok86/otter/Makefile
create mode 100644 vendor/github.com/maypok86/otter/README.md
create mode 100644 vendor/github.com/maypok86/otter/builder.go
create mode 100644 vendor/github.com/maypok86/otter/cache.go
create mode 100644 vendor/github.com/maypok86/otter/entry.go
create mode 100644 vendor/github.com/maypok86/otter/extension.go
create mode 100644 vendor/github.com/maypok86/otter/internal/core/cache.go
create mode 100644 vendor/github.com/maypok86/otter/internal/core/task.go
create mode 100644 vendor/github.com/maypok86/otter/internal/expiry/disabled.go
create mode 100644 vendor/github.com/maypok86/otter/internal/expiry/fixed.go
create mode 100644 vendor/github.com/maypok86/otter/internal/expiry/queue.go
create mode 100644 vendor/github.com/maypok86/otter/internal/expiry/variable.go
create mode 100644 vendor/github.com/maypok86/otter/internal/generated/node/b.go
create mode 100644 vendor/github.com/maypok86/otter/internal/generated/node/bc.go
create mode 100644 vendor/github.com/maypok86/otter/internal/generated/node/be.go
create mode 100644 vendor/github.com/maypok86/otter/internal/generated/node/bec.go
create mode 100644 vendor/github.com/maypok86/otter/internal/generated/node/manager.go
create mode 100644 vendor/github.com/maypok86/otter/internal/hashtable/bucket.go
create mode 100644 vendor/github.com/maypok86/otter/internal/hashtable/map.go
create mode 100644 vendor/github.com/maypok86/otter/internal/lossy/buffer.go
create mode 100644 vendor/github.com/maypok86/otter/internal/queue/growable.go
create mode 100644 vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go
create mode 100644 vendor/github.com/maypok86/otter/internal/s3fifo/main.go
create mode 100644 vendor/github.com/maypok86/otter/internal/s3fifo/policy.go
create mode 100644 vendor/github.com/maypok86/otter/internal/s3fifo/queue.go
create mode 100644 vendor/github.com/maypok86/otter/internal/s3fifo/small.go
create mode 100644 vendor/github.com/maypok86/otter/internal/stats/counter.go
create mode 100644 vendor/github.com/maypok86/otter/internal/stats/stats.go
create mode 100644 vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go
create mode 100644 vendor/github.com/maypok86/otter/internal/xmath/power.go
create mode 100644 vendor/github.com/maypok86/otter/internal/xruntime/runtime.go
create mode 100644 vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go
create mode 100644 vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go
create mode 100644 vendor/github.com/maypok86/otter/stats.go
diff --git a/go.mod b/go.mod
index fdf75b4f..0edf7558 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/conductorone/baton-databricks
go 1.21
require (
- github.com/conductorone/baton-sdk v0.2.48
+ github.com/conductorone/baton-sdk v0.2.58
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/spf13/viper v1.19.0
go.uber.org/zap v1.27.0
@@ -14,7 +14,6 @@ require (
require (
filippo.io/age v1.1.1 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
- github.com/allegro/bigcache/v3 v3.1.0 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
@@ -43,10 +42,12 @@ require (
github.com/aws/smithy-go v1.20.2 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
+ github.com/dolthub/maphash v0.1.0 // indirect
github.com/doug-martin/goqu/v9 v9.19.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
+ github.com/gammazero/deque v0.2.1 // indirect
github.com/glebarez/go-sqlite v1.22.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
@@ -59,6 +60,7 @@ require (
github.com/lufia/plan9stats v0.0.0-20240408141607-282e7b5d6b74 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
+ github.com/maypok86/otter v1.2.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
diff --git a/go.sum b/go.sum
index 347d5720..34694109 100644
--- a/go.sum
+++ b/go.sum
@@ -6,8 +6,6 @@ filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
-github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk=
-github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I=
github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA=
github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to=
@@ -52,8 +50,8 @@ github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/conductorone/baton-sdk v0.2.48 h1:P8Xql5ViTmZcGYgOOfCUx97d8Mkh8gaNIQ3W/VlNXSI=
-github.com/conductorone/baton-sdk v0.2.48/go.mod h1:CYyNk1kPIEgZmc3Z16TmpS1l3KbkNSjyJk16KuQw+JM=
+github.com/conductorone/baton-sdk v0.2.58 h1:LBZ12JeEQar2GKA9Tll5iSt7cW6gCkrPbQq3Zs4UeDk=
+github.com/conductorone/baton-sdk v0.2.58/go.mod h1:s8Cj7lufoHVNz4cFM6etem0yjJgorl42jMhHrfM2sFA=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -62,6 +60,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc
github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM=
github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
+github.com/dolthub/maphash v0.1.0 h1:bsQ7JsF4FkkWyrP3oCnFJgrCUAFbFf3kOl4L/QxPDyQ=
+github.com/dolthub/maphash v0.1.0/go.mod h1:gkg4Ch4CdCDu5h6PMriVLawB7koZ+5ijb9puGMV50a4=
github.com/doug-martin/goqu/v9 v9.19.0 h1:PD7t1X3tRcUiSdc5TEyOFKujZA5gs3VSA7wxSvBx7qo=
github.com/doug-martin/goqu/v9 v9.19.0/go.mod h1:nf0Wc2/hV3gYK9LiyqIrzBEVGlI8qW3GuDCEobC4wBQ=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
@@ -76,6 +76,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
+github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0=
+github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU=
github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ=
github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc=
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
@@ -144,6 +146,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
+github.com/maypok86/otter v1.2.4 h1:HhW1Pq6VdJkmWwcZZq19BlEQkHtI8xgsQzBVXJU0nfc=
+github.com/maypok86/otter v1.2.4/go.mod h1:mKLfoI7v1HOmQMwFgX4QkRk23mX6ge3RDvjdHOWG4R4=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
diff --git a/vendor/github.com/allegro/bigcache/v3/.codecov.yml b/vendor/github.com/allegro/bigcache/v3/.codecov.yml
deleted file mode 100644
index d8c862ec..00000000
--- a/vendor/github.com/allegro/bigcache/v3/.codecov.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-codecov:
- require_ci_to_pass: true
-comment:
- behavior: default
- layout: reach, diff, flags, files, footer
- require_base: false
- require_changes: false
- require_head: true
-coverage:
- precision: 2
- range:
- - 70
- - 100
- round: down
- status:
- changes: false
- patch: true
- project: true
-parsers:
- gcov:
- branch_detection:
- conditional: true
- loop: true
- macro: false
- method: false
- javascript:
- enable_partials: false
diff --git a/vendor/github.com/allegro/bigcache/v3/.gitignore b/vendor/github.com/allegro/bigcache/v3/.gitignore
deleted file mode 100644
index 78869152..00000000
--- a/vendor/github.com/allegro/bigcache/v3/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.idea
-.DS_Store
-/server/server.exe
-/server/server
-/server/server_dar*
-/server/server_fre*
-/server/server_win*
-/server/server_net*
-/server/server_ope*
-/server/server_lin*
-CHANGELOG.md
diff --git a/vendor/github.com/allegro/bigcache/v3/README.md b/vendor/github.com/allegro/bigcache/v3/README.md
deleted file mode 100644
index 253749be..00000000
--- a/vendor/github.com/allegro/bigcache/v3/README.md
+++ /dev/null
@@ -1,204 +0,0 @@
-# BigCache [![Build Status](https://github.com/allegro/bigcache/workflows/build/badge.svg)](https://github.com/allegro/bigcache/actions?query=workflow%3Abuild) [![Coverage Status](https://coveralls.io/repos/github/allegro/bigcache/badge.svg?branch=master)](https://coveralls.io/github/allegro/bigcache?branch=master) [![GoDoc](https://godoc.org/github.com/allegro/bigcache/v3?status.svg)](https://godoc.org/github.com/allegro/bigcache/v3) [![Go Report Card](https://goreportcard.com/badge/github.com/allegro/bigcache/v3)](https://goreportcard.com/report/github.com/allegro/bigcache/v3)
-
-Fast, concurrent, evicting in-memory cache written to keep big number of entries without impact on performance.
-BigCache keeps entries on heap but omits GC for them. To achieve that, operations on byte slices take place,
-therefore entries (de)serialization in front of the cache will be needed in most use cases.
-
-Requires Go 1.12 or newer.
-
-## Usage
-
-### Simple initialization
-
-```go
-import (
- "fmt"
- "context"
- "github.com/allegro/bigcache/v3"
-)
-
-cache, _ := bigcache.New(context.Background(), bigcache.DefaultConfig(10 * time.Minute))
-
-cache.Set("my-unique-key", []byte("value"))
-
-entry, _ := cache.Get("my-unique-key")
-fmt.Println(string(entry))
-```
-
-### Custom initialization
-
-When cache load can be predicted in advance then it is better to use custom initialization because additional memory
-allocation can be avoided in that way.
-
-```go
-import (
- "log"
-
- "github.com/allegro/bigcache/v3"
-)
-
-config := bigcache.Config {
- // number of shards (must be a power of 2)
- Shards: 1024,
-
- // time after which entry can be evicted
- LifeWindow: 10 * time.Minute,
-
- // Interval between removing expired entries (clean up).
- // If set to <= 0 then no action is performed.
- // Setting to < 1 second is counterproductive — bigcache has a one second resolution.
- CleanWindow: 5 * time.Minute,
-
- // rps * lifeWindow, used only in initial memory allocation
- MaxEntriesInWindow: 1000 * 10 * 60,
-
- // max entry size in bytes, used only in initial memory allocation
- MaxEntrySize: 500,
-
- // prints information about additional memory allocation
- Verbose: true,
-
- // cache will not allocate more memory than this limit, value in MB
- // if value is reached then the oldest entries can be overridden for the new ones
- // 0 value means no size limit
- HardMaxCacheSize: 8192,
-
- // callback fired when the oldest entry is removed because of its expiration time or no space left
- // for the new entry, or because delete was called. A bitmask representing the reason will be returned.
- // Default value is nil which means no callback and it prevents from unwrapping the oldest entry.
- OnRemove: nil,
-
- // OnRemoveWithReason is a callback fired when the oldest entry is removed because of its expiration time or no space left
- // for the new entry, or because delete was called. A constant representing the reason will be passed through.
- // Default value is nil which means no callback and it prevents from unwrapping the oldest entry.
- // Ignored if OnRemove is specified.
- OnRemoveWithReason: nil,
- }
-
-cache, initErr := bigcache.New(context.Background(), config)
-if initErr != nil {
- log.Fatal(initErr)
-}
-
-cache.Set("my-unique-key", []byte("value"))
-
-if entry, err := cache.Get("my-unique-key"); err == nil {
- fmt.Println(string(entry))
-}
-```
-
-### `LifeWindow` & `CleanWindow`
-
-1. `LifeWindow` is a time. After that time, an entry can be called dead but not deleted.
-
-2. `CleanWindow` is a time. After that time, all the dead entries will be deleted, but not the entries that still have life.
-
-## [Benchmarks](https://github.com/allegro/bigcache-bench)
-
-Three caches were compared: bigcache, [freecache](https://github.com/coocood/freecache) and map.
-Benchmark tests were made using an
-i7-6700K CPU @ 4.00GHz with 32GB of RAM on Ubuntu 18.04 LTS (5.2.12-050212-generic).
-
-Benchmarks source code can be found [here](https://github.com/allegro/bigcache-bench)
-
-### Writes and reads
-
-```bash
-go version
-go version go1.13 linux/amd64
-
-go test -bench=. -benchmem -benchtime=4s ./... -timeout 30m
-goos: linux
-goarch: amd64
-pkg: github.com/allegro/bigcache/v3/caches_bench
-BenchmarkMapSet-8 12999889 376 ns/op 199 B/op 3 allocs/op
-BenchmarkConcurrentMapSet-8 4355726 1275 ns/op 337 B/op 8 allocs/op
-BenchmarkFreeCacheSet-8 11068976 703 ns/op 328 B/op 2 allocs/op
-BenchmarkBigCacheSet-8 10183717 478 ns/op 304 B/op 2 allocs/op
-BenchmarkMapGet-8 16536015 324 ns/op 23 B/op 1 allocs/op
-BenchmarkConcurrentMapGet-8 13165708 401 ns/op 24 B/op 2 allocs/op
-BenchmarkFreeCacheGet-8 10137682 690 ns/op 136 B/op 2 allocs/op
-BenchmarkBigCacheGet-8 11423854 450 ns/op 152 B/op 4 allocs/op
-BenchmarkBigCacheSetParallel-8 34233472 148 ns/op 317 B/op 3 allocs/op
-BenchmarkFreeCacheSetParallel-8 34222654 268 ns/op 350 B/op 3 allocs/op
-BenchmarkConcurrentMapSetParallel-8 19635688 240 ns/op 200 B/op 6 allocs/op
-BenchmarkBigCacheGetParallel-8 60547064 86.1 ns/op 152 B/op 4 allocs/op
-BenchmarkFreeCacheGetParallel-8 50701280 147 ns/op 136 B/op 3 allocs/op
-BenchmarkConcurrentMapGetParallel-8 27353288 175 ns/op 24 B/op 2 allocs/op
-PASS
-ok github.com/allegro/bigcache/v3/caches_bench 256.257s
-```
-
-Writes and reads in bigcache are faster than in freecache.
-Writes to map are the slowest.
-
-### GC pause time
-
-```bash
-go version
-go version go1.13 linux/amd64
-
-go run caches_gc_overhead_comparison.go
-
-Number of entries: 20000000
-GC pause for bigcache: 1.506077ms
-GC pause for freecache: 5.594416ms
-GC pause for map: 9.347015ms
-```
-
-```
-go version
-go version go1.13 linux/arm64
-
-go run caches_gc_overhead_comparison.go
-Number of entries: 20000000
-GC pause for bigcache: 22.382827ms
-GC pause for freecache: 41.264651ms
-GC pause for map: 72.236853ms
-```
-
-Test shows how long are the GC pauses for caches filled with 20mln of entries.
-Bigcache and freecache have very similar GC pause time.
-
-### Memory usage
-
-You may encounter system memory reporting what appears to be an exponential increase, however this is expected behaviour. Go runtime allocates memory in chunks or 'spans' and will inform the OS when they are no longer required by changing their state to 'idle'. The 'spans' will remain part of the process resource usage until the OS needs to repurpose the address. Further reading available [here](https://utcc.utoronto.ca/~cks/space/blog/programming/GoNoMemoryFreeing).
-
-## How it works
-
-BigCache relies on optimization presented in 1.5 version of Go ([issue-9477](https://github.com/golang/go/issues/9477)).
-This optimization states that if map without pointers in keys and values is used then GC will omit its content.
-Therefore BigCache uses `map[uint64]uint32` where keys are hashed and values are offsets of entries.
-
-Entries are kept in byte slices, to omit GC again.
-Byte slices size can grow to gigabytes without impact on performance
-because GC will only see single pointer to it.
-
-### Collisions
-
-BigCache does not handle collisions. When new item is inserted and it's hash collides with previously stored item, new item overwrites previously stored value.
-
-## Bigcache vs Freecache
-
-Both caches provide the same core features but they reduce GC overhead in different ways.
-Bigcache relies on `map[uint64]uint32`, freecache implements its own mapping built on
-slices to reduce number of pointers.
-
-Results from benchmark tests are presented above.
-One of the advantage of bigcache over freecache is that you don’t need to know
-the size of the cache in advance, because when bigcache is full,
-it can allocate additional memory for new entries instead of
-overwriting existing ones as freecache does currently.
-However hard max size in bigcache also can be set, check [HardMaxCacheSize](https://godoc.org/github.com/allegro/bigcache#Config).
-
-## HTTP Server
-
-This package also includes an easily deployable HTTP implementation of BigCache, which can be found in the [server](/server) package.
-
-## More
-
-Bigcache genesis is described in allegro.tech blog post: [writing a very fast cache service in Go](http://allegro.tech/2016/03/writing-fast-cache-service-in-go.html)
-
-## License
-
-BigCache is released under the Apache 2.0 license (see [LICENSE](LICENSE))
diff --git a/vendor/github.com/allegro/bigcache/v3/bigcache.go b/vendor/github.com/allegro/bigcache/v3/bigcache.go
deleted file mode 100644
index 17e2aca7..00000000
--- a/vendor/github.com/allegro/bigcache/v3/bigcache.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package bigcache
-
-import (
- "context"
- "fmt"
- "time"
-)
-
-const (
- minimumEntriesInShard = 10 // Minimum number of entries in single shard
-)
-
-// BigCache is fast, concurrent, evicting cache created to keep big number of entries without impact on performance.
-// It keeps entries on heap but omits GC for them. To achieve that, operations take place on byte arrays,
-// therefore entries (de)serialization in front of the cache will be needed in most use cases.
-type BigCache struct {
- shards []*cacheShard
- lifeWindow uint64
- clock clock
- hash Hasher
- config Config
- shardMask uint64
- close chan struct{}
-}
-
-// Response will contain metadata about the entry for which GetWithInfo(key) was called
-type Response struct {
- EntryStatus RemoveReason
-}
-
-// RemoveReason is a value used to signal to the user why a particular key was removed in the OnRemove callback.
-type RemoveReason uint32
-
-const (
- // Expired means the key is past its LifeWindow.
- Expired = RemoveReason(1)
- // NoSpace means the key is the oldest and the cache size was at its maximum when Set was called, or the
- // entry exceeded the maximum shard size.
- NoSpace = RemoveReason(2)
- // Deleted means Delete was called and this key was removed as a result.
- Deleted = RemoveReason(3)
-)
-
-// New initialize new instance of BigCache
-func New(ctx context.Context, config Config) (*BigCache, error) {
- return newBigCache(ctx, config, &systemClock{})
-}
-
-// NewBigCache initialize new instance of BigCache
-//
-// Deprecated: NewBigCache is deprecated, please use New(ctx, config) instead,
-// New takes in context and can gracefully
-// shutdown with context cancellations
-func NewBigCache(config Config) (*BigCache, error) {
- return newBigCache(context.Background(), config, &systemClock{})
-}
-
-func newBigCache(ctx context.Context, config Config, clock clock) (*BigCache, error) {
- if !isPowerOfTwo(config.Shards) {
- return nil, fmt.Errorf("Shards number must be power of two")
- }
- if config.MaxEntrySize < 0 {
- return nil, fmt.Errorf("MaxEntrySize must be >= 0")
- }
- if config.MaxEntriesInWindow < 0 {
- return nil, fmt.Errorf("MaxEntriesInWindow must be >= 0")
- }
- if config.HardMaxCacheSize < 0 {
- return nil, fmt.Errorf("HardMaxCacheSize must be >= 0")
- }
-
- if config.Hasher == nil {
- config.Hasher = newDefaultHasher()
- }
-
- cache := &BigCache{
- shards: make([]*cacheShard, config.Shards),
- lifeWindow: uint64(config.LifeWindow.Seconds()),
- clock: clock,
- hash: config.Hasher,
- config: config,
- shardMask: uint64(config.Shards - 1),
- close: make(chan struct{}),
- }
-
- var onRemove func(wrappedEntry []byte, reason RemoveReason)
- if config.OnRemoveWithMetadata != nil {
- onRemove = cache.providedOnRemoveWithMetadata
- } else if config.OnRemove != nil {
- onRemove = cache.providedOnRemove
- } else if config.OnRemoveWithReason != nil {
- onRemove = cache.providedOnRemoveWithReason
- } else {
- onRemove = cache.notProvidedOnRemove
- }
-
- for i := 0; i < config.Shards; i++ {
- cache.shards[i] = initNewShard(config, onRemove, clock)
- }
-
- if config.CleanWindow > 0 {
- go func() {
- ticker := time.NewTicker(config.CleanWindow)
- defer ticker.Stop()
- for {
- select {
- case <-ctx.Done():
- fmt.Println("ctx done, shutting down bigcache cleanup routine")
- return
- case t := <-ticker.C:
- cache.cleanUp(uint64(t.Unix()))
- case <-cache.close:
- return
- }
- }
- }()
- }
-
- return cache, nil
-}
-
-// Close is used to signal a shutdown of the cache when you are done with it.
-// This allows the cleaning goroutines to exit and ensures references are not
-// kept to the cache preventing GC of the entire cache.
-func (c *BigCache) Close() error {
- close(c.close)
- return nil
-}
-
-// Get reads entry for the key.
-// It returns an ErrEntryNotFound when
-// no entry exists for the given key.
-func (c *BigCache) Get(key string) ([]byte, error) {
- hashedKey := c.hash.Sum64(key)
- shard := c.getShard(hashedKey)
- return shard.get(key, hashedKey)
-}
-
-// GetWithInfo reads entry for the key with Response info.
-// It returns an ErrEntryNotFound when
-// no entry exists for the given key.
-func (c *BigCache) GetWithInfo(key string) ([]byte, Response, error) {
- hashedKey := c.hash.Sum64(key)
- shard := c.getShard(hashedKey)
- return shard.getWithInfo(key, hashedKey)
-}
-
-// Set saves entry under the key
-func (c *BigCache) Set(key string, entry []byte) error {
- hashedKey := c.hash.Sum64(key)
- shard := c.getShard(hashedKey)
- return shard.set(key, hashedKey, entry)
-}
-
-// Append appends entry under the key if key exists, otherwise
-// it will set the key (same behaviour as Set()). With Append() you can
-// concatenate multiple entries under the same key in an lock optimized way.
-func (c *BigCache) Append(key string, entry []byte) error {
- hashedKey := c.hash.Sum64(key)
- shard := c.getShard(hashedKey)
- return shard.append(key, hashedKey, entry)
-}
-
-// Delete removes the key
-func (c *BigCache) Delete(key string) error {
- hashedKey := c.hash.Sum64(key)
- shard := c.getShard(hashedKey)
- return shard.del(hashedKey)
-}
-
-// Reset empties all cache shards
-func (c *BigCache) Reset() error {
- for _, shard := range c.shards {
- shard.reset(c.config)
- }
- return nil
-}
-
-// ResetStats resets cache stats
-func (c *BigCache) ResetStats() error {
- for _, shard := range c.shards {
- shard.resetStats()
- }
- return nil
-}
-
-// Len computes number of entries in cache
-func (c *BigCache) Len() int {
- var len int
- for _, shard := range c.shards {
- len += shard.len()
- }
- return len
-}
-
-// Capacity returns amount of bytes store in the cache.
-func (c *BigCache) Capacity() int {
- var len int
- for _, shard := range c.shards {
- len += shard.capacity()
- }
- return len
-}
-
-// Stats returns cache's statistics
-func (c *BigCache) Stats() Stats {
- var s Stats
- for _, shard := range c.shards {
- tmp := shard.getStats()
- s.Hits += tmp.Hits
- s.Misses += tmp.Misses
- s.DelHits += tmp.DelHits
- s.DelMisses += tmp.DelMisses
- s.Collisions += tmp.Collisions
- }
- return s
-}
-
-// KeyMetadata returns number of times a cached resource was requested.
-func (c *BigCache) KeyMetadata(key string) Metadata {
- hashedKey := c.hash.Sum64(key)
- shard := c.getShard(hashedKey)
- return shard.getKeyMetadataWithLock(hashedKey)
-}
-
-// Iterator returns iterator function to iterate over EntryInfo's from whole cache.
-func (c *BigCache) Iterator() *EntryInfoIterator {
- return newIterator(c)
-}
-
-func (c *BigCache) onEvict(oldestEntry []byte, currentTimestamp uint64, evict func(reason RemoveReason) error) bool {
- oldestTimestamp := readTimestampFromEntry(oldestEntry)
- if currentTimestamp < oldestTimestamp {
- return false
- }
- if currentTimestamp-oldestTimestamp > c.lifeWindow {
- evict(Expired)
- return true
- }
- return false
-}
-
-func (c *BigCache) cleanUp(currentTimestamp uint64) {
- for _, shard := range c.shards {
- shard.cleanUp(currentTimestamp)
- }
-}
-
-func (c *BigCache) getShard(hashedKey uint64) (shard *cacheShard) {
- return c.shards[hashedKey&c.shardMask]
-}
-
-func (c *BigCache) providedOnRemove(wrappedEntry []byte, reason RemoveReason) {
- c.config.OnRemove(readKeyFromEntry(wrappedEntry), readEntry(wrappedEntry))
-}
-
-func (c *BigCache) providedOnRemoveWithReason(wrappedEntry []byte, reason RemoveReason) {
- if c.config.onRemoveFilter == 0 || (1< 0 {
- c.config.OnRemoveWithReason(readKeyFromEntry(wrappedEntry), readEntry(wrappedEntry), reason)
- }
-}
-
-func (c *BigCache) notProvidedOnRemove(wrappedEntry []byte, reason RemoveReason) {
-}
-
-func (c *BigCache) providedOnRemoveWithMetadata(wrappedEntry []byte, reason RemoveReason) {
- hashedKey := c.hash.Sum64(readKeyFromEntry(wrappedEntry))
- shard := c.getShard(hashedKey)
- c.config.OnRemoveWithMetadata(readKeyFromEntry(wrappedEntry), readEntry(wrappedEntry), shard.getKeyMetadata(hashedKey))
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/bytes.go b/vendor/github.com/allegro/bigcache/v3/bytes.go
deleted file mode 100644
index 2bf2e9a9..00000000
--- a/vendor/github.com/allegro/bigcache/v3/bytes.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build !appengine
-
-package bigcache
-
-import (
- "unsafe"
-)
-
-func bytesToString(b []byte) string {
- return *(*string)(unsafe.Pointer(&b))
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/bytes_appengine.go b/vendor/github.com/allegro/bigcache/v3/bytes_appengine.go
deleted file mode 100644
index 3892f3b5..00000000
--- a/vendor/github.com/allegro/bigcache/v3/bytes_appengine.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// +build appengine
-
-package bigcache
-
-func bytesToString(b []byte) string {
- return string(b)
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/clock.go b/vendor/github.com/allegro/bigcache/v3/clock.go
deleted file mode 100644
index 195d01af..00000000
--- a/vendor/github.com/allegro/bigcache/v3/clock.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package bigcache
-
-import "time"
-
-type clock interface {
- Epoch() int64
-}
-
-type systemClock struct {
-}
-
-func (c systemClock) Epoch() int64 {
- return time.Now().Unix()
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/config.go b/vendor/github.com/allegro/bigcache/v3/config.go
deleted file mode 100644
index 63a4e9b1..00000000
--- a/vendor/github.com/allegro/bigcache/v3/config.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package bigcache
-
-import "time"
-
-// Config for BigCache
-type Config struct {
- // Number of cache shards, value must be a power of two
- Shards int
- // Time after which entry can be evicted
- LifeWindow time.Duration
- // Interval between removing expired entries (clean up).
- // If set to <= 0 then no action is performed. Setting to < 1 second is counterproductive — bigcache has a one second resolution.
- CleanWindow time.Duration
- // Max number of entries in life window. Used only to calculate initial size for cache shards.
- // When proper value is set then additional memory allocation does not occur.
- MaxEntriesInWindow int
- // Max size of entry in bytes. Used only to calculate initial size for cache shards.
- MaxEntrySize int
- // StatsEnabled if true calculate the number of times a cached resource was requested.
- StatsEnabled bool
- // Verbose mode prints information about new memory allocation
- Verbose bool
- // Hasher used to map between string keys and unsigned 64bit integers, by default fnv64 hashing is used.
- Hasher Hasher
- // HardMaxCacheSize is a limit for BytesQueue size in MB.
- // It can protect application from consuming all available memory on machine, therefore from running OOM Killer.
- // Default value is 0 which means unlimited size. When the limit is higher than 0 and reached then
- // the oldest entries are overridden for the new ones. The max memory consumption will be bigger than
- // HardMaxCacheSize due to Shards' s additional memory. Every Shard consumes additional memory for map of keys
- // and statistics (map[uint64]uint32) the size of this map is equal to number of entries in
- // cache ~ 2×(64+32)×n bits + overhead or map itself.
- HardMaxCacheSize int
- // OnRemove is a callback fired when the oldest entry is removed because of its expiration time or no space left
- // for the new entry, or because delete was called.
- // Default value is nil which means no callback and it prevents from unwrapping the oldest entry.
- // ignored if OnRemoveWithMetadata is specified.
- OnRemove func(key string, entry []byte)
- // OnRemoveWithMetadata is a callback fired when the oldest entry is removed because of its expiration time or no space left
- // for the new entry, or because delete was called. A structure representing details about that specific entry.
- // Default value is nil which means no callback and it prevents from unwrapping the oldest entry.
- OnRemoveWithMetadata func(key string, entry []byte, keyMetadata Metadata)
- // OnRemoveWithReason is a callback fired when the oldest entry is removed because of its expiration time or no space left
- // for the new entry, or because delete was called. A constant representing the reason will be passed through.
- // Default value is nil which means no callback and it prevents from unwrapping the oldest entry.
- // Ignored if OnRemove is specified.
- OnRemoveWithReason func(key string, entry []byte, reason RemoveReason)
-
- onRemoveFilter int
-
- // Logger is a logging interface and used in combination with `Verbose`
- // Defaults to `DefaultLogger()`
- Logger Logger
-}
-
-// DefaultConfig initializes config with default values.
-// When load for BigCache can be predicted in advance then it is better to use custom config.
-func DefaultConfig(eviction time.Duration) Config {
- return Config{
- Shards: 1024,
- LifeWindow: eviction,
- CleanWindow: 1 * time.Second,
- MaxEntriesInWindow: 1000 * 10 * 60,
- MaxEntrySize: 500,
- StatsEnabled: false,
- Verbose: true,
- Hasher: newDefaultHasher(),
- HardMaxCacheSize: 0,
- Logger: DefaultLogger(),
- }
-}
-
-// initialShardSize computes initial shard size
-func (c Config) initialShardSize() int {
- return max(c.MaxEntriesInWindow/c.Shards, minimumEntriesInShard)
-}
-
-// maximumShardSizeInBytes computes maximum shard size in bytes
-func (c Config) maximumShardSizeInBytes() int {
- maxShardSize := 0
-
- if c.HardMaxCacheSize > 0 {
- maxShardSize = convertMBToBytes(c.HardMaxCacheSize) / c.Shards
- }
-
- return maxShardSize
-}
-
-// OnRemoveFilterSet sets which remove reasons will trigger a call to OnRemoveWithReason.
-// Filtering out reasons prevents bigcache from unwrapping them, which saves cpu.
-func (c Config) OnRemoveFilterSet(reasons ...RemoveReason) Config {
- c.onRemoveFilter = 0
- for i := range reasons {
- c.onRemoveFilter |= 1 << uint(reasons[i])
- }
-
- return c
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/encoding.go b/vendor/github.com/allegro/bigcache/v3/encoding.go
deleted file mode 100644
index fc861251..00000000
--- a/vendor/github.com/allegro/bigcache/v3/encoding.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package bigcache
-
-import (
- "encoding/binary"
-)
-
-const (
- timestampSizeInBytes = 8 // Number of bytes used for timestamp
- hashSizeInBytes = 8 // Number of bytes used for hash
- keySizeInBytes = 2 // Number of bytes used for size of entry key
- headersSizeInBytes = timestampSizeInBytes + hashSizeInBytes + keySizeInBytes // Number of bytes used for all headers
-)
-
-func wrapEntry(timestamp uint64, hash uint64, key string, entry []byte, buffer *[]byte) []byte {
- keyLength := len(key)
- blobLength := len(entry) + headersSizeInBytes + keyLength
-
- if blobLength > len(*buffer) {
- *buffer = make([]byte, blobLength)
- }
- blob := *buffer
-
- binary.LittleEndian.PutUint64(blob, timestamp)
- binary.LittleEndian.PutUint64(blob[timestampSizeInBytes:], hash)
- binary.LittleEndian.PutUint16(blob[timestampSizeInBytes+hashSizeInBytes:], uint16(keyLength))
- copy(blob[headersSizeInBytes:], key)
- copy(blob[headersSizeInBytes+keyLength:], entry)
-
- return blob[:blobLength]
-}
-
-func appendToWrappedEntry(timestamp uint64, wrappedEntry []byte, entry []byte, buffer *[]byte) []byte {
- blobLength := len(wrappedEntry) + len(entry)
- if blobLength > len(*buffer) {
- *buffer = make([]byte, blobLength)
- }
-
- blob := *buffer
-
- binary.LittleEndian.PutUint64(blob, timestamp)
- copy(blob[timestampSizeInBytes:], wrappedEntry[timestampSizeInBytes:])
- copy(blob[len(wrappedEntry):], entry)
-
- return blob[:blobLength]
-}
-
-func readEntry(data []byte) []byte {
- length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:])
-
- // copy on read
- dst := make([]byte, len(data)-int(headersSizeInBytes+length))
- copy(dst, data[headersSizeInBytes+length:])
-
- return dst
-}
-
-func readTimestampFromEntry(data []byte) uint64 {
- return binary.LittleEndian.Uint64(data)
-}
-
-func readKeyFromEntry(data []byte) string {
- length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:])
-
- // copy on read
- dst := make([]byte, length)
- copy(dst, data[headersSizeInBytes:headersSizeInBytes+length])
-
- return bytesToString(dst)
-}
-
-func compareKeyFromEntry(data []byte, key string) bool {
- length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:])
-
- return bytesToString(data[headersSizeInBytes:headersSizeInBytes+length]) == key
-}
-
-func readHashFromEntry(data []byte) uint64 {
- return binary.LittleEndian.Uint64(data[timestampSizeInBytes:])
-}
-
-func resetKeyFromEntry(data []byte) {
- binary.LittleEndian.PutUint64(data[timestampSizeInBytes:], 0)
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go b/vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go
deleted file mode 100644
index 8993384d..00000000
--- a/vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package bigcache
-
-import "errors"
-
-var (
- // ErrEntryNotFound is an error type struct which is returned when entry was not found for provided key
- ErrEntryNotFound = errors.New("Entry not found")
-)
diff --git a/vendor/github.com/allegro/bigcache/v3/fnv.go b/vendor/github.com/allegro/bigcache/v3/fnv.go
deleted file mode 100644
index 188c9aa6..00000000
--- a/vendor/github.com/allegro/bigcache/v3/fnv.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package bigcache
-
-// newDefaultHasher returns a new 64-bit FNV-1a Hasher which makes no memory allocations.
-// Its Sum64 method will lay the value out in big-endian byte order.
-// See https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function
-func newDefaultHasher() Hasher {
- return fnv64a{}
-}
-
-type fnv64a struct{}
-
-const (
- // offset64 FNVa offset basis. See https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function#FNV-1a_hash
- offset64 = 14695981039346656037
- // prime64 FNVa prime value. See https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function#FNV-1a_hash
- prime64 = 1099511628211
-)
-
-// Sum64 gets the string and returns its uint64 hash value.
-func (f fnv64a) Sum64(key string) uint64 {
- var hash uint64 = offset64
- for i := 0; i < len(key); i++ {
- hash ^= uint64(key[i])
- hash *= prime64
- }
-
- return hash
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/hash.go b/vendor/github.com/allegro/bigcache/v3/hash.go
deleted file mode 100644
index 5f8ade77..00000000
--- a/vendor/github.com/allegro/bigcache/v3/hash.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package bigcache
-
-// Hasher is responsible for generating unsigned, 64 bit hash of provided string. Hasher should minimize collisions
-// (generating same hash for different strings) and while performance is also important fast functions are preferable (i.e.
-// you can use FarmHash family).
-type Hasher interface {
- Sum64(string) uint64
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/iterator.go b/vendor/github.com/allegro/bigcache/v3/iterator.go
deleted file mode 100644
index db2a2ef4..00000000
--- a/vendor/github.com/allegro/bigcache/v3/iterator.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package bigcache
-
-import (
- "sync"
-)
-
-type iteratorError string
-
-func (e iteratorError) Error() string {
- return string(e)
-}
-
-// ErrInvalidIteratorState is reported when iterator is in invalid state
-const ErrInvalidIteratorState = iteratorError("Iterator is in invalid state. Use SetNext() to move to next position")
-
-// ErrCannotRetrieveEntry is reported when entry cannot be retrieved from underlying
-const ErrCannotRetrieveEntry = iteratorError("Could not retrieve entry from cache")
-
-var emptyEntryInfo = EntryInfo{}
-
-// EntryInfo holds informations about entry in the cache
-type EntryInfo struct {
- timestamp uint64
- hash uint64
- key string
- value []byte
- err error
-}
-
-// Key returns entry's underlying key
-func (e EntryInfo) Key() string {
- return e.key
-}
-
-// Hash returns entry's hash value
-func (e EntryInfo) Hash() uint64 {
- return e.hash
-}
-
-// Timestamp returns entry's timestamp (time of insertion)
-func (e EntryInfo) Timestamp() uint64 {
- return e.timestamp
-}
-
-// Value returns entry's underlying value
-func (e EntryInfo) Value() []byte {
- return e.value
-}
-
-// EntryInfoIterator allows to iterate over entries in the cache
-type EntryInfoIterator struct {
- mutex sync.Mutex
- cache *BigCache
- currentShard int
- currentIndex int
- currentEntryInfo EntryInfo
- elements []uint64
- elementsCount int
- valid bool
-}
-
-// SetNext moves to next element and returns true if it exists.
-func (it *EntryInfoIterator) SetNext() bool {
- it.mutex.Lock()
-
- it.valid = false
- it.currentIndex++
-
- if it.elementsCount > it.currentIndex {
- it.valid = true
-
- empty := it.setCurrentEntry()
- it.mutex.Unlock()
-
- if empty {
- return it.SetNext()
- }
- return true
- }
-
- for i := it.currentShard + 1; i < it.cache.config.Shards; i++ {
- it.elements, it.elementsCount = it.cache.shards[i].copyHashedKeys()
-
- // Non empty shard - stick with it
- if it.elementsCount > 0 {
- it.currentIndex = 0
- it.currentShard = i
- it.valid = true
-
- empty := it.setCurrentEntry()
- it.mutex.Unlock()
-
- if empty {
- return it.SetNext()
- }
- return true
- }
- }
- it.mutex.Unlock()
- return false
-}
-
-func (it *EntryInfoIterator) setCurrentEntry() bool {
- var entryNotFound = false
- entry, err := it.cache.shards[it.currentShard].getEntry(it.elements[it.currentIndex])
-
- if err == ErrEntryNotFound {
- it.currentEntryInfo = emptyEntryInfo
- entryNotFound = true
- } else if err != nil {
- it.currentEntryInfo = EntryInfo{
- err: err,
- }
- } else {
- it.currentEntryInfo = EntryInfo{
- timestamp: readTimestampFromEntry(entry),
- hash: readHashFromEntry(entry),
- key: readKeyFromEntry(entry),
- value: readEntry(entry),
- err: err,
- }
- }
-
- return entryNotFound
-}
-
-func newIterator(cache *BigCache) *EntryInfoIterator {
- elements, count := cache.shards[0].copyHashedKeys()
-
- return &EntryInfoIterator{
- cache: cache,
- currentShard: 0,
- currentIndex: -1,
- elements: elements,
- elementsCount: count,
- }
-}
-
-// Value returns current value from the iterator
-func (it *EntryInfoIterator) Value() (EntryInfo, error) {
- if !it.valid {
- return emptyEntryInfo, ErrInvalidIteratorState
- }
-
- return it.currentEntryInfo, it.currentEntryInfo.err
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/logger.go b/vendor/github.com/allegro/bigcache/v3/logger.go
deleted file mode 100644
index 50e84abc..00000000
--- a/vendor/github.com/allegro/bigcache/v3/logger.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package bigcache
-
-import (
- "log"
- "os"
-)
-
-// Logger is invoked when `Config.Verbose=true`
-type Logger interface {
- Printf(format string, v ...interface{})
-}
-
-// this is a safeguard, breaking on compile time in case
-// `log.Logger` does not adhere to our `Logger` interface.
-// see https://golang.org/doc/faq#guarantee_satisfies_interface
-var _ Logger = &log.Logger{}
-
-// DefaultLogger returns a `Logger` implementation
-// backed by stdlib's log
-func DefaultLogger() *log.Logger {
- return log.New(os.Stdout, "", log.LstdFlags)
-}
-
-func newLogger(custom Logger) Logger {
- if custom != nil {
- return custom
- }
-
- return DefaultLogger()
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go b/vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go
deleted file mode 100644
index 3ef0f6d9..00000000
--- a/vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go
+++ /dev/null
@@ -1,269 +0,0 @@
-package queue
-
-import (
- "encoding/binary"
- "log"
- "time"
-)
-
-const (
- // Number of bytes to encode 0 in uvarint format
- minimumHeaderSize = 17 // 1 byte blobsize + timestampSizeInBytes + hashSizeInBytes
- // Bytes before left margin are not used. Zero index means element does not exist in queue, useful while reading slice from index
- leftMarginIndex = 1
-)
-
-var (
- errEmptyQueue = &queueError{"Empty queue"}
- errInvalidIndex = &queueError{"Index must be greater than zero. Invalid index."}
- errIndexOutOfBounds = &queueError{"Index out of range"}
-)
-
-// BytesQueue is a non-thread safe queue type of fifo based on bytes array.
-// For every push operation index of entry is returned. It can be used to read the entry later
-type BytesQueue struct {
- full bool
- array []byte
- capacity int
- maxCapacity int
- head int
- tail int
- count int
- rightMargin int
- headerBuffer []byte
- verbose bool
-}
-
-type queueError struct {
- message string
-}
-
-// getNeededSize returns the number of bytes an entry of length need in the queue
-func getNeededSize(length int) int {
- var header int
- switch {
- case length < 127: // 1<<7-1
- header = 1
- case length < 16382: // 1<<14-2
- header = 2
- case length < 2097149: // 1<<21 -3
- header = 3
- case length < 268435452: // 1<<28 -4
- header = 4
- default:
- header = 5
- }
-
- return length + header
-}
-
-// NewBytesQueue initialize new bytes queue.
-// capacity is used in bytes array allocation
-// When verbose flag is set then information about memory allocation are printed
-func NewBytesQueue(capacity int, maxCapacity int, verbose bool) *BytesQueue {
- return &BytesQueue{
- array: make([]byte, capacity),
- capacity: capacity,
- maxCapacity: maxCapacity,
- headerBuffer: make([]byte, binary.MaxVarintLen32),
- tail: leftMarginIndex,
- head: leftMarginIndex,
- rightMargin: leftMarginIndex,
- verbose: verbose,
- }
-}
-
-// Reset removes all entries from queue
-func (q *BytesQueue) Reset() {
- // Just reset indexes
- q.tail = leftMarginIndex
- q.head = leftMarginIndex
- q.rightMargin = leftMarginIndex
- q.count = 0
- q.full = false
-}
-
-// Push copies entry at the end of queue and moves tail pointer. Allocates more space if needed.
-// Returns index for pushed data or error if maximum size queue limit is reached.
-func (q *BytesQueue) Push(data []byte) (int, error) {
- neededSize := getNeededSize(len(data))
-
- if !q.canInsertAfterTail(neededSize) {
- if q.canInsertBeforeHead(neededSize) {
- q.tail = leftMarginIndex
- } else if q.capacity+neededSize >= q.maxCapacity && q.maxCapacity > 0 {
- return -1, &queueError{"Full queue. Maximum size limit reached."}
- } else {
- q.allocateAdditionalMemory(neededSize)
- }
- }
-
- index := q.tail
-
- q.push(data, neededSize)
-
- return index, nil
-}
-
-func (q *BytesQueue) allocateAdditionalMemory(minimum int) {
- start := time.Now()
- if q.capacity < minimum {
- q.capacity += minimum
- }
- q.capacity = q.capacity * 2
- if q.capacity > q.maxCapacity && q.maxCapacity > 0 {
- q.capacity = q.maxCapacity
- }
-
- oldArray := q.array
- q.array = make([]byte, q.capacity)
-
- if leftMarginIndex != q.rightMargin {
- copy(q.array, oldArray[:q.rightMargin])
-
- if q.tail <= q.head {
- if q.tail != q.head {
- // created slice is slightly larger then need but this is fine after only the needed bytes are copied
- q.push(make([]byte, q.head-q.tail), q.head-q.tail)
- }
-
- q.head = leftMarginIndex
- q.tail = q.rightMargin
- }
- }
-
- q.full = false
-
- if q.verbose {
- log.Printf("Allocated new queue in %s; Capacity: %d \n", time.Since(start), q.capacity)
- }
-}
-
-func (q *BytesQueue) push(data []byte, len int) {
- headerEntrySize := binary.PutUvarint(q.headerBuffer, uint64(len))
- q.copy(q.headerBuffer, headerEntrySize)
-
- q.copy(data, len-headerEntrySize)
-
- if q.tail > q.head {
- q.rightMargin = q.tail
- }
- if q.tail == q.head {
- q.full = true
- }
-
- q.count++
-}
-
-func (q *BytesQueue) copy(data []byte, len int) {
- q.tail += copy(q.array[q.tail:], data[:len])
-}
-
-// Pop reads the oldest entry from queue and moves head pointer to the next one
-func (q *BytesQueue) Pop() ([]byte, error) {
- data, blockSize, err := q.peek(q.head)
- if err != nil {
- return nil, err
- }
-
- q.head += blockSize
- q.count--
-
- if q.head == q.rightMargin {
- q.head = leftMarginIndex
- if q.tail == q.rightMargin {
- q.tail = leftMarginIndex
- }
- q.rightMargin = q.tail
- }
-
- q.full = false
-
- return data, nil
-}
-
-// Peek reads the oldest entry from list without moving head pointer
-func (q *BytesQueue) Peek() ([]byte, error) {
- data, _, err := q.peek(q.head)
- return data, err
-}
-
-// Get reads entry from index
-func (q *BytesQueue) Get(index int) ([]byte, error) {
- data, _, err := q.peek(index)
- return data, err
-}
-
-// CheckGet checks if an entry can be read from index
-func (q *BytesQueue) CheckGet(index int) error {
- return q.peekCheckErr(index)
-}
-
-// Capacity returns number of allocated bytes for queue
-func (q *BytesQueue) Capacity() int {
- return q.capacity
-}
-
-// Len returns number of entries kept in queue
-func (q *BytesQueue) Len() int {
- return q.count
-}
-
-// Error returns error message
-func (e *queueError) Error() string {
- return e.message
-}
-
-// peekCheckErr is identical to peek, but does not actually return any data
-func (q *BytesQueue) peekCheckErr(index int) error {
-
- if q.count == 0 {
- return errEmptyQueue
- }
-
- if index <= 0 {
- return errInvalidIndex
- }
-
- if index >= len(q.array) {
- return errIndexOutOfBounds
- }
- return nil
-}
-
-// peek returns the data from index and the number of bytes to encode the length of the data in uvarint format
-func (q *BytesQueue) peek(index int) ([]byte, int, error) {
- err := q.peekCheckErr(index)
- if err != nil {
- return nil, 0, err
- }
-
- blockSize, n := binary.Uvarint(q.array[index:])
- return q.array[index+n : index+int(blockSize)], int(blockSize), nil
-}
-
-// canInsertAfterTail returns true if it's possible to insert an entry of size of need after the tail of the queue
-func (q *BytesQueue) canInsertAfterTail(need int) bool {
- if q.full {
- return false
- }
- if q.tail >= q.head {
- return q.capacity-q.tail >= need
- }
- // 1. there is exactly need bytes between head and tail, so we do not need
- // to reserve extra space for a potential empty entry when realloc this queue
- // 2. still have unused space between tail and head, then we must reserve
- // at least headerEntrySize bytes so we can put an empty entry
- return q.head-q.tail == need || q.head-q.tail >= need+minimumHeaderSize
-}
-
-// canInsertBeforeHead returns true if it's possible to insert an entry of size of need before the head of the queue
-func (q *BytesQueue) canInsertBeforeHead(need int) bool {
- if q.full {
- return false
- }
- if q.tail >= q.head {
- return q.head-leftMarginIndex == need || q.head-leftMarginIndex >= need+minimumHeaderSize
- }
- return q.head-q.tail == need || q.head-q.tail >= need+minimumHeaderSize
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/shard.go b/vendor/github.com/allegro/bigcache/v3/shard.go
deleted file mode 100644
index e80a759a..00000000
--- a/vendor/github.com/allegro/bigcache/v3/shard.go
+++ /dev/null
@@ -1,454 +0,0 @@
-package bigcache
-
-import (
- "fmt"
- "sync"
- "sync/atomic"
-
- "github.com/allegro/bigcache/v3/queue"
-)
-
-type onRemoveCallback func(wrappedEntry []byte, reason RemoveReason)
-
-// Metadata contains information of a specific entry
-type Metadata struct {
- RequestCount uint32
-}
-
-type cacheShard struct {
- hashmap map[uint64]uint32
- entries queue.BytesQueue
- lock sync.RWMutex
- entryBuffer []byte
- onRemove onRemoveCallback
-
- isVerbose bool
- statsEnabled bool
- logger Logger
- clock clock
- lifeWindow uint64
-
- hashmapStats map[uint64]uint32
- stats Stats
- cleanEnabled bool
-}
-
-func (s *cacheShard) getWithInfo(key string, hashedKey uint64) (entry []byte, resp Response, err error) {
- currentTime := uint64(s.clock.Epoch())
- s.lock.RLock()
- wrappedEntry, err := s.getWrappedEntry(hashedKey)
- if err != nil {
- s.lock.RUnlock()
- return nil, resp, err
- }
- if entryKey := readKeyFromEntry(wrappedEntry); key != entryKey {
- s.lock.RUnlock()
- s.collision()
- if s.isVerbose {
- s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, entryKey, hashedKey)
- }
- return nil, resp, ErrEntryNotFound
- }
-
- entry = readEntry(wrappedEntry)
- if s.isExpired(wrappedEntry, currentTime) {
- resp.EntryStatus = Expired
- }
- s.lock.RUnlock()
- s.hit(hashedKey)
- return entry, resp, nil
-}
-
-func (s *cacheShard) get(key string, hashedKey uint64) ([]byte, error) {
- s.lock.RLock()
- wrappedEntry, err := s.getWrappedEntry(hashedKey)
- if err != nil {
- s.lock.RUnlock()
- return nil, err
- }
- if entryKey := readKeyFromEntry(wrappedEntry); key != entryKey {
- s.lock.RUnlock()
- s.collision()
- if s.isVerbose {
- s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, entryKey, hashedKey)
- }
- return nil, ErrEntryNotFound
- }
- entry := readEntry(wrappedEntry)
- s.lock.RUnlock()
- s.hit(hashedKey)
-
- return entry, nil
-}
-
-func (s *cacheShard) getWrappedEntry(hashedKey uint64) ([]byte, error) {
- itemIndex := s.hashmap[hashedKey]
-
- if itemIndex == 0 {
- s.miss()
- return nil, ErrEntryNotFound
- }
-
- wrappedEntry, err := s.entries.Get(int(itemIndex))
- if err != nil {
- s.miss()
- return nil, err
- }
-
- return wrappedEntry, err
-}
-
-func (s *cacheShard) getValidWrapEntry(key string, hashedKey uint64) ([]byte, error) {
- wrappedEntry, err := s.getWrappedEntry(hashedKey)
- if err != nil {
- return nil, err
- }
-
- if !compareKeyFromEntry(wrappedEntry, key) {
- s.collision()
- if s.isVerbose {
- s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, readKeyFromEntry(wrappedEntry), hashedKey)
- }
-
- return nil, ErrEntryNotFound
- }
- s.hitWithoutLock(hashedKey)
-
- return wrappedEntry, nil
-}
-
-func (s *cacheShard) set(key string, hashedKey uint64, entry []byte) error {
- currentTimestamp := uint64(s.clock.Epoch())
-
- s.lock.Lock()
-
- if previousIndex := s.hashmap[hashedKey]; previousIndex != 0 {
- if previousEntry, err := s.entries.Get(int(previousIndex)); err == nil {
- resetKeyFromEntry(previousEntry)
- //remove hashkey
- delete(s.hashmap, hashedKey)
- }
- }
-
- if !s.cleanEnabled {
- if oldestEntry, err := s.entries.Peek(); err == nil {
- s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry)
- }
- }
-
- w := wrapEntry(currentTimestamp, hashedKey, key, entry, &s.entryBuffer)
-
- for {
- if index, err := s.entries.Push(w); err == nil {
- s.hashmap[hashedKey] = uint32(index)
- s.lock.Unlock()
- return nil
- }
- if s.removeOldestEntry(NoSpace) != nil {
- s.lock.Unlock()
- return fmt.Errorf("entry is bigger than max shard size")
- }
- }
-}
-
-func (s *cacheShard) addNewWithoutLock(key string, hashedKey uint64, entry []byte) error {
- currentTimestamp := uint64(s.clock.Epoch())
-
- if !s.cleanEnabled {
- if oldestEntry, err := s.entries.Peek(); err == nil {
- s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry)
- }
- }
-
- w := wrapEntry(currentTimestamp, hashedKey, key, entry, &s.entryBuffer)
-
- for {
- if index, err := s.entries.Push(w); err == nil {
- s.hashmap[hashedKey] = uint32(index)
- return nil
- }
- if s.removeOldestEntry(NoSpace) != nil {
- return fmt.Errorf("entry is bigger than max shard size")
- }
- }
-}
-
-func (s *cacheShard) setWrappedEntryWithoutLock(currentTimestamp uint64, w []byte, hashedKey uint64) error {
- if previousIndex := s.hashmap[hashedKey]; previousIndex != 0 {
- if previousEntry, err := s.entries.Get(int(previousIndex)); err == nil {
- resetKeyFromEntry(previousEntry)
- }
- }
-
- if !s.cleanEnabled {
- if oldestEntry, err := s.entries.Peek(); err == nil {
- s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry)
- }
- }
-
- for {
- if index, err := s.entries.Push(w); err == nil {
- s.hashmap[hashedKey] = uint32(index)
- return nil
- }
- if s.removeOldestEntry(NoSpace) != nil {
- return fmt.Errorf("entry is bigger than max shard size")
- }
- }
-}
-
-func (s *cacheShard) append(key string, hashedKey uint64, entry []byte) error {
- s.lock.Lock()
- wrappedEntry, err := s.getValidWrapEntry(key, hashedKey)
-
- if err == ErrEntryNotFound {
- err = s.addNewWithoutLock(key, hashedKey, entry)
- s.lock.Unlock()
- return err
- }
- if err != nil {
- s.lock.Unlock()
- return err
- }
-
- currentTimestamp := uint64(s.clock.Epoch())
-
- w := appendToWrappedEntry(currentTimestamp, wrappedEntry, entry, &s.entryBuffer)
-
- err = s.setWrappedEntryWithoutLock(currentTimestamp, w, hashedKey)
- s.lock.Unlock()
-
- return err
-}
-
-func (s *cacheShard) del(hashedKey uint64) error {
- // Optimistic pre-check using only readlock
- s.lock.RLock()
- {
- itemIndex := s.hashmap[hashedKey]
-
- if itemIndex == 0 {
- s.lock.RUnlock()
- s.delmiss()
- return ErrEntryNotFound
- }
-
- if err := s.entries.CheckGet(int(itemIndex)); err != nil {
- s.lock.RUnlock()
- s.delmiss()
- return err
- }
- }
- s.lock.RUnlock()
-
- s.lock.Lock()
- {
- // After obtaining the writelock, we need to read the same again,
- // since the data delivered earlier may be stale now
- itemIndex := s.hashmap[hashedKey]
-
- if itemIndex == 0 {
- s.lock.Unlock()
- s.delmiss()
- return ErrEntryNotFound
- }
-
- wrappedEntry, err := s.entries.Get(int(itemIndex))
- if err != nil {
- s.lock.Unlock()
- s.delmiss()
- return err
- }
-
- delete(s.hashmap, hashedKey)
- s.onRemove(wrappedEntry, Deleted)
- if s.statsEnabled {
- delete(s.hashmapStats, hashedKey)
- }
- resetKeyFromEntry(wrappedEntry)
- }
- s.lock.Unlock()
-
- s.delhit()
- return nil
-}
-
-func (s *cacheShard) onEvict(oldestEntry []byte, currentTimestamp uint64, evict func(reason RemoveReason) error) bool {
- if s.isExpired(oldestEntry, currentTimestamp) {
- evict(Expired)
- return true
- }
- return false
-}
-
-func (s *cacheShard) isExpired(oldestEntry []byte, currentTimestamp uint64) bool {
- oldestTimestamp := readTimestampFromEntry(oldestEntry)
- if currentTimestamp <= oldestTimestamp { // if currentTimestamp < oldestTimestamp, the result will out of uint64 limits;
- return false
- }
- return currentTimestamp-oldestTimestamp > s.lifeWindow
-}
-
-func (s *cacheShard) cleanUp(currentTimestamp uint64) {
- s.lock.Lock()
- for {
- if oldestEntry, err := s.entries.Peek(); err != nil {
- break
- } else if evicted := s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry); !evicted {
- break
- }
- }
- s.lock.Unlock()
-}
-
-func (s *cacheShard) getEntry(hashedKey uint64) ([]byte, error) {
- s.lock.RLock()
-
- entry, err := s.getWrappedEntry(hashedKey)
- // copy entry
- newEntry := make([]byte, len(entry))
- copy(newEntry, entry)
-
- s.lock.RUnlock()
-
- return newEntry, err
-}
-
-func (s *cacheShard) copyHashedKeys() (keys []uint64, next int) {
- s.lock.RLock()
- keys = make([]uint64, len(s.hashmap))
-
- for key := range s.hashmap {
- keys[next] = key
- next++
- }
-
- s.lock.RUnlock()
- return keys, next
-}
-
-func (s *cacheShard) removeOldestEntry(reason RemoveReason) error {
- oldest, err := s.entries.Pop()
- if err == nil {
- hash := readHashFromEntry(oldest)
- if hash == 0 {
- // entry has been explicitly deleted with resetKeyFromEntry, ignore
- return nil
- }
- delete(s.hashmap, hash)
- s.onRemove(oldest, reason)
- if s.statsEnabled {
- delete(s.hashmapStats, hash)
- }
- return nil
- }
- return err
-}
-
-func (s *cacheShard) reset(config Config) {
- s.lock.Lock()
- s.hashmap = make(map[uint64]uint32, config.initialShardSize())
- s.entryBuffer = make([]byte, config.MaxEntrySize+headersSizeInBytes)
- s.entries.Reset()
- s.lock.Unlock()
-}
-
-func (s *cacheShard) resetStats() {
- s.lock.Lock()
- s.stats = Stats{}
- s.lock.Unlock()
-}
-
-func (s *cacheShard) len() int {
- s.lock.RLock()
- res := len(s.hashmap)
- s.lock.RUnlock()
- return res
-}
-
-func (s *cacheShard) capacity() int {
- s.lock.RLock()
- res := s.entries.Capacity()
- s.lock.RUnlock()
- return res
-}
-
-func (s *cacheShard) getStats() Stats {
- var stats = Stats{
- Hits: atomic.LoadInt64(&s.stats.Hits),
- Misses: atomic.LoadInt64(&s.stats.Misses),
- DelHits: atomic.LoadInt64(&s.stats.DelHits),
- DelMisses: atomic.LoadInt64(&s.stats.DelMisses),
- Collisions: atomic.LoadInt64(&s.stats.Collisions),
- }
- return stats
-}
-
-func (s *cacheShard) getKeyMetadataWithLock(key uint64) Metadata {
- s.lock.RLock()
- c := s.hashmapStats[key]
- s.lock.RUnlock()
- return Metadata{
- RequestCount: c,
- }
-}
-
-func (s *cacheShard) getKeyMetadata(key uint64) Metadata {
- return Metadata{
- RequestCount: s.hashmapStats[key],
- }
-}
-
-func (s *cacheShard) hit(key uint64) {
- atomic.AddInt64(&s.stats.Hits, 1)
- if s.statsEnabled {
- s.lock.Lock()
- s.hashmapStats[key]++
- s.lock.Unlock()
- }
-}
-
-func (s *cacheShard) hitWithoutLock(key uint64) {
- atomic.AddInt64(&s.stats.Hits, 1)
- if s.statsEnabled {
- s.hashmapStats[key]++
- }
-}
-
-func (s *cacheShard) miss() {
- atomic.AddInt64(&s.stats.Misses, 1)
-}
-
-func (s *cacheShard) delhit() {
- atomic.AddInt64(&s.stats.DelHits, 1)
-}
-
-func (s *cacheShard) delmiss() {
- atomic.AddInt64(&s.stats.DelMisses, 1)
-}
-
-func (s *cacheShard) collision() {
- atomic.AddInt64(&s.stats.Collisions, 1)
-}
-
-func initNewShard(config Config, callback onRemoveCallback, clock clock) *cacheShard {
- bytesQueueInitialCapacity := config.initialShardSize() * config.MaxEntrySize
- maximumShardSizeInBytes := config.maximumShardSizeInBytes()
- if maximumShardSizeInBytes > 0 && bytesQueueInitialCapacity > maximumShardSizeInBytes {
- bytesQueueInitialCapacity = maximumShardSizeInBytes
- }
- return &cacheShard{
- hashmap: make(map[uint64]uint32, config.initialShardSize()),
- hashmapStats: make(map[uint64]uint32, config.initialShardSize()),
- entries: *queue.NewBytesQueue(bytesQueueInitialCapacity, maximumShardSizeInBytes, config.Verbose),
- entryBuffer: make([]byte, config.MaxEntrySize+headersSizeInBytes),
- onRemove: callback,
-
- isVerbose: config.Verbose,
- logger: newLogger(config.Logger),
- clock: clock,
- lifeWindow: uint64(config.LifeWindow.Seconds()),
- statsEnabled: config.StatsEnabled,
- cleanEnabled: config.CleanWindow > 0,
- }
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/stats.go b/vendor/github.com/allegro/bigcache/v3/stats.go
deleted file mode 100644
index 07157132..00000000
--- a/vendor/github.com/allegro/bigcache/v3/stats.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package bigcache
-
-// Stats stores cache statistics
-type Stats struct {
- // Hits is a number of successfully found keys
- Hits int64 `json:"hits"`
- // Misses is a number of not found keys
- Misses int64 `json:"misses"`
- // DelHits is a number of successfully deleted keys
- DelHits int64 `json:"delete_hits"`
- // DelMisses is a number of not deleted keys
- DelMisses int64 `json:"delete_misses"`
- // Collisions is a number of happened key-collisions
- Collisions int64 `json:"collisions"`
-}
diff --git a/vendor/github.com/allegro/bigcache/v3/utils.go b/vendor/github.com/allegro/bigcache/v3/utils.go
deleted file mode 100644
index 2b6ac4f1..00000000
--- a/vendor/github.com/allegro/bigcache/v3/utils.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package bigcache
-
-func max(a, b int) int {
- if a > b {
- return a
- }
- return b
-}
-
-func min(a, b int) int {
- if a < b {
- return a
- }
- return b
-}
-
-func convertMBToBytes(value int) int {
- return value * 1024 * 1024
-}
-
-func isPowerOfTwo(number int) bool {
- return (number != 0) && (number&(number-1)) == 0
-}
diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go
index 52c2759f..67223839 100644
--- a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go
+++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go
@@ -256,6 +256,7 @@ func (cw *wrapper) runServer(ctx context.Context, serverCred *tlsV1.Credential)
if waitErr != nil {
l.Error("error closing connector wrapper", zap.Error(waitErr))
}
+ os.Exit(1)
}
}()
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
index 2426fc14..71f18f6a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
@@ -90,6 +90,58 @@ func (Capability) EnumDescriptor() ([]byte, []int) {
return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{0}
}
+type CapabilityDetailCredentialOption int32
+
+const (
+ CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED CapabilityDetailCredentialOption = 0
+ CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_NO_PASSWORD CapabilityDetailCredentialOption = 1
+ CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD CapabilityDetailCredentialOption = 2
+ CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_SSO CapabilityDetailCredentialOption = 3
+)
+
+// Enum value maps for CapabilityDetailCredentialOption.
+var (
+ CapabilityDetailCredentialOption_name = map[int32]string{
+ 0: "CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED",
+ 1: "CAPABILITY_DETAIL_CREDENTIAL_OPTION_NO_PASSWORD",
+ 2: "CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD",
+ 3: "CAPABILITY_DETAIL_CREDENTIAL_OPTION_SSO",
+ }
+ CapabilityDetailCredentialOption_value = map[string]int32{
+ "CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED": 0,
+ "CAPABILITY_DETAIL_CREDENTIAL_OPTION_NO_PASSWORD": 1,
+ "CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD": 2,
+ "CAPABILITY_DETAIL_CREDENTIAL_OPTION_SSO": 3,
+ }
+)
+
+func (x CapabilityDetailCredentialOption) Enum() *CapabilityDetailCredentialOption {
+ p := new(CapabilityDetailCredentialOption)
+ *p = x
+ return p
+}
+
+func (x CapabilityDetailCredentialOption) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CapabilityDetailCredentialOption) Descriptor() protoreflect.EnumDescriptor {
+ return file_c1_connector_v2_connector_proto_enumTypes[1].Descriptor()
+}
+
+func (CapabilityDetailCredentialOption) Type() protoreflect.EnumType {
+ return &file_c1_connector_v2_connector_proto_enumTypes[1]
+}
+
+func (x CapabilityDetailCredentialOption) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CapabilityDetailCredentialOption.Descriptor instead.
+func (CapabilityDetailCredentialOption) EnumDescriptor() ([]byte, []int) {
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{1}
+}
+
type ConnectorServiceCleanupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -287,6 +339,171 @@ func (x *ConnectorMetadata) GetCapabilities() *ConnectorCapabilities {
return nil
}
+type CredentialDetails struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CapabilityAccountProvisioning *CredentialDetailsAccountProvisioning `protobuf:"bytes,1,opt,name=capability_account_provisioning,json=capabilityAccountProvisioning,proto3" json:"capability_account_provisioning,omitempty"`
+ CapabilityCredentialRotation *CredentialDetailsCredentialRotation `protobuf:"bytes,2,opt,name=capability_credential_rotation,json=capabilityCredentialRotation,proto3" json:"capability_credential_rotation,omitempty"`
+}
+
+func (x *CredentialDetails) Reset() {
+ *x = CredentialDetails{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CredentialDetails) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CredentialDetails) ProtoMessage() {}
+
+func (x *CredentialDetails) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ 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 CredentialDetails.ProtoReflect.Descriptor instead.
+func (*CredentialDetails) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CredentialDetails) GetCapabilityAccountProvisioning() *CredentialDetailsAccountProvisioning {
+ if x != nil {
+ return x.CapabilityAccountProvisioning
+ }
+ return nil
+}
+
+func (x *CredentialDetails) GetCapabilityCredentialRotation() *CredentialDetailsCredentialRotation {
+ if x != nil {
+ return x.CapabilityCredentialRotation
+ }
+ return nil
+}
+
+type CredentialDetailsAccountProvisioning struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SupportedCredentialOptions []CapabilityDetailCredentialOption `protobuf:"varint,1,rep,packed,name=supported_credential_options,json=supportedCredentialOptions,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"supported_credential_options,omitempty"`
+ PreferredCredentialOption CapabilityDetailCredentialOption `protobuf:"varint,2,opt,name=preferred_credential_option,json=preferredCredentialOption,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"preferred_credential_option,omitempty"`
+}
+
+func (x *CredentialDetailsAccountProvisioning) Reset() {
+ *x = CredentialDetailsAccountProvisioning{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CredentialDetailsAccountProvisioning) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CredentialDetailsAccountProvisioning) ProtoMessage() {}
+
+func (x *CredentialDetailsAccountProvisioning) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ 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 CredentialDetailsAccountProvisioning.ProtoReflect.Descriptor instead.
+func (*CredentialDetailsAccountProvisioning) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CredentialDetailsAccountProvisioning) GetSupportedCredentialOptions() []CapabilityDetailCredentialOption {
+ if x != nil {
+ return x.SupportedCredentialOptions
+ }
+ return nil
+}
+
+func (x *CredentialDetailsAccountProvisioning) GetPreferredCredentialOption() CapabilityDetailCredentialOption {
+ if x != nil {
+ return x.PreferredCredentialOption
+ }
+ return CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED
+}
+
+type CredentialDetailsCredentialRotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SupportedCredentialOptions []CapabilityDetailCredentialOption `protobuf:"varint,1,rep,packed,name=supported_credential_options,json=supportedCredentialOptions,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"supported_credential_options,omitempty"`
+ PreferredCredentialOption CapabilityDetailCredentialOption `protobuf:"varint,2,opt,name=preferred_credential_option,json=preferredCredentialOption,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"preferred_credential_option,omitempty"`
+}
+
+func (x *CredentialDetailsCredentialRotation) Reset() {
+ *x = CredentialDetailsCredentialRotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CredentialDetailsCredentialRotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CredentialDetailsCredentialRotation) ProtoMessage() {}
+
+func (x *CredentialDetailsCredentialRotation) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_connector_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 CredentialDetailsCredentialRotation.ProtoReflect.Descriptor instead.
+func (*CredentialDetailsCredentialRotation) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CredentialDetailsCredentialRotation) GetSupportedCredentialOptions() []CapabilityDetailCredentialOption {
+ if x != nil {
+ return x.SupportedCredentialOptions
+ }
+ return nil
+}
+
+func (x *CredentialDetailsCredentialRotation) GetPreferredCredentialOption() CapabilityDetailCredentialOption {
+ if x != nil {
+ return x.PreferredCredentialOption
+ }
+ return CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED
+}
+
type ConnectorCapabilities struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -294,12 +511,13 @@ type ConnectorCapabilities struct {
ResourceTypeCapabilities []*ResourceTypeCapability `protobuf:"bytes,1,rep,name=resource_type_capabilities,json=resourceTypeCapabilities,proto3" json:"resource_type_capabilities,omitempty"`
ConnectorCapabilities []Capability `protobuf:"varint,2,rep,packed,name=connector_capabilities,json=connectorCapabilities,proto3,enum=c1.connector.v2.Capability" json:"connector_capabilities,omitempty"`
+ CredentialDetails *CredentialDetails `protobuf:"bytes,3,opt,name=credential_details,json=credentialDetails,proto3" json:"credential_details,omitempty"`
}
func (x *ConnectorCapabilities) Reset() {
*x = ConnectorCapabilities{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -312,7 +530,7 @@ func (x *ConnectorCapabilities) String() string {
func (*ConnectorCapabilities) ProtoMessage() {}
func (x *ConnectorCapabilities) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -325,7 +543,7 @@ func (x *ConnectorCapabilities) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorCapabilities.ProtoReflect.Descriptor instead.
func (*ConnectorCapabilities) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{3}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{6}
}
func (x *ConnectorCapabilities) GetResourceTypeCapabilities() []*ResourceTypeCapability {
@@ -342,6 +560,13 @@ func (x *ConnectorCapabilities) GetConnectorCapabilities() []Capability {
return nil
}
+func (x *ConnectorCapabilities) GetCredentialDetails() *CredentialDetails {
+ if x != nil {
+ return x.CredentialDetails
+ }
+ return nil
+}
+
type ResourceTypeCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -354,7 +579,7 @@ type ResourceTypeCapability struct {
func (x *ResourceTypeCapability) Reset() {
*x = ResourceTypeCapability{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -367,7 +592,7 @@ func (x *ResourceTypeCapability) String() string {
func (*ResourceTypeCapability) ProtoMessage() {}
func (x *ResourceTypeCapability) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -380,7 +605,7 @@ func (x *ResourceTypeCapability) ProtoReflect() protoreflect.Message {
// Deprecated: Use ResourceTypeCapability.ProtoReflect.Descriptor instead.
func (*ResourceTypeCapability) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{4}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{7}
}
func (x *ResourceTypeCapability) GetResourceType() *ResourceType {
@@ -406,7 +631,7 @@ type ConnectorServiceGetMetadataRequest struct {
func (x *ConnectorServiceGetMetadataRequest) Reset() {
*x = ConnectorServiceGetMetadataRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -419,7 +644,7 @@ func (x *ConnectorServiceGetMetadataRequest) String() string {
func (*ConnectorServiceGetMetadataRequest) ProtoMessage() {}
func (x *ConnectorServiceGetMetadataRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -432,7 +657,7 @@ func (x *ConnectorServiceGetMetadataRequest) ProtoReflect() protoreflect.Message
// Deprecated: Use ConnectorServiceGetMetadataRequest.ProtoReflect.Descriptor instead.
func (*ConnectorServiceGetMetadataRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{5}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{8}
}
type ConnectorServiceGetMetadataResponse struct {
@@ -446,7 +671,7 @@ type ConnectorServiceGetMetadataResponse struct {
func (x *ConnectorServiceGetMetadataResponse) Reset() {
*x = ConnectorServiceGetMetadataResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -459,7 +684,7 @@ func (x *ConnectorServiceGetMetadataResponse) String() string {
func (*ConnectorServiceGetMetadataResponse) ProtoMessage() {}
func (x *ConnectorServiceGetMetadataResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -472,7 +697,7 @@ func (x *ConnectorServiceGetMetadataResponse) ProtoReflect() protoreflect.Messag
// Deprecated: Use ConnectorServiceGetMetadataResponse.ProtoReflect.Descriptor instead.
func (*ConnectorServiceGetMetadataResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{6}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{9}
}
func (x *ConnectorServiceGetMetadataResponse) GetMetadata() *ConnectorMetadata {
@@ -491,7 +716,7 @@ type ConnectorServiceValidateRequest struct {
func (x *ConnectorServiceValidateRequest) Reset() {
*x = ConnectorServiceValidateRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -504,7 +729,7 @@ func (x *ConnectorServiceValidateRequest) String() string {
func (*ConnectorServiceValidateRequest) ProtoMessage() {}
func (x *ConnectorServiceValidateRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -517,7 +742,7 @@ func (x *ConnectorServiceValidateRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorServiceValidateRequest.ProtoReflect.Descriptor instead.
func (*ConnectorServiceValidateRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{7}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{10}
}
// NOTE(morgabra) We're expecting correct grpc.Status responses
@@ -533,7 +758,7 @@ type ConnectorServiceValidateResponse struct {
func (x *ConnectorServiceValidateResponse) Reset() {
*x = ConnectorServiceValidateResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -546,7 +771,7 @@ func (x *ConnectorServiceValidateResponse) String() string {
func (*ConnectorServiceValidateResponse) ProtoMessage() {}
func (x *ConnectorServiceValidateResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -559,7 +784,7 @@ func (x *ConnectorServiceValidateResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConnectorServiceValidateResponse.ProtoReflect.Descriptor instead.
func (*ConnectorServiceValidateResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{8}
+ return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{11}
}
func (x *ConnectorServiceValidateResponse) GetAnnotations() []*anypb.Any {
@@ -623,91 +848,163 @@ var file_c1_connector_v2_connector_proto_rawDesc = []byte{
0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61,
0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69,
- 0x65, 0x73, 0x12, 0x65, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
- 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70,
- 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9d, 0x01,
- 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61,
- 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0c,
- 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
- 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
- 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x24, 0x0a,
- 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x22, 0x65, 0x0a, 0x23, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x21, 0x0a, 0x1f, 0x43, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61,
- 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a,
- 0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x95, 0x02, 0x0a, 0x0a, 0x43, 0x61,
- 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41,
- 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
- 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49,
- 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x13,
- 0x0a, 0x0f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e,
- 0x43, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
- 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x45, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18,
- 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x49, 0x43,
- 0x4b, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x41, 0x50, 0x41,
- 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50,
- 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x22, 0x0a,
- 0x1e, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x44,
- 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10,
- 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
- 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10,
- 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
- 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10,
- 0x08, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x7d,
+ 0x0a, 0x1f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
+ 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x1d,
+ 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x7a, 0x0a,
+ 0x1e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x61, 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x63, 0x61, 0x70,
+ 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
+ 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x02, 0x0a, 0x24, 0x43, 0x72,
+ 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41,
+ 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69,
+ 0x6e, 0x67, 0x12, 0x73, 0x0a, 0x1c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f,
+ 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x73, 0x75, 0x70,
+ 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x71, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x66, 0x65,
+ 0x72, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,
- 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31,
- 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
- 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63,
+ 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43,
+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x19, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x02, 0x0a, 0x23, 0x43,
+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
+ 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f,
+ 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x73, 0x75, 0x70,
+ 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x71, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x66, 0x65,
+ 0x72, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
- 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43,
+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x19, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x15, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
+ 0x74, 0x69, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x52, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43,
+ 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12,
+ 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65,
+ 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72,
+ 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52,
+ 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69,
+ 0x6c, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a,
+ 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
+ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69,
+ 0x65, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x65, 0x0a, 0x23, 0x43, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22,
+ 0x21, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
+ 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x95,
+ 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a,
+ 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50,
+ 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f,
+ 0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x41, 0x50, 0x41,
+ 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x45, 0x45,
+ 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x23, 0x0a,
+ 0x1f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f,
+ 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47,
+ 0x10, 0x05, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59,
+ 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x4f, 0x54, 0x41,
+ 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49,
+ 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x52,
+ 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49,
+ 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45,
+ 0x4c, 0x45, 0x54, 0x45, 0x10, 0x08, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43,
+ 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c,
+ 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44,
+ 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c,
+ 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57,
+ 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c,
+ 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45,
+ 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e,
+ 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b,
+ 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54,
+ 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f,
+ 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
- 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
- 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12,
+ 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43,
+ 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75,
+ 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f,
+ 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70,
+ 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
+ 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -722,49 +1019,60 @@ func file_c1_connector_v2_connector_proto_rawDescGZIP() []byte {
return file_c1_connector_v2_connector_proto_rawDescData
}
-var file_c1_connector_v2_connector_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_c1_connector_v2_connector_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_c1_connector_v2_connector_proto_goTypes = []interface{}{
- (Capability)(0), // 0: c1.connector.v2.Capability
- (*ConnectorServiceCleanupRequest)(nil), // 1: c1.connector.v2.ConnectorServiceCleanupRequest
- (*ConnectorServiceCleanupResponse)(nil), // 2: c1.connector.v2.ConnectorServiceCleanupResponse
- (*ConnectorMetadata)(nil), // 3: c1.connector.v2.ConnectorMetadata
- (*ConnectorCapabilities)(nil), // 4: c1.connector.v2.ConnectorCapabilities
- (*ResourceTypeCapability)(nil), // 5: c1.connector.v2.ResourceTypeCapability
- (*ConnectorServiceGetMetadataRequest)(nil), // 6: c1.connector.v2.ConnectorServiceGetMetadataRequest
- (*ConnectorServiceGetMetadataResponse)(nil), // 7: c1.connector.v2.ConnectorServiceGetMetadataResponse
- (*ConnectorServiceValidateRequest)(nil), // 8: c1.connector.v2.ConnectorServiceValidateRequest
- (*ConnectorServiceValidateResponse)(nil), // 9: c1.connector.v2.ConnectorServiceValidateResponse
- (*anypb.Any)(nil), // 10: google.protobuf.Any
- (*AssetRef)(nil), // 11: c1.connector.v2.AssetRef
- (*structpb.Struct)(nil), // 12: google.protobuf.Struct
- (*ResourceType)(nil), // 13: c1.connector.v2.ResourceType
+ (Capability)(0), // 0: c1.connector.v2.Capability
+ (CapabilityDetailCredentialOption)(0), // 1: c1.connector.v2.CapabilityDetailCredentialOption
+ (*ConnectorServiceCleanupRequest)(nil), // 2: c1.connector.v2.ConnectorServiceCleanupRequest
+ (*ConnectorServiceCleanupResponse)(nil), // 3: c1.connector.v2.ConnectorServiceCleanupResponse
+ (*ConnectorMetadata)(nil), // 4: c1.connector.v2.ConnectorMetadata
+ (*CredentialDetails)(nil), // 5: c1.connector.v2.CredentialDetails
+ (*CredentialDetailsAccountProvisioning)(nil), // 6: c1.connector.v2.CredentialDetailsAccountProvisioning
+ (*CredentialDetailsCredentialRotation)(nil), // 7: c1.connector.v2.CredentialDetailsCredentialRotation
+ (*ConnectorCapabilities)(nil), // 8: c1.connector.v2.ConnectorCapabilities
+ (*ResourceTypeCapability)(nil), // 9: c1.connector.v2.ResourceTypeCapability
+ (*ConnectorServiceGetMetadataRequest)(nil), // 10: c1.connector.v2.ConnectorServiceGetMetadataRequest
+ (*ConnectorServiceGetMetadataResponse)(nil), // 11: c1.connector.v2.ConnectorServiceGetMetadataResponse
+ (*ConnectorServiceValidateRequest)(nil), // 12: c1.connector.v2.ConnectorServiceValidateRequest
+ (*ConnectorServiceValidateResponse)(nil), // 13: c1.connector.v2.ConnectorServiceValidateResponse
+ (*anypb.Any)(nil), // 14: google.protobuf.Any
+ (*AssetRef)(nil), // 15: c1.connector.v2.AssetRef
+ (*structpb.Struct)(nil), // 16: google.protobuf.Struct
+ (*ResourceType)(nil), // 17: c1.connector.v2.ResourceType
}
var file_c1_connector_v2_connector_proto_depIdxs = []int32{
- 10, // 0: c1.connector.v2.ConnectorServiceCleanupRequest.annotations:type_name -> google.protobuf.Any
- 10, // 1: c1.connector.v2.ConnectorServiceCleanupResponse.annotations:type_name -> google.protobuf.Any
- 11, // 2: c1.connector.v2.ConnectorMetadata.icon:type_name -> c1.connector.v2.AssetRef
- 11, // 3: c1.connector.v2.ConnectorMetadata.logo:type_name -> c1.connector.v2.AssetRef
- 12, // 4: c1.connector.v2.ConnectorMetadata.profile:type_name -> google.protobuf.Struct
- 10, // 5: c1.connector.v2.ConnectorMetadata.annotations:type_name -> google.protobuf.Any
- 4, // 6: c1.connector.v2.ConnectorMetadata.capabilities:type_name -> c1.connector.v2.ConnectorCapabilities
- 5, // 7: c1.connector.v2.ConnectorCapabilities.resource_type_capabilities:type_name -> c1.connector.v2.ResourceTypeCapability
- 0, // 8: c1.connector.v2.ConnectorCapabilities.connector_capabilities:type_name -> c1.connector.v2.Capability
- 13, // 9: c1.connector.v2.ResourceTypeCapability.resource_type:type_name -> c1.connector.v2.ResourceType
- 0, // 10: c1.connector.v2.ResourceTypeCapability.capabilities:type_name -> c1.connector.v2.Capability
- 3, // 11: c1.connector.v2.ConnectorServiceGetMetadataResponse.metadata:type_name -> c1.connector.v2.ConnectorMetadata
- 10, // 12: c1.connector.v2.ConnectorServiceValidateResponse.annotations:type_name -> google.protobuf.Any
- 6, // 13: c1.connector.v2.ConnectorService.GetMetadata:input_type -> c1.connector.v2.ConnectorServiceGetMetadataRequest
- 8, // 14: c1.connector.v2.ConnectorService.Validate:input_type -> c1.connector.v2.ConnectorServiceValidateRequest
- 1, // 15: c1.connector.v2.ConnectorService.Cleanup:input_type -> c1.connector.v2.ConnectorServiceCleanupRequest
- 7, // 16: c1.connector.v2.ConnectorService.GetMetadata:output_type -> c1.connector.v2.ConnectorServiceGetMetadataResponse
- 9, // 17: c1.connector.v2.ConnectorService.Validate:output_type -> c1.connector.v2.ConnectorServiceValidateResponse
- 2, // 18: c1.connector.v2.ConnectorService.Cleanup:output_type -> c1.connector.v2.ConnectorServiceCleanupResponse
- 16, // [16:19] is the sub-list for method output_type
- 13, // [13:16] is the sub-list for method input_type
- 13, // [13:13] is the sub-list for extension type_name
- 13, // [13:13] is the sub-list for extension extendee
- 0, // [0:13] is the sub-list for field type_name
+ 14, // 0: c1.connector.v2.ConnectorServiceCleanupRequest.annotations:type_name -> google.protobuf.Any
+ 14, // 1: c1.connector.v2.ConnectorServiceCleanupResponse.annotations:type_name -> google.protobuf.Any
+ 15, // 2: c1.connector.v2.ConnectorMetadata.icon:type_name -> c1.connector.v2.AssetRef
+ 15, // 3: c1.connector.v2.ConnectorMetadata.logo:type_name -> c1.connector.v2.AssetRef
+ 16, // 4: c1.connector.v2.ConnectorMetadata.profile:type_name -> google.protobuf.Struct
+ 14, // 5: c1.connector.v2.ConnectorMetadata.annotations:type_name -> google.protobuf.Any
+ 8, // 6: c1.connector.v2.ConnectorMetadata.capabilities:type_name -> c1.connector.v2.ConnectorCapabilities
+ 6, // 7: c1.connector.v2.CredentialDetails.capability_account_provisioning:type_name -> c1.connector.v2.CredentialDetailsAccountProvisioning
+ 7, // 8: c1.connector.v2.CredentialDetails.capability_credential_rotation:type_name -> c1.connector.v2.CredentialDetailsCredentialRotation
+ 1, // 9: c1.connector.v2.CredentialDetailsAccountProvisioning.supported_credential_options:type_name -> c1.connector.v2.CapabilityDetailCredentialOption
+ 1, // 10: c1.connector.v2.CredentialDetailsAccountProvisioning.preferred_credential_option:type_name -> c1.connector.v2.CapabilityDetailCredentialOption
+ 1, // 11: c1.connector.v2.CredentialDetailsCredentialRotation.supported_credential_options:type_name -> c1.connector.v2.CapabilityDetailCredentialOption
+ 1, // 12: c1.connector.v2.CredentialDetailsCredentialRotation.preferred_credential_option:type_name -> c1.connector.v2.CapabilityDetailCredentialOption
+ 9, // 13: c1.connector.v2.ConnectorCapabilities.resource_type_capabilities:type_name -> c1.connector.v2.ResourceTypeCapability
+ 0, // 14: c1.connector.v2.ConnectorCapabilities.connector_capabilities:type_name -> c1.connector.v2.Capability
+ 5, // 15: c1.connector.v2.ConnectorCapabilities.credential_details:type_name -> c1.connector.v2.CredentialDetails
+ 17, // 16: c1.connector.v2.ResourceTypeCapability.resource_type:type_name -> c1.connector.v2.ResourceType
+ 0, // 17: c1.connector.v2.ResourceTypeCapability.capabilities:type_name -> c1.connector.v2.Capability
+ 4, // 18: c1.connector.v2.ConnectorServiceGetMetadataResponse.metadata:type_name -> c1.connector.v2.ConnectorMetadata
+ 14, // 19: c1.connector.v2.ConnectorServiceValidateResponse.annotations:type_name -> google.protobuf.Any
+ 10, // 20: c1.connector.v2.ConnectorService.GetMetadata:input_type -> c1.connector.v2.ConnectorServiceGetMetadataRequest
+ 12, // 21: c1.connector.v2.ConnectorService.Validate:input_type -> c1.connector.v2.ConnectorServiceValidateRequest
+ 2, // 22: c1.connector.v2.ConnectorService.Cleanup:input_type -> c1.connector.v2.ConnectorServiceCleanupRequest
+ 11, // 23: c1.connector.v2.ConnectorService.GetMetadata:output_type -> c1.connector.v2.ConnectorServiceGetMetadataResponse
+ 13, // 24: c1.connector.v2.ConnectorService.Validate:output_type -> c1.connector.v2.ConnectorServiceValidateResponse
+ 3, // 25: c1.connector.v2.ConnectorService.Cleanup:output_type -> c1.connector.v2.ConnectorServiceCleanupResponse
+ 23, // [23:26] is the sub-list for method output_type
+ 20, // [20:23] is the sub-list for method input_type
+ 20, // [20:20] is the sub-list for extension type_name
+ 20, // [20:20] is the sub-list for extension extendee
+ 0, // [0:20] is the sub-list for field type_name
}
func init() { file_c1_connector_v2_connector_proto_init() }
@@ -812,7 +1120,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorCapabilities); i {
+ switch v := v.(*CredentialDetails); i {
case 0:
return &v.state
case 1:
@@ -824,7 +1132,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypeCapability); i {
+ switch v := v.(*CredentialDetailsAccountProvisioning); i {
case 0:
return &v.state
case 1:
@@ -836,7 +1144,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceGetMetadataRequest); i {
+ switch v := v.(*CredentialDetailsCredentialRotation); i {
case 0:
return &v.state
case 1:
@@ -848,7 +1156,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceGetMetadataResponse); i {
+ switch v := v.(*ConnectorCapabilities); i {
case 0:
return &v.state
case 1:
@@ -860,7 +1168,7 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceValidateRequest); i {
+ switch v := v.(*ResourceTypeCapability); i {
case 0:
return &v.state
case 1:
@@ -872,6 +1180,42 @@ func file_c1_connector_v2_connector_proto_init() {
}
}
file_c1_connector_v2_connector_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConnectorServiceGetMetadataRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_connector_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConnectorServiceGetMetadataResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_connector_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConnectorServiceValidateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_connector_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConnectorServiceValidateResponse); i {
case 0:
return &v.state
@@ -889,8 +1233,8 @@ func file_c1_connector_v2_connector_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_c1_connector_v2_connector_proto_rawDesc,
- NumEnums: 1,
- NumMessages: 9,
+ NumEnums: 2,
+ NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
index 21a7378d..dd6cde15 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
@@ -634,6 +634,380 @@ var _ interface {
ErrorName() string
} = ConnectorMetadataValidationError{}
+// Validate checks the field values on CredentialDetails with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *CredentialDetails) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CredentialDetails with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CredentialDetailsMultiError, or nil if none found.
+func (m *CredentialDetails) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CredentialDetails) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCapabilityAccountProvisioning()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CredentialDetailsValidationError{
+ field: "CapabilityAccountProvisioning",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CredentialDetailsValidationError{
+ field: "CapabilityAccountProvisioning",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCapabilityAccountProvisioning()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CredentialDetailsValidationError{
+ field: "CapabilityAccountProvisioning",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCapabilityCredentialRotation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CredentialDetailsValidationError{
+ field: "CapabilityCredentialRotation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CredentialDetailsValidationError{
+ field: "CapabilityCredentialRotation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCapabilityCredentialRotation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CredentialDetailsValidationError{
+ field: "CapabilityCredentialRotation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CredentialDetailsMultiError(errors)
+ }
+
+ return nil
+}
+
+// CredentialDetailsMultiError is an error wrapping multiple validation errors
+// returned by CredentialDetails.ValidateAll() if the designated constraints
+// aren't met.
+type CredentialDetailsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CredentialDetailsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CredentialDetailsMultiError) AllErrors() []error { return m }
+
+// CredentialDetailsValidationError is the validation error returned by
+// CredentialDetails.Validate if the designated constraints aren't met.
+type CredentialDetailsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CredentialDetailsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CredentialDetailsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CredentialDetailsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CredentialDetailsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CredentialDetailsValidationError) ErrorName() string {
+ return "CredentialDetailsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CredentialDetailsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCredentialDetails.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CredentialDetailsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CredentialDetailsValidationError{}
+
+// Validate checks the field values on CredentialDetailsAccountProvisioning
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *CredentialDetailsAccountProvisioning) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CredentialDetailsAccountProvisioning
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// CredentialDetailsAccountProvisioningMultiError, or nil if none found.
+func (m *CredentialDetailsAccountProvisioning) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CredentialDetailsAccountProvisioning) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for PreferredCredentialOption
+
+ if len(errors) > 0 {
+ return CredentialDetailsAccountProvisioningMultiError(errors)
+ }
+
+ return nil
+}
+
+// CredentialDetailsAccountProvisioningMultiError is an error wrapping multiple
+// validation errors returned by
+// CredentialDetailsAccountProvisioning.ValidateAll() if the designated
+// constraints aren't met.
+type CredentialDetailsAccountProvisioningMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CredentialDetailsAccountProvisioningMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CredentialDetailsAccountProvisioningMultiError) AllErrors() []error { return m }
+
+// CredentialDetailsAccountProvisioningValidationError is the validation error
+// returned by CredentialDetailsAccountProvisioning.Validate if the designated
+// constraints aren't met.
+type CredentialDetailsAccountProvisioningValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CredentialDetailsAccountProvisioningValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CredentialDetailsAccountProvisioningValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CredentialDetailsAccountProvisioningValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CredentialDetailsAccountProvisioningValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CredentialDetailsAccountProvisioningValidationError) ErrorName() string {
+ return "CredentialDetailsAccountProvisioningValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CredentialDetailsAccountProvisioningValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCredentialDetailsAccountProvisioning.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CredentialDetailsAccountProvisioningValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CredentialDetailsAccountProvisioningValidationError{}
+
+// Validate checks the field values on CredentialDetailsCredentialRotation with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *CredentialDetailsCredentialRotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CredentialDetailsCredentialRotation
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// CredentialDetailsCredentialRotationMultiError, or nil if none found.
+func (m *CredentialDetailsCredentialRotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CredentialDetailsCredentialRotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for PreferredCredentialOption
+
+ if len(errors) > 0 {
+ return CredentialDetailsCredentialRotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// CredentialDetailsCredentialRotationMultiError is an error wrapping multiple
+// validation errors returned by
+// CredentialDetailsCredentialRotation.ValidateAll() if the designated
+// constraints aren't met.
+type CredentialDetailsCredentialRotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CredentialDetailsCredentialRotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CredentialDetailsCredentialRotationMultiError) AllErrors() []error { return m }
+
+// CredentialDetailsCredentialRotationValidationError is the validation error
+// returned by CredentialDetailsCredentialRotation.Validate if the designated
+// constraints aren't met.
+type CredentialDetailsCredentialRotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CredentialDetailsCredentialRotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CredentialDetailsCredentialRotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CredentialDetailsCredentialRotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CredentialDetailsCredentialRotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CredentialDetailsCredentialRotationValidationError) ErrorName() string {
+ return "CredentialDetailsCredentialRotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CredentialDetailsCredentialRotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCredentialDetailsCredentialRotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CredentialDetailsCredentialRotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CredentialDetailsCredentialRotationValidationError{}
+
// Validate checks the field values on ConnectorCapabilities with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
@@ -690,6 +1064,35 @@ func (m *ConnectorCapabilities) validate(all bool) error {
}
+ if all {
+ switch v := interface{}(m.GetCredentialDetails()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConnectorCapabilitiesValidationError{
+ field: "CredentialDetails",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConnectorCapabilitiesValidationError{
+ field: "CredentialDetails",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCredentialDetails()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConnectorCapabilitiesValidationError{
+ field: "CredentialDetails",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
if len(errors) > 0 {
return ConnectorCapabilitiesMultiError(errors)
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
index 71e73fe0..e79ba422 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
@@ -752,6 +752,8 @@ type CredentialOptions struct {
// Types that are assignable to Options:
//
// *CredentialOptions_RandomPassword_
+ // *CredentialOptions_NoPassword_
+ // *CredentialOptions_Sso
Options isCredentialOptions_Options `protobuf_oneof:"options"`
}
@@ -801,6 +803,20 @@ func (x *CredentialOptions) GetRandomPassword() *CredentialOptions_RandomPasswor
return nil
}
+func (x *CredentialOptions) GetNoPassword() *CredentialOptions_NoPassword {
+ if x, ok := x.GetOptions().(*CredentialOptions_NoPassword_); ok {
+ return x.NoPassword
+ }
+ return nil
+}
+
+func (x *CredentialOptions) GetSso() *CredentialOptions_SSO {
+ if x, ok := x.GetOptions().(*CredentialOptions_Sso); ok {
+ return x.Sso
+ }
+ return nil
+}
+
type isCredentialOptions_Options interface {
isCredentialOptions_Options()
}
@@ -809,8 +825,20 @@ type CredentialOptions_RandomPassword_ struct {
RandomPassword *CredentialOptions_RandomPassword `protobuf:"bytes,100,opt,name=random_password,json=randomPassword,proto3,oneof"`
}
+type CredentialOptions_NoPassword_ struct {
+ NoPassword *CredentialOptions_NoPassword `protobuf:"bytes,101,opt,name=no_password,json=noPassword,proto3,oneof"`
+}
+
+type CredentialOptions_Sso struct {
+ Sso *CredentialOptions_SSO `protobuf:"bytes,102,opt,name=sso,proto3,oneof"`
+}
+
func (*CredentialOptions_RandomPassword_) isCredentialOptions_Options() {}
+func (*CredentialOptions_NoPassword_) isCredentialOptions_Options() {}
+
+func (*CredentialOptions_Sso) isCredentialOptions_Options() {}
+
type CreateAccountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -976,12 +1004,14 @@ type EncryptedData struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
- KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
- Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
- Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
- Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` // optional
- EncryptedBytes []byte `protobuf:"bytes,6,opt,name=encrypted_bytes,json=encryptedBytes,proto3" json:"encrypted_bytes,omitempty"` // if 'schema' is set, this should be JSON.
+ Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
+ // Deprecated: Do not use.
+ KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` // optional
+ EncryptedBytes []byte `protobuf:"bytes,6,opt,name=encrypted_bytes,json=encryptedBytes,proto3" json:"encrypted_bytes,omitempty"` // if 'schema' is set, this should be JSON.
+ KeyIds []string `protobuf:"bytes,7,rep,name=key_ids,json=keyIds,proto3" json:"key_ids,omitempty"`
}
func (x *EncryptedData) Reset() {
@@ -1023,6 +1053,7 @@ func (x *EncryptedData) GetProvider() string {
return ""
}
+// Deprecated: Do not use.
func (x *EncryptedData) GetKeyId() string {
if x != nil {
return x.KeyId
@@ -1058,6 +1089,13 @@ func (x *EncryptedData) GetEncryptedBytes() []byte {
return nil
}
+func (x *EncryptedData) GetKeyIds() []string {
+ if x != nil {
+ return x.KeyIds
+ }
+ return nil
+}
+
type PlaintextData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1694,6 +1732,91 @@ func (x *CredentialOptions_RandomPassword) GetLength() int64 {
return 0
}
+type CredentialOptions_NoPassword struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *CredentialOptions_NoPassword) Reset() {
+ *x = CredentialOptions_NoPassword{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CredentialOptions_NoPassword) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CredentialOptions_NoPassword) ProtoMessage() {}
+
+func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
+ 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 CredentialOptions_NoPassword.ProtoReflect.Descriptor instead.
+func (*CredentialOptions_NoPassword) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 1}
+}
+
+type CredentialOptions_SSO struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SsoProvider string `protobuf:"bytes,1,opt,name=sso_provider,json=ssoProvider,proto3" json:"sso_provider,omitempty"`
+}
+
+func (x *CredentialOptions_SSO) Reset() {
+ *x = CredentialOptions_SSO{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CredentialOptions_SSO) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CredentialOptions_SSO) ProtoMessage() {}
+
+func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
+ 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 CredentialOptions_SSO.ProtoReflect.Descriptor instead.
+func (*CredentialOptions_SSO) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 2}
+}
+
+func (x *CredentialOptions_SSO) GetSsoProvider() string {
+ if x != nil {
+ return x.SsoProvider
+ }
+ return ""
+}
+
type CreateAccountResponse_SuccessResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1706,7 +1829,7 @@ type CreateAccountResponse_SuccessResult struct {
func (x *CreateAccountResponse_SuccessResult) Reset() {
*x = CreateAccountResponse_SuccessResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1719,7 +1842,7 @@ func (x *CreateAccountResponse_SuccessResult) String() string {
func (*CreateAccountResponse_SuccessResult) ProtoMessage() {}
func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1762,7 +1885,7 @@ type CreateAccountResponse_ActionRequiredResult struct {
func (x *CreateAccountResponse_ActionRequiredResult) Reset() {
*x = CreateAccountResponse_ActionRequiredResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1775,7 +1898,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) String() string {
func (*CreateAccountResponse_ActionRequiredResult) ProtoMessage() {}
func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1823,7 +1946,7 @@ type EncryptionConfig_JWKPublicKeyConfig struct {
func (x *EncryptionConfig_JWKPublicKeyConfig) Reset() {
*x = EncryptionConfig_JWKPublicKeyConfig{}
if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1836,7 +1959,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) String() string {
func (*EncryptionConfig_JWKPublicKeyConfig) ProtoMessage() {}
func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1995,251 +2118,266 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79,
- 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
+ 0x22, 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d,
0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73,
- 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61,
- 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28,
- 0x08, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a,
- 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66,
- 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51,
- 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11,
- 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
- 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34,
+ 0x77, 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77,
+ 0x6f, 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x6f,
+ 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x50, 0x61,
+ 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18, 0x66, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, 0x03, 0x73,
+ 0x73, 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73,
+ 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, 0x08, 0x52,
+ 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, 0x61, 0x73,
+ 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, 0x0a, 0x0c,
+ 0x73, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42,
+ 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
+ 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f,
+ 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b,
0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
- 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
- 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52,
- 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36,
- 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
- 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37,
- 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f,
- 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a,
- 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
- 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c,
- 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73,
- 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x61, 0x74,
- 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
- 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
- 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72,
- 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69,
- 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12,
- 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x5f, 0x70, 0x75,
- 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
- 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c,
- 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6a,
- 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
- 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b,
- 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79,
- 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x08, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42,
- 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a, 0x08, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a,
+ 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65,
+ 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
+ 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d,
+ 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01,
+ 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
+ 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73,
+ 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
+ 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x0d, 0x45,
+ 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08,
+ 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f,
+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x6b, 0x65,
+ 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62,
+ 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72,
+ 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65,
+ 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79,
+ 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a,
+ 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69,
+ 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b,
+ 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50,
+ 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00,
+ 0x52, 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69,
+ 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75,
+ 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62,
+ 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01,
+ 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52,
+ 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62,
+ 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a,
+ 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52,
- 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30,
- 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08,
- 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
- 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa,
- 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74,
- 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
- 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x51,
- 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e,
- 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f,
- 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
- 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
- 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
- 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52,
- 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x50, 0x52, 0x49,
- 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22, 0xc1, 0x02, 0x0a,
- 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69,
- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64,
- 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52,
- 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67,
- 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa,
- 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70,
- 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65,
+ 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49,
+ 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01,
+ 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e,
+ 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e,
+ 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f,
+ 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49,
+ 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54,
+ 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e,
+ 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55,
+ 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43,
+ 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f,
+ 0x50, 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22,
+ 0xc1, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53,
+ 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10,
+ 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01,
+ 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01,
+ 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a,
+ 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f,
+ 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80,
+ 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a,
+ 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69,
+ 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20,
+ 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69,
+ 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12,
+ 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69,
- 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78,
- 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0,
- 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
- 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45, 0x78, 0x74,
- 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01,
- 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
- 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x31,
+ 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92,
+ 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31,
0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79,
- 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92, 0x01, 0x0a, 0x10,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x6e,
- 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61,
- 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69,
+ 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61,
+ 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
- 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67,
- 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
- 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75,
- 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
- 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72,
+ 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, 0x41, 0x63,
+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62,
+ 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
@@ -2255,7 +2393,7 @@ func file_c1_connector_v2_resource_proto_rawDescGZIP() []byte {
}
var file_c1_connector_v2_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
+var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
var file_c1_connector_v2_resource_proto_goTypes = []interface{}{
(ResourceType_Trait)(0), // 0: c1.connector.v2.ResourceType.Trait
(Resource_CreationSource)(0), // 1: c1.connector.v2.Resource.CreationSource
@@ -2282,70 +2420,74 @@ var file_c1_connector_v2_resource_proto_goTypes = []interface{}{
(*ExternalId)(nil), // 22: c1.connector.v2.ExternalId
(*AccountInfo_Email)(nil), // 23: c1.connector.v2.AccountInfo.Email
(*CredentialOptions_RandomPassword)(nil), // 24: c1.connector.v2.CredentialOptions.RandomPassword
- (*CreateAccountResponse_SuccessResult)(nil), // 25: c1.connector.v2.CreateAccountResponse.SuccessResult
- (*CreateAccountResponse_ActionRequiredResult)(nil), // 26: c1.connector.v2.CreateAccountResponse.ActionRequiredResult
- (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 27: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
- (*anypb.Any)(nil), // 28: google.protobuf.Any
- (*structpb.Struct)(nil), // 29: google.protobuf.Struct
+ (*CredentialOptions_NoPassword)(nil), // 25: c1.connector.v2.CredentialOptions.NoPassword
+ (*CredentialOptions_SSO)(nil), // 26: c1.connector.v2.CredentialOptions.SSO
+ (*CreateAccountResponse_SuccessResult)(nil), // 27: c1.connector.v2.CreateAccountResponse.SuccessResult
+ (*CreateAccountResponse_ActionRequiredResult)(nil), // 28: c1.connector.v2.CreateAccountResponse.ActionRequiredResult
+ (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 29: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
+ (*anypb.Any)(nil), // 30: google.protobuf.Any
+ (*structpb.Struct)(nil), // 31: google.protobuf.Struct
}
var file_c1_connector_v2_resource_proto_depIdxs = []int32{
0, // 0: c1.connector.v2.ResourceType.traits:type_name -> c1.connector.v2.ResourceType.Trait
- 28, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any
+ 30, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any
19, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource
- 28, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any
+ 30, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any
2, // 4: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.list:type_name -> c1.connector.v2.ResourceType
- 28, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any
+ 30, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any
19, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource
19, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource
- 28, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any
+ 30, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any
18, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId
- 28, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any
+ 30, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any
18, // 11: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId
12, // 12: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
17, // 13: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
15, // 14: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
18, // 15: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId
- 28, // 16: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any
+ 30, // 16: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any
23, // 17: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email
- 29, // 18: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct
+ 31, // 18: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct
24, // 19: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword
- 11, // 20: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo
- 12, // 21: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 17, // 22: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 25, // 23: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult
- 26, // 24: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult
- 15, // 25: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
- 28, // 26: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any
- 19, // 27: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource
- 27, // 28: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
- 18, // 29: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId
- 18, // 30: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId
- 28, // 31: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any
- 22, // 32: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId
- 1, // 33: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource
- 18, // 34: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId
- 28, // 35: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any
- 19, // 36: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource
- 28, // 37: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any
- 19, // 38: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource
- 19, // 39: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource
- 3, // 40: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest
- 20, // 41: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest
- 5, // 42: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest
- 7, // 43: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest
- 9, // 44: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest
- 13, // 45: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest
- 4, // 46: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse
- 21, // 47: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse
- 6, // 48: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse
- 8, // 49: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse
- 10, // 50: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse
- 14, // 51: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse
- 46, // [46:52] is the sub-list for method output_type
- 40, // [40:46] is the sub-list for method input_type
- 40, // [40:40] is the sub-list for extension type_name
- 40, // [40:40] is the sub-list for extension extendee
- 0, // [0:40] is the sub-list for field type_name
+ 25, // 20: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword
+ 26, // 21: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO
+ 11, // 22: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo
+ 12, // 23: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 17, // 24: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 27, // 25: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult
+ 28, // 26: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult
+ 15, // 27: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
+ 30, // 28: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any
+ 19, // 29: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource
+ 29, // 30: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
+ 18, // 31: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId
+ 18, // 32: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId
+ 30, // 33: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any
+ 22, // 34: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId
+ 1, // 35: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource
+ 18, // 36: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId
+ 30, // 37: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any
+ 19, // 38: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource
+ 30, // 39: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any
+ 19, // 40: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource
+ 19, // 41: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource
+ 3, // 42: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest
+ 20, // 43: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest
+ 5, // 44: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest
+ 7, // 45: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest
+ 9, // 46: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest
+ 13, // 47: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest
+ 4, // 48: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse
+ 21, // 49: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse
+ 6, // 50: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse
+ 8, // 51: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse
+ 10, // 52: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse
+ 14, // 53: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse
+ 48, // [48:54] is the sub-list for method output_type
+ 42, // [42:48] is the sub-list for method input_type
+ 42, // [42:42] is the sub-list for extension type_name
+ 42, // [42:42] is the sub-list for extension extendee
+ 0, // [0:42] is the sub-list for field type_name
}
func init() { file_c1_connector_v2_resource_proto_init() }
@@ -2631,7 +2773,7 @@ func file_c1_connector_v2_resource_proto_init() {
}
}
file_c1_connector_v2_resource_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateAccountResponse_SuccessResult); i {
+ switch v := v.(*CredentialOptions_NoPassword); i {
case 0:
return &v.state
case 1:
@@ -2643,7 +2785,7 @@ func file_c1_connector_v2_resource_proto_init() {
}
}
file_c1_connector_v2_resource_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateAccountResponse_ActionRequiredResult); i {
+ switch v := v.(*CredentialOptions_SSO); i {
case 0:
return &v.state
case 1:
@@ -2655,6 +2797,30 @@ func file_c1_connector_v2_resource_proto_init() {
}
}
file_c1_connector_v2_resource_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateAccountResponse_SuccessResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_resource_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateAccountResponse_ActionRequiredResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_c1_connector_v2_resource_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EncryptionConfig_JWKPublicKeyConfig); i {
case 0:
return &v.state
@@ -2669,6 +2835,8 @@ func file_c1_connector_v2_resource_proto_init() {
}
file_c1_connector_v2_resource_proto_msgTypes[10].OneofWrappers = []interface{}{
(*CredentialOptions_RandomPassword_)(nil),
+ (*CredentialOptions_NoPassword_)(nil),
+ (*CredentialOptions_Sso)(nil),
}
file_c1_connector_v2_resource_proto_msgTypes[12].OneofWrappers = []interface{}{
(*CreateAccountResponse_Success)(nil),
@@ -2683,7 +2851,7 @@ func file_c1_connector_v2_resource_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_c1_connector_v2_resource_proto_rawDesc,
NumEnums: 2,
- NumMessages: 26,
+ NumMessages: 28,
NumExtensions: 0,
NumServices: 5,
},
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
index 1af7d070..0bb151b4 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
@@ -1818,6 +1818,88 @@ func (m *CredentialOptions) validate(all bool) error {
}
}
+ case *CredentialOptions_NoPassword_:
+ if v == nil {
+ err := CredentialOptionsValidationError{
+ field: "Options",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetNoPassword()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CredentialOptionsValidationError{
+ field: "NoPassword",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CredentialOptionsValidationError{
+ field: "NoPassword",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNoPassword()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CredentialOptionsValidationError{
+ field: "NoPassword",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CredentialOptions_Sso:
+ if v == nil {
+ err := CredentialOptionsValidationError{
+ field: "Options",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSso()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CredentialOptionsValidationError{
+ field: "Sso",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CredentialOptionsValidationError{
+ field: "Sso",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSso()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CredentialOptionsValidationError{
+ field: "Sso",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
default:
_ = v // ensures v is used
}
@@ -3913,6 +3995,213 @@ var _ interface {
ErrorName() string
} = CredentialOptions_RandomPasswordValidationError{}
+// Validate checks the field values on CredentialOptions_NoPassword with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CredentialOptions_NoPassword) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CredentialOptions_NoPassword with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CredentialOptions_NoPasswordMultiError, or nil if none found.
+func (m *CredentialOptions_NoPassword) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CredentialOptions_NoPassword) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return CredentialOptions_NoPasswordMultiError(errors)
+ }
+
+ return nil
+}
+
+// CredentialOptions_NoPasswordMultiError is an error wrapping multiple
+// validation errors returned by CredentialOptions_NoPassword.ValidateAll() if
+// the designated constraints aren't met.
+type CredentialOptions_NoPasswordMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CredentialOptions_NoPasswordMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CredentialOptions_NoPasswordMultiError) AllErrors() []error { return m }
+
+// CredentialOptions_NoPasswordValidationError is the validation error returned
+// by CredentialOptions_NoPassword.Validate if the designated constraints
+// aren't met.
+type CredentialOptions_NoPasswordValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CredentialOptions_NoPasswordValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CredentialOptions_NoPasswordValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CredentialOptions_NoPasswordValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CredentialOptions_NoPasswordValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CredentialOptions_NoPasswordValidationError) ErrorName() string {
+ return "CredentialOptions_NoPasswordValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CredentialOptions_NoPasswordValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCredentialOptions_NoPassword.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CredentialOptions_NoPasswordValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CredentialOptions_NoPasswordValidationError{}
+
+// Validate checks the field values on CredentialOptions_SSO with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CredentialOptions_SSO) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CredentialOptions_SSO with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CredentialOptions_SSOMultiError, or nil if none found.
+func (m *CredentialOptions_SSO) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CredentialOptions_SSO) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SsoProvider
+
+ if len(errors) > 0 {
+ return CredentialOptions_SSOMultiError(errors)
+ }
+
+ return nil
+}
+
+// CredentialOptions_SSOMultiError is an error wrapping multiple validation
+// errors returned by CredentialOptions_SSO.ValidateAll() if the designated
+// constraints aren't met.
+type CredentialOptions_SSOMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CredentialOptions_SSOMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CredentialOptions_SSOMultiError) AllErrors() []error { return m }
+
+// CredentialOptions_SSOValidationError is the validation error returned by
+// CredentialOptions_SSO.Validate if the designated constraints aren't met.
+type CredentialOptions_SSOValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CredentialOptions_SSOValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CredentialOptions_SSOValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CredentialOptions_SSOValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CredentialOptions_SSOValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CredentialOptions_SSOValidationError) ErrorName() string {
+ return "CredentialOptions_SSOValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CredentialOptions_SSOValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCredentialOptions_SSO.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CredentialOptions_SSOValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CredentialOptions_SSOValidationError{}
+
// Validate checks the field values on CreateAccountResponse_SuccessResult with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
index 6513b234..29e02e8b 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
@@ -56,10 +56,12 @@ type CreateAccountResponse interface {
type AccountManager interface {
CreateAccount(ctx context.Context, accountInfo *v2.AccountInfo, credentialOptions *v2.CredentialOptions) (CreateAccountResponse, []*v2.PlaintextData, annotations.Annotations, error)
+ CreateAccountCapabilityDetails(ctx context.Context) (*v2.CredentialDetailsAccountProvisioning, annotations.Annotations, error)
}
type CredentialManager interface {
Rotate(ctx context.Context, resourceId *v2.ResourceId, credentialOptions *v2.CredentialOptions) ([]*v2.PlaintextData, annotations.Annotations, error)
+ RotateCapabilityDetails(ctx context.Context) (*v2.CredentialDetailsCredentialRotation, annotations.Annotations, error)
}
type EventProvider interface {
@@ -524,7 +526,11 @@ func (b *builderImpl) GetMetadata(ctx context.Context, request *v2.ConnectorServ
return nil, err
}
- md.Capabilities = getCapabilities(ctx, b)
+ md.Capabilities, err = getCapabilities(ctx, b)
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, err
+ }
annos := annotations.Annotations(md.Annotations)
if b.ticketManager != nil {
@@ -536,8 +542,63 @@ func (b *builderImpl) GetMetadata(ctx context.Context, request *v2.ConnectorServ
return &v2.ConnectorServiceGetMetadataResponse{Metadata: md}, nil
}
+func validateCapabilityDetails(ctx context.Context, credDetails *v2.CredentialDetails) error {
+ if credDetails.CapabilityAccountProvisioning != nil {
+ // Ensure that the preferred option is included and is part of the supported options
+ if credDetails.CapabilityAccountProvisioning.PreferredCredentialOption == v2.CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED {
+ return status.Error(codes.InvalidArgument, "error: preferred credential creation option is not set")
+ }
+ if !slices.Contains(credDetails.CapabilityAccountProvisioning.SupportedCredentialOptions, credDetails.CapabilityAccountProvisioning.PreferredCredentialOption) {
+ return status.Error(codes.InvalidArgument, "error: preferred credential creation option is not part of the supported options")
+ }
+ }
+
+ if credDetails.CapabilityCredentialRotation != nil {
+ // Ensure that the preferred option is included and is part of the supported options
+ if credDetails.CapabilityCredentialRotation.PreferredCredentialOption == v2.CapabilityDetailCredentialOption_CAPABILITY_DETAIL_CREDENTIAL_OPTION_UNSPECIFIED {
+ return status.Error(codes.InvalidArgument, "error: preferred credential rotation option is not set")
+ }
+ if !slices.Contains(credDetails.CapabilityCredentialRotation.SupportedCredentialOptions, credDetails.CapabilityCredentialRotation.PreferredCredentialOption) {
+ return status.Error(codes.InvalidArgument, "error: preferred credential rotation option is not part of the supported options")
+ }
+ }
+
+ return nil
+}
+
+func getCredentialDetails(ctx context.Context, b *builderImpl) (*v2.CredentialDetails, error) {
+ l := ctxzap.Extract(ctx)
+ rv := &v2.CredentialDetails{}
+
+ for _, rb := range b.resourceBuilders {
+ if am, ok := rb.(AccountManager); ok {
+ accountProvisioningCapabilityDetails, _, err := am.CreateAccountCapabilityDetails(ctx)
+ if err != nil {
+ l.Error("error: getting account provisioning details", zap.Error(err))
+ return nil, fmt.Errorf("error: getting account provisioning details: %w", err)
+ }
+ rv.CapabilityAccountProvisioning = accountProvisioningCapabilityDetails
+ }
+
+ if cm, ok := rb.(CredentialManager); ok {
+ credentialRotationCapabilityDetails, _, err := cm.RotateCapabilityDetails(ctx)
+ if err != nil {
+ l.Error("error: getting credential management details", zap.Error(err))
+ return nil, fmt.Errorf("error: getting credential management details: %w", err)
+ }
+ rv.CapabilityCredentialRotation = credentialRotationCapabilityDetails
+ }
+ }
+
+ err := validateCapabilityDetails(ctx, rv)
+ if err != nil {
+ return nil, fmt.Errorf("error: validating capability details: %w", err)
+ }
+ return rv, nil
+}
+
// getCapabilities gets all capabilities for a connector.
-func getCapabilities(ctx context.Context, b *builderImpl) *v2.ConnectorCapabilities {
+func getCapabilities(ctx context.Context, b *builderImpl) (*v2.ConnectorCapabilities, error) {
connectorCaps := make(map[v2.Capability]struct{})
resourceTypeCapabilities := []*v2.ResourceTypeCapability{}
for _, rb := range b.resourceBuilders {
@@ -589,10 +650,16 @@ func getCapabilities(ctx context.Context, b *builderImpl) *v2.ConnectorCapabilit
}
slices.Sort(caps)
+ credDetails, err := getCredentialDetails(ctx, b)
+ if err != nil {
+ return nil, err
+ }
+
return &v2.ConnectorCapabilities{
ResourceTypeCapabilities: resourceTypeCapabilities,
ConnectorCapabilities: caps,
- }
+ CredentialDetails: credDetails,
+ }, nil
}
// Validate validates the connector.
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go
index bb7ae52e..a8b8b95b 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go
@@ -113,6 +113,7 @@ func (j *JWKEncryptionProvider) Encrypt(ctx context.Context, conf *v2.Encryption
Description: plainText.Description,
Schema: plainText.Schema,
EncryptedBytes: []byte(encCipherText),
+ KeyIds: []string{tp},
}, nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go
index 7191d217..2ceebc6a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go
@@ -84,22 +84,15 @@ func (c *C1File) GetEntitlement(ctx context.Context, request *reader_v2.Entitlem
}
func (c *C1File) PutEntitlements(ctx context.Context, entitlementObjs ...*v2.Entitlement) error {
- err := c.db.WithTx(func(tx *goqu.TxDatabase) error {
- err := bulkPutConnectorObjectTx(ctx, c, tx, entitlements.Name(),
- func(entitlement *v2.Entitlement) (goqu.Record, error) {
- return goqu.Record{
- "resource_id": entitlement.Resource.Id.Resource,
- "resource_type_id": entitlement.Resource.Id.ResourceType,
- }, nil
- },
- entitlementObjs...,
- )
- if err != nil {
- return err
- }
-
- return nil
- })
+ err := bulkPutConnectorObject(ctx, c, entitlements.Name(),
+ func(entitlement *v2.Entitlement) (goqu.Record, error) {
+ return goqu.Record{
+ "resource_id": entitlement.Resource.Id.Resource,
+ "resource_type_id": entitlement.Resource.Id.ResourceType,
+ }, nil
+ },
+ entitlementObjs...,
+ )
if err != nil {
return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go
index 0a3cf5a9..432f9093 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go
@@ -27,8 +27,8 @@ create table if not exists %s (
discovered_at datetime not null
);
create index if not exists %s on %s (resource_type_id, resource_id);
-create index if not exists %s on %s (entitlement_id);
create index if not exists %s on %s (principal_resource_type_id, principal_resource_id);
+create index if not exists %s on %s (entitlement_id, principal_resource_type_id, principal_resource_id);
create unique index if not exists %s on %s (external_id, sync_id);`
var grants = (*grantsTable)(nil)
@@ -48,10 +48,10 @@ func (r *grantsTable) Schema() (string, []interface{}) {
r.Name(),
fmt.Sprintf("idx_resource_types_external_sync_v%s", r.Version()),
r.Name(),
- fmt.Sprintf("idx_grants_entitlement_id_v%s", r.Version()),
- r.Name(),
fmt.Sprintf("idx_grants_principal_id_v%s", r.Version()),
r.Name(),
+ fmt.Sprintf("idx_grants_entitlement_id_principal_id_v%s", r.Version()),
+ r.Name(),
fmt.Sprintf("idx_grants_external_sync_v%s", r.Version()),
r.Name(),
}
@@ -168,24 +168,18 @@ func (c *C1File) ListGrantsForResourceType(
}
func (c *C1File) PutGrants(ctx context.Context, bulkGrants ...*v2.Grant) error {
- err := c.db.WithTx(func(tx *goqu.TxDatabase) error {
- err := bulkPutConnectorObjectTx(ctx, c, tx, grants.Name(),
- func(grant *v2.Grant) (goqu.Record, error) {
- return goqu.Record{
- "resource_type_id": grant.Entitlement.Resource.Id.ResourceType,
- "resource_id": grant.Entitlement.Resource.Id.Resource,
- "entitlement_id": grant.Entitlement.Id,
- "principal_resource_type_id": grant.Principal.Id.ResourceType,
- "principal_resource_id": grant.Principal.Id.Resource,
- }, nil
- },
- bulkGrants...,
- )
- if err != nil {
- return err
- }
- return nil
- })
+ err := bulkPutConnectorObject(ctx, c, grants.Name(),
+ func(grant *v2.Grant) (goqu.Record, error) {
+ return goqu.Record{
+ "resource_type_id": grant.Entitlement.Resource.Id.ResourceType,
+ "resource_id": grant.Entitlement.Resource.Id.Resource,
+ "entitlement_id": grant.Entitlement.Id,
+ "principal_resource_type_id": grant.Principal.Id.ResourceType,
+ "principal_resource_id": grant.Principal.Id.Resource,
+ }, nil
+ },
+ bulkGrants...,
+ )
if err != nil {
return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go
index a0bb4d71..4b12f40e 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go
@@ -79,18 +79,12 @@ func (c *C1File) GetResourceType(ctx context.Context, request *reader_v2.Resourc
}
func (c *C1File) PutResourceTypes(ctx context.Context, resourceTypesObjs ...*v2.ResourceType) error {
- err := c.db.WithTx(func(tx *goqu.TxDatabase) error {
- err := bulkPutConnectorObjectTx(ctx, c, tx, resourceTypes.Name(),
- func(resource *v2.ResourceType) (goqu.Record, error) {
- return nil, nil
- },
- resourceTypesObjs...,
- )
- if err != nil {
- return err
- }
- return nil
- })
+ err := bulkPutConnectorObject(ctx, c, resourceTypes.Name(),
+ func(resource *v2.ResourceType) (goqu.Record, error) {
+ return nil, nil
+ },
+ resourceTypesObjs...,
+ )
if err != nil {
return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go
index dc235699..40e0542d 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go
@@ -98,27 +98,21 @@ func (c *C1File) GetResource(ctx context.Context, request *reader_v2.ResourcesRe
}
func (c *C1File) PutResources(ctx context.Context, resourceObjs ...*v2.Resource) error {
- err := c.db.WithTx(func(tx *goqu.TxDatabase) error {
- err := bulkPutConnectorObjectTx(ctx, c, tx, resources.Name(),
- func(resource *v2.Resource) (goqu.Record, error) {
- fields := goqu.Record{
- "resource_type_id": resource.Id.ResourceType,
- "external_id": fmt.Sprintf("%s:%s", resource.Id.ResourceType, resource.Id.Resource),
- }
-
- if resource.ParentResourceId != nil {
- fields["parent_resource_type_id"] = resource.ParentResourceId.ResourceType
- fields["parent_resource_id"] = resource.ParentResourceId.Resource
- }
- return fields, nil
- },
- resourceObjs...,
- )
- if err != nil {
- return err
- }
- return nil
- })
+ err := bulkPutConnectorObject(ctx, c, resources.Name(),
+ func(resource *v2.Resource) (goqu.Record, error) {
+ fields := goqu.Record{
+ "resource_type_id": resource.Id.ResourceType,
+ "external_id": fmt.Sprintf("%s:%s", resource.Id.ResourceType, resource.Id.Resource),
+ }
+
+ if resource.ParentResourceId != nil {
+ fields["parent_resource_type_id"] = resource.ParentResourceId.ResourceType
+ fields["parent_resource_id"] = resource.ParentResourceId.Resource
+ }
+ return fields, nil
+ },
+ resourceObjs...,
+ )
if err != nil {
return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go
index 968e9277..b1f8ff8e 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go
@@ -233,20 +233,21 @@ func (c *C1File) listConnectorObjects(ctx context.Context, tableName string, req
var protoMarshaler = proto.MarshalOptions{Deterministic: true}
-func bulkPutConnectorObjectTx[T proto.Message](ctx context.Context, c *C1File,
- tx *goqu.TxDatabase,
+func bulkPutConnectorObject[T proto.Message](ctx context.Context, c *C1File,
tableName string,
extractFields func(m T) (goqu.Record, error),
msgs ...T) error {
+ if len(msgs) == 0 {
+ return nil
+ }
+
err := c.validateSyncDb(ctx)
if err != nil {
return err
}
- baseQ := tx.Insert(tableName).Prepared(true)
- baseQ = baseQ.OnConflict(goqu.DoUpdate("external_id, sync_id", goqu.C("data").Set(goqu.I("EXCLUDED.data"))))
-
- for _, m := range msgs {
+ rows := make([]*goqu.Record, len(msgs))
+ for i, m := range msgs {
messageBlob, err := protoMarshaler.Marshal(m)
if err != nil {
return err
@@ -270,16 +271,35 @@ func bulkPutConnectorObjectTx[T proto.Message](ctx context.Context, c *C1File,
fields["data"] = messageBlob
fields["sync_id"] = c.currentSyncID
fields["discovered_at"] = time.Now().Format("2006-01-02 15:04:05.999999999")
- q := baseQ.Rows(fields)
- query, args, err := q.ToSQL()
+ rows[i] = &fields
+ }
+ chunkSize := 100
+ chunks := len(rows) / chunkSize
+ if len(rows)%chunkSize != 0 {
+ chunks++
+ }
+
+ for i := 0; i < chunks; i++ {
+ start := i * chunkSize
+ end := (i + 1) * chunkSize
+ if end > len(rows) {
+ end = len(rows)
+ }
+ chunkedRows := rows[start:end]
+ query, args, err := c.db.Insert(tableName).
+ OnConflict(goqu.DoUpdate("external_id, sync_id", goqu.C("data").Set(goqu.I("EXCLUDED.data")))).
+ Rows(chunkedRows).
+ Prepared(true).
+ ToSQL()
if err != nil {
return err
}
- _, err = tx.Exec(query, args...)
+ _, err = c.db.Exec(query, args...)
if err != nil {
return err
}
}
+
return nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
index 6e022c14..324649e0 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
@@ -1,3 +1,3 @@
package sdk
-const Version = "v0.2.47"
+const Version = "v0.2.57"
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go
index c399e7ed..98d042bf 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go
@@ -39,17 +39,17 @@ type Node struct {
// This is because the graph can have cycles, and we address them by reducing
// _all_ nodes in a cycle into a single node.
type EntitlementGraph struct {
- NextNodeID int `json:"next_node_id"` // Automatically incremented so that each node has a unique ID.
- NextEdgeID int `json:"next_edge_id"` // Automatically incremented so that each edge has a unique ID.
- Nodes map[int]Node `json:"nodes"` // The mapping of all node IDs to nodes.
- EntitlementsToNodes map[string]int `json:"entitlements_to_nodes"` // Internal mapping of entitlements to nodes for quicker lookup.
- SourcesToDestinations map[int]map[int]int `json:"sources_to_destinations"` // Internal mapping of outgoing edges by node ID.
- DestinationsToSources map[int]map[int]int `json:"destinations_to_sources"` // Internal mapping of incoming edges by node ID.
- Edges map[int]Edge `json:"edges"` // Adjacency list. Source node -> descendant node
- Loaded bool `json:"loaded"`
- Depth int `json:"depth"`
- Actions []EntitlementGraphAction `json:"actions"`
- HasNoCycles bool `json:"has_no_cycles"`
+ NextNodeID int `json:"next_node_id"` // Automatically incremented so that each node has a unique ID.
+ NextEdgeID int `json:"next_edge_id"` // Automatically incremented so that each edge has a unique ID.
+ Nodes map[int]Node `json:"nodes"` // The mapping of all node IDs to nodes.
+ EntitlementsToNodes map[string]int `json:"entitlements_to_nodes"` // Internal mapping of entitlements to nodes for quicker lookup.
+ SourcesToDestinations map[int]map[int]int `json:"sources_to_destinations"` // Internal mapping of outgoing edges by node ID.
+ DestinationsToSources map[int]map[int]int `json:"destinations_to_sources"` // Internal mapping of incoming edges by node ID.
+ Edges map[int]Edge `json:"edges"` // Adjacency list. Source node -> descendant node
+ Loaded bool `json:"loaded"`
+ Depth int `json:"depth"`
+ Actions []*EntitlementGraphAction `json:"actions"`
+ HasNoCycles bool `json:"has_no_cycles"`
}
func NewEntitlementGraph(_ context.Context) *EntitlementGraph {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
index 99bd5c89..392436b3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
@@ -42,6 +42,120 @@ type Syncer interface {
Close(context.Context) error
}
+type ProgressCounts struct {
+ ResourceTypes int
+ Resources map[string]int
+ EntitlementsProgress map[string]int
+ LastEntitlementLog map[string]time.Time
+ GrantsProgress map[string]int
+ LastGrantLog map[string]time.Time
+ LastActionLog time.Time
+}
+
+const maxLogFrequency = 10 * time.Second
+
+// TODO: use a mutex or a syncmap for when this code becomes parallel
+func NewProgressCounts() *ProgressCounts {
+ return &ProgressCounts{
+ Resources: make(map[string]int),
+ EntitlementsProgress: make(map[string]int),
+ LastEntitlementLog: make(map[string]time.Time),
+ GrantsProgress: make(map[string]int),
+ LastGrantLog: make(map[string]time.Time),
+ LastActionLog: time.Time{},
+ }
+}
+
+func (p *ProgressCounts) LogResourceTypesProgress(ctx context.Context) {
+ l := ctxzap.Extract(ctx)
+ l.Info("Synced resource types", zap.Int("count", p.ResourceTypes))
+}
+
+func (p *ProgressCounts) LogResourcesProgress(ctx context.Context, resourceType string) {
+ l := ctxzap.Extract(ctx)
+ resources := p.Resources[resourceType]
+ l.Info("Synced resources", zap.String("resource_type_id", resourceType), zap.Int("count", resources))
+}
+
+func (p *ProgressCounts) LogEntitlementsProgress(ctx context.Context, resourceType string) {
+ entitlementsProgress := p.EntitlementsProgress[resourceType]
+ resources := p.Resources[resourceType]
+ if resources == 0 {
+ return
+ }
+ percentComplete := (entitlementsProgress * 100) / resources
+
+ l := ctxzap.Extract(ctx)
+ switch {
+ case entitlementsProgress > resources:
+ l.Error("more entitlement resources than resources",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("synced", entitlementsProgress),
+ zap.Int("total", resources),
+ )
+ case percentComplete == 100:
+ l.Info("Synced entitlements",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("count", entitlementsProgress),
+ zap.Int("total", resources),
+ )
+ p.LastEntitlementLog[resourceType] = time.Time{}
+ case time.Since(p.LastEntitlementLog[resourceType]) > maxLogFrequency:
+ l.Info("Syncing entitlements",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("synced", entitlementsProgress),
+ zap.Int("total", resources),
+ zap.Int("percent_complete", percentComplete),
+ )
+ p.LastEntitlementLog[resourceType] = time.Now()
+ }
+}
+
+func (p *ProgressCounts) LogGrantsProgress(ctx context.Context, resourceType string) {
+ grantsProgress := p.GrantsProgress[resourceType]
+ resources := p.Resources[resourceType]
+ if resources == 0 {
+ return
+ }
+ percentComplete := (grantsProgress * 100) / resources
+
+ l := ctxzap.Extract(ctx)
+ switch {
+ case grantsProgress > resources:
+ l.Error("more grant resources than resources",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("synced", grantsProgress),
+ zap.Int("total", resources),
+ )
+ case percentComplete == 100:
+ l.Info("Synced grants",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("count", grantsProgress),
+ zap.Int("total", resources),
+ )
+ p.LastGrantLog[resourceType] = time.Time{}
+ case time.Since(p.LastGrantLog[resourceType]) > maxLogFrequency:
+ l.Info("Syncing grants",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("synced", grantsProgress),
+ zap.Int("total", resources),
+ zap.Int("percent_complete", percentComplete),
+ )
+ p.LastGrantLog[resourceType] = time.Now()
+ }
+}
+
+func (p *ProgressCounts) LogExpandProgress(ctx context.Context, actions []*expand.EntitlementGraphAction) {
+ actionsLen := len(actions)
+ if time.Since(p.LastActionLog) < maxLogFrequency {
+ return
+ }
+ p.LastActionLog = time.Now()
+
+ l := ctxzap.Extract(ctx)
+ l.Info("Expanding grants", zap.Int("actions_remaining", actionsLen))
+}
+
// syncer orchestrates a connector sync and stores the results using the provided datasource.Writer.
type syncer struct {
c1zManager manager.Manager
@@ -55,6 +169,7 @@ type syncer struct {
tmpDir string
skipFullSync bool
lastCheckPointTime time.Time
+ counts *ProgressCounts
skipEGForResourceType map[string]bool
}
@@ -146,6 +261,18 @@ func shouldWaitAndRetry(ctx context.Context, err error) bool {
}
}
+func isWarning(ctx context.Context, err error) bool {
+ if err == nil {
+ return false
+ }
+
+ if status.Code(err) == codes.NotFound {
+ return true
+ }
+
+ return false
+}
+
// Sync starts the syncing process. The sync process is driven by the action stack that is part of the state object.
// For each page of data that is required to be fetched from the connector, a new action is pushed on to the stack. Once
// an action is completed, it is popped off of the queue. Before processing each action, we checkpoint the state object
@@ -199,12 +326,17 @@ func (s *syncer) Sync(ctx context.Context) error {
}
s.state = state
+ var warnings []error
for s.state.Current() != nil {
err = s.Checkpoint(ctx)
if err != nil {
return err
}
+ // TODO: count actions divided by warnings and error if warning percentage is too high
+ if len(warnings) > 10 {
+ return fmt.Errorf("too many warnings, exiting sync. warnings: %v", warnings)
+ }
select {
case <-runCtx.Done():
err = context.Cause(runCtx)
@@ -254,6 +386,12 @@ func (s *syncer) Sync(ctx context.Context) error {
case SyncEntitlementsOp:
err = s.SyncEntitlements(ctx)
+ if isWarning(ctx, err) {
+ l.Warn("skipping sync entitlement action", zap.Any("stateAction", stateAction), zap.Error(err))
+ warnings = append(warnings, err)
+ s.state.FinishAction(ctx)
+ continue
+ }
if !shouldWaitAndRetry(ctx, err) {
return err
}
@@ -261,6 +399,12 @@ func (s *syncer) Sync(ctx context.Context) error {
case SyncGrantsOp:
err = s.SyncGrants(ctx)
+ if isWarning(ctx, err) {
+ l.Warn("skipping sync grant action", zap.Any("stateAction", stateAction), zap.Error(err))
+ warnings = append(warnings, err)
+ s.state.FinishAction(ctx)
+ continue
+ }
if !shouldWaitAndRetry(ctx, err) {
return err
}
@@ -307,6 +451,9 @@ func (s *syncer) Sync(ctx context.Context) error {
l.Error("error clearing connector caches", zap.Error(err))
}
+ if len(warnings) > 0 {
+ l.Warn("sync completed with warnings", zap.Int("warning_count", len(warnings)), zap.Any("warnings", warnings))
+ }
return nil
}
@@ -374,9 +521,11 @@ func (s *syncer) SyncResourceTypes(ctx context.Context) error {
return err
}
+ s.counts.ResourceTypes += len(resp.List)
s.handleProgress(ctx, s.state.Current(), len(resp.List))
if resp.NextPageToken == "" {
+ s.counts.LogResourceTypesProgress(ctx)
s.state.FinishAction(ctx)
return nil
}
@@ -467,7 +616,11 @@ func (s *syncer) syncResources(ctx context.Context) error {
s.handleProgress(ctx, s.state.Current(), len(resp.List))
+ resourceTypeId := s.state.ResourceTypeID(ctx)
+ s.counts.Resources[resourceTypeId] += len(resp.List)
+
if resp.NextPageToken == "" {
+ s.counts.LogResourcesProgress(ctx, resourceTypeId)
s.state.FinishAction(ctx)
} else {
err = s.state.NextPage(ctx, resp.NextPageToken)
@@ -660,6 +813,9 @@ func (s *syncer) syncEntitlementsForResource(ctx context.Context, resourceID *v2
return err
}
} else {
+ s.counts.EntitlementsProgress[resourceID.ResourceType] += 1
+ s.counts.LogEntitlementsProgress(ctx, resourceID.ResourceType)
+
s.state.FinishAction(ctx)
}
@@ -840,6 +996,7 @@ func (s *syncer) SyncGrantExpansion(ctx context.Context) error {
return err
}
} else {
+ l.Info("Finished loading entitlement graph", zap.Int("edges", len(entitlementGraph.Edges)))
entitlementGraph.Loaded = true
}
@@ -1087,7 +1244,6 @@ func (s *syncer) fetchEtaggedGrantsForResource(
Resource: resource,
Annotations: storeAnnos,
PageToken: npt,
- PageSize: 1000,
})
if err != nil {
return nil, false, err
@@ -1199,6 +1355,8 @@ func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.Resou
return nil
}
+ s.counts.GrantsProgress[resourceID.ResourceType] += 1
+ s.counts.LogGrantsProgress(ctx, resourceID.ResourceType)
s.state.FinishAction(ctx)
return nil
@@ -1240,7 +1398,6 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) {
// Fetch a page of source grants
sourceGrants, err := s.store.ListGrantsForEntitlement(ctx, &reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest{
Entitlement: sourceEntitlement.GetEntitlement(),
- PageSize: 1000,
PageToken: action.PageToken,
})
if err != nil {
@@ -1248,6 +1405,7 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) {
return false, fmt.Errorf("runGrantExpandActions: error fetching source grants: %w", err)
}
+ var newGrants []*v2.Grant = make([]*v2.Grant, 0)
for _, sourceGrant := range sourceGrants.List {
// Skip this grant if it is not for a resource type we care about
if len(action.ResourceTypeIDs) > 0 {
@@ -1289,7 +1447,6 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) {
req := &reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest{
Entitlement: descendantEntitlement.GetEntitlement(),
PrincipalId: sourceGrant.GetPrincipal().GetId(),
- PageSize: 1000,
PageToken: pageToken,
Annotations: nil,
}
@@ -1350,13 +1507,14 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) {
zap.String("grant_id", descendantGrant.GetId()),
zap.Any("sources", sources),
)
-
- err = s.store.PutGrants(ctx, descendantGrant)
- if err != nil {
- l.Error("runGrantExpandActions: error updating descendant grant", zap.Error(err))
- return false, fmt.Errorf("runGrantExpandActions: error updating descendant grant: %w", err)
- }
}
+ newGrants = append(newGrants, descendantGrants...)
+ }
+
+ err = s.store.PutGrants(ctx, newGrants...)
+ if err != nil {
+ l.Error("runGrantExpandActions: error updating descendant grants", zap.Error(err))
+ return false, fmt.Errorf("runGrantExpandActions: error updating descendant grants: %w", err)
}
// If we have no more pages of work, pop the action off the stack and mark this edge in the graph as done
@@ -1395,6 +1553,8 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error {
l = l.With(zap.Int("depth", graph.Depth))
l.Debug("expandGrantsForEntitlements: start", zap.Any("graph", graph))
+ s.counts.LogExpandProgress(ctx, graph.Actions)
+
actionsDone, err := s.runGrantExpandActions(ctx)
if err != nil {
l.Error("expandGrantsForEntitlements: error running graph actions", zap.Error(err))
@@ -1432,7 +1592,7 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error {
if grantInfo.IsExpanded {
continue
}
- graph.Actions = append(graph.Actions, expand.EntitlementGraphAction{
+ graph.Actions = append(graph.Actions, &expand.EntitlementGraphAction{
SourceEntitlementID: sourceEntitlementID,
DescendantEntitlementID: descendantEntitlementID,
PageToken: "",
@@ -1560,6 +1720,7 @@ func NewSyncer(ctx context.Context, c types.ConnectorClient, opts ...SyncOpt) (S
s := &syncer{
connector: c,
skipEGForResourceType: make(map[string]bool),
+ counts: NewProgressCounts(),
}
for _, o := range opts {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go
index 5b08851b..9fb32424 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go
@@ -47,13 +47,13 @@ type CacheRow struct {
}
const (
- failStartTransaction = "Failed to start a transaction"
- errQueryingTable = "Error querying cache table"
- failRollback = "Failed to rollback transaction"
- failInsert = "Failed to insert response data into cache table"
- failScanResponse = "Failed to scan rows for cached response"
- cacheTTLThreshold = 60
- cacheTTLMultiplier int64 = 5
+ failStartTransaction = "Failed to start a transaction"
+ errQueryingTable = "Error querying cache table"
+ failRollback = "Failed to rollback transaction"
+ failInsert = "Failed to insert response data into cache table"
+ failScanResponse = "Failed to scan rows for cached response"
+ cacheTTLThreshold = 60
+ cacheTTLMultiplier uint64 = 5
)
var errNilConnection = errors.New("database connection is nil")
@@ -67,8 +67,9 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
var (
err error
dc = &DBCache{
- waitDuration: defaultWaitDuration, // Default Cleanup interval, 60 seconds
- stats: true,
+ waitDuration: defaultWaitDuration, // Default Cleanup interval, 60 seconds
+ stats: true,
+ //nolint:gosec // disable G115
expirationTime: time.Duration(cfg.TTL) * time.Second,
}
)
@@ -110,6 +111,7 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
}
if cfg.TTL > cacheTTLThreshold {
+ //nolint:gosec // disable G115
dc.waitDuration = time.Duration(cfg.TTL*cacheTTLMultiplier) * time.Second // set as a fraction of the Cache TTL
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go
index 9674694f..63f769db 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go
@@ -4,32 +4,23 @@ import (
"bufio"
"bytes"
"context"
- "errors"
"fmt"
+ "math"
"net/http"
"net/http/httputil"
"os"
"strconv"
"time"
- bigCache "github.com/allegro/bigcache/v3"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "github.com/maypok86/otter"
"go.uber.org/zap"
)
const (
- cacheTTLMaximum = 31536000 // 31536000 seconds = one year
- cacheTTLDefault = 3600 // 3600 seconds = one hour
- defaultCacheSize = 5 // MB
-)
-
-type CacheBehavior string
-
-const (
- CacheBehaviorDefault CacheBehavior = "default"
- // On the first time setting a value, make it empty. Get will return not found, so uhttp Do() will set it again.
- // Then actually set the value. This effectively makes the cache only cache things that have been requested more than once.
- CacheBehaviorSparse CacheBehavior = "sparse"
+ cacheTTLMaximum uint64 = 31536000 // 31536000 seconds = one year
+ cacheTTLDefault uint64 = 3600 // 3600 seconds = one hour
+ defaultCacheSize uint = 5 // MB
)
type CacheBackend string
@@ -42,10 +33,9 @@ const (
type CacheConfig struct {
LogDebug bool
- TTL int64 // If 0, cache is disabled
- MaxSize int // MB
- Behavior CacheBehavior
- Backend CacheBackend
+ TTL uint64 // If 0, cache is disabled
+ MaxSize uint // MB
+ Backend CacheBackend // If noop, cache is disabled
}
type CacheStats struct {
@@ -56,8 +46,7 @@ type CacheStats struct {
type ContextKey struct{}
type GoCache struct {
- rootLibrary *bigCache.BigCache
- behavior CacheBehavior
+ rootLibrary *otter.Cache[string, []byte]
}
type NoopCache struct {
@@ -90,7 +79,7 @@ func (n *NoopCache) Stats(ctx context.Context) CacheStats {
}
func (cc *CacheConfig) ToString() string {
- return fmt.Sprintf("Backend: %v, TTL: %d, MaxSize: %dMB, LogDebug: %t, Behavior: %v", cc.Backend, cc.TTL, cc.MaxSize, cc.LogDebug, cc.Behavior)
+ return fmt.Sprintf("Backend: %v, TTL: %d, MaxSize: %dMB, LogDebug: %t", cc.Backend, cc.TTL, cc.MaxSize, cc.LogDebug)
}
func DefaultCacheConfig() CacheConfig {
@@ -98,7 +87,6 @@ func DefaultCacheConfig() CacheConfig {
TTL: cacheTTLDefault,
MaxSize: defaultCacheSize,
LogDebug: false,
- Behavior: CacheBehaviorDefault,
Backend: CacheBackendMemory,
}
}
@@ -107,15 +95,11 @@ func NewCacheConfigFromEnv() *CacheConfig {
config := DefaultCacheConfig()
cacheMaxSize, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_MAX_SIZE"), 10, 64)
- if err == nil {
- config.MaxSize = int(cacheMaxSize)
+ if err == nil && cacheMaxSize >= 0 {
+ config.MaxSize = uint(cacheMaxSize)
}
- // read the `BATON_HTTP_CACHE_TTL` environment variable and return
- // the value as a number of seconds between 0 and an arbitrary maximum. Note:
- // this means that passing a value of `-1` will set the TTL to zero rather than
- // infinity.
- cacheTTL, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_TTL"), 10, 64)
+ cacheTTL, err := strconv.ParseUint(os.Getenv("BATON_HTTP_CACHE_TTL"), 10, 64)
if err == nil {
config.TTL = min(cacheTTLMaximum, max(0, cacheTTL))
}
@@ -130,14 +114,6 @@ func NewCacheConfigFromEnv() *CacheConfig {
config.Backend = CacheBackendNoop
}
- cacheBehavior := os.Getenv("BATON_HTTP_CACHE_BEHAVIOR")
- switch cacheBehavior {
- case "sparse":
- config.Behavior = CacheBehaviorSparse
- case "default":
- config.Behavior = CacheBehaviorDefault
- }
-
disableCache, err := strconv.ParseBool(os.Getenv("BATON_DISABLE_HTTP_CACHE"))
if err != nil {
disableCache = false
@@ -170,8 +146,8 @@ func NewHttpCache(ctx context.Context, config *CacheConfig) (icache, error) {
l.Info("http cache config", zap.String("config", config.ToString()))
- if config.TTL <= 0 {
- l.Debug("CacheTTL is <=0, disabling cache.", zap.Int64("CacheTTL", config.TTL))
+ if config.TTL == 0 {
+ l.Debug("CacheTTL is 0, disabling cache.", zap.Uint64("CacheTTL", config.TTL))
return NewNoopCache(ctx), nil
}
@@ -203,29 +179,26 @@ func NewHttpCache(ctx context.Context, config *CacheConfig) (icache, error) {
func NewGoCache(ctx context.Context, cfg CacheConfig) (*GoCache, error) {
l := ctxzap.Extract(ctx)
gc := GoCache{}
- gc.behavior = cfg.Behavior
- config := bigCache.DefaultConfig(time.Duration(cfg.TTL) * time.Second)
- config.Verbose = cfg.LogDebug
- config.Shards = 4
- config.HardMaxCacheSize = cfg.MaxSize // value in MB, 0 value means no size limit
- cache, err := bigCache.New(ctx, config)
+ maxSize := cfg.MaxSize * 1024 * 1024
+ if maxSize > math.MaxInt {
+ return nil, fmt.Errorf("error converting max size to bytes")
+ }
+ //nolint:gosec // disable G115: we check the max size
+ cache, err := otter.MustBuilder[string, []byte](int(maxSize)).
+ CollectStats().
+ Cost(func(key string, value []byte) uint32 {
+ return uint32(len(key) + len(value))
+ }).
+ WithTTL(time.Duration(cfg.TTL) * time.Second).
+ Build()
+
if err != nil {
- l.Error("bigcache initialization error", zap.Error(err))
+ l.Error("cache initialization error", zap.Error(err))
return nil, err
}
- l.Debug("bigcache config",
- zap.Dict("config",
- zap.Int("Shards", config.Shards),
- zap.Duration("LifeWindow", config.LifeWindow),
- zap.Duration("CleanWindow", config.CleanWindow),
- zap.Int("MaxEntriesInWindow", config.MaxEntriesInWindow),
- zap.Int("MaxEntrySize", config.MaxEntrySize),
- zap.Bool("StatsEnabled", config.StatsEnabled),
- zap.Bool("Verbose", config.Verbose),
- zap.Int("HardMaxCacheSize", config.HardMaxCacheSize),
- ))
- gc.rootLibrary = cache
+ l.Debug("otter cache initialized", zap.Int("capacity", cache.Capacity()))
+ gc.rootLibrary = &cache
return &gc, nil
}
@@ -236,8 +209,8 @@ func (g *GoCache) Stats(ctx context.Context) CacheStats {
}
stats := g.rootLibrary.Stats()
return CacheStats{
- Hits: stats.Hits,
- Misses: stats.Misses,
+ Hits: stats.Hits(),
+ Misses: stats.Misses(),
}
}
@@ -251,12 +224,9 @@ func (g *GoCache) Get(req *http.Request) (*http.Response, error) {
return nil, err
}
- entry, err := g.rootLibrary.Get(key)
- if err != nil {
- if errors.Is(err, bigCache.ErrEntryNotFound) {
- return nil, nil
- }
- return nil, err
+ entry, ok := g.rootLibrary.Get(key)
+ if !ok {
+ return nil, nil
}
if len(entry) == 0 {
@@ -287,23 +257,9 @@ func (g *GoCache) Set(req *http.Request, value *http.Response) error {
return err
}
- // If in sparse mode, the first time we call set on a key we make the value empty bytes.
- // Subsequent calls to set actually set the value.
- if g.behavior == CacheBehaviorSparse {
- _, err := g.rootLibrary.Get(key)
- if err != nil && !errors.Is(err, bigCache.ErrEntryNotFound) {
- return err
- }
-
- if errors.Is(err, bigCache.ErrEntryNotFound) {
- newValue = []byte{}
- }
- }
-
- err = g.rootLibrary.Set(key, newValue)
- if err != nil {
- return err
- }
+ // Otter's cost function rejects large responses if there's not enough room
+ // TODO: return some error or warning that we couldn't set?
+ _ = g.rootLibrary.Set(key, newValue)
return nil
}
@@ -313,10 +269,7 @@ func (g *GoCache) Delete(key string) error {
return nil
}
- err := g.rootLibrary.Delete(key)
- if err != nil {
- return err
- }
+ g.rootLibrary.Delete(key)
return nil
}
@@ -328,14 +281,7 @@ func (g *GoCache) Clear(ctx context.Context) error {
return nil
}
- err := g.rootLibrary.Reset()
- if err != nil {
- return err
- }
- err = g.rootLibrary.ResetStats()
- if err != nil {
- return err
- }
+ g.rootLibrary.Clear()
l.Debug("reset cache")
return nil
@@ -346,5 +292,5 @@ func (g *GoCache) Has(key string) bool {
return false
}
_, found := g.rootLibrary.Get(key)
- return found == nil
+ return found
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
index bb2628d4..d9f78db5 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
@@ -206,6 +206,9 @@ func WithErrorResponse(resource ErrorResponse) DoOption {
func WithRatelimitData(resource *v2.RateLimitDescription) DoOption {
return func(resp *WrapperResponse) error {
+ if resource == nil {
+ return fmt.Errorf("WithRatelimitData: rate limit description is nil")
+ }
rl, err := ratelimit.ExtractRateLimitData(resp.StatusCode, &resp.Header)
if err != nil {
return err
diff --git a/vendor/github.com/dolthub/maphash/.gitignore b/vendor/github.com/dolthub/maphash/.gitignore
new file mode 100644
index 00000000..977a7cad
--- /dev/null
+++ b/vendor/github.com/dolthub/maphash/.gitignore
@@ -0,0 +1,2 @@
+*.idea
+*.test
\ No newline at end of file
diff --git a/vendor/github.com/allegro/bigcache/v3/LICENSE b/vendor/github.com/dolthub/maphash/LICENSE
similarity index 99%
rename from vendor/github.com/allegro/bigcache/v3/LICENSE
rename to vendor/github.com/dolthub/maphash/LICENSE
index 8dada3ed..261eeb9e 100644
--- a/vendor/github.com/allegro/bigcache/v3/LICENSE
+++ b/vendor/github.com/dolthub/maphash/LICENSE
@@ -178,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
+ boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/dolthub/maphash/README.md b/vendor/github.com/dolthub/maphash/README.md
new file mode 100644
index 00000000..d91530f9
--- /dev/null
+++ b/vendor/github.com/dolthub/maphash/README.md
@@ -0,0 +1,4 @@
+# maphash
+
+Hash any `comparable` type using Golang's fast runtime hash.
+Uses [AES](https://en.wikipedia.org/wiki/AES_instruction_set) instructions when available.
\ No newline at end of file
diff --git a/vendor/github.com/dolthub/maphash/hasher.go b/vendor/github.com/dolthub/maphash/hasher.go
new file mode 100644
index 00000000..ef53596a
--- /dev/null
+++ b/vendor/github.com/dolthub/maphash/hasher.go
@@ -0,0 +1,48 @@
+// Copyright 2022 Dolthub, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package maphash
+
+import "unsafe"
+
+// Hasher hashes values of type K.
+// Uses runtime AES-based hashing.
+type Hasher[K comparable] struct {
+ hash hashfn
+ seed uintptr
+}
+
+// NewHasher creates a new Hasher[K] with a random seed.
+func NewHasher[K comparable]() Hasher[K] {
+ return Hasher[K]{
+ hash: getRuntimeHasher[K](),
+ seed: newHashSeed(),
+ }
+}
+
+// NewSeed returns a copy of |h| with a new hash seed.
+func NewSeed[K comparable](h Hasher[K]) Hasher[K] {
+ return Hasher[K]{
+ hash: h.hash,
+ seed: newHashSeed(),
+ }
+}
+
+// Hash hashes |key|.
+func (h Hasher[K]) Hash(key K) uint64 {
+ // promise to the compiler that pointer
+ // |p| does not escape the stack.
+ p := noescape(unsafe.Pointer(&key))
+ return uint64(h.hash(p, h.seed))
+}
diff --git a/vendor/github.com/dolthub/maphash/runtime.go b/vendor/github.com/dolthub/maphash/runtime.go
new file mode 100644
index 00000000..29cd6a8e
--- /dev/null
+++ b/vendor/github.com/dolthub/maphash/runtime.go
@@ -0,0 +1,111 @@
+// Copyright 2022 Dolthub, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// This file incorporates work covered by the following copyright and
+// permission notice:
+//
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.18 || go1.19
+// +build go1.18 go1.19
+
+package maphash
+
+import (
+ "math/rand"
+ "unsafe"
+)
+
+type hashfn func(unsafe.Pointer, uintptr) uintptr
+
+func getRuntimeHasher[K comparable]() (h hashfn) {
+ a := any(make(map[K]struct{}))
+ i := (*mapiface)(unsafe.Pointer(&a))
+ h = i.typ.hasher
+ return
+}
+
+func newHashSeed() uintptr {
+ return uintptr(rand.Int())
+}
+
+// noescape hides a pointer from escape analysis. It is the identity function
+// but escape analysis doesn't think the output depends on the input.
+// noescape is inlined and currently compiles down to zero instructions.
+// USE CAREFULLY!
+// This was copied from the runtime (via pkg "strings"); see issues 23382 and 7921.
+//
+//go:nosplit
+//go:nocheckptr
+func noescape(p unsafe.Pointer) unsafe.Pointer {
+ x := uintptr(p)
+ return unsafe.Pointer(x ^ 0)
+}
+
+type mapiface struct {
+ typ *maptype
+ val *hmap
+}
+
+// go/src/runtime/type.go
+type maptype struct {
+ typ _type
+ key *_type
+ elem *_type
+ bucket *_type
+ // function for hashing keys (ptr to key, seed) -> hash
+ hasher func(unsafe.Pointer, uintptr) uintptr
+ keysize uint8
+ elemsize uint8
+ bucketsize uint16
+ flags uint32
+}
+
+// go/src/runtime/map.go
+type hmap struct {
+ count int
+ flags uint8
+ B uint8
+ noverflow uint16
+ // hash seed
+ hash0 uint32
+ buckets unsafe.Pointer
+ oldbuckets unsafe.Pointer
+ nevacuate uintptr
+ // true type is *mapextra
+ // but we don't need this data
+ extra unsafe.Pointer
+}
+
+// go/src/runtime/type.go
+type tflag uint8
+type nameOff int32
+type typeOff int32
+
+// go/src/runtime/type.go
+type _type struct {
+ size uintptr
+ ptrdata uintptr
+ hash uint32
+ tflag tflag
+ align uint8
+ fieldAlign uint8
+ kind uint8
+ equal func(unsafe.Pointer, unsafe.Pointer) bool
+ gcdata *byte
+ str nameOff
+ ptrToThis typeOff
+}
diff --git a/vendor/github.com/gammazero/deque/.gitignore b/vendor/github.com/gammazero/deque/.gitignore
new file mode 100644
index 00000000..b33406fb
--- /dev/null
+++ b/vendor/github.com/gammazero/deque/.gitignore
@@ -0,0 +1,26 @@
+*~
+
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/vendor/github.com/gammazero/deque/LICENSE b/vendor/github.com/gammazero/deque/LICENSE
new file mode 100644
index 00000000..0566f266
--- /dev/null
+++ b/vendor/github.com/gammazero/deque/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Andrew J. Gillis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/gammazero/deque/README.md b/vendor/github.com/gammazero/deque/README.md
new file mode 100644
index 00000000..eb06369e
--- /dev/null
+++ b/vendor/github.com/gammazero/deque/README.md
@@ -0,0 +1,80 @@
+# deque
+
+[![GoDoc](https://pkg.go.dev/badge/github.com/gammazero/deque)](https://pkg.go.dev/github.com/gammazero/deque)
+[![Build Status](https://github.com/gammazero/deque/actions/workflows/go.yml/badge.svg)](https://github.com/gammazero/deque/actions/workflows/go.yml)
+[![Go Report Card](https://goreportcard.com/badge/github.com/gammazero/deque)](https://goreportcard.com/report/github.com/gammazero/deque)
+[![codecov](https://codecov.io/gh/gammazero/deque/branch/master/graph/badge.svg)](https://codecov.io/gh/gammazero/deque)
+[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
+
+Fast ring-buffer deque ([double-ended queue](https://en.wikipedia.org/wiki/Double-ended_queue)) implementation.
+
+For a pictorial description, see the [Deque diagram](https://github.com/gammazero/deque/wiki)
+
+## Installation
+
+```
+$ go get github.com/gammazero/deque
+```
+
+## Deque data structure
+
+Deque generalizes a queue and a stack, to efficiently add and remove items at either end with O(1) performance. [Queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) (FIFO) operations are supported using `PushBack` and `PopFront`. [Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) (LIFO) operations are supported using `PushBack` and `PopBack`.
+
+## Ring-buffer Performance
+
+This deque implementation is optimized for CPU and GC performance. The circular buffer automatically re-sizes by powers of two, growing when additional capacity is needed and shrinking when only a quarter of the capacity is used, and uses bitwise arithmetic for all calculations. Since growth is by powers of two, adding elements will only cause O(log n) allocations. A minimum capacity can be set so that there is no resizing at or below that specified amount.
+
+The ring-buffer implementation improves memory and time performance with fewer GC pauses, compared to implementations based on slices and linked lists. By wrapping around the buffer, previously used space is reused, making allocation unnecessary until all buffer capacity is used. If the deque is only filled and then completely emptied before being filled again, then the ring structure offers little benefit for memory reuse over a slice.
+
+For maximum speed, this deque implementation leaves concurrency safety up to the application to provide, however the application chooses, if needed at all.
+
+## Reading Empty Deque
+
+Since it is OK for the deque to contain a `nil` value, it is necessary to either panic or return a second boolean value to indicate the deque is empty, when reading or removing an element. This deque panics when reading from an empty deque. This is a run-time check to help catch programming errors, which may be missed if a second return value is ignored. Simply check `Deque.Len()` before reading from the deque.
+
+## Generics
+
+Deque uses generics to create a Deque that contains items of the type specified. To create a Deque that holds a specific type, provide a type argument to New or with the variable declaration. For example:
+```go
+ stringDeque := deque.New[string]()
+ var intDeque deque.Deque[int]
+```
+
+## Example
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/gammazero/deque"
+)
+
+func main() {
+ var q deque.Deque[string]
+ q.PushBack("foo")
+ q.PushBack("bar")
+ q.PushBack("baz")
+
+ fmt.Println(q.Len()) // Prints: 3
+ fmt.Println(q.Front()) // Prints: foo
+ fmt.Println(q.Back()) // Prints: baz
+
+ q.PopFront() // remove "foo"
+ q.PopBack() // remove "baz"
+
+ q.PushFront("hello")
+ q.PushBack("world")
+
+ // Consume deque and print elements.
+ for q.Len() != 0 {
+ fmt.Println(q.PopFront())
+ }
+}
+```
+
+## Uses
+
+Deque can be used as both a:
+- [Queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) using `PushBack` and `PopFront`
+- [Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) using `PushBack` and `PopBack`
diff --git a/vendor/github.com/gammazero/deque/deque.go b/vendor/github.com/gammazero/deque/deque.go
new file mode 100644
index 00000000..a1743c16
--- /dev/null
+++ b/vendor/github.com/gammazero/deque/deque.go
@@ -0,0 +1,420 @@
+package deque
+
+import "fmt"
+
+// minCapacity is the smallest capacity that deque may have. Must be power of 2
+// for bitwise modulus: x % n == x & (n - 1).
+const minCapacity = 16
+
+// Deque represents a single instance of the deque data structure. A Deque
+// instance contains items of the type specified by the type argument.
+type Deque[T any] struct {
+ buf []T
+ head int
+ tail int
+ count int
+ minCap int
+}
+
+// New creates a new Deque, optionally setting the current and minimum capacity
+// when non-zero values are given for these. The Deque instance returns
+// operates on items of the type specified by the type argument. For example,
+// to create a Deque that contains strings,
+//
+// stringDeque := deque.New[string]()
+//
+// To create a Deque with capacity to store 2048 ints without resizing, and
+// that will not resize below space for 32 items when removing items:
+//
+// d := deque.New[int](2048, 32)
+//
+// To create a Deque that has not yet allocated memory, but after it does will
+// never resize to have space for less than 64 items:
+//
+// d := deque.New[int](0, 64)
+//
+// Any size values supplied here are rounded up to the nearest power of 2.
+func New[T any](size ...int) *Deque[T] {
+ var capacity, minimum int
+ if len(size) >= 1 {
+ capacity = size[0]
+ if len(size) >= 2 {
+ minimum = size[1]
+ }
+ }
+
+ minCap := minCapacity
+ for minCap < minimum {
+ minCap <<= 1
+ }
+
+ var buf []T
+ if capacity != 0 {
+ bufSize := minCap
+ for bufSize < capacity {
+ bufSize <<= 1
+ }
+ buf = make([]T, bufSize)
+ }
+
+ return &Deque[T]{
+ buf: buf,
+ minCap: minCap,
+ }
+}
+
+// Cap returns the current capacity of the Deque. If q is nil, q.Cap() is zero.
+func (q *Deque[T]) Cap() int {
+ if q == nil {
+ return 0
+ }
+ return len(q.buf)
+}
+
+// Len returns the number of elements currently stored in the queue. If q is
+// nil, q.Len() is zero.
+func (q *Deque[T]) Len() int {
+ if q == nil {
+ return 0
+ }
+ return q.count
+}
+
+// PushBack appends an element to the back of the queue. Implements FIFO when
+// elements are removed with PopFront, and LIFO when elements are removed with
+// PopBack.
+func (q *Deque[T]) PushBack(elem T) {
+ q.growIfFull()
+
+ q.buf[q.tail] = elem
+ // Calculate new tail position.
+ q.tail = q.next(q.tail)
+ q.count++
+}
+
+// PushFront prepends an element to the front of the queue.
+func (q *Deque[T]) PushFront(elem T) {
+ q.growIfFull()
+
+ // Calculate new head position.
+ q.head = q.prev(q.head)
+ q.buf[q.head] = elem
+ q.count++
+}
+
+// PopFront removes and returns the element from the front of the queue.
+// Implements FIFO when used with PushBack. If the queue is empty, the call
+// panics.
+func (q *Deque[T]) PopFront() T {
+ if q.count <= 0 {
+ panic("deque: PopFront() called on empty queue")
+ }
+ ret := q.buf[q.head]
+ var zero T
+ q.buf[q.head] = zero
+ // Calculate new head position.
+ q.head = q.next(q.head)
+ q.count--
+
+ q.shrinkIfExcess()
+ return ret
+}
+
+// PopBack removes and returns the element from the back of the queue.
+// Implements LIFO when used with PushBack. If the queue is empty, the call
+// panics.
+func (q *Deque[T]) PopBack() T {
+ if q.count <= 0 {
+ panic("deque: PopBack() called on empty queue")
+ }
+
+ // Calculate new tail position
+ q.tail = q.prev(q.tail)
+
+ // Remove value at tail.
+ ret := q.buf[q.tail]
+ var zero T
+ q.buf[q.tail] = zero
+ q.count--
+
+ q.shrinkIfExcess()
+ return ret
+}
+
+// Front returns the element at the front of the queue. This is the element
+// that would be returned by PopFront. This call panics if the queue is empty.
+func (q *Deque[T]) Front() T {
+ if q.count <= 0 {
+ panic("deque: Front() called when empty")
+ }
+ return q.buf[q.head]
+}
+
+// Back returns the element at the back of the queue. This is the element that
+// would be returned by PopBack. This call panics if the queue is empty.
+func (q *Deque[T]) Back() T {
+ if q.count <= 0 {
+ panic("deque: Back() called when empty")
+ }
+ return q.buf[q.prev(q.tail)]
+}
+
+// At returns the element at index i in the queue without removing the element
+// from the queue. This method accepts only non-negative index values. At(0)
+// refers to the first element and is the same as Front(). At(Len()-1) refers
+// to the last element and is the same as Back(). If the index is invalid, the
+// call panics.
+//
+// The purpose of At is to allow Deque to serve as a more general purpose
+// circular buffer, where items are only added to and removed from the ends of
+// the deque, but may be read from any place within the deque. Consider the
+// case of a fixed-size circular log buffer: A new entry is pushed onto one end
+// and when full the oldest is popped from the other end. All the log entries
+// in the buffer must be readable without altering the buffer contents.
+func (q *Deque[T]) At(i int) T {
+ if i < 0 || i >= q.count {
+ panic(outOfRangeText(i, q.Len()))
+ }
+ // bitwise modulus
+ return q.buf[(q.head+i)&(len(q.buf)-1)]
+}
+
+// Set assigns the item to index i in the queue. Set indexes the deque the same
+// as At but perform the opposite operation. If the index is invalid, the call
+// panics.
+func (q *Deque[T]) Set(i int, item T) {
+ if i < 0 || i >= q.count {
+ panic(outOfRangeText(i, q.Len()))
+ }
+ // bitwise modulus
+ q.buf[(q.head+i)&(len(q.buf)-1)] = item
+}
+
+// Clear removes all elements from the queue, but retains the current capacity.
+// This is useful when repeatedly reusing the queue at high frequency to avoid
+// GC during reuse. The queue will not be resized smaller as long as items are
+// only added. Only when items are removed is the queue subject to getting
+// resized smaller.
+func (q *Deque[T]) Clear() {
+ var zero T
+ modBits := len(q.buf) - 1
+ h := q.head
+ for i := 0; i < q.Len(); i++ {
+ q.buf[(h+i)&modBits] = zero
+ }
+ q.head = 0
+ q.tail = 0
+ q.count = 0
+}
+
+// Rotate rotates the deque n steps front-to-back. If n is negative, rotates
+// back-to-front. Having Deque provide Rotate avoids resizing that could happen
+// if implementing rotation using only Pop and Push methods. If q.Len() is one
+// or less, or q is nil, then Rotate does nothing.
+func (q *Deque[T]) Rotate(n int) {
+ if q.Len() <= 1 {
+ return
+ }
+ // Rotating a multiple of q.count is same as no rotation.
+ n %= q.count
+ if n == 0 {
+ return
+ }
+
+ modBits := len(q.buf) - 1
+ // If no empty space in buffer, only move head and tail indexes.
+ if q.head == q.tail {
+ // Calculate new head and tail using bitwise modulus.
+ q.head = (q.head + n) & modBits
+ q.tail = q.head
+ return
+ }
+
+ var zero T
+
+ if n < 0 {
+ // Rotate back to front.
+ for ; n < 0; n++ {
+ // Calculate new head and tail using bitwise modulus.
+ q.head = (q.head - 1) & modBits
+ q.tail = (q.tail - 1) & modBits
+ // Put tail value at head and remove value at tail.
+ q.buf[q.head] = q.buf[q.tail]
+ q.buf[q.tail] = zero
+ }
+ return
+ }
+
+ // Rotate front to back.
+ for ; n > 0; n-- {
+ // Put head value at tail and remove value at head.
+ q.buf[q.tail] = q.buf[q.head]
+ q.buf[q.head] = zero
+ // Calculate new head and tail using bitwise modulus.
+ q.head = (q.head + 1) & modBits
+ q.tail = (q.tail + 1) & modBits
+ }
+}
+
+// Index returns the index into the Deque of the first item satisfying f(item),
+// or -1 if none do. If q is nil, then -1 is always returned. Search is linear
+// starting with index 0.
+func (q *Deque[T]) Index(f func(T) bool) int {
+ if q.Len() > 0 {
+ modBits := len(q.buf) - 1
+ for i := 0; i < q.count; i++ {
+ if f(q.buf[(q.head+i)&modBits]) {
+ return i
+ }
+ }
+ }
+ return -1
+}
+
+// RIndex is the same as Index, but searches from Back to Front. The index
+// returned is from Front to Back, where index 0 is the index of the item
+// returned by Front().
+func (q *Deque[T]) RIndex(f func(T) bool) int {
+ if q.Len() > 0 {
+ modBits := len(q.buf) - 1
+ for i := q.count - 1; i >= 0; i-- {
+ if f(q.buf[(q.head+i)&modBits]) {
+ return i
+ }
+ }
+ }
+ return -1
+}
+
+// Insert is used to insert an element into the middle of the queue, before the
+// element at the specified index. Insert(0,e) is the same as PushFront(e) and
+// Insert(Len(),e) is the same as PushBack(e). Accepts only non-negative index
+// values, and panics if index is out of range.
+//
+// Important: Deque is optimized for O(1) operations at the ends of the queue,
+// not for operations in the the middle. Complexity of this function is
+// constant plus linear in the lesser of the distances between the index and
+// either of the ends of the queue.
+func (q *Deque[T]) Insert(at int, item T) {
+ if at < 0 || at > q.count {
+ panic(outOfRangeText(at, q.Len()))
+ }
+ if at*2 < q.count {
+ q.PushFront(item)
+ front := q.head
+ for i := 0; i < at; i++ {
+ next := q.next(front)
+ q.buf[front], q.buf[next] = q.buf[next], q.buf[front]
+ front = next
+ }
+ return
+ }
+ swaps := q.count - at
+ q.PushBack(item)
+ back := q.prev(q.tail)
+ for i := 0; i < swaps; i++ {
+ prev := q.prev(back)
+ q.buf[back], q.buf[prev] = q.buf[prev], q.buf[back]
+ back = prev
+ }
+}
+
+// Remove removes and returns an element from the middle of the queue, at the
+// specified index. Remove(0) is the same as PopFront() and Remove(Len()-1) is
+// the same as PopBack(). Accepts only non-negative index values, and panics if
+// index is out of range.
+//
+// Important: Deque is optimized for O(1) operations at the ends of the queue,
+// not for operations in the the middle. Complexity of this function is
+// constant plus linear in the lesser of the distances between the index and
+// either of the ends of the queue.
+func (q *Deque[T]) Remove(at int) T {
+ if at < 0 || at >= q.Len() {
+ panic(outOfRangeText(at, q.Len()))
+ }
+
+ rm := (q.head + at) & (len(q.buf) - 1)
+ if at*2 < q.count {
+ for i := 0; i < at; i++ {
+ prev := q.prev(rm)
+ q.buf[prev], q.buf[rm] = q.buf[rm], q.buf[prev]
+ rm = prev
+ }
+ return q.PopFront()
+ }
+ swaps := q.count - at - 1
+ for i := 0; i < swaps; i++ {
+ next := q.next(rm)
+ q.buf[rm], q.buf[next] = q.buf[next], q.buf[rm]
+ rm = next
+ }
+ return q.PopBack()
+}
+
+// SetMinCapacity sets a minimum capacity of 2^minCapacityExp. If the value of
+// the minimum capacity is less than or equal to the minimum allowed, then
+// capacity is set to the minimum allowed. This may be called at anytime to set
+// a new minimum capacity.
+//
+// Setting a larger minimum capacity may be used to prevent resizing when the
+// number of stored items changes frequently across a wide range.
+func (q *Deque[T]) SetMinCapacity(minCapacityExp uint) {
+ if 1< minCapacity {
+ q.minCap = 1 << minCapacityExp
+ } else {
+ q.minCap = minCapacity
+ }
+}
+
+// prev returns the previous buffer position wrapping around buffer.
+func (q *Deque[T]) prev(i int) int {
+ return (i - 1) & (len(q.buf) - 1) // bitwise modulus
+}
+
+// next returns the next buffer position wrapping around buffer.
+func (q *Deque[T]) next(i int) int {
+ return (i + 1) & (len(q.buf) - 1) // bitwise modulus
+}
+
+// growIfFull resizes up if the buffer is full.
+func (q *Deque[T]) growIfFull() {
+ if q.count != len(q.buf) {
+ return
+ }
+ if len(q.buf) == 0 {
+ if q.minCap == 0 {
+ q.minCap = minCapacity
+ }
+ q.buf = make([]T, q.minCap)
+ return
+ }
+ q.resize()
+}
+
+// shrinkIfExcess resize down if the buffer 1/4 full.
+func (q *Deque[T]) shrinkIfExcess() {
+ if len(q.buf) > q.minCap && (q.count<<2) == len(q.buf) {
+ q.resize()
+ }
+}
+
+// resize resizes the deque to fit exactly twice its current contents. This is
+// used to grow the queue when it is full, and also to shrink it when it is
+// only a quarter full.
+func (q *Deque[T]) resize() {
+ newBuf := make([]T, q.count<<1)
+ if q.tail > q.head {
+ copy(newBuf, q.buf[q.head:q.tail])
+ } else {
+ n := copy(newBuf, q.buf[q.head:])
+ copy(newBuf[n:], q.buf[:q.tail])
+ }
+
+ q.head = 0
+ q.tail = q.count
+ q.buf = newBuf
+}
+
+func outOfRangeText(i, len int) string {
+ return fmt.Sprintf("deque: index out of range %d with length %d", i, len)
+}
diff --git a/vendor/github.com/gammazero/deque/doc.go b/vendor/github.com/gammazero/deque/doc.go
new file mode 100644
index 00000000..6cfead99
--- /dev/null
+++ b/vendor/github.com/gammazero/deque/doc.go
@@ -0,0 +1,38 @@
+/*
+Package deque provides a fast ring-buffer deque (double-ended queue)
+implementation.
+
+Deque generalizes a queue and a stack, to efficiently add and remove items at
+either end with O(1) performance. Queue (FIFO) operations are supported using
+PushBack and PopFront. Stack (LIFO) operations are supported using PushBack and
+PopBack.
+
+# Ring-buffer Performance
+
+The ring-buffer automatically resizes by powers of two, growing when additional
+capacity is needed and shrinking when only a quarter of the capacity is used,
+and uses bitwise arithmetic for all calculations.
+
+The ring-buffer implementation significantly improves memory and time
+performance with fewer GC pauses, compared to implementations based on slices
+and linked lists.
+
+For maximum speed, this deque implementation leaves concurrency safety up to
+the application to provide, however the application chooses, if needed at all.
+
+# Reading Empty Deque
+
+Since it is OK for the deque to contain the zero-value of an item, it is
+necessary to either panic or return a second boolean value to indicate the
+deque is empty, when reading or removing an element. This deque panics when
+reading from an empty deque. This is a run-time check to help catch programming
+errors, which may be missed if a second return value is ignored. Simply check
+Deque.Len() before reading from the deque.
+
+# Generics
+
+Deque uses generics to create a Deque that contains items of the type
+specified. To create a Deque that holds a specific type, provide a type
+argument to New or with the variable declaration.
+*/
+package deque
diff --git a/vendor/github.com/maypok86/otter/.gitignore b/vendor/github.com/maypok86/otter/.gitignore
new file mode 100644
index 00000000..e95bc5ed
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/.gitignore
@@ -0,0 +1,22 @@
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, built with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Dependency directories (remove the comment below to include it)
+# vendor/
+
+/.idea/
+*.tmp
+*coverage.txt
+*lint.txt
+**/bin/
+.DS_Store
diff --git a/vendor/github.com/maypok86/otter/.golangci.yml b/vendor/github.com/maypok86/otter/.golangci.yml
new file mode 100644
index 00000000..a4235930
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/.golangci.yml
@@ -0,0 +1,103 @@
+run:
+ concurrency: 8
+ timeout: 5m
+ build-tags:
+ - integration
+ modules-download-mode: readonly
+ go: '1.22'
+output:
+ formats:
+ - format: tab
+ path: lint.txt
+ print-issued-lines: false
+ uniq-by-line: false
+ sort-results: true
+linters:
+ enable:
+ - asasalint
+ - asciicheck
+ - bidichk
+ - bodyclose
+ - contextcheck
+ - durationcheck
+ - errcheck
+ - errname
+ - errorlint
+ - gocheckcompilerdirectives
+ - gocritic
+ - godot
+ - gofumpt
+ - gci
+ - gomoddirectives
+ - gosec
+ - gosimple
+ - govet
+ - ineffassign
+ - misspell
+ - nakedret
+ - nilerr
+ - nilnil
+ - noctx
+ - nolintlint
+ - prealloc
+ - predeclared
+ - promlinter
+ - reassign
+ - revive
+ - rowserrcheck
+ - sqlclosecheck
+ - staticcheck
+ - stylecheck
+ - tagliatelle
+ - tenv
+ - testableexamples
+ - thelper
+ - tparallel
+ - unconvert
+ - unparam
+ - usestdlibvars
+ - wastedassign
+ disable:
+ - unused
+issues:
+ max-issues-per-linter: 0
+ max-same-issues: 0
+ exclude-rules:
+ - path: _test\.go
+ linters:
+ - gosec
+linters-settings:
+ gci:
+ sections:
+ - standard # Standard lib
+ - default # External dependencies
+ - prefix(github.com/maypok86/otter) # Internal packages
+ gocritic:
+ enabled-tags:
+ - diagnostic
+ - experimental
+ - opinionated
+ - performance
+ - style
+ disabled-checks:
+ - hugeParam
+ - rangeExprCopy
+ - rangeValCopy
+ errcheck:
+ check-type-assertions: true
+ check-blank: true
+ exclude-functions:
+ - io/ioutil.ReadFile
+ - io.Copy(*bytes.Buffer)
+ - io.Copy(os.Stdout)
+ nakedret:
+ max-func-lines: 1
+ revive:
+ rules:
+ - name: empty-block
+ disabled: true
+ tagliatelle:
+ case:
+ rules:
+ json: snake
+ yaml: snake
diff --git a/vendor/github.com/maypok86/otter/CHANGELOG.md b/vendor/github.com/maypok86/otter/CHANGELOG.md
new file mode 100644
index 00000000..01e2d724
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/CHANGELOG.md
@@ -0,0 +1,98 @@
+## 1.2.4 - 2024-11-23
+
+### 🐞 Bug Fixes
+
+- Fixed a bug due to changing [gammazero/deque](https://github.com/gammazero/deque/pull/33) contracts without v2 release. ([#112](https://github.com/maypok86/otter/issues/112))
+
+## 1.2.3 - 2024-09-30
+
+### 🐞 Bug Fixes
+
+- Added collection of eviction statistics for expired entries. ([#108](https://github.com/maypok86/otter/issues/108))
+
+## 1.2.2 - 2024-08-14
+
+### ✨️Features
+
+- Implemented `fmt.Stringer` interface for `DeletionReason` type ([#100](https://github.com/maypok86/otter/issues/100))
+
+### 🐞 Bug Fixes
+
+- Fixed processing of an expired entry in the `Get` method ([#98](https://github.com/maypok86/otter/issues/98))
+- Fixed inconsistent deletion listener behavior ([#98](https://github.com/maypok86/otter/issues/98))
+- Fixed the behavior of `checkedAdd` when over/underflow ([#91](https://github.com/maypok86/otter/issues/91))
+
+## 1.2.1 - 2024-04-15
+
+### 🐞 Bug Fixes
+
+- Fixed uint32 capacity overflow.
+
+## 1.2.0 - 2024-03-12
+
+The main innovation of this release is the addition of an `Extension`, which makes it easy to add a huge number of features to otter.
+
+Usage example:
+
+```go
+key := 1
+...
+entry, ok := cache.Extension().GetEntry(key)
+...
+key := entry.Key()
+value := entry.Value()
+cost := entry.Cost()
+expiration := entry.Expiration()
+ttl := entry.TTL()
+hasExpired := entry.HasExpired()
+```
+
+### ✨️Features
+
+- Added `DeletionListener` to the builder ([#63](https://github.com/maypok86/otter/issues/63))
+- Added `Extension` ([#56](https://github.com/maypok86/otter/issues/56))
+
+### 🚀 Improvements
+
+- Added support for Go 1.22
+- Memory consumption with small cache sizes is reduced to the level of other libraries ([#66](https://github.com/maypok86/otter/issues/66))
+
+## 1.1.1 - 2024-03-06
+
+### 🐞 Bug Fixes
+
+- Fixed alignment issues on 32-bit archs
+
+## 1.1.0 - 2024-03-04
+
+The main innovation of this release is node code generation. Thanks to it, the cache will no longer consume more memory due to features that it does not use. For example, if you do not need an expiration policy, then otter will not store the expiration time of each entry. It also allows otter to use more effective expiration policies.
+
+Another expected improvement is the correction of minor synchronization problems due to the state machine. Now otter, unlike other contention-free caches in Go, should not have them at all.
+
+### ✨️Features
+
+- Added `DeleteByFunc` function to cache ([#44](https://github.com/maypok86/otter/issues/44))
+- Added `InitialCapacity` function to builder ([#47](https://github.com/maypok86/otter/issues/47))
+- Added collection of additional statistics ([#57](https://github.com/maypok86/otter/issues/57))
+
+### 🚀 Improvements
+
+- Added proactive queue-based and timer wheel-based expiration policies with O(1) time complexity ([#55](https://github.com/maypok86/otter/issues/55))
+- Added node code generation ([#55](https://github.com/maypok86/otter/issues/55))
+- Fixed the race condition when changing the order of events ([#59](https://github.com/maypok86/otter/issues/59))
+- Reduced memory consumption on small caches
+
+## 1.0.0 - 2024-01-26
+
+### ✨️Features
+
+- Builder pattern support
+- Cleaner API compared to other caches ([#40](https://github.com/maypok86/otter/issues/40))
+- Added `SetIfAbsent` and `Range` functions ([#27](https://github.com/maypok86/otter/issues/27))
+- Statistics collection ([#4](https://github.com/maypok86/otter/issues/4))
+- Cost based eviction
+- Support for generics and any comparable types as keys
+- Support ttl ([#14](https://github.com/maypok86/otter/issues/14))
+- Excellent speed ([benchmark results](https://github.com/maypok86/otter?tab=readme-ov-file#-performance-))
+- O(1) worst case time complexity for S3-FIFO instead of O(n)
+- Improved hit ratio of S3-FIFO on many traces ([simulator results](https://github.com/maypok86/otter?tab=readme-ov-file#-hit-ratio-))
diff --git a/vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md b/vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..2538016e
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md
@@ -0,0 +1,128 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+ overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+maypok86@gmail.com.
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct
+enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at
+https://www.contributor-covenant.org/translations.
diff --git a/vendor/github.com/maypok86/otter/CONTRIBUTING.md b/vendor/github.com/maypok86/otter/CONTRIBUTING.md
new file mode 100644
index 00000000..0b52d462
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/CONTRIBUTING.md
@@ -0,0 +1,23 @@
+# Contribution Guidelines
+
+## Reporting Issues
+
+Please [open an issue](https://github.com/maypok86/otter/issues) if you find a bug or have a feature request.
+Note: you need to login (e. g. using your GitHub account) first.
+Before submitting a bug report or feature request, check to make sure it hasn't
+already been submitted
+
+The more detailed your report is, the faster it can be resolved.
+If you report a bug, please provide steps to reproduce this bug and revision of
+code in which this bug reproduces.
+
+
+## Code
+
+If you would like to contribute code to fix a bug, add a new feature, or
+otherwise improve our product, pull requests are most welcome.
+
+Our pull request template contains a [checklist](https://github.com/maypok86/otter/blob/main/.github/pull_request_template.md) of acceptance
+criteria for your pull request.
+Please read it before you start contributing and make sure your contributions
+adhere to this checklist.
diff --git a/vendor/github.com/maypok86/otter/LICENSE b/vendor/github.com/maypok86/otter/LICENSE
new file mode 100644
index 00000000..f49a4e16
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
\ No newline at end of file
diff --git a/vendor/github.com/maypok86/otter/Makefile b/vendor/github.com/maypok86/otter/Makefile
new file mode 100644
index 00000000..ef138b48
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/Makefile
@@ -0,0 +1,56 @@
+.PHONY: setup
+setup: deps ## Setup development environment
+ cp ./scripts/pre-push.sh .git/hooks/pre-push
+ chmod +x .git/hooks/pre-push
+
+.PHONY: deps
+deps: ## Install all the build and lint dependencies
+ bash scripts/deps.sh
+
+.PHONY: fmt
+fmt: ## Run format tools on all go files
+ gci write --skip-vendor --skip-generated \
+ -s standard -s default -s "prefix(github.com/maypok86/otter)" .
+ gofumpt -l -w .
+
+.PHONY: lint
+lint: ## Run all the linters
+ golangci-lint run -v ./...
+
+.PHONY: test
+test: test.unit ## Run all the tests
+
+.PHONY: test.unit
+test.unit: ## Run all unit tests
+ @echo 'mode: atomic' > coverage.txt
+ go test -covermode=atomic -coverprofile=coverage.txt.tmp -coverpkg=./... -v -race ./...
+ cat coverage.txt.tmp | grep -v -E "/generated/|/cmd/" > coverage.txt
+ rm coverage.txt.tmp
+
+.PHONY: test.32-bit
+test.32-bit: ## Run tests on 32-bit arch
+ GOARCH=386 go test -v ./...
+
+.PHONY: cover
+cover: test.unit ## Run all the tests and opens the coverage report
+ go tool cover -html=coverage.txt
+
+.PHONY: ci
+ci: lint test ## Run all the tests and code checks
+
+.PHONY: generate
+generate: ## Generate files for the project
+ go run ./cmd/generator ./internal/generated/node
+
+.PHONY: clean
+clean: ## Remove temporary files
+ @go clean
+ @rm -rf bin/
+ @rm -rf coverage.txt lint.txt
+ @echo "SUCCESS!"
+
+.PHONY: help
+help:
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+
+.DEFAULT_GOAL:= help
diff --git a/vendor/github.com/maypok86/otter/README.md b/vendor/github.com/maypok86/otter/README.md
new file mode 100644
index 00000000..27233930
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/README.md
@@ -0,0 +1,191 @@
+
+
+
High performance in-memory cache
+
+
+
+
+
+
+
+
+
+
+
+
+Otter is one of the most powerful caching libraries for Go based on researches in caching and concurrent data structures. Otter also uses the experience of designing caching libraries in other languages (for example, [caffeine](https://github.com/ben-manes/caffeine)).
+
+## 📖 Contents
+
+- [Features](#features)
+- [Related works](#related-works)
+- [Usage](#usage)
+ - [Requirements](#requirements)
+ - [Installation](#installation)
+ - [Examples](#examples)
+- [Performance](#performance)
+ - [Throughput](#throughput)
+ - [Hit ratio](#hit-ratio)
+ - [Memory consumption](#memory-consumption)
+- [Contribute](#contribute)
+- [License](#license)
+
+## ✨ Features
+
+- **Simple API**: Just set the parameters you want in the builder and enjoy
+- **Autoconfiguration**: Otter is automatically configured based on the parallelism of your application
+- **Generics**: You can safely use any comparable types as keys and any types as values
+- **TTL**: Expired values will be automatically deleted from the cache
+- **Cost-based eviction**: Otter supports eviction based on the cost of each entry
+- **Deletion listener**: You can pass a callback function in the builder that will be called when an entry is deleted from the cache
+- **Stats**: You can collect various usage statistics
+- **Excellent throughput**: Otter can handle a [huge number of requests](#throughput)
+- **Great hit ratio**: New S3-FIFO algorithm is used, which shows excellent [results](#hit-ratio)
+
+## 🗃 Related works
+
+Otter is based on the following papers:
+
+- [BP-Wrapper: A Framework Making Any Replacement Algorithms (Almost) Lock Contention Free](https://www.researchgate.net/publication/220966845_BP-Wrapper_A_System_Framework_Making_Any_Replacement_Algorithms_Almost_Lock_Contention_Free)
+- [FIFO queues are all you need for cache eviction](https://dl.acm.org/doi/10.1145/3600006.3613147)
+- [A large scale analysis of hundreds of in-memory cache clusters at Twitter](https://www.usenix.org/system/files/osdi20-yang.pdf)
+
+## 📚 Usage
+
+### 📋 Requirements
+
+- Go 1.19+
+
+### 🛠️ Installation
+
+```shell
+go get -u github.com/maypok86/otter
+```
+
+### ✏️ Examples
+
+Otter uses a builder pattern that allows you to conveniently create a cache instance with different parameters.
+
+**Cache with const TTL**
+```go
+package main
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/maypok86/otter"
+)
+
+func main() {
+ // create a cache with capacity equal to 10000 elements
+ cache, err := otter.MustBuilder[string, string](10_000).
+ CollectStats().
+ Cost(func(key string, value string) uint32 {
+ return 1
+ }).
+ WithTTL(time.Hour).
+ Build()
+ if err != nil {
+ panic(err)
+ }
+
+ // set item with ttl (1 hour)
+ cache.Set("key", "value")
+
+ // get value from cache
+ value, ok := cache.Get("key")
+ if !ok {
+ panic("not found key")
+ }
+ fmt.Println(value)
+
+ // delete item from cache
+ cache.Delete("key")
+
+ // delete data and stop goroutines
+ cache.Close()
+}
+```
+
+**Cache with variable TTL**
+```go
+package main
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/maypok86/otter"
+)
+
+func main() {
+ // create a cache with capacity equal to 10000 elements
+ cache, err := otter.MustBuilder[string, string](10_000).
+ CollectStats().
+ Cost(func(key string, value string) uint32 {
+ return 1
+ }).
+ WithVariableTTL().
+ Build()
+ if err != nil {
+ panic(err)
+ }
+
+ // set item with ttl (1 hour)
+ cache.Set("key1", "value1", time.Hour)
+ // set item with ttl (1 minute)
+ cache.Set("key2", "value2", time.Minute)
+
+ // get value from cache
+ value, ok := cache.Get("key1")
+ if !ok {
+ panic("not found key")
+ }
+ fmt.Println(value)
+
+ // delete item from cache
+ cache.Delete("key1")
+
+ // delete data and stop goroutines
+ cache.Close()
+}
+```
+
+## 📊 Performance
+
+The benchmark code can be found [here](https://github.com/maypok86/benchmarks).
+
+### 🚀 Throughput
+
+Throughput benchmarks are a Go port of the caffeine [benchmarks](https://github.com/ben-manes/caffeine/blob/master/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/GetPutBenchmark.java). This microbenchmark compares the throughput of caches on a zipf distribution, which allows to show various inefficient places in implementations.
+
+You can find results [here](https://maypok86.github.io/otter/performance/throughput/).
+
+### 🎯 Hit ratio
+
+The hit ratio simulator tests caches on various traces:
+1. Synthetic (zipf distribution)
+2. Traditional (widely known and used in various projects and papers)
+3. Modern (recently collected from the production of the largest companies in the world)
+
+You can find results [here](https://maypok86.github.io/otter/performance/hit-ratio/).
+
+### 💾 Memory consumption
+
+The memory overhead benchmark shows how much additional memory the cache will require at different capacities.
+
+You can find results [here](https://maypok86.github.io/otter/performance/memory-consumption/).
+
+## 👏 Contribute
+
+Contributions are welcome as always, before submitting a new PR please make sure to open a new issue so community members can discuss it.
+For more information please see [contribution guidelines](./CONTRIBUTING.md).
+
+Additionally, you might find existing open issues which can help with improvements.
+
+This project follows a standard [code of conduct](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
+
+## 📄 License
+
+This project is Apache 2.0 licensed, as found in the [LICENSE](./LICENSE).
diff --git a/vendor/github.com/maypok86/otter/builder.go b/vendor/github.com/maypok86/otter/builder.go
new file mode 100644
index 00000000..2498c903
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/builder.go
@@ -0,0 +1,311 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package otter
+
+import (
+ "errors"
+ "time"
+
+ "github.com/maypok86/otter/internal/core"
+)
+
+const (
+ unsetCapacity = -1
+)
+
+var (
+ // ErrIllegalCapacity means that a non-positive capacity has been passed to the NewBuilder.
+ ErrIllegalCapacity = errors.New("capacity should be positive")
+ // ErrIllegalInitialCapacity means that a non-positive capacity has been passed to the Builder.InitialCapacity.
+ ErrIllegalInitialCapacity = errors.New("initial capacity should be positive")
+ // ErrNilCostFunc means that a nil cost func has been passed to the Builder.Cost.
+ ErrNilCostFunc = errors.New("setCostFunc func should not be nil")
+ // ErrIllegalTTL means that a non-positive ttl has been passed to the Builder.WithTTL.
+ ErrIllegalTTL = errors.New("ttl should be positive")
+)
+
+type baseOptions[K comparable, V any] struct {
+ capacity int
+ initialCapacity int
+ statsEnabled bool
+ withCost bool
+ costFunc func(key K, value V) uint32
+ deletionListener func(key K, value V, cause DeletionCause)
+}
+
+func (o *baseOptions[K, V]) collectStats() {
+ o.statsEnabled = true
+}
+
+func (o *baseOptions[K, V]) setCostFunc(costFunc func(key K, value V) uint32) {
+ o.costFunc = costFunc
+ o.withCost = true
+}
+
+func (o *baseOptions[K, V]) setInitialCapacity(initialCapacity int) {
+ o.initialCapacity = initialCapacity
+}
+
+func (o *baseOptions[K, V]) setDeletionListener(deletionListener func(key K, value V, cause DeletionCause)) {
+ o.deletionListener = deletionListener
+}
+
+func (o *baseOptions[K, V]) validate() error {
+ if o.initialCapacity <= 0 && o.initialCapacity != unsetCapacity {
+ return ErrIllegalInitialCapacity
+ }
+ if o.costFunc == nil {
+ return ErrNilCostFunc
+ }
+ return nil
+}
+
+func (o *baseOptions[K, V]) toConfig() core.Config[K, V] {
+ var initialCapacity *int
+ if o.initialCapacity != unsetCapacity {
+ initialCapacity = &o.initialCapacity
+ }
+ return core.Config[K, V]{
+ Capacity: o.capacity,
+ InitialCapacity: initialCapacity,
+ StatsEnabled: o.statsEnabled,
+ CostFunc: o.costFunc,
+ WithCost: o.withCost,
+ DeletionListener: o.deletionListener,
+ }
+}
+
+type constTTLOptions[K comparable, V any] struct {
+ baseOptions[K, V]
+ ttl time.Duration
+}
+
+func (o *constTTLOptions[K, V]) validate() error {
+ if o.ttl <= 0 {
+ return ErrIllegalTTL
+ }
+ return o.baseOptions.validate()
+}
+
+func (o *constTTLOptions[K, V]) toConfig() core.Config[K, V] {
+ c := o.baseOptions.toConfig()
+ c.TTL = &o.ttl
+ return c
+}
+
+type variableTTLOptions[K comparable, V any] struct {
+ baseOptions[K, V]
+}
+
+func (o *variableTTLOptions[K, V]) toConfig() core.Config[K, V] {
+ c := o.baseOptions.toConfig()
+ c.WithVariableTTL = true
+ return c
+}
+
+// Builder is a one-shot builder for creating a cache instance.
+type Builder[K comparable, V any] struct {
+ baseOptions[K, V]
+}
+
+// MustBuilder creates a builder and sets the future cache capacity.
+//
+// Panics if capacity <= 0.
+func MustBuilder[K comparable, V any](capacity int) *Builder[K, V] {
+ b, err := NewBuilder[K, V](capacity)
+ if err != nil {
+ panic(err)
+ }
+ return b
+}
+
+// NewBuilder creates a builder and sets the future cache capacity.
+//
+// Returns an error if capacity <= 0.
+func NewBuilder[K comparable, V any](capacity int) (*Builder[K, V], error) {
+ if capacity <= 0 {
+ return nil, ErrIllegalCapacity
+ }
+
+ return &Builder[K, V]{
+ baseOptions: baseOptions[K, V]{
+ capacity: capacity,
+ initialCapacity: unsetCapacity,
+ statsEnabled: false,
+ costFunc: func(key K, value V) uint32 {
+ return 1
+ },
+ },
+ }, nil
+}
+
+// CollectStats determines whether statistics should be calculated when the cache is running.
+//
+// By default, statistics calculating is disabled.
+func (b *Builder[K, V]) CollectStats() *Builder[K, V] {
+ b.collectStats()
+ return b
+}
+
+// InitialCapacity sets the minimum total size for the internal data structures. Providing a large enough estimate
+// at construction time avoids the need for expensive resizing operations later, but setting this
+// value unnecessarily high wastes memory.
+func (b *Builder[K, V]) InitialCapacity(initialCapacity int) *Builder[K, V] {
+ b.setInitialCapacity(initialCapacity)
+ return b
+}
+
+// Cost sets a function to dynamically calculate the cost of an item.
+//
+// By default, this function always returns 1.
+func (b *Builder[K, V]) Cost(costFunc func(key K, value V) uint32) *Builder[K, V] {
+ b.setCostFunc(costFunc)
+ return b
+}
+
+// DeletionListener specifies a listener instance that caches should notify each time an entry is deleted for any
+// DeletionCause cause. The cache will invoke this listener in the background goroutine
+// after the entry's deletion operation has completed.
+func (b *Builder[K, V]) DeletionListener(deletionListener func(key K, value V, cause DeletionCause)) *Builder[K, V] {
+ b.setDeletionListener(deletionListener)
+ return b
+}
+
+// WithTTL specifies that each item should be automatically removed from the cache once a fixed duration
+// has elapsed after the item's creation.
+func (b *Builder[K, V]) WithTTL(ttl time.Duration) *ConstTTLBuilder[K, V] {
+ return &ConstTTLBuilder[K, V]{
+ constTTLOptions[K, V]{
+ baseOptions: b.baseOptions,
+ ttl: ttl,
+ },
+ }
+}
+
+// WithVariableTTL specifies that each item should be automatically removed from the cache once a duration has
+// elapsed after the item's creation. Items are expired based on the custom ttl specified for each item separately.
+//
+// You should prefer WithTTL to this option whenever possible.
+func (b *Builder[K, V]) WithVariableTTL() *VariableTTLBuilder[K, V] {
+ return &VariableTTLBuilder[K, V]{
+ variableTTLOptions[K, V]{
+ baseOptions: b.baseOptions,
+ },
+ }
+}
+
+// Build creates a configured cache or
+// returns an error if invalid parameters were passed to the builder.
+func (b *Builder[K, V]) Build() (Cache[K, V], error) {
+ if err := b.validate(); err != nil {
+ return Cache[K, V]{}, err
+ }
+
+ return newCache(b.toConfig()), nil
+}
+
+// ConstTTLBuilder is a one-shot builder for creating a cache instance.
+type ConstTTLBuilder[K comparable, V any] struct {
+ constTTLOptions[K, V]
+}
+
+// CollectStats determines whether statistics should be calculated when the cache is running.
+//
+// By default, statistics calculating is disabled.
+func (b *ConstTTLBuilder[K, V]) CollectStats() *ConstTTLBuilder[K, V] {
+ b.collectStats()
+ return b
+}
+
+// InitialCapacity sets the minimum total size for the internal data structures. Providing a large enough estimate
+// at construction time avoids the need for expensive resizing operations later, but setting this
+// value unnecessarily high wastes memory.
+func (b *ConstTTLBuilder[K, V]) InitialCapacity(initialCapacity int) *ConstTTLBuilder[K, V] {
+ b.setInitialCapacity(initialCapacity)
+ return b
+}
+
+// Cost sets a function to dynamically calculate the cost of an item.
+//
+// By default, this function always returns 1.
+func (b *ConstTTLBuilder[K, V]) Cost(costFunc func(key K, value V) uint32) *ConstTTLBuilder[K, V] {
+ b.setCostFunc(costFunc)
+ return b
+}
+
+// DeletionListener specifies a listener instance that caches should notify each time an entry is deleted for any
+// DeletionCause cause. The cache will invoke this listener in the background goroutine
+// after the entry's deletion operation has completed.
+func (b *ConstTTLBuilder[K, V]) DeletionListener(deletionListener func(key K, value V, cause DeletionCause)) *ConstTTLBuilder[K, V] {
+ b.setDeletionListener(deletionListener)
+ return b
+}
+
+// Build creates a configured cache or
+// returns an error if invalid parameters were passed to the builder.
+func (b *ConstTTLBuilder[K, V]) Build() (Cache[K, V], error) {
+ if err := b.validate(); err != nil {
+ return Cache[K, V]{}, err
+ }
+
+ return newCache(b.toConfig()), nil
+}
+
+// VariableTTLBuilder is a one-shot builder for creating a cache instance.
+type VariableTTLBuilder[K comparable, V any] struct {
+ variableTTLOptions[K, V]
+}
+
+// CollectStats determines whether statistics should be calculated when the cache is running.
+//
+// By default, statistics calculating is disabled.
+func (b *VariableTTLBuilder[K, V]) CollectStats() *VariableTTLBuilder[K, V] {
+ b.collectStats()
+ return b
+}
+
+// InitialCapacity sets the minimum total size for the internal data structures. Providing a large enough estimate
+// at construction time avoids the need for expensive resizing operations later, but setting this
+// value unnecessarily high wastes memory.
+func (b *VariableTTLBuilder[K, V]) InitialCapacity(initialCapacity int) *VariableTTLBuilder[K, V] {
+ b.setInitialCapacity(initialCapacity)
+ return b
+}
+
+// Cost sets a function to dynamically calculate the cost of an item.
+//
+// By default, this function always returns 1.
+func (b *VariableTTLBuilder[K, V]) Cost(costFunc func(key K, value V) uint32) *VariableTTLBuilder[K, V] {
+ b.setCostFunc(costFunc)
+ return b
+}
+
+// DeletionListener specifies a listener instance that caches should notify each time an entry is deleted for any
+// DeletionCause cause. The cache will invoke this listener in the background goroutine
+// after the entry's deletion operation has completed.
+func (b *VariableTTLBuilder[K, V]) DeletionListener(deletionListener func(key K, value V, cause DeletionCause)) *VariableTTLBuilder[K, V] {
+ b.setDeletionListener(deletionListener)
+ return b
+}
+
+// Build creates a configured cache or
+// returns an error if invalid parameters were passed to the builder.
+func (b *VariableTTLBuilder[K, V]) Build() (CacheWithVariableTTL[K, V], error) {
+ if err := b.validate(); err != nil {
+ return CacheWithVariableTTL[K, V]{}, err
+ }
+
+ return newCacheWithVariableTTL(b.toConfig()), nil
+}
diff --git a/vendor/github.com/maypok86/otter/cache.go b/vendor/github.com/maypok86/otter/cache.go
new file mode 100644
index 00000000..bedbb0e5
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/cache.go
@@ -0,0 +1,165 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package otter
+
+import (
+ "time"
+
+ "github.com/maypok86/otter/internal/core"
+)
+
+// DeletionCause the cause why a cached entry was deleted.
+type DeletionCause = core.DeletionCause
+
+const (
+ // Explicit the entry was manually deleted by the user.
+ Explicit = core.Explicit
+ // Replaced the entry itself was not actually deleted, but its value was replaced by the user.
+ Replaced = core.Replaced
+ // Size the entry was evicted due to size constraints.
+ Size = core.Size
+ // Expired the entry's expiration timestamp has passed.
+ Expired = core.Expired
+)
+
+type baseCache[K comparable, V any] struct {
+ cache *core.Cache[K, V]
+}
+
+func newBaseCache[K comparable, V any](c core.Config[K, V]) baseCache[K, V] {
+ return baseCache[K, V]{
+ cache: core.NewCache(c),
+ }
+}
+
+// Has checks if there is an entry with the given key in the cache.
+func (bs baseCache[K, V]) Has(key K) bool {
+ return bs.cache.Has(key)
+}
+
+// Get returns the value associated with the key in this cache.
+func (bs baseCache[K, V]) Get(key K) (V, bool) {
+ return bs.cache.Get(key)
+}
+
+// Delete removes the association for this key from the cache.
+func (bs baseCache[K, V]) Delete(key K) {
+ bs.cache.Delete(key)
+}
+
+// DeleteByFunc removes the association for this key from the cache when the given function returns true.
+func (bs baseCache[K, V]) DeleteByFunc(f func(key K, value V) bool) {
+ bs.cache.DeleteByFunc(f)
+}
+
+// Range iterates over all entries in the cache.
+//
+// Iteration stops early when the given function returns false.
+func (bs baseCache[K, V]) Range(f func(key K, value V) bool) {
+ bs.cache.Range(f)
+}
+
+// Clear clears the hash table, all policies, buffers, etc.
+//
+// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined.
+func (bs baseCache[K, V]) Clear() {
+ bs.cache.Clear()
+}
+
+// Close clears the hash table, all policies, buffers, etc and stop all goroutines.
+//
+// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined.
+func (bs baseCache[K, V]) Close() {
+ bs.cache.Close()
+}
+
+// Size returns the current number of entries in the cache.
+func (bs baseCache[K, V]) Size() int {
+ return bs.cache.Size()
+}
+
+// Capacity returns the cache capacity.
+func (bs baseCache[K, V]) Capacity() int {
+ return bs.cache.Capacity()
+}
+
+// Stats returns a current snapshot of this cache's cumulative statistics.
+func (bs baseCache[K, V]) Stats() Stats {
+ return newStats(bs.cache.Stats())
+}
+
+// Extension returns access to inspect and perform low-level operations on this cache based on its runtime
+// characteristics. These operations are optional and dependent on how the cache was constructed
+// and what abilities the implementation exposes.
+func (bs baseCache[K, V]) Extension() Extension[K, V] {
+ return newExtension(bs.cache)
+}
+
+// Cache is a structure performs a best-effort bounding of a hash table using eviction algorithm
+// to determine which entries to evict when the capacity is exceeded.
+type Cache[K comparable, V any] struct {
+ baseCache[K, V]
+}
+
+func newCache[K comparable, V any](c core.Config[K, V]) Cache[K, V] {
+ return Cache[K, V]{
+ baseCache: newBaseCache(c),
+ }
+}
+
+// Set associates the value with the key in this cache.
+//
+// If it returns false, then the key-value pair had too much cost and the Set was dropped.
+func (c Cache[K, V]) Set(key K, value V) bool {
+ return c.cache.Set(key, value)
+}
+
+// SetIfAbsent if the specified key is not already associated with a value associates it with the given value.
+//
+// If the specified key is not already associated with a value, then it returns false.
+//
+// Also, it returns false if the key-value pair had too much cost and the SetIfAbsent was dropped.
+func (c Cache[K, V]) SetIfAbsent(key K, value V) bool {
+ return c.cache.SetIfAbsent(key, value)
+}
+
+// CacheWithVariableTTL is a structure performs a best-effort bounding of a hash table using eviction algorithm
+// to determine which entries to evict when the capacity is exceeded.
+type CacheWithVariableTTL[K comparable, V any] struct {
+ baseCache[K, V]
+}
+
+func newCacheWithVariableTTL[K comparable, V any](c core.Config[K, V]) CacheWithVariableTTL[K, V] {
+ return CacheWithVariableTTL[K, V]{
+ baseCache: newBaseCache(c),
+ }
+}
+
+// Set associates the value with the key in this cache and sets the custom ttl for this key-value pair.
+//
+// If it returns false, then the key-value pair had too much cost and the Set was dropped.
+func (c CacheWithVariableTTL[K, V]) Set(key K, value V, ttl time.Duration) bool {
+ return c.cache.SetWithTTL(key, value, ttl)
+}
+
+// SetIfAbsent if the specified key is not already associated with a value associates it with the given value
+// and sets the custom ttl for this key-value pair.
+//
+// If the specified key is not already associated with a value, then it returns false.
+//
+// Also, it returns false if the key-value pair had too much cost and the SetIfAbsent was dropped.
+func (c CacheWithVariableTTL[K, V]) SetIfAbsent(key K, value V, ttl time.Duration) bool {
+ return c.cache.SetIfAbsentWithTTL(key, value, ttl)
+}
diff --git a/vendor/github.com/maypok86/otter/entry.go b/vendor/github.com/maypok86/otter/entry.go
new file mode 100644
index 00000000..5dcfaf02
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/entry.go
@@ -0,0 +1,82 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package otter
+
+import "time"
+
+// Entry is a key-value pair that may include policy metadata for the cached entry.
+//
+// It is an immutable snapshot of the cached data at the time of this entry's creation, and it will not
+// reflect changes afterward.
+type Entry[K comparable, V any] struct {
+ key K
+ value V
+ expiration int64
+ cost uint32
+}
+
+// Key returns the entry's key.
+func (e Entry[K, V]) Key() K {
+ return e.key
+}
+
+// Value returns the entry's value.
+func (e Entry[K, V]) Value() V {
+ return e.value
+}
+
+// Expiration returns the entry's expiration time as a unix time,
+// the number of seconds elapsed since January 1, 1970 UTC.
+//
+// If the cache was not configured with an expiration policy then this value is always 0.
+func (e Entry[K, V]) Expiration() int64 {
+ return e.expiration
+}
+
+// TTL returns the entry's ttl.
+//
+// If the cache was not configured with an expiration policy then this value is always -1.
+//
+// If the entry is expired then this value is always 0.
+func (e Entry[K, V]) TTL() time.Duration {
+ expiration := e.Expiration()
+ if expiration == 0 {
+ return -1
+ }
+
+ now := time.Now().Unix()
+ if expiration <= now {
+ return 0
+ }
+
+ return time.Duration(expiration-now) * time.Second
+}
+
+// HasExpired returns true if the entry has expired.
+func (e Entry[K, V]) HasExpired() bool {
+ expiration := e.Expiration()
+ if expiration == 0 {
+ return false
+ }
+
+ return expiration <= time.Now().Unix()
+}
+
+// Cost returns the entry's cost.
+//
+// If the cache was not configured with a cost then this value is always 1.
+func (e Entry[K, V]) Cost() uint32 {
+ return e.cost
+}
diff --git a/vendor/github.com/maypok86/otter/extension.go b/vendor/github.com/maypok86/otter/extension.go
new file mode 100644
index 00000000..83a511b5
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/extension.go
@@ -0,0 +1,89 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package otter
+
+import (
+ "github.com/maypok86/otter/internal/core"
+ "github.com/maypok86/otter/internal/generated/node"
+ "github.com/maypok86/otter/internal/unixtime"
+)
+
+func zeroValue[V any]() V {
+ var zero V
+ return zero
+}
+
+// Extension is an access point for inspecting and performing low-level operations based on the cache's runtime
+// characteristics. These operations are optional and dependent on how the cache was constructed
+// and what abilities the implementation exposes.
+type Extension[K comparable, V any] struct {
+ cache *core.Cache[K, V]
+}
+
+func newExtension[K comparable, V any](cache *core.Cache[K, V]) Extension[K, V] {
+ return Extension[K, V]{
+ cache: cache,
+ }
+}
+
+func (e Extension[K, V]) createEntry(n node.Node[K, V]) Entry[K, V] {
+ var expiration int64
+ if e.cache.WithExpiration() {
+ expiration = unixtime.StartTime() + int64(n.Expiration())
+ }
+
+ return Entry[K, V]{
+ key: n.Key(),
+ value: n.Value(),
+ expiration: expiration,
+ cost: n.Cost(),
+ }
+}
+
+// GetQuietly returns the value associated with the key in this cache.
+//
+// Unlike Get in the cache, this function does not produce any side effects
+// such as updating statistics or the eviction policy.
+func (e Extension[K, V]) GetQuietly(key K) (V, bool) {
+ n, ok := e.cache.GetNodeQuietly(key)
+ if !ok {
+ return zeroValue[V](), false
+ }
+
+ return n.Value(), true
+}
+
+// GetEntry returns the cache entry associated with the key in this cache.
+func (e Extension[K, V]) GetEntry(key K) (Entry[K, V], bool) {
+ n, ok := e.cache.GetNode(key)
+ if !ok {
+ return Entry[K, V]{}, false
+ }
+
+ return e.createEntry(n), true
+}
+
+// GetEntryQuietly returns the cache entry associated with the key in this cache.
+//
+// Unlike GetEntry, this function does not produce any side effects
+// such as updating statistics or the eviction policy.
+func (e Extension[K, V]) GetEntryQuietly(key K) (Entry[K, V], bool) {
+ n, ok := e.cache.GetNodeQuietly(key)
+ if !ok {
+ return Entry[K, V]{}, false
+ }
+
+ return e.createEntry(n), true
+}
diff --git a/vendor/github.com/maypok86/otter/internal/core/cache.go b/vendor/github.com/maypok86/otter/internal/core/cache.go
new file mode 100644
index 00000000..761a3abb
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/core/cache.go
@@ -0,0 +1,533 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package core
+
+import (
+ "sync"
+ "time"
+
+ "github.com/maypok86/otter/internal/expiry"
+ "github.com/maypok86/otter/internal/generated/node"
+ "github.com/maypok86/otter/internal/hashtable"
+ "github.com/maypok86/otter/internal/lossy"
+ "github.com/maypok86/otter/internal/queue"
+ "github.com/maypok86/otter/internal/s3fifo"
+ "github.com/maypok86/otter/internal/stats"
+ "github.com/maypok86/otter/internal/unixtime"
+ "github.com/maypok86/otter/internal/xmath"
+ "github.com/maypok86/otter/internal/xruntime"
+)
+
+// DeletionCause the cause why a cached entry was deleted.
+type DeletionCause uint8
+
+const (
+ // Explicit the entry was manually deleted by the user.
+ Explicit DeletionCause = iota
+ // Replaced the entry itself was not actually deleted, but its value was replaced by the user.
+ Replaced
+ // Size the entry was evicted due to size constraints.
+ Size
+ // Expired the entry's expiration timestamp has passed.
+ Expired
+)
+
+func (dc DeletionCause) String() string {
+ switch dc {
+ case Explicit:
+ return "Explicit"
+ case Replaced:
+ return "Replaced"
+ case Size:
+ return "Size"
+ case Expired:
+ return "Expired"
+ default:
+ panic("unknown deletion cause")
+ }
+}
+
+const (
+ minWriteBufferSize uint32 = 4
+)
+
+var (
+ maxWriteBufferSize uint32
+ maxStripedBufferSize int
+)
+
+func init() {
+ parallelism := xruntime.Parallelism()
+ roundedParallelism := int(xmath.RoundUpPowerOf2(parallelism))
+ //nolint:gosec // there will never be an overflow
+ maxWriteBufferSize = uint32(128 * roundedParallelism)
+ maxStripedBufferSize = 4 * roundedParallelism
+}
+
+func zeroValue[V any]() V {
+ var zero V
+ return zero
+}
+
+func getTTL(ttl time.Duration) uint32 {
+ //nolint:gosec // there will never be an overflow
+ return uint32((ttl + time.Second - 1) / time.Second)
+}
+
+func getExpiration(ttl time.Duration) uint32 {
+ return unixtime.Now() + getTTL(ttl)
+}
+
+// Config is a set of cache settings.
+type Config[K comparable, V any] struct {
+ Capacity int
+ InitialCapacity *int
+ StatsEnabled bool
+ TTL *time.Duration
+ WithVariableTTL bool
+ CostFunc func(key K, value V) uint32
+ WithCost bool
+ DeletionListener func(key K, value V, cause DeletionCause)
+}
+
+type expiryPolicy[K comparable, V any] interface {
+ Add(n node.Node[K, V])
+ Delete(n node.Node[K, V])
+ DeleteExpired()
+ Clear()
+}
+
+// Cache is a structure performs a best-effort bounding of a hash table using eviction algorithm
+// to determine which entries to evict when the capacity is exceeded.
+type Cache[K comparable, V any] struct {
+ nodeManager *node.Manager[K, V]
+ hashmap *hashtable.Map[K, V]
+ policy *s3fifo.Policy[K, V]
+ expiryPolicy expiryPolicy[K, V]
+ stats *stats.Stats
+ stripedBuffer []*lossy.Buffer[K, V]
+ writeBuffer *queue.Growable[task[K, V]]
+ evictionMutex sync.Mutex
+ closeOnce sync.Once
+ doneClear chan struct{}
+ costFunc func(key K, value V) uint32
+ deletionListener func(key K, value V, cause DeletionCause)
+ capacity int
+ mask uint32
+ ttl uint32
+ withExpiration bool
+ isClosed bool
+}
+
+// NewCache returns a new cache instance based on the settings from Config.
+func NewCache[K comparable, V any](c Config[K, V]) *Cache[K, V] {
+ nodeManager := node.NewManager[K, V](node.Config{
+ WithExpiration: c.TTL != nil || c.WithVariableTTL,
+ WithCost: c.WithCost,
+ })
+
+ stripedBuffer := make([]*lossy.Buffer[K, V], 0, maxStripedBufferSize)
+ for i := 0; i < maxStripedBufferSize; i++ {
+ stripedBuffer = append(stripedBuffer, lossy.New[K, V](nodeManager))
+ }
+
+ var hashmap *hashtable.Map[K, V]
+ if c.InitialCapacity == nil {
+ hashmap = hashtable.New[K, V](nodeManager)
+ } else {
+ hashmap = hashtable.NewWithSize[K, V](nodeManager, *c.InitialCapacity)
+ }
+
+ cache := &Cache[K, V]{
+ nodeManager: nodeManager,
+ hashmap: hashmap,
+ stripedBuffer: stripedBuffer,
+ writeBuffer: queue.NewGrowable[task[K, V]](minWriteBufferSize, maxWriteBufferSize),
+ doneClear: make(chan struct{}),
+ //nolint:gosec // there will never be an overflow
+ mask: uint32(maxStripedBufferSize - 1),
+ costFunc: c.CostFunc,
+ deletionListener: c.DeletionListener,
+ capacity: c.Capacity,
+ }
+
+ cache.policy = s3fifo.NewPolicy(c.Capacity, cache.evictNode)
+
+ switch {
+ case c.TTL != nil:
+ cache.expiryPolicy = expiry.NewFixed[K, V](cache.deleteExpiredNode)
+ case c.WithVariableTTL:
+ cache.expiryPolicy = expiry.NewVariable[K, V](nodeManager, cache.deleteExpiredNode)
+ default:
+ cache.expiryPolicy = expiry.NewDisabled[K, V]()
+ }
+
+ if c.StatsEnabled {
+ cache.stats = stats.New()
+ }
+ if c.TTL != nil {
+ cache.ttl = getTTL(*c.TTL)
+ }
+
+ cache.withExpiration = c.TTL != nil || c.WithVariableTTL
+
+ if cache.withExpiration {
+ unixtime.Start()
+ go cache.cleanup()
+ }
+
+ go cache.process()
+
+ return cache
+}
+
+func (c *Cache[K, V]) getReadBufferIdx() int {
+ return int(xruntime.Fastrand() & c.mask)
+}
+
+// Has checks if there is an item with the given key in the cache.
+func (c *Cache[K, V]) Has(key K) bool {
+ _, ok := c.Get(key)
+ return ok
+}
+
+// Get returns the value associated with the key in this cache.
+func (c *Cache[K, V]) Get(key K) (V, bool) {
+ n, ok := c.GetNode(key)
+ if !ok {
+ return zeroValue[V](), false
+ }
+
+ return n.Value(), true
+}
+
+// GetNode returns the node associated with the key in this cache.
+func (c *Cache[K, V]) GetNode(key K) (node.Node[K, V], bool) {
+ n, ok := c.hashmap.Get(key)
+ if !ok || !n.IsAlive() {
+ c.stats.IncMisses()
+ return nil, false
+ }
+
+ if n.HasExpired() {
+ // avoid duplicate push
+ deleted := c.hashmap.DeleteNode(n)
+ if deleted != nil {
+ n.Die()
+ c.writeBuffer.Push(newExpiredTask(n))
+ }
+ c.stats.IncMisses()
+ return nil, false
+ }
+
+ c.afterGet(n)
+ c.stats.IncHits()
+
+ return n, true
+}
+
+// GetNodeQuietly returns the node associated with the key in this cache.
+//
+// Unlike GetNode, this function does not produce any side effects
+// such as updating statistics or the eviction policy.
+func (c *Cache[K, V]) GetNodeQuietly(key K) (node.Node[K, V], bool) {
+ n, ok := c.hashmap.Get(key)
+ if !ok || !n.IsAlive() || n.HasExpired() {
+ return nil, false
+ }
+
+ return n, true
+}
+
+func (c *Cache[K, V]) afterGet(got node.Node[K, V]) {
+ idx := c.getReadBufferIdx()
+ pb := c.stripedBuffer[idx].Add(got)
+ if pb != nil {
+ c.evictionMutex.Lock()
+ c.policy.Read(pb.Returned)
+ c.evictionMutex.Unlock()
+
+ c.stripedBuffer[idx].Free()
+ }
+}
+
+// Set associates the value with the key in this cache.
+//
+// If it returns false, then the key-value item had too much cost and the Set was dropped.
+func (c *Cache[K, V]) Set(key K, value V) bool {
+ return c.set(key, value, c.defaultExpiration(), false)
+}
+
+func (c *Cache[K, V]) defaultExpiration() uint32 {
+ if c.ttl == 0 {
+ return 0
+ }
+
+ return unixtime.Now() + c.ttl
+}
+
+// SetWithTTL associates the value with the key in this cache and sets the custom ttl for this key-value item.
+//
+// If it returns false, then the key-value item had too much cost and the SetWithTTL was dropped.
+func (c *Cache[K, V]) SetWithTTL(key K, value V, ttl time.Duration) bool {
+ return c.set(key, value, getExpiration(ttl), false)
+}
+
+// SetIfAbsent if the specified key is not already associated with a value associates it with the given value.
+//
+// If the specified key is not already associated with a value, then it returns false.
+//
+// Also, it returns false if the key-value item had too much cost and the SetIfAbsent was dropped.
+func (c *Cache[K, V]) SetIfAbsent(key K, value V) bool {
+ return c.set(key, value, c.defaultExpiration(), true)
+}
+
+// SetIfAbsentWithTTL if the specified key is not already associated with a value associates it with the given value
+// and sets the custom ttl for this key-value item.
+//
+// If the specified key is not already associated with a value, then it returns false.
+//
+// Also, it returns false if the key-value item had too much cost and the SetIfAbsent was dropped.
+func (c *Cache[K, V]) SetIfAbsentWithTTL(key K, value V, ttl time.Duration) bool {
+ return c.set(key, value, getExpiration(ttl), true)
+}
+
+func (c *Cache[K, V]) set(key K, value V, expiration uint32, onlyIfAbsent bool) bool {
+ cost := c.costFunc(key, value)
+ if int(cost) > c.policy.MaxAvailableCost() {
+ c.stats.IncRejectedSets()
+ return false
+ }
+
+ n := c.nodeManager.Create(key, value, expiration, cost)
+ if onlyIfAbsent {
+ res := c.hashmap.SetIfAbsent(n)
+ if res == nil {
+ // insert
+ c.writeBuffer.Push(newAddTask(n))
+ return true
+ }
+ c.stats.IncRejectedSets()
+ return false
+ }
+
+ evicted := c.hashmap.Set(n)
+ if evicted != nil {
+ // update
+ evicted.Die()
+ c.writeBuffer.Push(newUpdateTask(n, evicted))
+ } else {
+ // insert
+ c.writeBuffer.Push(newAddTask(n))
+ }
+
+ return true
+}
+
+// Delete deletes the association for this key from the cache.
+func (c *Cache[K, V]) Delete(key K) {
+ c.afterDelete(c.hashmap.Delete(key))
+}
+
+func (c *Cache[K, V]) deleteNode(n node.Node[K, V]) {
+ c.afterDelete(c.hashmap.DeleteNode(n))
+}
+
+func (c *Cache[K, V]) afterDelete(deleted node.Node[K, V]) {
+ if deleted != nil {
+ deleted.Die()
+ c.writeBuffer.Push(newDeleteTask(deleted))
+ }
+}
+
+// DeleteByFunc deletes the association for this key from the cache when the given function returns true.
+func (c *Cache[K, V]) DeleteByFunc(f func(key K, value V) bool) {
+ c.hashmap.Range(func(n node.Node[K, V]) bool {
+ if !n.IsAlive() || n.HasExpired() {
+ return true
+ }
+
+ if f(n.Key(), n.Value()) {
+ c.deleteNode(n)
+ }
+
+ return true
+ })
+}
+
+func (c *Cache[K, V]) notifyDeletion(key K, value V, cause DeletionCause) {
+ if c.deletionListener == nil {
+ return
+ }
+
+ c.deletionListener(key, value, cause)
+}
+
+func (c *Cache[K, V]) deleteExpiredNode(n node.Node[K, V]) {
+ c.policy.Delete(n)
+ deleted := c.hashmap.DeleteNode(n)
+ if deleted != nil {
+ n.Die()
+ c.notifyDeletion(n.Key(), n.Value(), Expired)
+ c.stats.IncEvictedCount()
+ c.stats.AddEvictedCost(n.Cost())
+ }
+}
+
+func (c *Cache[K, V]) cleanup() {
+ for {
+ time.Sleep(time.Second)
+
+ c.evictionMutex.Lock()
+ if c.isClosed {
+ c.evictionMutex.Unlock()
+ return
+ }
+
+ c.expiryPolicy.DeleteExpired()
+
+ c.evictionMutex.Unlock()
+ }
+}
+
+func (c *Cache[K, V]) evictNode(n node.Node[K, V]) {
+ c.expiryPolicy.Delete(n)
+ deleted := c.hashmap.DeleteNode(n)
+ if deleted != nil {
+ n.Die()
+ c.notifyDeletion(n.Key(), n.Value(), Size)
+ c.stats.IncEvictedCount()
+ c.stats.AddEvictedCost(n.Cost())
+ }
+}
+
+func (c *Cache[K, V]) onWrite(t task[K, V]) {
+ if t.isClear() || t.isClose() {
+ c.writeBuffer.Clear()
+
+ c.policy.Clear()
+ c.expiryPolicy.Clear()
+ if t.isClose() {
+ c.isClosed = true
+ }
+
+ c.doneClear <- struct{}{}
+ return
+ }
+
+ n := t.node()
+ switch {
+ case t.isAdd():
+ if n.IsAlive() {
+ c.expiryPolicy.Add(n)
+ c.policy.Add(n)
+ }
+ case t.isUpdate():
+ oldNode := t.oldNode()
+ c.expiryPolicy.Delete(oldNode)
+ c.policy.Delete(oldNode)
+ if n.IsAlive() {
+ c.expiryPolicy.Add(n)
+ c.policy.Add(n)
+ }
+ c.notifyDeletion(oldNode.Key(), oldNode.Value(), Replaced)
+ case t.isDelete():
+ c.expiryPolicy.Delete(n)
+ c.policy.Delete(n)
+ c.notifyDeletion(n.Key(), n.Value(), Explicit)
+ case t.isExpired():
+ c.expiryPolicy.Delete(n)
+ c.policy.Delete(n)
+ c.notifyDeletion(n.Key(), n.Value(), Expired)
+ }
+}
+
+func (c *Cache[K, V]) process() {
+ for {
+ t := c.writeBuffer.Pop()
+
+ c.evictionMutex.Lock()
+ c.onWrite(t)
+ c.evictionMutex.Unlock()
+
+ if t.isClose() {
+ break
+ }
+ }
+}
+
+// Range iterates over all items in the cache.
+//
+// Iteration stops early when the given function returns false.
+func (c *Cache[K, V]) Range(f func(key K, value V) bool) {
+ c.hashmap.Range(func(n node.Node[K, V]) bool {
+ if !n.IsAlive() || n.HasExpired() {
+ return true
+ }
+
+ return f(n.Key(), n.Value())
+ })
+}
+
+// Clear clears the hash table, all policies, buffers, etc.
+//
+// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined.
+func (c *Cache[K, V]) Clear() {
+ c.clear(newClearTask[K, V]())
+}
+
+func (c *Cache[K, V]) clear(t task[K, V]) {
+ c.hashmap.Clear()
+ for i := 0; i < len(c.stripedBuffer); i++ {
+ c.stripedBuffer[i].Clear()
+ }
+
+ c.writeBuffer.Push(t)
+ <-c.doneClear
+
+ c.stats.Clear()
+}
+
+// Close clears the hash table, all policies, buffers, etc and stop all goroutines.
+//
+// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined.
+func (c *Cache[K, V]) Close() {
+ c.closeOnce.Do(func() {
+ c.clear(newCloseTask[K, V]())
+ if c.withExpiration {
+ unixtime.Stop()
+ }
+ })
+}
+
+// Size returns the current number of items in the cache.
+func (c *Cache[K, V]) Size() int {
+ return c.hashmap.Size()
+}
+
+// Capacity returns the cache capacity.
+func (c *Cache[K, V]) Capacity() int {
+ return c.capacity
+}
+
+// Stats returns a current snapshot of this cache's cumulative statistics.
+func (c *Cache[K, V]) Stats() *stats.Stats {
+ return c.stats
+}
+
+// WithExpiration returns true if the cache was configured with the expiration policy enabled.
+func (c *Cache[K, V]) WithExpiration() bool {
+ return c.withExpiration
+}
diff --git a/vendor/github.com/maypok86/otter/internal/core/task.go b/vendor/github.com/maypok86/otter/internal/core/task.go
new file mode 100644
index 00000000..2455708b
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/core/task.go
@@ -0,0 +1,126 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package core
+
+import (
+ "github.com/maypok86/otter/internal/generated/node"
+)
+
+// reason represents the reason for writing the item to the cache.
+type reason uint8
+
+const (
+ addReason reason = iota + 1
+ deleteReason
+ updateReason
+ clearReason
+ closeReason
+ expiredReason
+)
+
+// task is a set of information to update the cache:
+// node, reason for write, difference after node cost change, etc.
+type task[K comparable, V any] struct {
+ n node.Node[K, V]
+ old node.Node[K, V]
+ writeReason reason
+}
+
+// newAddTask creates a task to add a node to policies.
+func newAddTask[K comparable, V any](n node.Node[K, V]) task[K, V] {
+ return task[K, V]{
+ n: n,
+ writeReason: addReason,
+ }
+}
+
+// newDeleteTask creates a task to delete a node from policies.
+func newDeleteTask[K comparable, V any](n node.Node[K, V]) task[K, V] {
+ return task[K, V]{
+ n: n,
+ writeReason: deleteReason,
+ }
+}
+
+// newExpireTask creates a task to delete a expired node from policies.
+func newExpiredTask[K comparable, V any](n node.Node[K, V]) task[K, V] {
+ return task[K, V]{
+ n: n,
+ writeReason: expiredReason,
+ }
+}
+
+// newUpdateTask creates a task to update the node in the policies.
+func newUpdateTask[K comparable, V any](n, oldNode node.Node[K, V]) task[K, V] {
+ return task[K, V]{
+ n: n,
+ old: oldNode,
+ writeReason: updateReason,
+ }
+}
+
+// newClearTask creates a task to clear policies.
+func newClearTask[K comparable, V any]() task[K, V] {
+ return task[K, V]{
+ writeReason: clearReason,
+ }
+}
+
+// newCloseTask creates a task to clear policies and stop all goroutines.
+func newCloseTask[K comparable, V any]() task[K, V] {
+ return task[K, V]{
+ writeReason: closeReason,
+ }
+}
+
+// node returns the node contained in the task. If node was not specified, it returns nil.
+func (t *task[K, V]) node() node.Node[K, V] {
+ return t.n
+}
+
+// oldNode returns the old node contained in the task. If old node was not specified, it returns nil.
+func (t *task[K, V]) oldNode() node.Node[K, V] {
+ return t.old
+}
+
+// isAdd returns true if this is an add task.
+func (t *task[K, V]) isAdd() bool {
+ return t.writeReason == addReason
+}
+
+// isDelete returns true if this is a delete task.
+func (t *task[K, V]) isDelete() bool {
+ return t.writeReason == deleteReason
+}
+
+// isExpired returns true if this is an expired task.
+func (t *task[K, V]) isExpired() bool {
+ return t.writeReason == expiredReason
+}
+
+// isUpdate returns true if this is an update task.
+func (t *task[K, V]) isUpdate() bool {
+ return t.writeReason == updateReason
+}
+
+// isClear returns true if this is a clear task.
+func (t *task[K, V]) isClear() bool {
+ return t.writeReason == clearReason
+}
+
+// isClose returns true if this is a close task.
+func (t *task[K, V]) isClose() bool {
+ return t.writeReason == closeReason
+}
diff --git a/vendor/github.com/maypok86/otter/internal/expiry/disabled.go b/vendor/github.com/maypok86/otter/internal/expiry/disabled.go
new file mode 100644
index 00000000..e75494ac
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/expiry/disabled.go
@@ -0,0 +1,35 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package expiry
+
+import "github.com/maypok86/otter/internal/generated/node"
+
+type Disabled[K comparable, V any] struct{}
+
+func NewDisabled[K comparable, V any]() *Disabled[K, V] {
+ return &Disabled[K, V]{}
+}
+
+func (d *Disabled[K, V]) Add(n node.Node[K, V]) {
+}
+
+func (d *Disabled[K, V]) Delete(n node.Node[K, V]) {
+}
+
+func (d *Disabled[K, V]) DeleteExpired() {
+}
+
+func (d *Disabled[K, V]) Clear() {
+}
diff --git a/vendor/github.com/maypok86/otter/internal/expiry/fixed.go b/vendor/github.com/maypok86/otter/internal/expiry/fixed.go
new file mode 100644
index 00000000..35792aa0
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/expiry/fixed.go
@@ -0,0 +1,47 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package expiry
+
+import "github.com/maypok86/otter/internal/generated/node"
+
+type Fixed[K comparable, V any] struct {
+ q *queue[K, V]
+ deleteNode func(node.Node[K, V])
+}
+
+func NewFixed[K comparable, V any](deleteNode func(node.Node[K, V])) *Fixed[K, V] {
+ return &Fixed[K, V]{
+ q: newQueue[K, V](),
+ deleteNode: deleteNode,
+ }
+}
+
+func (f *Fixed[K, V]) Add(n node.Node[K, V]) {
+ f.q.push(n)
+}
+
+func (f *Fixed[K, V]) Delete(n node.Node[K, V]) {
+ f.q.delete(n)
+}
+
+func (f *Fixed[K, V]) DeleteExpired() {
+ for !f.q.isEmpty() && f.q.head.HasExpired() {
+ f.deleteNode(f.q.pop())
+ }
+}
+
+func (f *Fixed[K, V]) Clear() {
+ f.q.clear()
+}
diff --git a/vendor/github.com/maypok86/otter/internal/expiry/queue.go b/vendor/github.com/maypok86/otter/internal/expiry/queue.go
new file mode 100644
index 00000000..ce4bdf13
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/expiry/queue.go
@@ -0,0 +1,89 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package expiry
+
+import "github.com/maypok86/otter/internal/generated/node"
+
+type queue[K comparable, V any] struct {
+ head node.Node[K, V]
+ tail node.Node[K, V]
+ len int
+}
+
+func newQueue[K comparable, V any]() *queue[K, V] {
+ return &queue[K, V]{}
+}
+
+func (q *queue[K, V]) length() int {
+ return q.len
+}
+
+func (q *queue[K, V]) isEmpty() bool {
+ return q.length() == 0
+}
+
+func (q *queue[K, V]) push(n node.Node[K, V]) {
+ if q.isEmpty() {
+ q.head = n
+ q.tail = n
+ } else {
+ n.SetPrevExp(q.tail)
+ q.tail.SetNextExp(n)
+ q.tail = n
+ }
+
+ q.len++
+}
+
+func (q *queue[K, V]) pop() node.Node[K, V] {
+ if q.isEmpty() {
+ return nil
+ }
+
+ result := q.head
+ q.delete(result)
+ return result
+}
+
+func (q *queue[K, V]) delete(n node.Node[K, V]) {
+ next := n.NextExp()
+ prev := n.PrevExp()
+
+ if node.Equals(prev, nil) {
+ if node.Equals(next, nil) && !node.Equals(q.head, n) {
+ return
+ }
+
+ q.head = next
+ } else {
+ prev.SetNextExp(next)
+ n.SetPrevExp(nil)
+ }
+
+ if node.Equals(next, nil) {
+ q.tail = prev
+ } else {
+ next.SetPrevExp(prev)
+ n.SetNextExp(nil)
+ }
+
+ q.len--
+}
+
+func (q *queue[K, V]) clear() {
+ for !q.isEmpty() {
+ q.pop()
+ }
+}
diff --git a/vendor/github.com/maypok86/otter/internal/expiry/variable.go b/vendor/github.com/maypok86/otter/internal/expiry/variable.go
new file mode 100644
index 00000000..cecf3f12
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/expiry/variable.go
@@ -0,0 +1,181 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package expiry
+
+import (
+ "math"
+ "math/bits"
+ "time"
+
+ "github.com/maypok86/otter/internal/generated/node"
+ "github.com/maypok86/otter/internal/unixtime"
+ "github.com/maypok86/otter/internal/xmath"
+)
+
+var (
+ buckets = []uint32{64, 64, 32, 4, 1}
+ spans = []uint32{
+ xmath.RoundUpPowerOf2(uint32((1 * time.Second).Seconds())), // 1s
+ xmath.RoundUpPowerOf2(uint32((1 * time.Minute).Seconds())), // 1.07m
+ xmath.RoundUpPowerOf2(uint32((1 * time.Hour).Seconds())), // 1.13h
+ xmath.RoundUpPowerOf2(uint32((24 * time.Hour).Seconds())), // 1.52d
+ buckets[3] * xmath.RoundUpPowerOf2(uint32((24 * time.Hour).Seconds())), // 6.07d
+ buckets[3] * xmath.RoundUpPowerOf2(uint32((24 * time.Hour).Seconds())), // 6.07d
+ }
+ shift = []uint32{
+ uint32(bits.TrailingZeros32(spans[0])),
+ uint32(bits.TrailingZeros32(spans[1])),
+ uint32(bits.TrailingZeros32(spans[2])),
+ uint32(bits.TrailingZeros32(spans[3])),
+ uint32(bits.TrailingZeros32(spans[4])),
+ }
+)
+
+type Variable[K comparable, V any] struct {
+ wheel [][]node.Node[K, V]
+ time uint32
+ deleteNode func(node.Node[K, V])
+}
+
+func NewVariable[K comparable, V any](nodeManager *node.Manager[K, V], deleteNode func(node.Node[K, V])) *Variable[K, V] {
+ wheel := make([][]node.Node[K, V], len(buckets))
+ for i := 0; i < len(wheel); i++ {
+ wheel[i] = make([]node.Node[K, V], buckets[i])
+ for j := 0; j < len(wheel[i]); j++ {
+ var k K
+ var v V
+ fn := nodeManager.Create(k, v, math.MaxUint32, 1)
+ fn.SetPrevExp(fn)
+ fn.SetNextExp(fn)
+ wheel[i][j] = fn
+ }
+ }
+ return &Variable[K, V]{
+ wheel: wheel,
+ deleteNode: deleteNode,
+ }
+}
+
+// findBucket determines the bucket that the timer event should be added to.
+func (v *Variable[K, V]) findBucket(expiration uint32) node.Node[K, V] {
+ duration := expiration - v.time
+ length := len(v.wheel) - 1
+ for i := 0; i < length; i++ {
+ if duration < spans[i+1] {
+ ticks := expiration >> shift[i]
+ index := ticks & (buckets[i] - 1)
+ return v.wheel[i][index]
+ }
+ }
+ return v.wheel[length][0]
+}
+
+// Add schedules a timer event for the node.
+func (v *Variable[K, V]) Add(n node.Node[K, V]) {
+ root := v.findBucket(n.Expiration())
+ link(root, n)
+}
+
+// Delete removes a timer event for this entry if present.
+func (v *Variable[K, V]) Delete(n node.Node[K, V]) {
+ unlink(n)
+ n.SetNextExp(nil)
+ n.SetPrevExp(nil)
+}
+
+func (v *Variable[K, V]) DeleteExpired() {
+ currentTime := unixtime.Now()
+ prevTime := v.time
+ v.time = currentTime
+
+ for i := 0; i < len(shift); i++ {
+ previousTicks := prevTime >> shift[i]
+ currentTicks := currentTime >> shift[i]
+ delta := currentTicks - previousTicks
+ if delta == 0 {
+ break
+ }
+
+ v.deleteExpiredFromBucket(i, previousTicks, delta)
+ }
+}
+
+func (v *Variable[K, V]) deleteExpiredFromBucket(index int, prevTicks, delta uint32) {
+ mask := buckets[index] - 1
+ steps := buckets[index]
+ if delta < steps {
+ steps = delta
+ }
+ start := prevTicks & mask
+ end := start + steps
+ timerWheel := v.wheel[index]
+ for i := start; i < end; i++ {
+ root := timerWheel[i&mask]
+ n := root.NextExp()
+ root.SetPrevExp(root)
+ root.SetNextExp(root)
+
+ for !node.Equals(n, root) {
+ next := n.NextExp()
+ n.SetPrevExp(nil)
+ n.SetNextExp(nil)
+
+ if n.Expiration() <= v.time {
+ v.deleteNode(n)
+ } else {
+ v.Add(n)
+ }
+
+ n = next
+ }
+ }
+}
+
+func (v *Variable[K, V]) Clear() {
+ for i := 0; i < len(v.wheel); i++ {
+ for j := 0; j < len(v.wheel[i]); j++ {
+ root := v.wheel[i][j]
+ n := root.NextExp()
+ // NOTE(maypok86): Maybe we should use the same approach as in DeleteExpired?
+
+ for !node.Equals(n, root) {
+ next := n.NextExp()
+ v.Delete(n)
+
+ n = next
+ }
+ }
+ }
+ v.time = unixtime.Now()
+}
+
+// link adds the entry at the tail of the bucket's list.
+func link[K comparable, V any](root, n node.Node[K, V]) {
+ n.SetPrevExp(root.PrevExp())
+ n.SetNextExp(root)
+
+ root.PrevExp().SetNextExp(n)
+ root.SetPrevExp(n)
+}
+
+// unlink removes the entry from its bucket, if scheduled.
+func unlink[K comparable, V any](n node.Node[K, V]) {
+ next := n.NextExp()
+ if !node.Equals(next, nil) {
+ prev := n.PrevExp()
+ next.SetPrevExp(prev)
+ prev.SetNextExp(next)
+ }
+}
diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/b.go b/vendor/github.com/maypok86/otter/internal/generated/node/b.go
new file mode 100644
index 00000000..a10e484f
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/generated/node/b.go
@@ -0,0 +1,144 @@
+// Code generated by NodeGenerator. DO NOT EDIT.
+
+// Package node is a generated generator package.
+package node
+
+import (
+ "sync/atomic"
+ "unsafe"
+)
+
+// B is a cache entry that provide the following features:
+//
+// 1. Base
+type B[K comparable, V any] struct {
+ key K
+ value V
+ prev *B[K, V]
+ next *B[K, V]
+ state uint32
+ frequency uint8
+ queueType uint8
+}
+
+// NewB creates a new B.
+func NewB[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] {
+ return &B[K, V]{
+ key: key,
+ value: value,
+ state: aliveState,
+ }
+}
+
+// CastPointerToB casts a pointer to B.
+func CastPointerToB[K comparable, V any](ptr unsafe.Pointer) Node[K, V] {
+ return (*B[K, V])(ptr)
+}
+
+func (n *B[K, V]) Key() K {
+ return n.key
+}
+
+func (n *B[K, V]) Value() V {
+ return n.value
+}
+
+func (n *B[K, V]) AsPointer() unsafe.Pointer {
+ return unsafe.Pointer(n)
+}
+
+func (n *B[K, V]) Prev() Node[K, V] {
+ return n.prev
+}
+
+func (n *B[K, V]) SetPrev(v Node[K, V]) {
+ if v == nil {
+ n.prev = nil
+ return
+ }
+ n.prev = (*B[K, V])(v.AsPointer())
+}
+
+func (n *B[K, V]) Next() Node[K, V] {
+ return n.next
+}
+
+func (n *B[K, V]) SetNext(v Node[K, V]) {
+ if v == nil {
+ n.next = nil
+ return
+ }
+ n.next = (*B[K, V])(v.AsPointer())
+}
+
+func (n *B[K, V]) PrevExp() Node[K, V] {
+ panic("not implemented")
+}
+
+func (n *B[K, V]) SetPrevExp(v Node[K, V]) {
+ panic("not implemented")
+}
+
+func (n *B[K, V]) NextExp() Node[K, V] {
+ panic("not implemented")
+}
+
+func (n *B[K, V]) SetNextExp(v Node[K, V]) {
+ panic("not implemented")
+}
+
+func (n *B[K, V]) HasExpired() bool {
+ return false
+}
+
+func (n *B[K, V]) Expiration() uint32 {
+ panic("not implemented")
+}
+
+func (n *B[K, V]) Cost() uint32 {
+ return 1
+}
+
+func (n *B[K, V]) IsAlive() bool {
+ return atomic.LoadUint32(&n.state) == aliveState
+}
+
+func (n *B[K, V]) Die() {
+ atomic.StoreUint32(&n.state, deadState)
+}
+
+func (n *B[K, V]) Frequency() uint8 {
+ return n.frequency
+}
+
+func (n *B[K, V]) IncrementFrequency() {
+ n.frequency = minUint8(n.frequency+1, maxFrequency)
+}
+
+func (n *B[K, V]) DecrementFrequency() {
+ n.frequency--
+}
+
+func (n *B[K, V]) ResetFrequency() {
+ n.frequency = 0
+}
+
+func (n *B[K, V]) MarkSmall() {
+ n.queueType = smallQueueType
+}
+
+func (n *B[K, V]) IsSmall() bool {
+ return n.queueType == smallQueueType
+}
+
+func (n *B[K, V]) MarkMain() {
+ n.queueType = mainQueueType
+}
+
+func (n *B[K, V]) IsMain() bool {
+ return n.queueType == mainQueueType
+}
+
+func (n *B[K, V]) Unmark() {
+ n.queueType = unknownQueueType
+}
diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/bc.go b/vendor/github.com/maypok86/otter/internal/generated/node/bc.go
new file mode 100644
index 00000000..962ecde0
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/generated/node/bc.go
@@ -0,0 +1,148 @@
+// Code generated by NodeGenerator. DO NOT EDIT.
+
+// Package node is a generated generator package.
+package node
+
+import (
+ "sync/atomic"
+ "unsafe"
+)
+
+// BC is a cache entry that provide the following features:
+//
+// 1. Base
+//
+// 2. Cost
+type BC[K comparable, V any] struct {
+ key K
+ value V
+ prev *BC[K, V]
+ next *BC[K, V]
+ cost uint32
+ state uint32
+ frequency uint8
+ queueType uint8
+}
+
+// NewBC creates a new BC.
+func NewBC[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] {
+ return &BC[K, V]{
+ key: key,
+ value: value,
+ cost: cost,
+ state: aliveState,
+ }
+}
+
+// CastPointerToBC casts a pointer to BC.
+func CastPointerToBC[K comparable, V any](ptr unsafe.Pointer) Node[K, V] {
+ return (*BC[K, V])(ptr)
+}
+
+func (n *BC[K, V]) Key() K {
+ return n.key
+}
+
+func (n *BC[K, V]) Value() V {
+ return n.value
+}
+
+func (n *BC[K, V]) AsPointer() unsafe.Pointer {
+ return unsafe.Pointer(n)
+}
+
+func (n *BC[K, V]) Prev() Node[K, V] {
+ return n.prev
+}
+
+func (n *BC[K, V]) SetPrev(v Node[K, V]) {
+ if v == nil {
+ n.prev = nil
+ return
+ }
+ n.prev = (*BC[K, V])(v.AsPointer())
+}
+
+func (n *BC[K, V]) Next() Node[K, V] {
+ return n.next
+}
+
+func (n *BC[K, V]) SetNext(v Node[K, V]) {
+ if v == nil {
+ n.next = nil
+ return
+ }
+ n.next = (*BC[K, V])(v.AsPointer())
+}
+
+func (n *BC[K, V]) PrevExp() Node[K, V] {
+ panic("not implemented")
+}
+
+func (n *BC[K, V]) SetPrevExp(v Node[K, V]) {
+ panic("not implemented")
+}
+
+func (n *BC[K, V]) NextExp() Node[K, V] {
+ panic("not implemented")
+}
+
+func (n *BC[K, V]) SetNextExp(v Node[K, V]) {
+ panic("not implemented")
+}
+
+func (n *BC[K, V]) HasExpired() bool {
+ return false
+}
+
+func (n *BC[K, V]) Expiration() uint32 {
+ panic("not implemented")
+}
+
+func (n *BC[K, V]) Cost() uint32 {
+ return n.cost
+}
+
+func (n *BC[K, V]) IsAlive() bool {
+ return atomic.LoadUint32(&n.state) == aliveState
+}
+
+func (n *BC[K, V]) Die() {
+ atomic.StoreUint32(&n.state, deadState)
+}
+
+func (n *BC[K, V]) Frequency() uint8 {
+ return n.frequency
+}
+
+func (n *BC[K, V]) IncrementFrequency() {
+ n.frequency = minUint8(n.frequency+1, maxFrequency)
+}
+
+func (n *BC[K, V]) DecrementFrequency() {
+ n.frequency--
+}
+
+func (n *BC[K, V]) ResetFrequency() {
+ n.frequency = 0
+}
+
+func (n *BC[K, V]) MarkSmall() {
+ n.queueType = smallQueueType
+}
+
+func (n *BC[K, V]) IsSmall() bool {
+ return n.queueType == smallQueueType
+}
+
+func (n *BC[K, V]) MarkMain() {
+ n.queueType = mainQueueType
+}
+
+func (n *BC[K, V]) IsMain() bool {
+ return n.queueType == mainQueueType
+}
+
+func (n *BC[K, V]) Unmark() {
+ n.queueType = unknownQueueType
+}
diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/be.go b/vendor/github.com/maypok86/otter/internal/generated/node/be.go
new file mode 100644
index 00000000..ef66eef9
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/generated/node/be.go
@@ -0,0 +1,160 @@
+// Code generated by NodeGenerator. DO NOT EDIT.
+
+// Package node is a generated generator package.
+package node
+
+import (
+ "sync/atomic"
+ "unsafe"
+
+ "github.com/maypok86/otter/internal/unixtime"
+)
+
+// BE is a cache entry that provide the following features:
+//
+// 1. Base
+//
+// 2. Expiration
+type BE[K comparable, V any] struct {
+ key K
+ value V
+ prev *BE[K, V]
+ next *BE[K, V]
+ prevExp *BE[K, V]
+ nextExp *BE[K, V]
+ expiration uint32
+ state uint32
+ frequency uint8
+ queueType uint8
+}
+
+// NewBE creates a new BE.
+func NewBE[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] {
+ return &BE[K, V]{
+ key: key,
+ value: value,
+ expiration: expiration,
+ state: aliveState,
+ }
+}
+
+// CastPointerToBE casts a pointer to BE.
+func CastPointerToBE[K comparable, V any](ptr unsafe.Pointer) Node[K, V] {
+ return (*BE[K, V])(ptr)
+}
+
+func (n *BE[K, V]) Key() K {
+ return n.key
+}
+
+func (n *BE[K, V]) Value() V {
+ return n.value
+}
+
+func (n *BE[K, V]) AsPointer() unsafe.Pointer {
+ return unsafe.Pointer(n)
+}
+
+func (n *BE[K, V]) Prev() Node[K, V] {
+ return n.prev
+}
+
+func (n *BE[K, V]) SetPrev(v Node[K, V]) {
+ if v == nil {
+ n.prev = nil
+ return
+ }
+ n.prev = (*BE[K, V])(v.AsPointer())
+}
+
+func (n *BE[K, V]) Next() Node[K, V] {
+ return n.next
+}
+
+func (n *BE[K, V]) SetNext(v Node[K, V]) {
+ if v == nil {
+ n.next = nil
+ return
+ }
+ n.next = (*BE[K, V])(v.AsPointer())
+}
+
+func (n *BE[K, V]) PrevExp() Node[K, V] {
+ return n.prevExp
+}
+
+func (n *BE[K, V]) SetPrevExp(v Node[K, V]) {
+ if v == nil {
+ n.prevExp = nil
+ return
+ }
+ n.prevExp = (*BE[K, V])(v.AsPointer())
+}
+
+func (n *BE[K, V]) NextExp() Node[K, V] {
+ return n.nextExp
+}
+
+func (n *BE[K, V]) SetNextExp(v Node[K, V]) {
+ if v == nil {
+ n.nextExp = nil
+ return
+ }
+ n.nextExp = (*BE[K, V])(v.AsPointer())
+}
+
+func (n *BE[K, V]) HasExpired() bool {
+ return n.expiration <= unixtime.Now()
+}
+
+func (n *BE[K, V]) Expiration() uint32 {
+ return n.expiration
+}
+
+func (n *BE[K, V]) Cost() uint32 {
+ return 1
+}
+
+func (n *BE[K, V]) IsAlive() bool {
+ return atomic.LoadUint32(&n.state) == aliveState
+}
+
+func (n *BE[K, V]) Die() {
+ atomic.StoreUint32(&n.state, deadState)
+}
+
+func (n *BE[K, V]) Frequency() uint8 {
+ return n.frequency
+}
+
+func (n *BE[K, V]) IncrementFrequency() {
+ n.frequency = minUint8(n.frequency+1, maxFrequency)
+}
+
+func (n *BE[K, V]) DecrementFrequency() {
+ n.frequency--
+}
+
+func (n *BE[K, V]) ResetFrequency() {
+ n.frequency = 0
+}
+
+func (n *BE[K, V]) MarkSmall() {
+ n.queueType = smallQueueType
+}
+
+func (n *BE[K, V]) IsSmall() bool {
+ return n.queueType == smallQueueType
+}
+
+func (n *BE[K, V]) MarkMain() {
+ n.queueType = mainQueueType
+}
+
+func (n *BE[K, V]) IsMain() bool {
+ return n.queueType == mainQueueType
+}
+
+func (n *BE[K, V]) Unmark() {
+ n.queueType = unknownQueueType
+}
diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/bec.go b/vendor/github.com/maypok86/otter/internal/generated/node/bec.go
new file mode 100644
index 00000000..f4813ca9
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/generated/node/bec.go
@@ -0,0 +1,164 @@
+// Code generated by NodeGenerator. DO NOT EDIT.
+
+// Package node is a generated generator package.
+package node
+
+import (
+ "sync/atomic"
+ "unsafe"
+
+ "github.com/maypok86/otter/internal/unixtime"
+)
+
+// BEC is a cache entry that provide the following features:
+//
+// 1. Base
+//
+// 2. Expiration
+//
+// 3. Cost
+type BEC[K comparable, V any] struct {
+ key K
+ value V
+ prev *BEC[K, V]
+ next *BEC[K, V]
+ prevExp *BEC[K, V]
+ nextExp *BEC[K, V]
+ expiration uint32
+ cost uint32
+ state uint32
+ frequency uint8
+ queueType uint8
+}
+
+// NewBEC creates a new BEC.
+func NewBEC[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] {
+ return &BEC[K, V]{
+ key: key,
+ value: value,
+ expiration: expiration,
+ cost: cost,
+ state: aliveState,
+ }
+}
+
+// CastPointerToBEC casts a pointer to BEC.
+func CastPointerToBEC[K comparable, V any](ptr unsafe.Pointer) Node[K, V] {
+ return (*BEC[K, V])(ptr)
+}
+
+func (n *BEC[K, V]) Key() K {
+ return n.key
+}
+
+func (n *BEC[K, V]) Value() V {
+ return n.value
+}
+
+func (n *BEC[K, V]) AsPointer() unsafe.Pointer {
+ return unsafe.Pointer(n)
+}
+
+func (n *BEC[K, V]) Prev() Node[K, V] {
+ return n.prev
+}
+
+func (n *BEC[K, V]) SetPrev(v Node[K, V]) {
+ if v == nil {
+ n.prev = nil
+ return
+ }
+ n.prev = (*BEC[K, V])(v.AsPointer())
+}
+
+func (n *BEC[K, V]) Next() Node[K, V] {
+ return n.next
+}
+
+func (n *BEC[K, V]) SetNext(v Node[K, V]) {
+ if v == nil {
+ n.next = nil
+ return
+ }
+ n.next = (*BEC[K, V])(v.AsPointer())
+}
+
+func (n *BEC[K, V]) PrevExp() Node[K, V] {
+ return n.prevExp
+}
+
+func (n *BEC[K, V]) SetPrevExp(v Node[K, V]) {
+ if v == nil {
+ n.prevExp = nil
+ return
+ }
+ n.prevExp = (*BEC[K, V])(v.AsPointer())
+}
+
+func (n *BEC[K, V]) NextExp() Node[K, V] {
+ return n.nextExp
+}
+
+func (n *BEC[K, V]) SetNextExp(v Node[K, V]) {
+ if v == nil {
+ n.nextExp = nil
+ return
+ }
+ n.nextExp = (*BEC[K, V])(v.AsPointer())
+}
+
+func (n *BEC[K, V]) HasExpired() bool {
+ return n.expiration <= unixtime.Now()
+}
+
+func (n *BEC[K, V]) Expiration() uint32 {
+ return n.expiration
+}
+
+func (n *BEC[K, V]) Cost() uint32 {
+ return n.cost
+}
+
+func (n *BEC[K, V]) IsAlive() bool {
+ return atomic.LoadUint32(&n.state) == aliveState
+}
+
+func (n *BEC[K, V]) Die() {
+ atomic.StoreUint32(&n.state, deadState)
+}
+
+func (n *BEC[K, V]) Frequency() uint8 {
+ return n.frequency
+}
+
+func (n *BEC[K, V]) IncrementFrequency() {
+ n.frequency = minUint8(n.frequency+1, maxFrequency)
+}
+
+func (n *BEC[K, V]) DecrementFrequency() {
+ n.frequency--
+}
+
+func (n *BEC[K, V]) ResetFrequency() {
+ n.frequency = 0
+}
+
+func (n *BEC[K, V]) MarkSmall() {
+ n.queueType = smallQueueType
+}
+
+func (n *BEC[K, V]) IsSmall() bool {
+ return n.queueType == smallQueueType
+}
+
+func (n *BEC[K, V]) MarkMain() {
+ n.queueType = mainQueueType
+}
+
+func (n *BEC[K, V]) IsMain() bool {
+ return n.queueType == mainQueueType
+}
+
+func (n *BEC[K, V]) Unmark() {
+ n.queueType = unknownQueueType
+}
diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/manager.go b/vendor/github.com/maypok86/otter/internal/generated/node/manager.go
new file mode 100644
index 00000000..e48b9008
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/generated/node/manager.go
@@ -0,0 +1,143 @@
+// Code generated by NodeGenerator. DO NOT EDIT.
+
+// Package node is a generated generator package.
+package node
+
+import (
+ "strings"
+ "unsafe"
+)
+
+const (
+ unknownQueueType uint8 = iota
+ smallQueueType
+ mainQueueType
+
+ maxFrequency uint8 = 3
+)
+
+const (
+ aliveState uint32 = iota
+ deadState
+)
+
+// Node is a cache entry.
+type Node[K comparable, V any] interface {
+ // Key returns the key.
+ Key() K
+ // Value returns the value.
+ Value() V
+ // AsPointer returns the node as a pointer.
+ AsPointer() unsafe.Pointer
+ // Prev returns the previous node in the eviction policy.
+ Prev() Node[K, V]
+ // SetPrev sets the previous node in the eviction policy.
+ SetPrev(v Node[K, V])
+ // Next returns the next node in the eviction policy.
+ Next() Node[K, V]
+ // SetNext sets the next node in the eviction policy.
+ SetNext(v Node[K, V])
+ // PrevExp returns the previous node in the expiration policy.
+ PrevExp() Node[K, V]
+ // SetPrevExp sets the previous node in the expiration policy.
+ SetPrevExp(v Node[K, V])
+ // NextExp returns the next node in the expiration policy.
+ NextExp() Node[K, V]
+ // SetNextExp sets the next node in the expiration policy.
+ SetNextExp(v Node[K, V])
+ // HasExpired returns true if node has expired.
+ HasExpired() bool
+ // Expiration returns the expiration time.
+ Expiration() uint32
+ // Cost returns the cost of the node.
+ Cost() uint32
+ // IsAlive returns true if the entry is available in the hash-table.
+ IsAlive() bool
+ // Die sets the node to the dead state.
+ Die()
+ // Frequency returns the frequency of the node.
+ Frequency() uint8
+ // IncrementFrequency increments the frequency of the node.
+ IncrementFrequency()
+ // DecrementFrequency decrements the frequency of the node.
+ DecrementFrequency()
+ // ResetFrequency resets the frequency.
+ ResetFrequency()
+ // MarkSmall sets the status to the small queue.
+ MarkSmall()
+ // IsSmall returns true if node is in the small queue.
+ IsSmall() bool
+ // MarkMain sets the status to the main queue.
+ MarkMain()
+ // IsMain returns true if node is in the main queue.
+ IsMain() bool
+ // Unmark sets the status to unknown.
+ Unmark()
+}
+
+func Equals[K comparable, V any](a, b Node[K, V]) bool {
+ if a == nil {
+ return b == nil || b.AsPointer() == nil
+ }
+ if b == nil {
+ return a.AsPointer() == nil
+ }
+ return a.AsPointer() == b.AsPointer()
+}
+
+type Config struct {
+ WithExpiration bool
+ WithCost bool
+}
+
+type Manager[K comparable, V any] struct {
+ create func(key K, value V, expiration, cost uint32) Node[K, V]
+ fromPointer func(ptr unsafe.Pointer) Node[K, V]
+}
+
+func NewManager[K comparable, V any](c Config) *Manager[K, V] {
+ var sb strings.Builder
+ sb.WriteString("b")
+ if c.WithExpiration {
+ sb.WriteString("e")
+ }
+ if c.WithCost {
+ sb.WriteString("c")
+ }
+ nodeType := sb.String()
+ m := &Manager[K, V]{}
+
+ switch nodeType {
+ case "bec":
+ m.create = NewBEC[K, V]
+ m.fromPointer = CastPointerToBEC[K, V]
+ case "bc":
+ m.create = NewBC[K, V]
+ m.fromPointer = CastPointerToBC[K, V]
+ case "be":
+ m.create = NewBE[K, V]
+ m.fromPointer = CastPointerToBE[K, V]
+ case "b":
+ m.create = NewB[K, V]
+ m.fromPointer = CastPointerToB[K, V]
+ default:
+ panic("not valid nodeType")
+ }
+ return m
+}
+
+func (m *Manager[K, V]) Create(key K, value V, expiration, cost uint32) Node[K, V] {
+ return m.create(key, value, expiration, cost)
+}
+
+func (m *Manager[K, V]) FromPointer(ptr unsafe.Pointer) Node[K, V] {
+ return m.fromPointer(ptr)
+}
+
+func minUint8(a, b uint8) uint8 {
+ if a < b {
+ return a
+ }
+
+ return b
+}
diff --git a/vendor/github.com/maypok86/otter/internal/hashtable/bucket.go b/vendor/github.com/maypok86/otter/internal/hashtable/bucket.go
new file mode 100644
index 00000000..2bec4656
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/hashtable/bucket.go
@@ -0,0 +1,81 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+// Copyright (c) 2021 Andrey Pechkurov
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright notice. This code is a fork of xsync.MapOf from this file with some changes:
+// https://github.com/puzpuzpuz/xsync/blob/main/mapof.go
+//
+// Use of this source code is governed by a MIT license that can be found
+// at https://github.com/puzpuzpuz/xsync/blob/main/LICENSE
+
+package hashtable
+
+import (
+ "sync"
+ "unsafe"
+
+ "github.com/maypok86/otter/internal/xruntime"
+)
+
+// paddedBucket is a CL-sized map bucket holding up to
+// bucketSize nodes.
+type paddedBucket struct {
+ // ensure each bucket takes two cache lines on both 32 and 64-bit archs
+ padding [xruntime.CacheLineSize - unsafe.Sizeof(bucket{})]byte
+
+ bucket
+}
+
+type bucket struct {
+ hashes [bucketSize]uint64
+ nodes [bucketSize]unsafe.Pointer
+ next unsafe.Pointer
+ mutex sync.Mutex
+}
+
+func (root *paddedBucket) isEmpty() bool {
+ b := root
+ for {
+ for i := 0; i < bucketSize; i++ {
+ if b.nodes[i] != nil {
+ return false
+ }
+ }
+ if b.next == nil {
+ return true
+ }
+ b = (*paddedBucket)(b.next)
+ }
+}
+
+func (root *paddedBucket) add(h uint64, nodePtr unsafe.Pointer) {
+ b := root
+ for {
+ for i := 0; i < bucketSize; i++ {
+ if b.nodes[i] == nil {
+ b.hashes[i] = h
+ b.nodes[i] = nodePtr
+ return
+ }
+ }
+ if b.next == nil {
+ newBucket := &paddedBucket{}
+ newBucket.hashes[0] = h
+ newBucket.nodes[0] = nodePtr
+ b.next = unsafe.Pointer(newBucket)
+ return
+ }
+ b = (*paddedBucket)(b.next)
+ }
+}
diff --git a/vendor/github.com/maypok86/otter/internal/hashtable/map.go b/vendor/github.com/maypok86/otter/internal/hashtable/map.go
new file mode 100644
index 00000000..01d261cd
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/hashtable/map.go
@@ -0,0 +1,551 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+// Copyright (c) 2021 Andrey Pechkurov
+//
+// Copyright notice. This code is a fork of xsync.MapOf from this file with some changes:
+// https://github.com/puzpuzpuz/xsync/blob/main/mapof.go
+//
+// Use of this source code is governed by a MIT license that can be found
+// at https://github.com/puzpuzpuz/xsync/blob/main/LICENSE
+
+package hashtable
+
+import (
+ "fmt"
+ "sync"
+ "sync/atomic"
+ "unsafe"
+
+ "github.com/dolthub/maphash"
+
+ "github.com/maypok86/otter/internal/generated/node"
+ "github.com/maypok86/otter/internal/xmath"
+ "github.com/maypok86/otter/internal/xruntime"
+)
+
+type resizeHint int
+
+const (
+ growHint resizeHint = 0
+ shrinkHint resizeHint = 1
+ clearHint resizeHint = 2
+)
+
+const (
+ // number of entries per bucket
+ // 3 because we need to fit them into 1 cache line (64 bytes).
+ bucketSize = 3
+ // percentage at which the map will be expanded.
+ loadFactor = 0.75
+ // threshold fraction of table occupation to start a table shrinking
+ // when deleting the last entry in a bucket chain.
+ shrinkFraction = 128
+ minBucketCount = 32
+ minNodeCount = bucketSize * minBucketCount
+ minCounterLength = 8
+ maxCounterLength = 32
+)
+
+// Map is like a Go map[K]V but is safe for concurrent
+// use by multiple goroutines without additional locking or
+// coordination.
+//
+// A Map must not be copied after first use.
+//
+// Map uses a modified version of Cache-Line Hash Table (CLHT)
+// data structure: https://github.com/LPD-EPFL/CLHT
+//
+// CLHT is built around idea to organize the hash table in
+// cache-line-sized buckets, so that on all modern CPUs update
+// operations complete with at most one cache-line transfer.
+// Also, Get operations involve no write to memory, as well as no
+// mutexes or any other sort of locks. Due to this design, in all
+// considered scenarios Map outperforms sync.Map.
+type Map[K comparable, V any] struct {
+ table unsafe.Pointer
+
+ nodeManager *node.Manager[K, V]
+ // only used along with resizeCond
+ resizeMutex sync.Mutex
+ // used to wake up resize waiters (concurrent modifications)
+ resizeCond sync.Cond
+ // resize in progress flag; updated atomically
+ resizing atomic.Int64
+}
+
+type table[K comparable] struct {
+ buckets []paddedBucket
+ // sharded counter for number of table entries;
+ // used to determine if a table shrinking is needed
+ // occupies min(buckets_memory/1024, 64KB) of memory
+ size []paddedCounter
+ mask uint64
+ hasher maphash.Hasher[K]
+}
+
+func (t *table[K]) addSize(bucketIdx uint64, delta int) {
+ //nolint:gosec // there will never be an overflow
+ counterIdx := uint64(len(t.size)-1) & bucketIdx
+ atomic.AddInt64(&t.size[counterIdx].c, int64(delta))
+}
+
+func (t *table[K]) addSizePlain(bucketIdx uint64, delta int) {
+ //nolint:gosec // there will never be an overflow
+ counterIdx := uint64(len(t.size)-1) & bucketIdx
+ t.size[counterIdx].c += int64(delta)
+}
+
+func (t *table[K]) sumSize() int64 {
+ sum := int64(0)
+ for i := range t.size {
+ sum += atomic.LoadInt64(&t.size[i].c)
+ }
+ return sum
+}
+
+func (t *table[K]) calcShiftHash(key K) uint64 {
+ // uint64(0) is a reserved value which stands for an empty slot.
+ h := t.hasher.Hash(key)
+ if h == uint64(0) {
+ return 1
+ }
+
+ return h
+}
+
+type counter struct {
+ c int64
+}
+
+type paddedCounter struct {
+ // padding prevents false sharing.
+ padding [xruntime.CacheLineSize - unsafe.Sizeof(counter{})]byte
+
+ counter
+}
+
+// NewWithSize creates a new Map instance with capacity enough
+// to hold size nodes. If size is zero or negative, the value
+// is ignored.
+func NewWithSize[K comparable, V any](nodeManager *node.Manager[K, V], size int) *Map[K, V] {
+ return newMap[K, V](nodeManager, size)
+}
+
+// New creates a new Map instance.
+func New[K comparable, V any](nodeManager *node.Manager[K, V]) *Map[K, V] {
+ return newMap[K, V](nodeManager, minNodeCount)
+}
+
+func newMap[K comparable, V any](nodeManager *node.Manager[K, V], size int) *Map[K, V] {
+ m := &Map[K, V]{
+ nodeManager: nodeManager,
+ }
+ m.resizeCond = *sync.NewCond(&m.resizeMutex)
+ var t *table[K]
+ if size <= minNodeCount {
+ t = newTable(minBucketCount, maphash.NewHasher[K]())
+ } else {
+ //nolint:gosec // there will never be an overflow
+ bucketCount := xmath.RoundUpPowerOf2(uint32(size / bucketSize))
+ t = newTable(int(bucketCount), maphash.NewHasher[K]())
+ }
+ atomic.StorePointer(&m.table, unsafe.Pointer(t))
+ return m
+}
+
+func newTable[K comparable](bucketCount int, prevHasher maphash.Hasher[K]) *table[K] {
+ buckets := make([]paddedBucket, bucketCount)
+ counterLength := bucketCount >> 10
+ if counterLength < minCounterLength {
+ counterLength = minCounterLength
+ } else if counterLength > maxCounterLength {
+ counterLength = maxCounterLength
+ }
+ counter := make([]paddedCounter, counterLength)
+ //nolint:gosec // there will never be an overflow
+ mask := uint64(len(buckets) - 1)
+ t := &table[K]{
+ buckets: buckets,
+ size: counter,
+ mask: mask,
+ hasher: maphash.NewSeed[K](prevHasher),
+ }
+ return t
+}
+
+// Get returns the node.Node stored in the map for a key, or nil if no node is present.
+//
+// The ok result indicates whether node was found in the map.
+func (m *Map[K, V]) Get(key K) (got node.Node[K, V], ok bool) {
+ t := (*table[K])(atomic.LoadPointer(&m.table))
+ hash := t.calcShiftHash(key)
+ bucketIdx := hash & t.mask
+ b := &t.buckets[bucketIdx]
+ for {
+ for i := 0; i < bucketSize; i++ {
+ // we treat the hash code only as a hint, so there is no
+ // need to get an atomic snapshot.
+ h := atomic.LoadUint64(&b.hashes[i])
+ if h == uint64(0) || h != hash {
+ continue
+ }
+ // we found a matching hash code
+ nodePtr := atomic.LoadPointer(&b.nodes[i])
+ if nodePtr == nil {
+ // concurrent write in this node
+ continue
+ }
+ n := m.nodeManager.FromPointer(nodePtr)
+ if key != n.Key() {
+ continue
+ }
+
+ return n, true
+ }
+ bucketPtr := atomic.LoadPointer(&b.next)
+ if bucketPtr == nil {
+ return nil, false
+ }
+ b = (*paddedBucket)(bucketPtr)
+ }
+}
+
+// Set sets the node.Node for the key.
+//
+// Returns the evicted node or nil if the node was inserted.
+func (m *Map[K, V]) Set(n node.Node[K, V]) node.Node[K, V] {
+ return m.set(n, false)
+}
+
+// SetIfAbsent sets the node.Node if the specified key is not already associated with a value (or is mapped to null)
+// associates it with the given value and returns null, else returns the current node.
+func (m *Map[K, V]) SetIfAbsent(n node.Node[K, V]) node.Node[K, V] {
+ return m.set(n, true)
+}
+
+func (m *Map[K, V]) set(n node.Node[K, V], onlyIfAbsent bool) node.Node[K, V] {
+ for {
+ RETRY:
+ var (
+ emptyBucket *paddedBucket
+ emptyIdx int
+ )
+ t := (*table[K])(atomic.LoadPointer(&m.table))
+ tableLen := len(t.buckets)
+ hash := t.calcShiftHash(n.Key())
+ bucketIdx := hash & t.mask
+ rootBucket := &t.buckets[bucketIdx]
+ rootBucket.mutex.Lock()
+ // the following two checks must go in reverse to what's
+ // in the resize method.
+ if m.resizeInProgress() {
+ // resize is in progress. wait, then go for another attempt.
+ rootBucket.mutex.Unlock()
+ m.waitForResize()
+ goto RETRY
+ }
+ if m.newerTableExists(t) {
+ // someone resized the table, go for another attempt.
+ rootBucket.mutex.Unlock()
+ goto RETRY
+ }
+ b := rootBucket
+ for {
+ for i := 0; i < bucketSize; i++ {
+ h := b.hashes[i]
+ if h == uint64(0) {
+ if emptyBucket == nil {
+ emptyBucket = b
+ emptyIdx = i
+ }
+ continue
+ }
+ if h != hash {
+ continue
+ }
+ prev := m.nodeManager.FromPointer(b.nodes[i])
+ if n.Key() != prev.Key() {
+ continue
+ }
+ if onlyIfAbsent {
+ // found node, drop set
+ rootBucket.mutex.Unlock()
+ return n
+ }
+ // in-place update.
+ // We get a copy of the value via an interface{} on each call,
+ // thus the live value pointers are unique. Otherwise atomic
+ // snapshot won't be correct in case of multiple Store calls
+ // using the same value.
+ atomic.StorePointer(&b.nodes[i], n.AsPointer())
+ rootBucket.mutex.Unlock()
+ return prev
+ }
+ if b.next == nil {
+ if emptyBucket != nil {
+ // insertion into an existing bucket.
+ // first we update the hash, then the entry.
+ atomic.StoreUint64(&emptyBucket.hashes[emptyIdx], hash)
+ atomic.StorePointer(&emptyBucket.nodes[emptyIdx], n.AsPointer())
+ rootBucket.mutex.Unlock()
+ t.addSize(bucketIdx, 1)
+ return nil
+ }
+ growThreshold := float64(tableLen) * bucketSize * loadFactor
+ if t.sumSize() > int64(growThreshold) {
+ // need to grow the table then go for another attempt.
+ rootBucket.mutex.Unlock()
+ m.resize(t, growHint)
+ goto RETRY
+ }
+ // insertion into a new bucket.
+ // create and append the bucket.
+ newBucket := &paddedBucket{}
+ newBucket.hashes[0] = hash
+ newBucket.nodes[0] = n.AsPointer()
+ atomic.StorePointer(&b.next, unsafe.Pointer(newBucket))
+ rootBucket.mutex.Unlock()
+ t.addSize(bucketIdx, 1)
+ return nil
+ }
+ b = (*paddedBucket)(b.next)
+ }
+ }
+}
+
+// Delete deletes the value for a key.
+//
+// Returns the deleted node or nil if the node wasn't deleted.
+func (m *Map[K, V]) Delete(key K) node.Node[K, V] {
+ return m.delete(key, func(n node.Node[K, V]) bool {
+ return key == n.Key()
+ })
+}
+
+// DeleteNode evicts the node for a key.
+//
+// Returns the evicted node or nil if the node wasn't evicted.
+func (m *Map[K, V]) DeleteNode(n node.Node[K, V]) node.Node[K, V] {
+ return m.delete(n.Key(), func(current node.Node[K, V]) bool {
+ return node.Equals(n, current)
+ })
+}
+
+func (m *Map[K, V]) delete(key K, cmp func(node.Node[K, V]) bool) node.Node[K, V] {
+ for {
+ RETRY:
+ hintNonEmpty := 0
+ t := (*table[K])(atomic.LoadPointer(&m.table))
+ hash := t.calcShiftHash(key)
+ bucketIdx := hash & t.mask
+ rootBucket := &t.buckets[bucketIdx]
+ rootBucket.mutex.Lock()
+ // the following two checks must go in reverse to what's
+ // in the resize method.
+ if m.resizeInProgress() {
+ // resize is in progress. Wait, then go for another attempt.
+ rootBucket.mutex.Unlock()
+ m.waitForResize()
+ goto RETRY
+ }
+ if m.newerTableExists(t) {
+ // someone resized the table. Go for another attempt.
+ rootBucket.mutex.Unlock()
+ goto RETRY
+ }
+ b := rootBucket
+ for {
+ for i := 0; i < bucketSize; i++ {
+ h := b.hashes[i]
+ if h == uint64(0) {
+ continue
+ }
+ if h != hash {
+ hintNonEmpty++
+ continue
+ }
+ current := m.nodeManager.FromPointer(b.nodes[i])
+ if !cmp(current) {
+ hintNonEmpty++
+ continue
+ }
+ // Deletion.
+ // First we update the hash, then the node.
+ atomic.StoreUint64(&b.hashes[i], uint64(0))
+ atomic.StorePointer(&b.nodes[i], nil)
+ leftEmpty := false
+ if hintNonEmpty == 0 {
+ leftEmpty = b.isEmpty()
+ }
+ rootBucket.mutex.Unlock()
+ t.addSize(bucketIdx, -1)
+ // Might need to shrink the table.
+ if leftEmpty {
+ m.resize(t, shrinkHint)
+ }
+ return current
+ }
+ if b.next == nil {
+ // not found
+ rootBucket.mutex.Unlock()
+ return nil
+ }
+ b = (*paddedBucket)(b.next)
+ }
+ }
+}
+
+func (m *Map[K, V]) resize(known *table[K], hint resizeHint) {
+ knownTableLen := len(known.buckets)
+ // fast path for shrink attempts.
+ if hint == shrinkHint {
+ shrinkThreshold := int64((knownTableLen * bucketSize) / shrinkFraction)
+ if knownTableLen == minBucketCount || known.sumSize() > shrinkThreshold {
+ return
+ }
+ }
+ // slow path.
+ if !m.resizing.CompareAndSwap(0, 1) {
+ // someone else started resize. Wait for it to finish.
+ m.waitForResize()
+ return
+ }
+ var nt *table[K]
+ t := (*table[K])(atomic.LoadPointer(&m.table))
+ tableLen := len(t.buckets)
+ switch hint {
+ case growHint:
+ // grow the table with factor of 2.
+ nt = newTable(tableLen<<1, t.hasher)
+ case shrinkHint:
+ shrinkThreshold := int64((tableLen * bucketSize) / shrinkFraction)
+ if tableLen > minBucketCount && t.sumSize() <= shrinkThreshold {
+ // shrink the table with factor of 2.
+ nt = newTable(tableLen>>1, t.hasher)
+ } else {
+ // no need to shrink, wake up all waiters and give up.
+ m.resizeMutex.Lock()
+ m.resizing.Store(0)
+ m.resizeCond.Broadcast()
+ m.resizeMutex.Unlock()
+ return
+ }
+ case clearHint:
+ nt = newTable(minBucketCount, t.hasher)
+ default:
+ panic(fmt.Sprintf("unexpected resize hint: %d", hint))
+ }
+ // copy the data only if we're not clearing the hashtable.
+ if hint != clearHint {
+ for i := 0; i < tableLen; i++ {
+ copied := m.copyBuckets(&t.buckets[i], nt)
+ //nolint:gosec // there will never be an overflow
+ nt.addSizePlain(uint64(i), copied)
+ }
+ }
+ // publish the new table and wake up all waiters.
+ atomic.StorePointer(&m.table, unsafe.Pointer(nt))
+ m.resizeMutex.Lock()
+ m.resizing.Store(0)
+ m.resizeCond.Broadcast()
+ m.resizeMutex.Unlock()
+}
+
+func (m *Map[K, V]) copyBuckets(b *paddedBucket, dest *table[K]) (copied int) {
+ rootBucket := b
+ rootBucket.mutex.Lock()
+ for {
+ for i := 0; i < bucketSize; i++ {
+ if b.nodes[i] == nil {
+ continue
+ }
+ n := m.nodeManager.FromPointer(b.nodes[i])
+ hash := dest.calcShiftHash(n.Key())
+ bucketIdx := hash & dest.mask
+ dest.buckets[bucketIdx].add(hash, b.nodes[i])
+ copied++
+ }
+ if b.next == nil {
+ rootBucket.mutex.Unlock()
+ return copied
+ }
+ b = (*paddedBucket)(b.next)
+ }
+}
+
+func (m *Map[K, V]) newerTableExists(table *table[K]) bool {
+ currentTable := atomic.LoadPointer(&m.table)
+ return uintptr(currentTable) != uintptr(unsafe.Pointer(table))
+}
+
+func (m *Map[K, V]) resizeInProgress() bool {
+ return m.resizing.Load() == 1
+}
+
+func (m *Map[K, V]) waitForResize() {
+ m.resizeMutex.Lock()
+ for m.resizeInProgress() {
+ m.resizeCond.Wait()
+ }
+ m.resizeMutex.Unlock()
+}
+
+// Range calls f sequentially for each node present in the
+// map. If f returns false, range stops the iteration.
+//
+// Range does not necessarily correspond to any consistent snapshot
+// of the Map's contents: no key will be visited more than once, but
+// if the value for any key is stored or deleted concurrently, Range
+// may reflect any mapping for that key from any point during the
+// Range call.
+//
+// It is safe to modify the map while iterating it. However, the
+// concurrent modification rule apply, i.e. the changes may be not
+// reflected in the subsequently iterated nodes.
+func (m *Map[K, V]) Range(f func(node.Node[K, V]) bool) {
+ var zeroPtr unsafe.Pointer
+ // Pre-allocate array big enough to fit nodes for most hash tables.
+ buffer := make([]unsafe.Pointer, 0, 16*bucketSize)
+ tp := atomic.LoadPointer(&m.table)
+ t := *(*table[K])(tp)
+ for i := range t.buckets {
+ rootBucket := &t.buckets[i]
+ b := rootBucket
+ // Prevent concurrent modifications and copy all nodes into
+ // the intermediate slice.
+ rootBucket.mutex.Lock()
+ for {
+ for i := 0; i < bucketSize; i++ {
+ if b.nodes[i] != nil {
+ buffer = append(buffer, b.nodes[i])
+ }
+ }
+ if b.next == nil {
+ rootBucket.mutex.Unlock()
+ break
+ }
+ b = (*paddedBucket)(b.next)
+ }
+ // Call the function for all copied nodes.
+ for j := range buffer {
+ n := m.nodeManager.FromPointer(buffer[j])
+ if !f(n) {
+ return
+ }
+ // Remove the reference to allow the copied nodes to be GCed before this method finishes.
+ buffer[j] = zeroPtr
+ }
+ buffer = buffer[:0]
+ }
+}
+
+// Clear deletes all keys and values currently stored in the map.
+func (m *Map[K, V]) Clear() {
+ table := (*table[K])(atomic.LoadPointer(&m.table))
+ m.resize(table, clearHint)
+}
+
+// Size returns current size of the map.
+func (m *Map[K, V]) Size() int {
+ table := (*table[K])(atomic.LoadPointer(&m.table))
+ return int(table.sumSize())
+}
diff --git a/vendor/github.com/maypok86/otter/internal/lossy/buffer.go b/vendor/github.com/maypok86/otter/internal/lossy/buffer.go
new file mode 100644
index 00000000..a0a1d558
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/lossy/buffer.go
@@ -0,0 +1,143 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package lossy
+
+import (
+ "runtime"
+ "sync/atomic"
+ "unsafe"
+
+ "github.com/maypok86/otter/internal/generated/node"
+ "github.com/maypok86/otter/internal/xruntime"
+)
+
+const (
+ // The maximum number of elements per buffer.
+ capacity = 16
+ mask = uint64(capacity - 1)
+)
+
+// PolicyBuffers is the set of buffers returned by the lossy buffer.
+type PolicyBuffers[K comparable, V any] struct {
+ Returned []node.Node[K, V]
+}
+
+// Buffer is a circular ring buffer stores the elements being transferred by the producers to the consumer.
+// The monotonically increasing count of reads and writes allow indexing sequentially to the next
+// element location based upon a power-of-two sizing.
+//
+// The producers race to read the counts, check if there is available capacity, and if so then try
+// once to CAS to the next write count. If the increment is successful then the producer lazily
+// publishes the element. The producer does not retry or block when unsuccessful due to a failed
+// CAS or the buffer being full.
+//
+// The consumer reads the counts and takes the available elements. The clearing of the elements
+// and the next read count are lazily set.
+//
+// This implementation is striped to further increase concurrency.
+type Buffer[K comparable, V any] struct {
+ head atomic.Uint64
+ headPadding [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte
+ tail atomic.Uint64
+ tailPadding [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte
+ nodeManager *node.Manager[K, V]
+ returned unsafe.Pointer
+ returnedPadding [xruntime.CacheLineSize - 2*8]byte
+ policyBuffers unsafe.Pointer
+ returnedSlicePadding [xruntime.CacheLineSize - 8]byte
+ buffer [capacity]unsafe.Pointer
+}
+
+// New creates a new lossy Buffer.
+func New[K comparable, V any](nodeManager *node.Manager[K, V]) *Buffer[K, V] {
+ pb := &PolicyBuffers[K, V]{
+ Returned: make([]node.Node[K, V], 0, capacity),
+ }
+ b := &Buffer[K, V]{
+ nodeManager: nodeManager,
+ policyBuffers: unsafe.Pointer(pb),
+ }
+ b.returned = b.policyBuffers
+ return b
+}
+
+// Add lazily publishes the item to the consumer.
+//
+// item may be lost due to contention.
+func (b *Buffer[K, V]) Add(n node.Node[K, V]) *PolicyBuffers[K, V] {
+ head := b.head.Load()
+ tail := b.tail.Load()
+ size := tail - head
+ if size >= capacity {
+ // full buffer
+ return nil
+ }
+ if b.tail.CompareAndSwap(tail, tail+1) {
+ // success
+ //nolint:gosec // there will never be an overflow
+ index := int(tail & mask)
+ atomic.StorePointer(&b.buffer[index], n.AsPointer())
+ if size == capacity-1 {
+ // try return new buffer
+ if !atomic.CompareAndSwapPointer(&b.returned, b.policyBuffers, nil) {
+ // somebody already get buffer
+ return nil
+ }
+
+ pb := (*PolicyBuffers[K, V])(b.policyBuffers)
+ for i := 0; i < capacity; i++ {
+ //nolint:gosec // there will never be an overflow
+ index := int(head & mask)
+ v := atomic.LoadPointer(&b.buffer[index])
+ if v != nil {
+ // published
+ pb.Returned = append(pb.Returned, b.nodeManager.FromPointer(v))
+ // release
+ atomic.StorePointer(&b.buffer[index], nil)
+ }
+ head++
+ }
+
+ b.head.Store(head)
+ return pb
+ }
+ }
+
+ // failed
+ return nil
+}
+
+// Free returns the processed buffer back and also clears it.
+func (b *Buffer[K, V]) Free() {
+ pb := (*PolicyBuffers[K, V])(b.policyBuffers)
+ for i := 0; i < len(pb.Returned); i++ {
+ pb.Returned[i] = nil
+ }
+ pb.Returned = pb.Returned[:0]
+ atomic.StorePointer(&b.returned, b.policyBuffers)
+}
+
+// Clear clears the lossy Buffer and returns it to the default state.
+func (b *Buffer[K, V]) Clear() {
+ for !atomic.CompareAndSwapPointer(&b.returned, b.policyBuffers, nil) {
+ runtime.Gosched()
+ }
+ for i := 0; i < capacity; i++ {
+ atomic.StorePointer(&b.buffer[i], nil)
+ }
+ b.Free()
+ b.tail.Store(0)
+ b.head.Store(0)
+}
diff --git a/vendor/github.com/maypok86/otter/internal/queue/growable.go b/vendor/github.com/maypok86/otter/internal/queue/growable.go
new file mode 100644
index 00000000..80e80656
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/queue/growable.go
@@ -0,0 +1,135 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package queue
+
+import (
+ "sync"
+
+ "github.com/maypok86/otter/internal/xmath"
+)
+
+type Growable[T any] struct {
+ mutex sync.Mutex
+ notEmpty sync.Cond
+ notFull sync.Cond
+ buf []T
+ head int
+ tail int
+ count int
+ minCap int
+ maxCap int
+}
+
+func NewGrowable[T any](minCap, maxCap uint32) *Growable[T] {
+ minCap = xmath.RoundUpPowerOf2(minCap)
+ maxCap = xmath.RoundUpPowerOf2(maxCap)
+
+ g := &Growable[T]{
+ buf: make([]T, minCap),
+ minCap: int(minCap),
+ maxCap: int(maxCap),
+ }
+
+ g.notEmpty = *sync.NewCond(&g.mutex)
+ g.notFull = *sync.NewCond(&g.mutex)
+
+ return g
+}
+
+func (g *Growable[T]) Push(item T) {
+ g.mutex.Lock()
+ for g.count == g.maxCap {
+ g.notFull.Wait()
+ }
+ g.push(item)
+ g.mutex.Unlock()
+}
+
+func (g *Growable[T]) push(item T) {
+ g.grow()
+ g.buf[g.tail] = item
+ g.tail = g.next(g.tail)
+ g.count++
+ g.notEmpty.Signal()
+}
+
+func (g *Growable[T]) Pop() T {
+ g.mutex.Lock()
+ for g.count == 0 {
+ g.notEmpty.Wait()
+ }
+ item := g.pop()
+ g.mutex.Unlock()
+ return item
+}
+
+func (g *Growable[T]) TryPop() (T, bool) {
+ var zero T
+ g.mutex.Lock()
+ if g.count == 0 {
+ g.mutex.Unlock()
+ return zero, false
+ }
+ item := g.pop()
+ g.mutex.Unlock()
+ return item, true
+}
+
+func (g *Growable[T]) pop() T {
+ var zero T
+
+ item := g.buf[g.head]
+ g.buf[g.head] = zero
+
+ g.head = g.next(g.head)
+ g.count--
+
+ g.notFull.Signal()
+
+ return item
+}
+
+func (g *Growable[T]) Clear() {
+ g.mutex.Lock()
+ for g.count > 0 {
+ g.pop()
+ }
+ g.mutex.Unlock()
+}
+
+func (g *Growable[T]) grow() {
+ if g.count != len(g.buf) {
+ return
+ }
+ g.resize()
+}
+
+func (g *Growable[T]) resize() {
+ newBuf := make([]T, g.count<<1)
+ if g.tail > g.head {
+ copy(newBuf, g.buf[g.head:g.tail])
+ } else {
+ n := copy(newBuf, g.buf[g.head:])
+ copy(newBuf[n:], g.buf[:g.tail])
+ }
+
+ g.head = 0
+ g.tail = g.count
+ g.buf = newBuf
+}
+
+func (g *Growable[T]) next(i int) int {
+ return (i + 1) & (len(g.buf) - 1)
+}
diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go b/vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go
new file mode 100644
index 00000000..0b263a08
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go
@@ -0,0 +1,77 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package s3fifo
+
+import (
+ "github.com/dolthub/maphash"
+ "github.com/gammazero/deque"
+
+ "github.com/maypok86/otter/internal/generated/node"
+)
+
+type ghost[K comparable, V any] struct {
+ q *deque.Deque[uint64]
+ m map[uint64]struct{}
+ main *main[K, V]
+ small *small[K, V]
+ hasher maphash.Hasher[K]
+ evictNode func(node.Node[K, V])
+}
+
+func newGhost[K comparable, V any](main *main[K, V], evictNode func(node.Node[K, V])) *ghost[K, V] {
+ return &ghost[K, V]{
+ q: &deque.Deque[uint64]{},
+ m: make(map[uint64]struct{}),
+ main: main,
+ hasher: maphash.NewHasher[K](),
+ evictNode: evictNode,
+ }
+}
+
+func (g *ghost[K, V]) isGhost(n node.Node[K, V]) bool {
+ h := g.hasher.Hash(n.Key())
+ _, ok := g.m[h]
+ return ok
+}
+
+func (g *ghost[K, V]) insert(n node.Node[K, V]) {
+ g.evictNode(n)
+
+ h := g.hasher.Hash(n.Key())
+
+ if _, ok := g.m[h]; ok {
+ return
+ }
+
+ maxLength := g.small.length() + g.main.length()
+ if maxLength == 0 {
+ return
+ }
+
+ for g.q.Len() >= maxLength {
+ v := g.q.PopFront()
+ delete(g.m, v)
+ }
+
+ g.q.PushBack(h)
+ g.m[h] = struct{}{}
+}
+
+func (g *ghost[K, V]) clear() {
+ g.q.Clear()
+ for k := range g.m {
+ delete(g.m, k)
+ }
+}
diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/main.go b/vendor/github.com/maypok86/otter/internal/s3fifo/main.go
new file mode 100644
index 00000000..e57120cc
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/s3fifo/main.go
@@ -0,0 +1,87 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package s3fifo
+
+import (
+ "github.com/maypok86/otter/internal/generated/node"
+)
+
+const maxReinsertions = 20
+
+type main[K comparable, V any] struct {
+ q *queue[K, V]
+ cost int
+ maxCost int
+ evictNode func(node.Node[K, V])
+}
+
+func newMain[K comparable, V any](maxCost int, evictNode func(node.Node[K, V])) *main[K, V] {
+ return &main[K, V]{
+ q: newQueue[K, V](),
+ maxCost: maxCost,
+ evictNode: evictNode,
+ }
+}
+
+func (m *main[K, V]) insert(n node.Node[K, V]) {
+ m.q.push(n)
+ n.MarkMain()
+ m.cost += int(n.Cost())
+}
+
+func (m *main[K, V]) evict() {
+ reinsertions := 0
+ for m.cost > 0 {
+ n := m.q.pop()
+
+ if !n.IsAlive() || n.HasExpired() || n.Frequency() == 0 {
+ n.Unmark()
+ m.cost -= int(n.Cost())
+ m.evictNode(n)
+ return
+ }
+
+ // to avoid the worst case O(n), we remove the 20th reinserted consecutive element.
+ reinsertions++
+ if reinsertions >= maxReinsertions {
+ n.Unmark()
+ m.cost -= int(n.Cost())
+ m.evictNode(n)
+ return
+ }
+
+ m.q.push(n)
+ n.DecrementFrequency()
+ }
+}
+
+func (m *main[K, V]) delete(n node.Node[K, V]) {
+ m.cost -= int(n.Cost())
+ n.Unmark()
+ m.q.delete(n)
+}
+
+func (m *main[K, V]) length() int {
+ return m.q.length()
+}
+
+func (m *main[K, V]) clear() {
+ m.q.clear()
+ m.cost = 0
+}
+
+func (m *main[K, V]) isFull() bool {
+ return m.cost >= m.maxCost
+}
diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/policy.go b/vendor/github.com/maypok86/otter/internal/s3fifo/policy.go
new file mode 100644
index 00000000..dd698172
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/s3fifo/policy.go
@@ -0,0 +1,106 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package s3fifo
+
+import (
+ "github.com/maypok86/otter/internal/generated/node"
+)
+
+// Policy is an eviction policy based on S3-FIFO eviction algorithm
+// from the following paper: https://dl.acm.org/doi/10.1145/3600006.3613147.
+type Policy[K comparable, V any] struct {
+ small *small[K, V]
+ main *main[K, V]
+ ghost *ghost[K, V]
+ maxCost int
+ maxAvailableNodeCost int
+}
+
+// NewPolicy creates a new Policy.
+func NewPolicy[K comparable, V any](maxCost int, evictNode func(node.Node[K, V])) *Policy[K, V] {
+ smallMaxCost := maxCost / 10
+ mainMaxCost := maxCost - smallMaxCost
+
+ main := newMain[K, V](mainMaxCost, evictNode)
+ ghost := newGhost(main, evictNode)
+ small := newSmall(smallMaxCost, main, ghost, evictNode)
+ ghost.small = small
+
+ return &Policy[K, V]{
+ small: small,
+ main: main,
+ ghost: ghost,
+ maxCost: maxCost,
+ maxAvailableNodeCost: smallMaxCost,
+ }
+}
+
+// Read updates the eviction policy based on node accesses.
+func (p *Policy[K, V]) Read(nodes []node.Node[K, V]) {
+ for _, n := range nodes {
+ n.IncrementFrequency()
+ }
+}
+
+// Add adds node to the eviction policy.
+func (p *Policy[K, V]) Add(n node.Node[K, V]) {
+ if p.ghost.isGhost(n) {
+ p.main.insert(n)
+ n.ResetFrequency()
+ } else {
+ p.small.insert(n)
+ }
+
+ for p.isFull() {
+ p.evict()
+ }
+}
+
+func (p *Policy[K, V]) evict() {
+ if p.small.cost >= p.maxCost/10 {
+ p.small.evict()
+ return
+ }
+
+ p.main.evict()
+}
+
+func (p *Policy[K, V]) isFull() bool {
+ return p.small.cost+p.main.cost > p.maxCost
+}
+
+// Delete deletes node from the eviction policy.
+func (p *Policy[K, V]) Delete(n node.Node[K, V]) {
+ if n.IsSmall() {
+ p.small.delete(n)
+ return
+ }
+
+ if n.IsMain() {
+ p.main.delete(n)
+ }
+}
+
+// MaxAvailableCost returns the maximum available cost of the node.
+func (p *Policy[K, V]) MaxAvailableCost() int {
+ return p.maxAvailableNodeCost
+}
+
+// Clear clears the eviction policy and returns it to the default state.
+func (p *Policy[K, V]) Clear() {
+ p.ghost.clear()
+ p.main.clear()
+ p.small.clear()
+}
diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/queue.go b/vendor/github.com/maypok86/otter/internal/s3fifo/queue.go
new file mode 100644
index 00000000..4f8e76de
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/s3fifo/queue.go
@@ -0,0 +1,75 @@
+package s3fifo
+
+import "github.com/maypok86/otter/internal/generated/node"
+
+type queue[K comparable, V any] struct {
+ head node.Node[K, V]
+ tail node.Node[K, V]
+ len int
+}
+
+func newQueue[K comparable, V any]() *queue[K, V] {
+ return &queue[K, V]{}
+}
+
+func (q *queue[K, V]) length() int {
+ return q.len
+}
+
+func (q *queue[K, V]) isEmpty() bool {
+ return q.length() == 0
+}
+
+func (q *queue[K, V]) push(n node.Node[K, V]) {
+ if q.isEmpty() {
+ q.head = n
+ q.tail = n
+ } else {
+ n.SetPrev(q.tail)
+ q.tail.SetNext(n)
+ q.tail = n
+ }
+
+ q.len++
+}
+
+func (q *queue[K, V]) pop() node.Node[K, V] {
+ if q.isEmpty() {
+ return nil
+ }
+
+ result := q.head
+ q.delete(result)
+ return result
+}
+
+func (q *queue[K, V]) delete(n node.Node[K, V]) {
+ next := n.Next()
+ prev := n.Prev()
+
+ if node.Equals(prev, nil) {
+ if node.Equals(next, nil) && !node.Equals(q.head, n) {
+ return
+ }
+
+ q.head = next
+ } else {
+ prev.SetNext(next)
+ n.SetPrev(nil)
+ }
+
+ if node.Equals(next, nil) {
+ q.tail = prev
+ } else {
+ next.SetPrev(prev)
+ n.SetNext(nil)
+ }
+
+ q.len--
+}
+
+func (q *queue[K, V]) clear() {
+ for !q.isEmpty() {
+ q.pop()
+ }
+}
diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/small.go b/vendor/github.com/maypok86/otter/internal/s3fifo/small.go
new file mode 100644
index 00000000..75e39771
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/s3fifo/small.go
@@ -0,0 +1,89 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package s3fifo
+
+import (
+ "github.com/maypok86/otter/internal/generated/node"
+)
+
+type small[K comparable, V any] struct {
+ q *queue[K, V]
+ main *main[K, V]
+ ghost *ghost[K, V]
+ cost int
+ maxCost int
+ evictNode func(node.Node[K, V])
+}
+
+func newSmall[K comparable, V any](
+ maxCost int,
+ main *main[K, V],
+ ghost *ghost[K, V],
+ evictNode func(node.Node[K, V]),
+) *small[K, V] {
+ return &small[K, V]{
+ q: newQueue[K, V](),
+ main: main,
+ ghost: ghost,
+ maxCost: maxCost,
+ evictNode: evictNode,
+ }
+}
+
+func (s *small[K, V]) insert(n node.Node[K, V]) {
+ s.q.push(n)
+ n.MarkSmall()
+ s.cost += int(n.Cost())
+}
+
+func (s *small[K, V]) evict() {
+ if s.cost == 0 {
+ return
+ }
+
+ n := s.q.pop()
+ s.cost -= int(n.Cost())
+ n.Unmark()
+ if !n.IsAlive() || n.HasExpired() {
+ s.evictNode(n)
+ return
+ }
+
+ if n.Frequency() > 1 {
+ s.main.insert(n)
+ for s.main.isFull() {
+ s.main.evict()
+ }
+ n.ResetFrequency()
+ return
+ }
+
+ s.ghost.insert(n)
+}
+
+func (s *small[K, V]) delete(n node.Node[K, V]) {
+ s.cost -= int(n.Cost())
+ n.Unmark()
+ s.q.delete(n)
+}
+
+func (s *small[K, V]) length() int {
+ return s.q.length()
+}
+
+func (s *small[K, V]) clear() {
+ s.q.clear()
+ s.cost = 0
+}
diff --git a/vendor/github.com/maypok86/otter/internal/stats/counter.go b/vendor/github.com/maypok86/otter/internal/stats/counter.go
new file mode 100644
index 00000000..0958c6f2
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/stats/counter.go
@@ -0,0 +1,108 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+// Copyright (c) 2021 Andrey Pechkurov
+//
+// Copyright notice. This code is a fork of xsync.Counter from this file with some changes:
+// https://github.com/puzpuzpuz/xsync/blob/main/counter.go
+//
+// Use of this source code is governed by a MIT license that can be found
+// at https://github.com/puzpuzpuz/xsync/blob/main/LICENSE
+
+package stats
+
+import (
+ "sync"
+ "sync/atomic"
+
+ "github.com/maypok86/otter/internal/xmath"
+ "github.com/maypok86/otter/internal/xruntime"
+)
+
+// pool for P tokens.
+var tokenPool sync.Pool
+
+// a P token is used to point at the current OS thread (P)
+// on which the goroutine is run; exact identity of the thread,
+// as well as P migration tolerance, is not important since
+// it's used to as a best effort mechanism for assigning
+// concurrent operations (goroutines) to different stripes of
+// the counter.
+type token struct {
+ idx uint32
+ padding [xruntime.CacheLineSize - 4]byte
+}
+
+// A counter is a striped int64 counter.
+//
+// Should be preferred over a single atomically updated int64
+// counter in high contention scenarios.
+//
+// A counter must not be copied after first use.
+type counter struct {
+ shards []cshard
+ mask uint32
+}
+
+type cshard struct {
+ c int64
+ padding [xruntime.CacheLineSize - 8]byte
+}
+
+// newCounter creates a new counter instance.
+func newCounter() *counter {
+ nshards := xmath.RoundUpPowerOf2(xruntime.Parallelism())
+ return &counter{
+ shards: make([]cshard, nshards),
+ mask: nshards - 1,
+ }
+}
+
+// increment increments the counter by 1.
+func (c *counter) increment() {
+ c.add(1)
+}
+
+// decrement decrements the counter by 1.
+func (c *counter) decrement() {
+ c.add(-1)
+}
+
+// add adds the delta to the counter.
+func (c *counter) add(delta int64) {
+ t, ok := tokenPool.Get().(*token)
+ if !ok {
+ t = &token{}
+ t.idx = xruntime.Fastrand()
+ }
+ for {
+ shard := &c.shards[t.idx&c.mask]
+ cnt := atomic.LoadInt64(&shard.c)
+ if atomic.CompareAndSwapInt64(&shard.c, cnt, cnt+delta) {
+ break
+ }
+ // Give a try with another randomly selected shard.
+ t.idx = xruntime.Fastrand()
+ }
+ tokenPool.Put(t)
+}
+
+// value returns the current counter value.
+// The returned value may not include all of the latest operations in
+// presence of concurrent modifications of the counter.
+func (c *counter) value() int64 {
+ v := int64(0)
+ for i := 0; i < len(c.shards); i++ {
+ shard := &c.shards[i]
+ v += atomic.LoadInt64(&shard.c)
+ }
+ return v
+}
+
+// reset resets the counter to zero.
+// This method should only be used when it is known that there are
+// no concurrent modifications of the counter.
+func (c *counter) reset() {
+ for i := 0; i < len(c.shards); i++ {
+ shard := &c.shards[i]
+ atomic.StoreInt64(&shard.c, 0)
+ }
+}
diff --git a/vendor/github.com/maypok86/otter/internal/stats/stats.go b/vendor/github.com/maypok86/otter/internal/stats/stats.go
new file mode 100644
index 00000000..e3824fa0
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/stats/stats.go
@@ -0,0 +1,143 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package stats
+
+import (
+ "sync/atomic"
+ "unsafe"
+
+ "github.com/maypok86/otter/internal/xruntime"
+)
+
+// Stats is a thread-safe statistics collector.
+type Stats struct {
+ hits *counter
+ misses *counter
+ rejectedSets *counter
+ evictedCountersPadding [xruntime.CacheLineSize - 2*unsafe.Sizeof(atomic.Int64{})]byte
+ evictedCount atomic.Int64
+ evictedCost atomic.Int64
+}
+
+// New creates a new Stats collector.
+func New() *Stats {
+ return &Stats{
+ hits: newCounter(),
+ misses: newCounter(),
+ rejectedSets: newCounter(),
+ }
+}
+
+// IncHits increments the hits counter.
+func (s *Stats) IncHits() {
+ if s == nil {
+ return
+ }
+
+ s.hits.increment()
+}
+
+// Hits returns the number of cache hits.
+func (s *Stats) Hits() int64 {
+ if s == nil {
+ return 0
+ }
+
+ return s.hits.value()
+}
+
+// IncMisses increments the misses counter.
+func (s *Stats) IncMisses() {
+ if s == nil {
+ return
+ }
+
+ s.misses.increment()
+}
+
+// Misses returns the number of cache misses.
+func (s *Stats) Misses() int64 {
+ if s == nil {
+ return 0
+ }
+
+ return s.misses.value()
+}
+
+// IncRejectedSets increments the rejectedSets counter.
+func (s *Stats) IncRejectedSets() {
+ if s == nil {
+ return
+ }
+
+ s.rejectedSets.increment()
+}
+
+// RejectedSets returns the number of rejected sets.
+func (s *Stats) RejectedSets() int64 {
+ if s == nil {
+ return 0
+ }
+
+ return s.rejectedSets.value()
+}
+
+// IncEvictedCount increments the evictedCount counter.
+func (s *Stats) IncEvictedCount() {
+ if s == nil {
+ return
+ }
+
+ s.evictedCount.Add(1)
+}
+
+// EvictedCount returns the number of evicted entries.
+func (s *Stats) EvictedCount() int64 {
+ if s == nil {
+ return 0
+ }
+
+ return s.evictedCount.Load()
+}
+
+// AddEvictedCost adds cost to the evictedCost counter.
+func (s *Stats) AddEvictedCost(cost uint32) {
+ if s == nil {
+ return
+ }
+
+ s.evictedCost.Add(int64(cost))
+}
+
+// EvictedCost returns the sum of costs of evicted entries.
+func (s *Stats) EvictedCost() int64 {
+ if s == nil {
+ return 0
+ }
+
+ return s.evictedCost.Load()
+}
+
+func (s *Stats) Clear() {
+ if s == nil {
+ return
+ }
+
+ s.hits.reset()
+ s.misses.reset()
+ s.rejectedSets.reset()
+ s.evictedCount.Store(0)
+ s.evictedCost.Store(0)
+}
diff --git a/vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go b/vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go
new file mode 100644
index 00000000..38f7b19f
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go
@@ -0,0 +1,93 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package unixtime
+
+import (
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+var (
+ // We need this package because time.Now() is slower, allocates memory,
+ // and we don't need a more precise time for the expiry time (and most other operations).
+ now uint32
+ startTime int64
+
+ mutex sync.Mutex
+ countInstance int
+ done chan struct{}
+)
+
+func startTimer() {
+ done = make(chan struct{})
+ atomic.StoreInt64(&startTime, time.Now().Unix())
+ atomic.StoreUint32(&now, uint32(0))
+
+ go func() {
+ ticker := time.NewTicker(time.Second)
+ defer ticker.Stop()
+ for {
+ select {
+ case t := <-ticker.C:
+ //nolint:gosec // there will never be an overflow
+ atomic.StoreUint32(&now, uint32(t.Unix()-StartTime()))
+ case <-done:
+ return
+ }
+ }
+ }()
+}
+
+// Start should be called when the cache instance is created to initialize the timer.
+func Start() {
+ mutex.Lock()
+ defer mutex.Unlock()
+
+ if countInstance == 0 {
+ startTimer()
+ }
+
+ countInstance++
+}
+
+// Stop should be called when closing and stopping the cache instance to stop the timer.
+func Stop() {
+ mutex.Lock()
+ defer mutex.Unlock()
+
+ countInstance--
+ if countInstance == 0 {
+ done <- struct{}{}
+ close(done)
+ }
+}
+
+// Now returns time as a Unix time, the number of seconds elapsed since program start.
+func Now() uint32 {
+ return atomic.LoadUint32(&now)
+}
+
+// SetNow sets the current time.
+//
+// NOTE: use only for testing and debugging.
+func SetNow(t uint32) {
+ atomic.StoreUint32(&now, t)
+}
+
+// StartTime returns the start time of the program.
+func StartTime() int64 {
+ return atomic.LoadInt64(&startTime)
+}
diff --git a/vendor/github.com/maypok86/otter/internal/xmath/power.go b/vendor/github.com/maypok86/otter/internal/xmath/power.go
new file mode 100644
index 00000000..384d7659
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/xmath/power.go
@@ -0,0 +1,30 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package xmath
+
+// RoundUpPowerOf2 is based on https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2.
+func RoundUpPowerOf2(v uint32) uint32 {
+ if v == 0 {
+ return 1
+ }
+ v--
+ v |= v >> 1
+ v |= v >> 2
+ v |= v >> 4
+ v |= v >> 8
+ v |= v >> 16
+ v++
+ return v
+}
diff --git a/vendor/github.com/maypok86/otter/internal/xruntime/runtime.go b/vendor/github.com/maypok86/otter/internal/xruntime/runtime.go
new file mode 100644
index 00000000..4813c8c9
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/xruntime/runtime.go
@@ -0,0 +1,25 @@
+//go:build !go1.22
+
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package xruntime
+
+import (
+ _ "unsafe"
+)
+
+//go:noescape
+//go:linkname Fastrand runtime.fastrand
+func Fastrand() uint32
diff --git a/vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go b/vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go
new file mode 100644
index 00000000..4827a343
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go
@@ -0,0 +1,26 @@
+//go:build go1.22
+
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package xruntime
+
+import (
+ "math/rand/v2"
+)
+
+func Fastrand() uint32 {
+ //nolint:gosec // we don't need a cryptographically secure random number generator
+ return rand.Uint32()
+}
diff --git a/vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go b/vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go
new file mode 100644
index 00000000..9c5de936
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go
@@ -0,0 +1,36 @@
+// Copyright (c) 2023 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package xruntime
+
+import (
+ "runtime"
+)
+
+const (
+ // CacheLineSize is useful for preventing false sharing.
+ CacheLineSize = 64
+)
+
+// Parallelism returns the maximum possible number of concurrently running goroutines.
+func Parallelism() uint32 {
+ //nolint:gosec // there will never be an overflow
+ maxProcs := uint32(runtime.GOMAXPROCS(0))
+ //nolint:gosec // there will never be an overflow
+ numCPU := uint32(runtime.NumCPU())
+ if maxProcs < numCPU {
+ return maxProcs
+ }
+ return numCPU
+}
diff --git a/vendor/github.com/maypok86/otter/stats.go b/vendor/github.com/maypok86/otter/stats.go
new file mode 100644
index 00000000..c80b849b
--- /dev/null
+++ b/vendor/github.com/maypok86/otter/stats.go
@@ -0,0 +1,95 @@
+// Copyright (c) 2024 Alexey Mayshev. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package otter
+
+import (
+ "math"
+
+ "github.com/maypok86/otter/internal/stats"
+)
+
+// Stats is a statistics snapshot.
+type Stats struct {
+ hits int64
+ misses int64
+ rejectedSets int64
+ evictedCount int64
+ evictedCost int64
+}
+
+func newStats(s *stats.Stats) Stats {
+ return Stats{
+ hits: negativeToMax(s.Hits()),
+ misses: negativeToMax(s.Misses()),
+ rejectedSets: negativeToMax(s.RejectedSets()),
+ evictedCount: negativeToMax(s.EvictedCount()),
+ evictedCost: negativeToMax(s.EvictedCost()),
+ }
+}
+
+// Hits returns the number of cache hits.
+func (s Stats) Hits() int64 {
+ return s.hits
+}
+
+// Misses returns the number of cache misses.
+func (s Stats) Misses() int64 {
+ return s.misses
+}
+
+// Ratio returns the cache hit ratio.
+func (s Stats) Ratio() float64 {
+ requests := checkedAdd(s.hits, s.misses)
+ if requests == 0 {
+ return 0.0
+ }
+ return float64(s.hits) / float64(requests)
+}
+
+// RejectedSets returns the number of rejected sets.
+func (s Stats) RejectedSets() int64 {
+ return s.rejectedSets
+}
+
+// EvictedCount returns the number of evicted entries.
+func (s Stats) EvictedCount() int64 {
+ return s.evictedCount
+}
+
+// EvictedCost returns the sum of costs of evicted entries.
+func (s Stats) EvictedCost() int64 {
+ return s.evictedCost
+}
+
+func checkedAdd(a, b int64) int64 {
+ naiveSum := a + b
+ if (a^b) < 0 || (a^naiveSum) >= 0 {
+ // If a and b have different signs or a has the same sign as the result then there was no overflow, return.
+ return naiveSum
+ }
+ // we did over/under flow, if the sign is negative we should return math.MaxInt64 otherwise math.MinInt64.
+ if naiveSum < 0 {
+ return math.MaxInt64
+ }
+ return math.MinInt64
+}
+
+func negativeToMax(v int64) int64 {
+ if v < 0 {
+ return math.MaxInt64
+ }
+
+ return v
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 7d05efeb..ef167f43 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -9,10 +9,6 @@ filippo.io/age/internal/stream
## explicit; go 1.20
filippo.io/edwards25519
filippo.io/edwards25519/field
-# github.com/allegro/bigcache/v3 v3.1.0
-## explicit; go 1.16
-github.com/allegro/bigcache/v3
-github.com/allegro/bigcache/v3/queue
# github.com/aws/aws-sdk-go-v2 v1.26.1
## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/aws
@@ -144,7 +140,7 @@ github.com/aws/smithy-go/waiter
# github.com/benbjohnson/clock v1.3.5
## explicit; go 1.15
github.com/benbjohnson/clock
-# github.com/conductorone/baton-sdk v0.2.48
+# github.com/conductorone/baton-sdk v0.2.58
## explicit; go 1.21
github.com/conductorone/baton-sdk/internal/connector
github.com/conductorone/baton-sdk/pb/c1/c1z/v1
@@ -197,6 +193,9 @@ github.com/davecgh/go-spew/spew
# github.com/deckarep/golang-set/v2 v2.6.0
## explicit; go 1.18
github.com/deckarep/golang-set/v2
+# github.com/dolthub/maphash v0.1.0
+## explicit; go 1.18
+github.com/dolthub/maphash
# github.com/doug-martin/goqu/v9 v9.19.0
## explicit; go 1.12
github.com/doug-martin/goqu/v9
@@ -217,6 +216,9 @@ github.com/envoyproxy/protoc-gen-validate/validate
# github.com/fsnotify/fsnotify v1.7.0
## explicit; go 1.17
github.com/fsnotify/fsnotify
+# github.com/gammazero/deque v0.2.1
+## explicit; go 1.18
+github.com/gammazero/deque
# github.com/glebarez/go-sqlite v1.22.0
## explicit; go 1.17
github.com/glebarez/go-sqlite
@@ -283,6 +285,20 @@ github.com/magiconair/properties
# github.com/mattn/go-isatty v0.0.20
## explicit; go 1.15
github.com/mattn/go-isatty
+# github.com/maypok86/otter v1.2.4
+## explicit; go 1.19
+github.com/maypok86/otter
+github.com/maypok86/otter/internal/core
+github.com/maypok86/otter/internal/expiry
+github.com/maypok86/otter/internal/generated/node
+github.com/maypok86/otter/internal/hashtable
+github.com/maypok86/otter/internal/lossy
+github.com/maypok86/otter/internal/queue
+github.com/maypok86/otter/internal/s3fifo
+github.com/maypok86/otter/internal/stats
+github.com/maypok86/otter/internal/unixtime
+github.com/maypok86/otter/internal/xmath
+github.com/maypok86/otter/internal/xruntime
# github.com/mitchellh/mapstructure v1.5.0
## explicit; go 1.14
github.com/mitchellh/mapstructure
From 7fbe9d446a4b67a7c55078adb8cbcc27b245a622 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Fri, 20 Dec 2024 13:15:40 -0800
Subject: [PATCH 14/16] Add workspace support to preparePrincipalId.
---
pkg/connector/account.go | 4 ++--
pkg/connector/groups.go | 4 ++--
pkg/connector/helpers.go | 16 ++++++++--------
pkg/connector/service-principals.go | 4 ++--
pkg/databricks/client.go | 9 ++++++---
5 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/pkg/connector/account.go b/pkg/connector/account.go
index 54c3760d..00f89587 100644
--- a/pkg/connector/account.go
+++ b/pkg/connector/account.go
@@ -167,7 +167,7 @@ func (a *accountBuilder) Grant(ctx context.Context, principal *v2.Resource, enti
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for account %s: %w", accID, err)
}
- principalID, err := preparePrincipalID(ctx, a.client, principal.Id.ResourceType, principal.Id.Resource)
+ principalID, err := preparePrincipalId(ctx, a.client, "", principal.Id.ResourceType, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to prepare principal id for principal %s: %w", principal.Id.Resource, err)
}
@@ -243,7 +243,7 @@ func (a *accountBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotatio
return nil, nil
}
- principalID, err := preparePrincipalID(ctx, a.client, principal.Id.ResourceType, principal.Id.Resource)
+ principalID, err := preparePrincipalId(ctx, a.client, "", principal.Id.ResourceType, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to prepare principal id: %w", err)
}
diff --git a/pkg/connector/groups.go b/pkg/connector/groups.go
index bb2eb630..f6b2c14d 100644
--- a/pkg/connector/groups.go
+++ b/pkg/connector/groups.go
@@ -323,7 +323,7 @@ func (g *groupBuilder) Grant(ctx context.Context, principal *v2.Resource, entitl
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for group %s (%s): %w", principal.Id.Resource, groupId.Resource, err)
}
- principalID, err := preparePrincipalID(ctx, g.client, principal.Id.ResourceType, principal.Id.Resource)
+ principalID, err := preparePrincipalId(ctx, g.client, workspaceId, principal.Id.ResourceType, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to prepare principal id: %w", err)
}
@@ -430,7 +430,7 @@ func (g *groupBuilder) Revoke(ctx context.Context, grant *v2.Grant) (annotations
return nil, nil
}
- principalID, err := preparePrincipalID(ctx, g.client, principal.Id.ResourceType, principal.Id.Resource)
+ principalID, err := preparePrincipalId(ctx, g.client, workspaceId, principal.Id.ResourceType, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to prepare principal id: %w", err)
}
diff --git a/pkg/connector/helpers.go b/pkg/connector/helpers.go
index 3e8b2af8..7e80bb96 100644
--- a/pkg/connector/helpers.go
+++ b/pkg/connector/helpers.go
@@ -119,30 +119,30 @@ func prepareResourceType(principal *databricks.WorkspacePrincipal) (*v2.Resource
}
}
-// preparePrincipalID prepares a principal ID for a user, group, or service principal.
+// preparePrincipalId prepares a principal ID for a user, group, or service principal.
// It's used when we need edit rule sets with new principals.
-func preparePrincipalID(ctx context.Context, c *databricks.Client, principalType, principalID string) (string, error) {
+func preparePrincipalId(ctx context.Context, c *databricks.Client, workspaceId, principalType, principalId string) (string, error) {
var result string
switch principalType {
case userResourceType.Id:
- username, _, err := c.FindUsername(ctx, principalID)
+ username, _, err := c.FindUsername(ctx, workspaceId, principalId)
if err != nil {
- return "", fmt.Errorf("failed to find user %s: %w", principalID, err)
+ return "", fmt.Errorf("failed to find user %s/%s: %w", workspaceId, principalId, err)
}
result = fmt.Sprintf("%s/%s", UsersType, username)
case groupResourceType.Id:
- displayName, _, err := c.FindGroupDisplayName(ctx, principalID)
+ displayName, _, err := c.FindGroupDisplayName(ctx, workspaceId, principalId)
if err != nil {
- return "", fmt.Errorf("failed to find group %s: %w", principalID, err)
+ return "", fmt.Errorf("failed to find group %s/%s: %w", workspaceId, principalId, err)
}
result = fmt.Sprintf("%s/%s", GroupsType, displayName)
case servicePrincipalResourceType.Id:
- appID, _, err := c.FindServicePrincipalAppID(ctx, principalID)
+ appID, _, err := c.FindServicePrincipalAppID(ctx, workspaceId, principalId)
if err != nil {
- return "", fmt.Errorf("failed to find service principal %s: %w", principalID, err)
+ return "", fmt.Errorf("failed to find service principal %s/%s: %w", workspaceId, principalId, err)
}
result = fmt.Sprintf("%s/%s", ServicePrincipalsType, appID)
diff --git a/pkg/connector/service-principals.go b/pkg/connector/service-principals.go
index 751a12c4..54b20bc3 100644
--- a/pkg/connector/service-principals.go
+++ b/pkg/connector/service-principals.go
@@ -242,7 +242,7 @@ func (s *servicePrincipalBuilder) Grant(ctx context.Context, principal *v2.Resou
return nil, fmt.Errorf("databricks-connector: failed to list rule sets for service principal %s (%s): %w", principal.Id.Resource, applicationId, err)
}
- principalID, err := preparePrincipalID(ctx, s.client, principal.Id.ResourceType, principal.Id.Resource)
+ principalID, err := preparePrincipalId(ctx, s.client, workspaceId, principal.Id.ResourceType, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to prepare principal id: %w", err)
}
@@ -335,7 +335,7 @@ func (s *servicePrincipalBuilder) Revoke(ctx context.Context, grant *v2.Grant) (
return nil, nil
}
- principalID, err := preparePrincipalID(ctx, s.client, principal.Id.ResourceType, principal.Id.Resource)
+ principalID, err := preparePrincipalId(ctx, s.client, workspaceId, principal.Id.ResourceType, principal.Id.Resource)
if err != nil {
return nil, fmt.Errorf("databricks-connector: failed to prepare principal id: %w", err)
}
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index 069af211..215c6f9f 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -197,6 +197,7 @@ func (c *Client) FindUserID(
func (c *Client) FindUsername(
ctx context.Context,
+ workspaceId string,
userID string,
) (
string,
@@ -205,7 +206,7 @@ func (c *Client) FindUsername(
) {
users, _, ratelimitData, err := c.ListUsers(
ctx,
- "",
+ workspaceId,
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("id eq '%s'", userID)),
)
@@ -307,6 +308,7 @@ func (c *Client) FindGroupID(
func (c *Client) FindGroupDisplayName(
ctx context.Context,
+ workspaceId,
groupID string,
) (
string,
@@ -315,7 +317,7 @@ func (c *Client) FindGroupDisplayName(
) {
groups, _, ratelimitData, err := c.ListGroups(
ctx,
- "",
+ workspaceId,
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("id eq '%s'", groupID)),
)
@@ -423,6 +425,7 @@ func (c *Client) FindServicePrincipalID(
func (c *Client) FindServicePrincipalAppID(
ctx context.Context,
+ workspaceId string,
servicePrincipalID string,
) (
string,
@@ -431,7 +434,7 @@ func (c *Client) FindServicePrincipalAppID(
) {
servicePrincipals, _, ratelimitData, err := c.ListServicePrincipals(
ctx,
- "",
+ workspaceId,
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("id eq '%s'", servicePrincipalID)),
)
From b27117bb0f883ba15e6de8a56e317bc138cd9915 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Fri, 20 Dec 2024 14:07:02 -0800
Subject: [PATCH 15/16] Wrap original error instead of discarding it.
---
pkg/databricks/request.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkg/databricks/request.go b/pkg/databricks/request.go
index 7f888157..927d07f6 100644
--- a/pkg/databricks/request.go
+++ b/pkg/databricks/request.go
@@ -122,9 +122,10 @@ func (c *Client) doRequest(
}
return ratelimitData, fmt.Errorf(
- "unexpected status code %d: %s %s",
+ "unexpected status code %d: %s %s %w",
resp.StatusCode,
errorResponse.Detail,
errorResponse.Message,
+ err,
)
}
From 393a768707b206e28fb17377e14e869173e4a9a9 Mon Sep 17 00:00:00 2001
From: Geoff Greer
Date: Fri, 20 Dec 2024 14:30:33 -0800
Subject: [PATCH 16/16] Add support for workspace ID in prepareResourceId
---
pkg/connector/account.go | 2 +-
pkg/connector/groups.go | 2 +-
pkg/connector/helpers.go | 10 +++++-----
pkg/connector/service-principals.go | 2 +-
pkg/databricks/client.go | 9 ++++++---
5 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/pkg/connector/account.go b/pkg/connector/account.go
index 00f89587..c89c5f0b 100644
--- a/pkg/connector/account.go
+++ b/pkg/connector/account.go
@@ -125,7 +125,7 @@ func (a *accountBuilder) Grants(ctx context.Context, resource *v2.Resource, pTok
// rule set contains role and its principals, each one with resource type and resource id seperated by "/"
if strings.Contains(ruleSet.Role, MarketplaceAdminRole) {
for _, p := range ruleSet.Principals {
- resourceId, err := prepareResourceID(ctx, a.client, p)
+ resourceId, err := prepareResourceId(ctx, a.client, "", p)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to prepare resource id for principal %s: %w", p, err)
}
diff --git a/pkg/connector/groups.go b/pkg/connector/groups.go
index f6b2c14d..57c35b91 100644
--- a/pkg/connector/groups.go
+++ b/pkg/connector/groups.go
@@ -233,7 +233,7 @@ func (g *groupBuilder) Grants(ctx context.Context, resource *v2.Resource, pToken
for _, ruleSet := range ruleSets {
for _, p := range ruleSet.Principals {
- resourceId, err := prepareResourceID(ctx, g.client, p)
+ resourceId, err := prepareResourceId(ctx, g.client, workspaceId, p)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to prepare resource id for principal %s: %w", p, err)
}
diff --git a/pkg/connector/helpers.go b/pkg/connector/helpers.go
index 7e80bb96..8b676977 100644
--- a/pkg/connector/helpers.go
+++ b/pkg/connector/helpers.go
@@ -62,9 +62,9 @@ func annotationsForUserResourceType() annotations.Annotations {
return annos
}
-// prepareResourceID prepares a resource ID for a user, group, or service principal.
+// prepareResourceId prepares a resource ID for a user, group, or service principal.
// It's used when we need to parse results from listing rule sets.
-func prepareResourceID(ctx context.Context, c *databricks.Client, principal string) (*v2.ResourceId, error) {
+func prepareResourceId(ctx context.Context, c *databricks.Client, workspaceId string, principal string) (*v2.ResourceId, error) {
pp := strings.Split(principal, "/")
if len(pp) != 2 {
return nil, fmt.Errorf("invalid principal format: %s", principal)
@@ -77,21 +77,21 @@ func prepareResourceID(ctx context.Context, c *databricks.Client, principal stri
switch principalType {
case UsersType:
- userID, _, err := c.FindUserID(ctx, principal)
+ userID, _, err := c.FindUserID(ctx, workspaceId, principal)
if err != nil {
return nil, fmt.Errorf("failed to find user %s: %w", principal, err)
}
resourceId = &v2.ResourceId{ResourceType: userResourceType.Id, Resource: userID}
case GroupsType:
- groupID, _, err := c.FindGroupID(ctx, principal)
+ groupID, _, err := c.FindGroupID(ctx, workspaceId, principal)
if err != nil {
return nil, fmt.Errorf("failed to find group %s: %w", principal, err)
}
resourceId = &v2.ResourceId{ResourceType: groupResourceType.Id, Resource: groupID}
case ServicePrincipalsType:
- servicePrincipalID, _, err := c.FindServicePrincipalID(ctx, principal)
+ servicePrincipalID, _, err := c.FindServicePrincipalID(ctx, workspaceId, principal)
if err != nil {
return nil, fmt.Errorf("failed to find service principal %s: %w", principal, err)
}
diff --git a/pkg/connector/service-principals.go b/pkg/connector/service-principals.go
index 54b20bc3..30522b80 100644
--- a/pkg/connector/service-principals.go
+++ b/pkg/connector/service-principals.go
@@ -182,7 +182,7 @@ func (s *servicePrincipalBuilder) Grants(ctx context.Context, resource *v2.Resou
var rv []*v2.Grant
for _, ruleSet := range ruleSets {
for _, p := range ruleSet.Principals {
- resourceId, err := prepareResourceID(ctx, s.client, p)
+ resourceId, err := prepareResourceId(ctx, s.client, workspaceId, p)
if err != nil {
return nil, "", nil, fmt.Errorf("databricks-connector: failed to prepare resource id for principal %s: %w", p, err)
}
diff --git a/pkg/databricks/client.go b/pkg/databricks/client.go
index 215c6f9f..fbd203bf 100644
--- a/pkg/databricks/client.go
+++ b/pkg/databricks/client.go
@@ -171,6 +171,7 @@ func (c *Client) UpdateUser(ctx context.Context, workspaceId string, user *User)
func (c *Client) FindUserID(
ctx context.Context,
+ workspaceId string,
username string,
) (
string,
@@ -179,7 +180,7 @@ func (c *Client) FindUserID(
) {
users, _, ratelimitData, err := c.ListUsers(
ctx,
- "",
+ workspaceId,
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("userName eq '%s'", username)),
)
@@ -282,6 +283,7 @@ func (c *Client) UpdateGroup(ctx context.Context, workspaceId string, group *Gro
func (c *Client) FindGroupID(
ctx context.Context,
+ workspaceId string,
displayName string,
) (
string,
@@ -290,7 +292,7 @@ func (c *Client) FindGroupID(
) {
groups, _, ratelimitData, err := c.ListGroups(
ctx,
- "",
+ workspaceId,
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("displayName eq '%s'", displayName)),
)
@@ -399,6 +401,7 @@ func (c *Client) UpdateServicePrincipal(
func (c *Client) FindServicePrincipalID(
ctx context.Context,
+ workspaceId string,
appID string,
) (
string,
@@ -407,7 +410,7 @@ func (c *Client) FindServicePrincipalID(
) {
servicePrincipals, _, ratelimitData, err := c.ListServicePrincipals(
ctx,
- "",
+ workspaceId,
&PaginationVars{Count: 1},
NewFilterVars(fmt.Sprintf("applicationId eq '%s'", appID)),
)