tyk
tyk copied to clipboard
[DX-1084] Add documentation to protobuf source code files for review
Description
- Added documentation for protobuf messages and service for review
- Task file has been updated to use a Python virtual environment.
- The PR includes the bindings regenerated
- The PR is large and has 22 files that includes the comments in the regenerated bindings. If required I can include just the protobuf files and then once reviewed include a separate PR for the bindings?
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] Refactoring or add test (improvements in base code or adds test coverage to functionality)
Checklist
- [x] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning why it's required
- [ ] I would like a code coverage CI quality gate exception and have explained why
API Changes
--- prev.txt 2024-06-25 15:54:16.129030630 +0000
+++ current.txt 2024-06-25 15:54:12.725040010 +0000
@@ -6300,12 +6300,23 @@
TYPES
type AccessDefinition struct {
- ApiName string `protobuf:"bytes,1,opt,name=api_name,json=apiName,proto3" json:"api_name,omitempty"`
- ApiId string `protobuf:"bytes,2,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"`
- Versions []string `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"`
+
+ // ApiName is the name of the API that the session request relates to.
+ ApiName string `protobuf:"bytes,1,opt,name=api_name,json=apiName,proto3" json:"api_name,omitempty"`
+ // ApiId is the ID of the API that the session request relates to.
+ ApiId string `protobuf:"bytes,2,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"`
+ // Versions is a list of allowed API versions, e.g. `"versions": [ "Default" ]`.
+ Versions []string `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"`
+ // AllowedUrls is a list of AccessSpec instances. Each instance defines a URL (endpoint)
+ // with an associated allowed list of methods. If all URLs (endpoints) are allowed then the
+ // attribute is not set.
AllowedUrls []*AccessSpec `protobuf:"bytes,4,rep,name=allowed_urls,json=allowedUrls,proto3" json:"allowed_urls,omitempty"`
// Has unexported fields.
}
+ AccessDefinition is defined as an attribute within a SessionState instance.
+ Contains the allowed versions and URLs (endpoints) for the API that the
+ session request relates to. Each URL (endpoint) specifies an associated list
+ of allowed methods. See also AccessSpec.
func (*AccessDefinition) Descriptor() ([]byte, []int)
Deprecated: Use AccessDefinition.ProtoReflect.Descriptor instead.
@@ -6327,10 +6338,16 @@
func (x *AccessDefinition) String() string
type AccessSpec struct {
- Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+
+ // Url is a URL (endpoint) belonging to the API associated with the request session.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+ // Methods is a list of allowed methods for the URL (endpoint), e.g. 'methods': [ 'GET'. 'POST', 'PUT', 'PATCH' ]
+ // The list of methods are case sensitive.
Methods []string `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`
// Has unexported fields.
}
+ AccessSpec defines an API's URL (endpoint) and associated list of allowed
+ methods.
func (*AccessSpec) Descriptor() ([]byte, []int)
Deprecated: Use AccessSpec.ProtoReflect.Descriptor instead.
@@ -6348,10 +6365,15 @@
func (x *AccessSpec) String() string
type BasicAuthData struct {
+
+ // Password is a hashed password.
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
- Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
+ // Hash is the name of the hashing algorithm used to hash the password, e.g. bcrypt, Argon2.
+ Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
// Has unexported fields.
}
+ BasicAuthData contains a hashed password and the name of the hashing
+ algorithm used.
func (*BasicAuthData) Descriptor() ([]byte, []int)
Deprecated: Use BasicAuthData.ProtoReflect.Descriptor instead.
@@ -6391,7 +6413,9 @@
PythonDispatcher for reference.
type DispatcherClient interface {
+ // Dispatch is an RPC method that accepts and returns an Object.
Dispatch(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error)
+ // DispatchEvent dispatches an event to the target language.
DispatchEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventReply, error)
}
DispatcherClient is the client API for Dispatcher service.
@@ -6402,17 +6426,22 @@
func NewDispatcherClient(cc grpc.ClientConnInterface) DispatcherClient
type DispatcherServer interface {
+ // Dispatch is an RPC method that accepts and returns an Object.
Dispatch(context.Context, *Object) (*Object, error)
+ // DispatchEvent dispatches an event to the target language.
DispatchEvent(context.Context, *Event) (*EventReply, error)
}
DispatcherServer is the server API for Dispatcher service. All
implementations should embed UnimplementedDispatcherServer for forward
- compatibility
+ compatibility.
type Event struct {
+
+ // Payload represents the JSON payload.
Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
// Has unexported fields.
}
+ Event is represented as a JSON payload.
func (*Event) Descriptor() ([]byte, []int)
Deprecated: Use Event.ProtoReflect.Descriptor instead.
@@ -6430,6 +6459,7 @@
type EventReply struct {
// Has unexported fields.
}
+ EventReply is the response for event.
func (*EventReply) Descriptor() ([]byte, []int)
Deprecated: Use EventReply.ProtoReflect.Descriptor instead.
@@ -6443,10 +6473,14 @@
func (x *EventReply) String() string
type Header struct {
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+
+ // Key represents the name of the header.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ // Values is a list of values for a given header content.
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
// Has unexported fields.
}
+ Header is a reponse header that contains multiple associated values.
func (*Header) Descriptor() ([]byte, []int)
Deprecated: Use Header.ProtoReflect.Descriptor instead.
@@ -6464,14 +6498,33 @@
func (x *Header) String() string
type HookType int32
+ HookType is an enumeration that identifies the type of plugin.
const (
- HookType_Unknown HookType = 0
- HookType_Pre HookType = 1
- HookType_Post HookType = 2
- HookType_PostKeyAuth HookType = 3
+ // Unknown is used for error checking and handling of an unrecognised hook type.
+ HookType_Unknown HookType = 0
+ // Pre is executed before request sent to upstream target and before any
+ // authentication information is extracted from the header or
+ // parameter list of the request. Applies to both keyless and protected
+ // APIs.
+ HookType_Pre HookType = 1
+ // Post is executed after authentication, validation, throttling and quota-limiting
+ // middleware has been executed, just before the request is proxied upstream. Use this
+ // to post-process a request before sending it to upstream API. This is only called
+ // when using protected APIs.
+ HookType_Post HookType = 2
+ // PostKeyAuth is executed after authentication, validation, throttling, and quota-limiting
+ // middleware has been executed, just before the request is proxied upstream. Use this
+ // to post-process a request before sending it to upstream API. This is only called
+ // when using protected APIs.
+ HookType_PostKeyAuth HookType = 3
+ // CustomKeyCheck is executed for performing customised authentication.
HookType_CustomKeyCheck HookType = 4
- HookType_Response HookType = 5
+ // Response is executed after the upstream API replies. The arguments passed to this hook include
+ // both the request and response data. Use this to modify the HTTP response before it’s
+ // sent to the client. This hook also receives the request object, the session object,
+ // the metadata and API definition associated with the request.
+ HookType_Response HookType = 5
)
func (HookType) Descriptor() protoreflect.EnumDescriptor
@@ -6487,9 +6540,14 @@
func (HookType) Type() protoreflect.EnumType
type JWTData struct {
+
+ // Secret is the shared secret.
Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
// Has unexported fields.
}
+ JWTData is added to sessions where a Tyk key (embedding a shared secret) is
+ used as the public key for signing the JWT. This message contains the shared
+ secret.
func (*JWTData) Descriptor() ([]byte, []int)
Deprecated: Use JWTData.ProtoReflect.Descriptor instead.
@@ -6505,22 +6563,39 @@
func (x *JWTData) String() string
type MiniRequestObject struct {
- Headers map[string]string `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- SetHeaders map[string]string `protobuf:"bytes,2,rep,name=set_headers,json=setHeaders,proto3" json:"set_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- DeleteHeaders []string `protobuf:"bytes,3,rep,name=delete_headers,json=deleteHeaders,proto3" json:"delete_headers,omitempty"`
- Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
- Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
- Params map[string]string `protobuf:"bytes,6,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- AddParams map[string]string `protobuf:"bytes,7,rep,name=add_params,json=addParams,proto3" json:"add_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- ExtendedParams map[string]string `protobuf:"bytes,8,rep,name=extended_params,json=extendedParams,proto3" json:"extended_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- DeleteParams []string `protobuf:"bytes,9,rep,name=delete_params,json=deleteParams,proto3" json:"delete_params,omitempty"`
- ReturnOverrides *ReturnOverrides `protobuf:"bytes,10,opt,name=return_overrides,json=returnOverrides,proto3" json:"return_overrides,omitempty"`
- Method string `protobuf:"bytes,11,opt,name=method,proto3" json:"method,omitempty"`
- RequestUri string `protobuf:"bytes,12,opt,name=request_uri,json=requestUri,proto3" json:"request_uri,omitempty"`
- Scheme string `protobuf:"bytes,13,opt,name=scheme,proto3" json:"scheme,omitempty"`
- RawBody []byte `protobuf:"bytes,14,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"`
+
+ // Headers is a read-only field for reading headers injected by previous middleware.
+ Headers map[string]string `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // SetHeaders is a map of header key values to append to the request.
+ SetHeaders map[string]string `protobuf:"bytes,2,rep,name=set_headers,json=setHeaders,proto3" json:"set_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // DeleteHeaders is a list of header names to be removed from the request.
+ DeleteHeaders []string `protobuf:"bytes,3,rep,name=delete_headers,json=deleteHeaders,proto3" json:"delete_headers,omitempty"`
+ // Body is the request body.
+ Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
+ // Url is the request URL.
+ Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
+ // Params is a read only map of request params.
+ Params map[string]string `protobuf:"bytes,6,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // AddParams is a map of parameter keys and values to add to the request.
+ AddParams map[string]string `protobuf:"bytes,7,rep,name=add_params,json=addParams,proto3" json:"add_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // ExtendedParams allows a parameter to have multiple values, currently unsupported.
+ ExtendedParams map[string]string `protobuf:"bytes,8,rep,name=extended_params,json=extendedParams,proto3" json:"extended_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // DeleteParams is a list of parameter keys to be removed from the request.
+ DeleteParams []string `protobuf:"bytes,9,rep,name=delete_params,json=deleteParams,proto3" json:"delete_params,omitempty"`
+ // ReturnOverrides override the response for the request, see ReturnOverrides.
+ ReturnOverrides *ReturnOverrides `protobuf:"bytes,10,opt,name=return_overrides,json=returnOverrides,proto3" json:"return_overrides,omitempty"`
+ // Method is the request method, eg GET, POST, etc.
+ Method string `protobuf:"bytes,11,opt,name=method,proto3" json:"method,omitempty"`
+ // RequestUri is the raw unprocessed request URL, including query string and fragments.
+ RequestUri string `protobuf:"bytes,12,opt,name=request_uri,json=requestUri,proto3" json:"request_uri,omitempty"`
+ // Scheme is the URL scheme, e.g. http or https.
+ Scheme string `protobuf:"bytes,13,opt,name=scheme,proto3" json:"scheme,omitempty"`
+ // RawBody is the raw request body.
+ RawBody []byte `protobuf:"bytes,14,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"`
// Has unexported fields.
}
+ MiniRequestObject is used for middleware calls and contains important fields
+ like headers, parameters, body and URL.
func (*MiniRequestObject) Descriptor() ([]byte, []int)
Deprecated: Use MiniRequestObject.ProtoReflect.Descriptor instead.
@@ -6562,9 +6637,14 @@
func (x *MiniRequestObject) String() string
type Monitor struct {
+
+ // TriggerLimits is a list of quota percentage limits, defined in descending order.
TriggerLimits []float64 `protobuf:"fixed64,1,rep,packed,name=trigger_limits,json=triggerLimits,proto3" json:"trigger_limits,omitempty"`
// Has unexported fields.
}
+ Monitor allows API endpoint users, stakeholders or an organisation to be
+ notified by webhook when certain quota limits have been reached for their
+ session token.
func (*Monitor) Descriptor() ([]byte, []int)
Deprecated: Use Monitor.ProtoReflect.Descriptor instead.
@@ -6580,15 +6660,28 @@
func (x *Monitor) String() string
type Object struct {
- HookType HookType `protobuf:"varint,1,opt,name=hook_type,json=hookType,proto3,enum=coprocess.HookType" json:"hook_type,omitempty"`
- HookName string `protobuf:"bytes,2,opt,name=hook_name,json=hookName,proto3" json:"hook_name,omitempty"`
- Request *MiniRequestObject `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
- Session *SessionState `protobuf:"bytes,4,opt,name=session,proto3" json:"session,omitempty"`
- Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Spec map[string]string `protobuf:"bytes,6,rep,name=spec,proto3" json:"spec,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Response *ResponseObject `protobuf:"bytes,7,opt,name=response,proto3" json:"response,omitempty"`
- // Has unexported fields.
-}
+
+ // HookType is an enumeration that identifies the plugin hook type.
+ HookType HookType `protobuf:"varint,1,opt,name=hook_type,json=hookType,proto3,enum=coprocess.HookType" json:"hook_type,omitempty"`
+ // HookName is the plugin name.
+ HookName string `protobuf:"bytes,2,opt,name=hook_name,json=hookName,proto3" json:"hook_name,omitempty"`
+ // Request relates to the main request data structure used by rich plugins. It’s used for middleware calls
+ // and contains important fields like headers, parameters, body and URL.
+ Request *MiniRequestObject `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
+ // Session stores information about the current key/user that’s used for authentication.
+ Session *SessionState `protobuf:"bytes,4,opt,name=session,proto3" json:"session,omitempty"`
+ // Metadata is a dynamic filed that contains the metadata.
+ Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Spec contains information about API definition, including APIID, OrgID and config_data.
+ Spec map[string]string `protobuf:"bytes,6,rep,name=spec,proto3" json:"spec,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Response relates to the ResponseObject used by response hooks. The fields are populated with the upstream HTTP
+ // response data. All the field contents can be modified.
+ Response *ResponseObject `protobuf:"bytes,7,opt,name=response,proto3" json:"response,omitempty"`
+ // Has unexported fields.
+}
+ Object wraps a MiniRequestObject and contains additional fields that are
+ useful for users that implement their own request dispatchers, like the
+ middleware hook type and name.
func (*Object) Descriptor() ([]byte, []int)
Deprecated: Use Object.ProtoReflect.Descriptor instead.
@@ -6616,13 +6709,20 @@
func (x *Object) String() string
type ResponseObject struct {
- StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
- RawBody []byte `protobuf:"bytes,2,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"`
- Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
- Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MultivalueHeaders []*Header `protobuf:"bytes,5,rep,name=multivalue_headers,json=multivalueHeaders,proto3" json:"multivalue_headers,omitempty"`
+
+ // StatusCode is the HTTP status code received from the upstream.
+ StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
+ // RawBody represents the raw bytes of HTTP response body.
+ RawBody []byte `protobuf:"bytes,2,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"`
+ // Body represents the HTTP response body. Excluded when the raw_body contains invalid UTF-8 characters.
+ Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
+ // Headers represents the headers received from upstream.
+ Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // MultivalueHeaders is a list of headers. Useful when header has multiple values. See Header.
+ MultivalueHeaders []*Header `protobuf:"bytes,5,rep,name=multivalue_headers,json=multivalueHeaders,proto3" json:"multivalue_headers,omitempty"`
// Has unexported fields.
}
+ ResponseObject is used by response hooks. All fields are modifiable.
func (*ResponseObject) Descriptor() ([]byte, []int)
Deprecated: Use ResponseObject.ProtoReflect.Descriptor instead.
@@ -6646,13 +6746,22 @@
func (x *ResponseObject) String() string
type ReturnOverrides struct {
- ResponseCode int32 `protobuf:"varint,1,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"`
- ResponseError string `protobuf:"bytes,2,opt,name=response_error,json=responseError,proto3" json:"response_error,omitempty"`
- Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- OverrideError bool `protobuf:"varint,4,opt,name=override_error,json=overrideError,proto3" json:"override_error,omitempty"`
- ResponseBody string `protobuf:"bytes,5,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
+
+ // ResponseCode overrides the upstream response status code.
+ ResponseCode int32 `protobuf:"varint,1,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"`
+ // ResponseError overrides the upstream response error message.
+ ResponseError string `protobuf:"bytes,2,opt,name=response_error,json=responseError,proto3" json:"response_error,omitempty"`
+ // Headers overrides the upstream response headers.
+ Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // OverrideError overrides the upstream error response with response_error when set to true.
+ OverrideError bool `protobuf:"varint,4,opt,name=override_error,json=overrideError,proto3" json:"override_error,omitempty"`
+ // ResponseBody is an alias of response_error that contains the response body.
+ ResponseBody string `protobuf:"bytes,5,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
// Has unexported fields.
}
+ ReturnOverrides is used to override the response for a given HTTP request
+ When returned within an Object for a given HTTP request, the upstream
+ reponse is replaced with the fields encapsulated within ReturnOverrides.
func (*ReturnOverrides) Descriptor() ([]byte, []int)
Deprecated: Use ReturnOverrides.ProtoReflect.Descriptor instead.
@@ -6676,39 +6785,98 @@
func (x *ReturnOverrides) String() string
type SessionState struct {
- LastCheck int64 `protobuf:"varint,1,opt,name=last_check,json=lastCheck,proto3" json:"last_check,omitempty"`
- Allowance float64 `protobuf:"fixed64,2,opt,name=allowance,proto3" json:"allowance,omitempty"`
- Rate float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"`
- Per float64 `protobuf:"fixed64,4,opt,name=per,proto3" json:"per,omitempty"`
- Expires int64 `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"`
- QuotaMax int64 `protobuf:"varint,6,opt,name=quota_max,json=quotaMax,proto3" json:"quota_max,omitempty"`
- QuotaRenews int64 `protobuf:"varint,7,opt,name=quota_renews,json=quotaRenews,proto3" json:"quota_renews,omitempty"`
- QuotaRemaining int64 `protobuf:"varint,8,opt,name=quota_remaining,json=quotaRemaining,proto3" json:"quota_remaining,omitempty"`
- QuotaRenewalRate int64 `protobuf:"varint,9,opt,name=quota_renewal_rate,json=quotaRenewalRate,proto3" json:"quota_renewal_rate,omitempty"`
- AccessRights map[string]*AccessDefinition `protobuf:"bytes,10,rep,name=access_rights,json=accessRights,proto3" json:"access_rights,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- OrgId string `protobuf:"bytes,11,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
- OauthClientId string `protobuf:"bytes,12,opt,name=oauth_client_id,json=oauthClientId,proto3" json:"oauth_client_id,omitempty"`
- OauthKeys map[string]string `protobuf:"bytes,13,rep,name=oauth_keys,json=oauthKeys,proto3" json:"oauth_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- BasicAuthData *BasicAuthData `protobuf:"bytes,14,opt,name=basic_auth_data,json=basicAuthData,proto3" json:"basic_auth_data,omitempty"`
- JwtData *JWTData `protobuf:"bytes,15,opt,name=jwt_data,json=jwtData,proto3" json:"jwt_data,omitempty"`
- HmacEnabled bool `protobuf:"varint,16,opt,name=hmac_enabled,json=hmacEnabled,proto3" json:"hmac_enabled,omitempty"`
- HmacSecret string `protobuf:"bytes,17,opt,name=hmac_secret,json=hmacSecret,proto3" json:"hmac_secret,omitempty"`
- IsInactive bool `protobuf:"varint,18,opt,name=is_inactive,json=isInactive,proto3" json:"is_inactive,omitempty"`
- ApplyPolicyId string `protobuf:"bytes,19,opt,name=apply_policy_id,json=applyPolicyId,proto3" json:"apply_policy_id,omitempty"`
- DataExpires int64 `protobuf:"varint,20,opt,name=data_expires,json=dataExpires,proto3" json:"data_expires,omitempty"`
- Monitor *Monitor `protobuf:"bytes,21,opt,name=monitor,proto3" json:"monitor,omitempty"`
- EnableDetailedRecording bool `protobuf:"varint,22,opt,name=enable_detailed_recording,json=enableDetailedRecording,proto3" json:"enable_detailed_recording,omitempty"`
- Metadata map[string]string `protobuf:"bytes,23,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Tags []string `protobuf:"bytes,24,rep,name=tags,proto3" json:"tags,omitempty"`
- Alias string `protobuf:"bytes,25,opt,name=alias,proto3" json:"alias,omitempty"`
- LastUpdated string `protobuf:"bytes,26,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
- IdExtractorDeadline int64 `protobuf:"varint,27,opt,name=id_extractor_deadline,json=idExtractorDeadline,proto3" json:"id_extractor_deadline,omitempty"`
- SessionLifetime int64 `protobuf:"varint,28,opt,name=session_lifetime,json=sessionLifetime,proto3" json:"session_lifetime,omitempty"`
- ApplyPolicies []string `protobuf:"bytes,29,rep,name=apply_policies,json=applyPolicies,proto3" json:"apply_policies,omitempty"`
- Certificate string `protobuf:"bytes,30,opt,name=certificate,proto3" json:"certificate,omitempty"`
- MaxQueryDepth int64 `protobuf:"varint,31,opt,name=max_query_depth,json=maxQueryDepth,proto3" json:"max_query_depth,omitempty"`
- // Has unexported fields.
-}
+
+ // LastCheck is deprecated.
+ LastCheck int64 `protobuf:"varint,1,opt,name=last_check,json=lastCheck,proto3" json:"last_check,omitempty"`
+ // Allowance is deprecated, replaced by rate.
+ Allowance float64 `protobuf:"fixed64,2,opt,name=allowance,proto3" json:"allowance,omitempty"`
+ // Rate is the number of requests that are allowed in the specified rate limiting window.
+ Rate float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"`
+ // Per is the duration of the rate window, in seconds.
+ Per float64 `protobuf:"fixed64,4,opt,name=per,proto3" json:"per,omitempty"`
+ // Expires is an epoch that defines when the key should expire.
+ Expires int64 `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"`
+ // QuotaMax is the maximum number of requests allowed during the quota period.
+ QuotaMax int64 `protobuf:"varint,6,opt,name=quota_max,json=quotaMax,proto3" json:"quota_max,omitempty"`
+ // QuotaRenews is an epoch that defines when the quota renews.
+ QuotaRenews int64 `protobuf:"varint,7,opt,name=quota_renews,json=quotaRenews,proto3" json:"quota_renews,omitempty"`
+ // QuotaRemaining is the number of requests remaining for this user’s quota (unrelated to rate
+ // limit).
+ QuotaRemaining int64 `protobuf:"varint,8,opt,name=quota_remaining,json=quotaRemaining,proto3" json:"quota_remaining,omitempty"`
+ // QuotaRenewalRate is the time in seconds during which the quota is valid.
+ // So for 1000 requests per hour, this value would be 3600 while quota_max and
+ // quota_remaining would be 1000.
+ QuotaRenewalRate int64 `protobuf:"varint,9,opt,name=quota_renewal_rate,json=quotaRenewalRate,proto3" json:"quota_renewal_rate,omitempty"`
+ // AccessRights maps the session's API ID to an AccessDefinition. The AccessDefinition defines the access rights for the API in terms
+ // of allowed: versions and URLs(endpoints). Each URL (endpoint) has a list of allowed methods.
+ AccessRights map[string]*AccessDefinition `protobuf:"bytes,10,rep,name=access_rights,json=accessRights,proto3" json:"access_rights,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // OrgId represents the organisation the session user belongs to. This can be used in conjunction with the org_id
+ // setting in the API Definition object to have tokens owned by organisations.
+ OrgId string `protobuf:"bytes,11,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
+ // OauthClientId is the OAuth client ID that is set if the token is generated by an OAuth client during an
+ // OAuth authorisation flow.
+ OauthClientId string `protobuf:"bytes,12,opt,name=oauth_client_id,json=oauthClientId,proto3" json:"oauth_client_id,omitempty"`
+ // OauthKeys maps an OAuth client ID with a corresponding access token value. Currently unsupported and under development.
+ OauthKeys map[string]string `protobuf:"bytes,13,rep,name=oauth_keys,json=oauthKeys,proto3" json:"oauth_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // BasicAuthData contains a hashed password and the name of the hashing algorithm used.
+ BasicAuthData *BasicAuthData `protobuf:"bytes,14,opt,name=basic_auth_data,json=basicAuthData,proto3" json:"basic_auth_data,omitempty"`
+ // JwtData is added to sessions where a Tyk key (embedding a shared secret) is used as the public key
+ // for signing the JWT. The JWT token's KID header value references the ID of a Tyk key.
+ JwtData *JWTData `protobuf:"bytes,15,opt,name=jwt_data,json=jwtData,proto3" json:"jwt_data,omitempty"`
+ // HmacEnabled is set to `true` to indicate generation of a HMAC signature using the secret provided in `hmac_secret`.
+ // If the generated signature matches the signature provided in the Authorizaton header then authentication of
+ // the request has passed.
+ HmacEnabled bool `protobuf:"varint,16,opt,name=hmac_enabled,json=hmacEnabled,proto3" json:"hmac_enabled,omitempty"`
+ // HmacSecret represents the HMAC secret.
+ HmacSecret string `protobuf:"bytes,17,opt,name=hmac_secret,json=hmacSecret,proto3" json:"hmac_secret,omitempty"`
+ // IsInactive when set to true, indicates that access is denied.
+ IsInactive bool `protobuf:"varint,18,opt,name=is_inactive,json=isInactive,proto3" json:"is_inactive,omitempty"`
+ // ApplyPolicyId represents the policy ID that is bound to the token. Deprecated use apply_policies instead.
+ ApplyPolicyId string `protobuf:"bytes,19,opt,name=apply_policy_id,json=applyPolicyId,proto3" json:"apply_policy_id,omitempty"`
+ // DataExpires is a value, in seconds, that defines when data generated by the session token expires in
+ // the analytics DB (must be using Pro edition and MongoDB).
+ DataExpires int64 `protobuf:"varint,20,opt,name=data_expires,json=dataExpires,proto3" json:"data_expires,omitempty"`
+ // Monitor represents the quota monitor settings, currently unsupported in gRPC sessions.
+ Monitor *Monitor `protobuf:"bytes,21,opt,name=monitor,proto3" json:"monitor,omitempty"`
+ // EnableDetailedRecording should be set to true to have Tyk store the inbound request and outbound
+ // response data in HTTP Wire format as part of the analytics data.
+ EnableDetailedRecording bool `protobuf:"varint,22,opt,name=enable_detailed_recording,json=enableDetailedRecording,proto3" json:"enable_detailed_recording,omitempty"`
+ // Metadata represents meta-data to be included as part of the session that can be used in other
+ // middleware such as transforms and header injection to embed user-specific
+ // data into a request, or alternatively to query the providence of a key.
+ Metadata map[string]string `protobuf:"bytes,23,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Tags is a list of tags to embed into analytics data when the request completes. If a policy
+ // has tags, those tags take precedence and are used instead.
+ Tags []string `protobuf:"bytes,24,rep,name=tags,proto3" json:"tags,omitempty"`
+ // Alias is an identifier for the token for use in analytics, to allow easier tracing of hashed
+ // and unhashed tokens.
+ Alias string `protobuf:"bytes,25,opt,name=alias,proto3" json:"alias,omitempty"`
+ // LastUpdated is a timestamp that represents the time the session was last updated.
+ // With *PostAuth* hooks this is a UNIX timestamp.
+ LastUpdated string `protobuf:"bytes,26,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
+ // IdExtractorDeadline is a UNIX timestamp that signifies when a cached key or ID will expire.
+ // This relates to custom authentication, where authenticated keys can be cached to save repeated requests
+ // to the gRPC server.
+ IdExtractorDeadline int64 `protobuf:"varint,27,opt,name=id_extractor_deadline,json=idExtractorDeadline,proto3" json:"id_extractor_deadline,omitempty"`
+ // SessionLifetime is a UNIX timestamp that denotes when the key will automatically expire.
+ // Any·subsequent API request made using the key will be rejected.
+ // Overrides the global session lifetime.
+ SessionLifetime int64 `protobuf:"varint,28,opt,name=session_lifetime,json=sessionLifetime,proto3" json:"session_lifetime,omitempty"`
+ // ApplyPolicies is a list of IDs for the policies that are bound to the token.
+ ApplyPolicies []string `protobuf:"bytes,29,rep,name=apply_policies,json=applyPolicies,proto3" json:"apply_policies,omitempty"`
+ // Certificate is the client certificate used to authenticate the request. Exists in the session instance if mTLS is configured
+ // for the API. Currently unsupported.
+ Certificate string `protobuf:"bytes,30,opt,name=certificate,proto3" json:"certificate,omitempty"`
+ // MaxQueryDepth relates to graphQL APIs. If the session key has a maximum query depth limit defined then it is included in the
+ // session instance. Currently unsupported and under development.
+ MaxQueryDepth int64 `protobuf:"varint,31,opt,name=max_query_depth,json=maxQueryDepth,proto3" json:"max_query_depth,omitempty"`
+ // Has unexported fields.
+}
+ SessionState is created for every authenticated request and stored in Redis.
+ Used to track the activity of a given key in different ways, mainly by the
+ built-in Tyk middleware such as the quota middleware or the rate limiter.
+ A GRPC plugin is able to create a SessionState object and store it in the
+ same way built-in authentication mechanisms do.
func (*SessionState) Descriptor() ([]byte, []int)
Deprecated: Use SessionState.ProtoReflect.Descriptor instead.
@@ -6784,9 +6952,12 @@
func (x *SessionState) String() string
type StringSlice struct {
+
+ // Items is a list of string items.
Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
// Has unexported fields.
}
+ StringSlice is a list of strings.
func (*StringSlice) Descriptor() ([]byte, []int)
Deprecated: Use StringSlice.ProtoReflect.Descriptor instead.
PR Description updated to latest commit (https://github.com/TykTechnologies/tyk/commit/2bd312e290f39de803faaa69cc407705f1b9696a)
:boom: CI tests failed :see_no_evil:
git-state
diff --git a/coprocess/coprocess_common.pb.go b/coprocess/coprocess_common.pb.go
index bdc0686..ccd0561 100644
--- a/coprocess/coprocess_common.pb.go
+++ b/coprocess/coprocess_common.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_mini_request_object.pb.go b/coprocess/coprocess_mini_request_object.pb.go
index 07136e3..184464b 100644
--- a/coprocess/coprocess_mini_request_object.pb.go
+++ b/coprocess/coprocess_mini_request_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_object.pb.go b/coprocess/coprocess_object.pb.go
index b3b4cd1..6fab2b8 100644
--- a/coprocess/coprocess_object.pb.go
+++ b/coprocess/coprocess_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_object_grpc.pb.go b/coprocess/coprocess_object_grpc.pb.go
index 8b48ff7..8423d03 100644
--- a/coprocess/coprocess_object_grpc.pb.go
+++ b/coprocess/coprocess_object_grpc.pb.go
@@ -8,6 +8,7 @@ package coprocess
import (
context "context"
+
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
diff --git a/coprocess/coprocess_response_object.pb.go b/coprocess/coprocess_response_object.pb.go
index 87283f3..3970c8b 100644
--- a/coprocess/coprocess_response_object.pb.go
+++ b/coprocess/coprocess_response_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_return_overrides.pb.go b/coprocess/coprocess_return_overrides.pb.go
index ddee20b..f3e8454 100644
--- a/coprocess/coprocess_return_overrides.pb.go
+++ b/coprocess/coprocess_return_overrides.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_session_state.pb.go b/coprocess/coprocess_session_state.pb.go
index b542cc3..b1cbd61 100644
--- a/coprocess/coprocess_session_state.pb.go
+++ b/coprocess/coprocess_session_state.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
Please look at the run or in the Checks tab.
PR Review
⏱️ Estimated effort to review [1-5] |
3, because the PR involves multiple files with significant changes, including updates to protobuf definitions and generated code. Understanding the implications of these changes requires a good grasp of the project's architecture and the protobuf system. |
🧪 Relevant tests |
No |
🔍 Possible issues |
Possible Bug: The removal of the |
Compatibility Issue: The upgrade of protobuf versions in the Go files might introduce compatibility issues with other parts of the system that depend on the older protobuf version. | |
🔒 Security concerns |
No |
Code feedback:
relevant file | coprocess/coprocess_session_state.pb.go |
suggestion |
Consider verifying backward compatibility of the protobuf changes. Upgrading protobuf versions can introduce changes that are not backward compatible. Ensure that these changes do not break existing implementations that depend on the older version. [important] |
relevant line | // protoc-gen-go v1.32.0 |
relevant file | coprocess/coprocess_session_state.pb.go |
suggestion |
Ensure that the removed imports ( |
relevant line | - reflect "reflect" |
relevant file | coprocess/coprocess_session_state.pb.go |
suggestion |
Add unit tests for the new fields added to the protobuf definitions to ensure they are serialized and deserialized correctly. This is crucial for maintaining data integrity and system stability. [important] |
relevant line | // The shared secret |
relevant file | coprocess/coprocess_session_state.pb.go |
suggestion |
Review the newly added comments for clarity and completeness. Some comments are quite brief and do not fully explain the purpose or usage of the associated fields. Expanding these comments would improve code readability and maintainability. [medium] |
relevant line | // The shared secret |
✨ Review tool usage guide:
Overview:
The review
tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.
The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
- When commenting, to edit configurations related to the review tool (
pr_reviewer
section), use the following template:
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
- With a configuration file, use the following template:
[pr_reviewer]
some_config1=...
some_config2=...
See the review usage page for a comprehensive guide on using this tool.
PR Code Suggestions
Category | Suggestions |
Possible issue |
Remove duplicate hook type descriptions to avoid confusion and maintain clarity in the codebase.Remove the duplicate description for coprocess/coprocess_common.pb.go [36-43]
|
Add error handling for the
| |
Best practice |
Rename
|
Enhancement |
Add a check for valid UTF-8 in
|
Improve the clarity of the comment for the
| |
Add a method to check the validity of a
| |
Simplify conditional assignments using a conditional expression.Use a conditional expression to simplify the assignment of coprocess/bindings/python/coprocess_object_pb2.py [26-27]
| |
Enhance the docstring of the
| |
Add logging before raising exceptions in
| |
Add warnings about the experimental status in the docstrings of
| |
Performance |
Implement context cancellation and timeouts for gRPC methods to enhance service reliability and performance.Add context cancellation and timeout handling for the coprocess/coprocess_object_grpc.pb.go [31-33]
|
Maintainability |
Rename
|
Remove deprecated fields from the
| |
Refactor
| |
Encapsulate descriptor option updates in a function to ensure integrity.Replace the direct manipulation of coprocess/bindings/python/coprocess_common_pb2.py [22-24]
| |
Use a helper function to apply serialized options to descriptors.Instead of manually setting serialized options for each descriptor, create a helper coprocess/bindings/python/coprocess_object_pb2.py [29-32]
| |
Refactor serialized bounds setting into a separate function.Refactor the setting of serialized starts and ends for descriptors to a separate function coprocess/bindings/python/coprocess_object_pb2.py [33-38]
| |
Refine the repeated docstring across multiple classes to be more specific and avoid redundancy.The repeated docstring phrase "The service interface that must be implemented by the coprocess/bindings/python/coprocess_object_pb2_grpc.py [9-10]
| |
Refactor the RPC method initialization in the
| |
Security |
Add validation for the
|
✨ Improve tool usage guide:
Overview:
The improve
tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
- When commenting, to edit configurations related to the improve tool (
pr_code_suggestions
section), use the following template:
/improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
- With a configuration file, use the following template:
[pr_code_suggestions]
some_config1=...
some_config2=...
See the improve usage page for a comprehensive guide on using this tool.
@dcs3spp CI is failing on this, also a lot to review. Can you follow godoc style comments in proto files, as discussed previously?
:boom: CI tests failed :see_no_evil:
git-state
diff --git a/coprocess/coprocess_common.pb.go b/coprocess/coprocess_common.pb.go
index bdc0686..ccd0561 100644
--- a/coprocess/coprocess_common.pb.go
+++ b/coprocess/coprocess_common.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_mini_request_object.pb.go b/coprocess/coprocess_mini_request_object.pb.go
index 07136e3..184464b 100644
--- a/coprocess/coprocess_mini_request_object.pb.go
+++ b/coprocess/coprocess_mini_request_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_object.pb.go b/coprocess/coprocess_object.pb.go
index b3b4cd1..6fab2b8 100644
--- a/coprocess/coprocess_object.pb.go
+++ b/coprocess/coprocess_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_object_grpc.pb.go b/coprocess/coprocess_object_grpc.pb.go
index 8b48ff7..8423d03 100644
--- a/coprocess/coprocess_object_grpc.pb.go
+++ b/coprocess/coprocess_object_grpc.pb.go
@@ -8,6 +8,7 @@ package coprocess
import (
context "context"
+
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
diff --git a/coprocess/coprocess_response_object.pb.go b/coprocess/coprocess_response_object.pb.go
index 87283f3..3970c8b 100644
--- a/coprocess/coprocess_response_object.pb.go
+++ b/coprocess/coprocess_response_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_return_overrides.pb.go b/coprocess/coprocess_return_overrides.pb.go
index ddee20b..f3e8454 100644
--- a/coprocess/coprocess_return_overrides.pb.go
+++ b/coprocess/coprocess_return_overrides.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_session_state.pb.go b/coprocess/coprocess_session_state.pb.go
index b542cc3..b1cbd61 100644
--- a/coprocess/coprocess_session_state.pb.go
+++ b/coprocess/coprocess_session_state.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
Please look at the run or in the Checks tab.
@titpetric I have updated comment style and fixed previous CI linting error. There is an error relating to Sonar Cloud?
:boom: CI tests failed :see_no_evil:
git-state
diff --git a/coprocess/coprocess_common.pb.go b/coprocess/coprocess_common.pb.go
index 53ab3e8..6f82029 100644
--- a/coprocess/coprocess_common.pb.go
+++ b/coprocess/coprocess_common.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_mini_request_object.pb.go b/coprocess/coprocess_mini_request_object.pb.go
index 85f6f66..9bc0ca2 100644
--- a/coprocess/coprocess_mini_request_object.pb.go
+++ b/coprocess/coprocess_mini_request_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_object.pb.go b/coprocess/coprocess_object.pb.go
index 88fd8bf..9efbf14 100644
--- a/coprocess/coprocess_object.pb.go
+++ b/coprocess/coprocess_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_object_grpc.pb.go b/coprocess/coprocess_object_grpc.pb.go
index e6ed11a..7508908 100644
--- a/coprocess/coprocess_object_grpc.pb.go
+++ b/coprocess/coprocess_object_grpc.pb.go
@@ -8,6 +8,7 @@ package coprocess
import (
context "context"
+
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
diff --git a/coprocess/coprocess_response_object.pb.go b/coprocess/coprocess_response_object.pb.go
index 40347aa..e7a7772 100644
--- a/coprocess/coprocess_response_object.pb.go
+++ b/coprocess/coprocess_response_object.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_return_overrides.pb.go b/coprocess/coprocess_return_overrides.pb.go
index 8bbe4a4..226c18d 100644
--- a/coprocess/coprocess_return_overrides.pb.go
+++ b/coprocess/coprocess_return_overrides.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
diff --git a/coprocess/coprocess_session_state.pb.go b/coprocess/coprocess_session_state.pb.go
index b995595..25848eb 100644
--- a/coprocess/coprocess_session_state.pb.go
+++ b/coprocess/coprocess_session_state.pb.go
@@ -7,10 +7,11 @@
package coprocess
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
Please look at the run or in the Checks tab.
@titpetric I have updated comments in protobuf files for godoc style and ran schema-gen extract && schema-gen lint
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
/release to release-5.3
Working on it! Note that it can take a few minutes.
@titpetric Seems like there is conflict and it require manual merge.
Ok, I'll be copying the changes to release-5.3. This is done because it being a common documentation requirement (updating LTS docs). This PR doesn't represent a functional change, so we can still apply it. I'll link this PR from there.