mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 18:06:34 +02:00
core/proto: update protoc dependencies (#5218)
* core/proto: update protoc dependencies * cleanup * disable unimplemented forward compatibility check * fix mock * add generate make command * add .0
This commit is contained in:
parent
3483447c37
commit
0cfb1025db
28 changed files with 1427 additions and 1832 deletions
5
Makefile
5
Makefile
|
@ -65,6 +65,11 @@ proto:
|
||||||
@echo "==> $@"
|
@echo "==> $@"
|
||||||
cd pkg/grpc && ./protoc.bash
|
cd pkg/grpc && ./protoc.bash
|
||||||
|
|
||||||
|
.PHONY: generate
|
||||||
|
generate: proto
|
||||||
|
@echo "==> $@"
|
||||||
|
$(GO) generate ./...
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: build-ui build-go
|
build: build-ui build-go
|
||||||
@echo "==> $@"
|
@echo "==> $@"
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module github.com/pomerium/pomerium
|
module github.com/pomerium/pomerium
|
||||||
|
|
||||||
go 1.23
|
go 1.23.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go/storage v1.43.0
|
cloud.google.com/go/storage v1.43.0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: audit.proto
|
// source: audit.proto
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ func file_audit_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_audit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_audit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_audit_proto_goTypes = []interface{}{
|
var file_audit_proto_goTypes = []any{
|
||||||
(*Record)(nil), // 0: pomerium.audit.Record
|
(*Record)(nil), // 0: pomerium.audit.Record
|
||||||
(*v3.CheckRequest)(nil), // 1: envoy.service.auth.v3.CheckRequest
|
(*v3.CheckRequest)(nil), // 1: envoy.service.auth.v3.CheckRequest
|
||||||
(*v3.CheckResponse)(nil), // 2: envoy.service.auth.v3.CheckResponse
|
(*v3.CheckResponse)(nil), // 2: envoy.service.auth.v3.CheckResponse
|
||||||
|
@ -132,7 +132,7 @@ func file_audit_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_audit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_audit_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Record); i {
|
switch v := v.(*Record); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: api.proto
|
// source: api.proto
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
|
||||||
grpc "google.golang.org/grpc"
|
|
||||||
codes "google.golang.org/grpc/codes"
|
|
||||||
status "google.golang.org/grpc/status"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
@ -1203,7 +1199,7 @@ func file_api_proto_rawDescGZIP() []byte {
|
||||||
|
|
||||||
var file_api_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_api_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
|
var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
|
||||||
var file_api_proto_goTypes = []interface{}{
|
var file_api_proto_goTypes = []any{
|
||||||
(ExportRequest_Format)(0), // 0: pomerium.cli.ExportRequest.Format
|
(ExportRequest_Format)(0), // 0: pomerium.cli.ExportRequest.Format
|
||||||
(ConnectionStatusUpdates_ConnectionStatus)(0), // 1: pomerium.cli.ConnectionStatusUpdates.ConnectionStatus
|
(ConnectionStatusUpdates_ConnectionStatus)(0), // 1: pomerium.cli.ConnectionStatusUpdates.ConnectionStatus
|
||||||
(*Record)(nil), // 2: pomerium.cli.Record
|
(*Record)(nil), // 2: pomerium.cli.Record
|
||||||
|
@ -1261,7 +1257,7 @@ func file_api_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Record); i {
|
switch v := v.(*Record); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1273,7 +1269,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Selector); i {
|
switch v := v.(*Selector); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1285,7 +1281,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ListRecordsResponse); i {
|
switch v := v.(*ListRecordsResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1297,7 +1293,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*DeleteRecordsResponse); i {
|
switch v := v.(*DeleteRecordsResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1309,7 +1305,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ExportRequest); i {
|
switch v := v.(*ExportRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1321,7 +1317,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ConfigData); i {
|
switch v := v.(*ConfigData); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1333,7 +1329,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ImportRequest); i {
|
switch v := v.(*ImportRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1345,7 +1341,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ImportResponse); i {
|
switch v := v.(*ImportResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1357,7 +1353,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ListenerUpdateRequest); i {
|
switch v := v.(*ListenerUpdateRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1369,7 +1365,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ListenerStatus); i {
|
switch v := v.(*ListenerStatus); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1381,7 +1377,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*StatusUpdatesRequest); i {
|
switch v := v.(*StatusUpdatesRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1393,7 +1389,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ConnectionStatusUpdates); i {
|
switch v := v.(*ConnectionStatusUpdates); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1405,7 +1401,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Connection); i {
|
switch v := v.(*Connection); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1417,7 +1413,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Selector_IdFilter); i {
|
switch v := v.(*Selector_IdFilter); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1429,7 +1425,7 @@ func file_api_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
file_api_proto_msgTypes[14].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Selector_TagFilter); i {
|
switch v := v.(*Selector_TagFilter); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1442,15 +1438,15 @@ func file_api_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
file_api_proto_msgTypes[0].OneofWrappers = []any{}
|
||||||
file_api_proto_msgTypes[1].OneofWrappers = []interface{}{
|
file_api_proto_msgTypes[1].OneofWrappers = []any{
|
||||||
(*Selector_All)(nil),
|
(*Selector_All)(nil),
|
||||||
(*Selector_Tag)(nil),
|
(*Selector_Tag)(nil),
|
||||||
(*Selector_IdFilter_)(nil),
|
(*Selector_IdFilter_)(nil),
|
||||||
}
|
}
|
||||||
file_api_proto_msgTypes[6].OneofWrappers = []interface{}{}
|
file_api_proto_msgTypes[6].OneofWrappers = []any{}
|
||||||
file_api_proto_msgTypes[11].OneofWrappers = []interface{}{}
|
file_api_proto_msgTypes[11].OneofWrappers = []any{}
|
||||||
file_api_proto_msgTypes[12].OneofWrappers = []interface{}{
|
file_api_proto_msgTypes[12].OneofWrappers = []any{
|
||||||
(*Connection_DisableTlsVerification)(nil),
|
(*Connection_DisableTlsVerification)(nil),
|
||||||
(*Connection_CaCert)(nil),
|
(*Connection_CaCert)(nil),
|
||||||
}
|
}
|
||||||
|
@ -1474,371 +1470,3 @@ func file_api_proto_init() {
|
||||||
file_api_proto_goTypes = nil
|
file_api_proto_goTypes = nil
|
||||||
file_api_proto_depIdxs = nil
|
file_api_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
|
||||||
var _ context.Context
|
|
||||||
var _ grpc.ClientConnInterface
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
const _ = grpc.SupportPackageIsVersion6
|
|
||||||
|
|
||||||
// ConfigClient is the client API for Config service.
|
|
||||||
//
|
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
||||||
type ConfigClient interface {
|
|
||||||
List(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*ListRecordsResponse, error)
|
|
||||||
Delete(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*DeleteRecordsResponse, error)
|
|
||||||
Upsert(ctx context.Context, in *Record, opts ...grpc.CallOption) (*Record, error)
|
|
||||||
Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ConfigData, error)
|
|
||||||
Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type configClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient {
|
|
||||||
return &configClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configClient) List(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*ListRecordsResponse, error) {
|
|
||||||
out := new(ListRecordsResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/pomerium.cli.Config/List", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configClient) Delete(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*DeleteRecordsResponse, error) {
|
|
||||||
out := new(DeleteRecordsResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/pomerium.cli.Config/Delete", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configClient) Upsert(ctx context.Context, in *Record, opts ...grpc.CallOption) (*Record, error) {
|
|
||||||
out := new(Record)
|
|
||||||
err := c.cc.Invoke(ctx, "/pomerium.cli.Config/Upsert", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ConfigData, error) {
|
|
||||||
out := new(ConfigData)
|
|
||||||
err := c.cc.Invoke(ctx, "/pomerium.cli.Config/Export", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configClient) Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) {
|
|
||||||
out := new(ImportResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/pomerium.cli.Config/Import", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ConfigServer is the server API for Config service.
|
|
||||||
type ConfigServer interface {
|
|
||||||
List(context.Context, *Selector) (*ListRecordsResponse, error)
|
|
||||||
Delete(context.Context, *Selector) (*DeleteRecordsResponse, error)
|
|
||||||
Upsert(context.Context, *Record) (*Record, error)
|
|
||||||
Export(context.Context, *ExportRequest) (*ConfigData, error)
|
|
||||||
Import(context.Context, *ImportRequest) (*ImportResponse, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedConfigServer can be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedConfigServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*UnimplementedConfigServer) List(context.Context, *Selector) (*ListRecordsResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedConfigServer) Delete(context.Context, *Selector) (*DeleteRecordsResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedConfigServer) Upsert(context.Context, *Record) (*Record, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Upsert not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedConfigServer) Export(context.Context, *ExportRequest) (*ConfigData, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Export not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedConfigServer) Import(context.Context, *ImportRequest) (*ImportResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Import not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterConfigServer(s *grpc.Server, srv ConfigServer) {
|
|
||||||
s.RegisterService(&_Config_serviceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Config_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(Selector)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ConfigServer).List(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/pomerium.cli.Config/List",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ConfigServer).List(ctx, req.(*Selector))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Config_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(Selector)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ConfigServer).Delete(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/pomerium.cli.Config/Delete",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ConfigServer).Delete(ctx, req.(*Selector))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Config_Upsert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(Record)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ConfigServer).Upsert(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/pomerium.cli.Config/Upsert",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ConfigServer).Upsert(ctx, req.(*Record))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Config_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ExportRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ConfigServer).Export(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/pomerium.cli.Config/Export",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ConfigServer).Export(ctx, req.(*ExportRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Config_Import_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ImportRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ConfigServer).Import(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/pomerium.cli.Config/Import",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ConfigServer).Import(ctx, req.(*ImportRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
var _Config_serviceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "pomerium.cli.Config",
|
|
||||||
HandlerType: (*ConfigServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "List",
|
|
||||||
Handler: _Config_List_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Delete",
|
|
||||||
Handler: _Config_Delete_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Upsert",
|
|
||||||
Handler: _Config_Upsert_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Export",
|
|
||||||
Handler: _Config_Export_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Import",
|
|
||||||
Handler: _Config_Import_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{},
|
|
||||||
Metadata: "api.proto",
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListenerClient is the client API for Listener service.
|
|
||||||
//
|
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
||||||
type ListenerClient interface {
|
|
||||||
// Listen starts connection listener
|
|
||||||
Update(ctx context.Context, in *ListenerUpdateRequest, opts ...grpc.CallOption) (*ListenerStatus, error)
|
|
||||||
// StatusUpdates opens a stream to listen to connection status updates
|
|
||||||
// a client has to subscribe and continuously
|
|
||||||
// listen to the broadcasted updates
|
|
||||||
StatusUpdates(ctx context.Context, in *Selector, opts ...grpc.CallOption) (Listener_StatusUpdatesClient, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type listenerClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewListenerClient(cc grpc.ClientConnInterface) ListenerClient {
|
|
||||||
return &listenerClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *listenerClient) Update(ctx context.Context, in *ListenerUpdateRequest, opts ...grpc.CallOption) (*ListenerStatus, error) {
|
|
||||||
out := new(ListenerStatus)
|
|
||||||
err := c.cc.Invoke(ctx, "/pomerium.cli.Listener/Update", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *listenerClient) StatusUpdates(ctx context.Context, in *Selector, opts ...grpc.CallOption) (Listener_StatusUpdatesClient, error) {
|
|
||||||
stream, err := c.cc.NewStream(ctx, &_Listener_serviceDesc.Streams[0], "/pomerium.cli.Listener/StatusUpdates", opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
x := &listenerStatusUpdatesClient{stream}
|
|
||||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := x.ClientStream.CloseSend(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return x, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Listener_StatusUpdatesClient interface {
|
|
||||||
Recv() (*ConnectionStatusUpdates, error)
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type listenerStatusUpdatesClient struct {
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *listenerStatusUpdatesClient) Recv() (*ConnectionStatusUpdates, error) {
|
|
||||||
m := new(ConnectionStatusUpdates)
|
|
||||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListenerServer is the server API for Listener service.
|
|
||||||
type ListenerServer interface {
|
|
||||||
// Listen starts connection listener
|
|
||||||
Update(context.Context, *ListenerUpdateRequest) (*ListenerStatus, error)
|
|
||||||
// StatusUpdates opens a stream to listen to connection status updates
|
|
||||||
// a client has to subscribe and continuously
|
|
||||||
// listen to the broadcasted updates
|
|
||||||
StatusUpdates(*Selector, Listener_StatusUpdatesServer) error
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedListenerServer can be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedListenerServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*UnimplementedListenerServer) Update(context.Context, *ListenerUpdateRequest) (*ListenerStatus, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedListenerServer) StatusUpdates(*Selector, Listener_StatusUpdatesServer) error {
|
|
||||||
return status.Errorf(codes.Unimplemented, "method StatusUpdates not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterListenerServer(s *grpc.Server, srv ListenerServer) {
|
|
||||||
s.RegisterService(&_Listener_serviceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Listener_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ListenerUpdateRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ListenerServer).Update(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/pomerium.cli.Listener/Update",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ListenerServer).Update(ctx, req.(*ListenerUpdateRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Listener_StatusUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
||||||
m := new(Selector)
|
|
||||||
if err := stream.RecvMsg(m); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return srv.(ListenerServer).StatusUpdates(m, &listenerStatusUpdatesServer{stream})
|
|
||||||
}
|
|
||||||
|
|
||||||
type Listener_StatusUpdatesServer interface {
|
|
||||||
Send(*ConnectionStatusUpdates) error
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type listenerStatusUpdatesServer struct {
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *listenerStatusUpdatesServer) Send(m *ConnectionStatusUpdates) error {
|
|
||||||
return x.ServerStream.SendMsg(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var _Listener_serviceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "pomerium.cli.Listener",
|
|
||||||
HandlerType: (*ListenerServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "Update",
|
|
||||||
Handler: _Listener_Update_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{
|
|
||||||
{
|
|
||||||
StreamName: "StatusUpdates",
|
|
||||||
Handler: _Listener_StatusUpdates_Handler,
|
|
||||||
ServerStreams: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Metadata: "api.proto",
|
|
||||||
}
|
|
||||||
|
|
425
pkg/grpc/cli/api_grpc.pb.go
Normal file
425
pkg/grpc/cli/api_grpc.pb.go
Normal file
|
@ -0,0 +1,425 @@
|
||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
|
// - protoc v3.21.7
|
||||||
|
// source: api.proto
|
||||||
|
|
||||||
|
package cli
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.64.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
|
const (
|
||||||
|
Config_List_FullMethodName = "/pomerium.cli.Config/List"
|
||||||
|
Config_Delete_FullMethodName = "/pomerium.cli.Config/Delete"
|
||||||
|
Config_Upsert_FullMethodName = "/pomerium.cli.Config/Upsert"
|
||||||
|
Config_Export_FullMethodName = "/pomerium.cli.Config/Export"
|
||||||
|
Config_Import_FullMethodName = "/pomerium.cli.Config/Import"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConfigClient is the client API for Config service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type ConfigClient interface {
|
||||||
|
List(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*ListRecordsResponse, error)
|
||||||
|
Delete(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*DeleteRecordsResponse, error)
|
||||||
|
Upsert(ctx context.Context, in *Record, opts ...grpc.CallOption) (*Record, error)
|
||||||
|
Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ConfigData, error)
|
||||||
|
Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type configClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient {
|
||||||
|
return &configClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *configClient) List(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*ListRecordsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ListRecordsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Config_List_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *configClient) Delete(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*DeleteRecordsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DeleteRecordsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Config_Delete_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *configClient) Upsert(ctx context.Context, in *Record, opts ...grpc.CallOption) (*Record, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(Record)
|
||||||
|
err := c.cc.Invoke(ctx, Config_Upsert_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *configClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ConfigData, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ConfigData)
|
||||||
|
err := c.cc.Invoke(ctx, Config_Export_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *configClient) Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ImportResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Config_Import_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConfigServer is the server API for Config service.
|
||||||
|
// All implementations should embed UnimplementedConfigServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type ConfigServer interface {
|
||||||
|
List(context.Context, *Selector) (*ListRecordsResponse, error)
|
||||||
|
Delete(context.Context, *Selector) (*DeleteRecordsResponse, error)
|
||||||
|
Upsert(context.Context, *Record) (*Record, error)
|
||||||
|
Export(context.Context, *ExportRequest) (*ConfigData, error)
|
||||||
|
Import(context.Context, *ImportRequest) (*ImportResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedConfigServer should be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedConfigServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedConfigServer) List(context.Context, *Selector) (*ListRecordsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedConfigServer) Delete(context.Context, *Selector) (*DeleteRecordsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedConfigServer) Upsert(context.Context, *Record) (*Record, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Upsert not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedConfigServer) Export(context.Context, *ExportRequest) (*ConfigData, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Export not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedConfigServer) Import(context.Context, *ImportRequest) (*ImportResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Import not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedConfigServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeConfigServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to ConfigServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeConfigServer interface {
|
||||||
|
mustEmbedUnimplementedConfigServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedConfigServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&Config_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Config_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(Selector)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConfigServer).List(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Config_List_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConfigServer).List(ctx, req.(*Selector))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Config_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(Selector)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConfigServer).Delete(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Config_Delete_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConfigServer).Delete(ctx, req.(*Selector))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Config_Upsert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(Record)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConfigServer).Upsert(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Config_Upsert_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConfigServer).Upsert(ctx, req.(*Record))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Config_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ExportRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConfigServer).Export(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Config_Export_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConfigServer).Export(ctx, req.(*ExportRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Config_Import_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ImportRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConfigServer).Import(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Config_Import_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConfigServer).Import(ctx, req.(*ImportRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Config_ServiceDesc is the grpc.ServiceDesc for Config service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Config_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "pomerium.cli.Config",
|
||||||
|
HandlerType: (*ConfigServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "List",
|
||||||
|
Handler: _Config_List_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Delete",
|
||||||
|
Handler: _Config_Delete_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Upsert",
|
||||||
|
Handler: _Config_Upsert_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Export",
|
||||||
|
Handler: _Config_Export_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Import",
|
||||||
|
Handler: _Config_Import_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "api.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
Listener_Update_FullMethodName = "/pomerium.cli.Listener/Update"
|
||||||
|
Listener_StatusUpdates_FullMethodName = "/pomerium.cli.Listener/StatusUpdates"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ListenerClient is the client API for Listener service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
//
|
||||||
|
// Listener service controls listeners
|
||||||
|
type ListenerClient interface {
|
||||||
|
// Listen starts connection listener
|
||||||
|
Update(ctx context.Context, in *ListenerUpdateRequest, opts ...grpc.CallOption) (*ListenerStatus, error)
|
||||||
|
// StatusUpdates opens a stream to listen to connection status updates
|
||||||
|
// a client has to subscribe and continuously
|
||||||
|
// listen to the broadcasted updates
|
||||||
|
StatusUpdates(ctx context.Context, in *Selector, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConnectionStatusUpdates], error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type listenerClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewListenerClient(cc grpc.ClientConnInterface) ListenerClient {
|
||||||
|
return &listenerClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *listenerClient) Update(ctx context.Context, in *ListenerUpdateRequest, opts ...grpc.CallOption) (*ListenerStatus, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ListenerStatus)
|
||||||
|
err := c.cc.Invoke(ctx, Listener_Update_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *listenerClient) StatusUpdates(ctx context.Context, in *Selector, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConnectionStatusUpdates], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &Listener_ServiceDesc.Streams[0], Listener_StatusUpdates_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[Selector, ConnectionStatusUpdates]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type Listener_StatusUpdatesClient = grpc.ServerStreamingClient[ConnectionStatusUpdates]
|
||||||
|
|
||||||
|
// ListenerServer is the server API for Listener service.
|
||||||
|
// All implementations should embed UnimplementedListenerServer
|
||||||
|
// for forward compatibility.
|
||||||
|
//
|
||||||
|
// Listener service controls listeners
|
||||||
|
type ListenerServer interface {
|
||||||
|
// Listen starts connection listener
|
||||||
|
Update(context.Context, *ListenerUpdateRequest) (*ListenerStatus, error)
|
||||||
|
// StatusUpdates opens a stream to listen to connection status updates
|
||||||
|
// a client has to subscribe and continuously
|
||||||
|
// listen to the broadcasted updates
|
||||||
|
StatusUpdates(*Selector, grpc.ServerStreamingServer[ConnectionStatusUpdates]) error
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedListenerServer should be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedListenerServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedListenerServer) Update(context.Context, *ListenerUpdateRequest) (*ListenerStatus, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedListenerServer) StatusUpdates(*Selector, grpc.ServerStreamingServer[ConnectionStatusUpdates]) error {
|
||||||
|
return status.Errorf(codes.Unimplemented, "method StatusUpdates not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedListenerServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeListenerServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to ListenerServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeListenerServer interface {
|
||||||
|
mustEmbedUnimplementedListenerServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterListenerServer(s grpc.ServiceRegistrar, srv ListenerServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedListenerServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&Listener_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Listener_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ListenerUpdateRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ListenerServer).Update(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Listener_Update_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ListenerServer).Update(ctx, req.(*ListenerUpdateRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Listener_StatusUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(Selector)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(ListenerServer).StatusUpdates(m, &grpc.GenericServerStream[Selector, ConnectionStatusUpdates]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type Listener_StatusUpdatesServer = grpc.ServerStreamingServer[ConnectionStatusUpdates]
|
||||||
|
|
||||||
|
// Listener_ServiceDesc is the grpc.ServiceDesc for Listener service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Listener_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "pomerium.cli.Listener",
|
||||||
|
HandlerType: (*ListenerServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Update",
|
||||||
|
Handler: _Listener_Update_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{
|
||||||
|
{
|
||||||
|
StreamName: "StatusUpdates",
|
||||||
|
Handler: _Listener_StatusUpdates_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Metadata: "api.proto",
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: config.proto
|
// source: config.proto
|
||||||
|
|
||||||
|
@ -398,13 +398,13 @@ type Route struct {
|
||||||
// if provided, load_balancing_weights[i] >= 1 and len(to) ==
|
// if provided, load_balancing_weights[i] >= 1 and len(to) ==
|
||||||
// len(load_balancing_weights)
|
// len(load_balancing_weights)
|
||||||
LoadBalancingWeights []uint32 `protobuf:"varint,37,rep,packed,name=load_balancing_weights,json=loadBalancingWeights,proto3" json:"load_balancing_weights,omitempty"`
|
LoadBalancingWeights []uint32 `protobuf:"varint,37,rep,packed,name=load_balancing_weights,json=loadBalancingWeights,proto3" json:"load_balancing_weights,omitempty"`
|
||||||
// Deprecated: Do not use.
|
// Deprecated: Marked as deprecated in config.proto.
|
||||||
AllowedUsers []string `protobuf:"bytes,4,rep,name=allowed_users,json=allowedUsers,proto3" json:"allowed_users,omitempty"`
|
AllowedUsers []string `protobuf:"bytes,4,rep,name=allowed_users,json=allowedUsers,proto3" json:"allowed_users,omitempty"`
|
||||||
// repeated string allowed_groups = 5 [ deprecated = true ];
|
// repeated string allowed_groups = 5 [ deprecated = true ];
|
||||||
//
|
//
|
||||||
// Deprecated: Do not use.
|
// Deprecated: Marked as deprecated in config.proto.
|
||||||
AllowedDomains []string `protobuf:"bytes,6,rep,name=allowed_domains,json=allowedDomains,proto3" json:"allowed_domains,omitempty"`
|
AllowedDomains []string `protobuf:"bytes,6,rep,name=allowed_domains,json=allowedDomains,proto3" json:"allowed_domains,omitempty"`
|
||||||
// Deprecated: Do not use.
|
// Deprecated: Marked as deprecated in config.proto.
|
||||||
AllowedIdpClaims map[string]*structpb.ListValue `protobuf:"bytes,32,rep,name=allowed_idp_claims,json=allowedIdpClaims,proto3" json:"allowed_idp_claims,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
AllowedIdpClaims map[string]*structpb.ListValue `protobuf:"bytes,32,rep,name=allowed_idp_claims,json=allowedIdpClaims,proto3" json:"allowed_idp_claims,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
Prefix string `protobuf:"bytes,7,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
Prefix string `protobuf:"bytes,7,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
||||||
Path string `protobuf:"bytes,8,opt,name=path,proto3" json:"path,omitempty"`
|
Path string `protobuf:"bytes,8,opt,name=path,proto3" json:"path,omitempty"`
|
||||||
|
@ -527,7 +527,7 @@ func (x *Route) GetLoadBalancingWeights() []uint32 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Do not use.
|
// Deprecated: Marked as deprecated in config.proto.
|
||||||
func (x *Route) GetAllowedUsers() []string {
|
func (x *Route) GetAllowedUsers() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AllowedUsers
|
return x.AllowedUsers
|
||||||
|
@ -535,7 +535,7 @@ func (x *Route) GetAllowedUsers() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Do not use.
|
// Deprecated: Marked as deprecated in config.proto.
|
||||||
func (x *Route) GetAllowedDomains() []string {
|
func (x *Route) GetAllowedDomains() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AllowedDomains
|
return x.AllowedDomains
|
||||||
|
@ -543,7 +543,7 @@ func (x *Route) GetAllowedDomains() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Do not use.
|
// Deprecated: Marked as deprecated in config.proto.
|
||||||
func (x *Route) GetAllowedIdpClaims() map[string]*structpb.ListValue {
|
func (x *Route) GetAllowedIdpClaims() map[string]*structpb.ListValue {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AllowedIdpClaims
|
return x.AllowedIdpClaims
|
||||||
|
@ -1665,7 +1665,7 @@ func (x *Settings) GetCodecType() v31.HttpConnectionManager_CodecType {
|
||||||
if x != nil && x.CodecType != nil {
|
if x != nil && x.CodecType != nil {
|
||||||
return *x.CodecType
|
return *x.CodecType
|
||||||
}
|
}
|
||||||
return v31.HttpConnectionManager_AUTO
|
return v31.HttpConnectionManager_CodecType(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Settings) GetAuditKey() *crypt.PublicKeyEncryptionKey {
|
func (x *Settings) GetAuditKey() *crypt.PublicKeyEncryptionKey {
|
||||||
|
@ -2732,7 +2732,7 @@ func file_config_proto_rawDescGZIP() []byte {
|
||||||
|
|
||||||
var file_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
var file_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
||||||
var file_config_proto_goTypes = []interface{}{
|
var file_config_proto_goTypes = []any{
|
||||||
(MtlsEnforcementMode)(0), // 0: pomerium.config.MtlsEnforcementMode
|
(MtlsEnforcementMode)(0), // 0: pomerium.config.MtlsEnforcementMode
|
||||||
(*Config)(nil), // 1: pomerium.config.Config
|
(*Config)(nil), // 1: pomerium.config.Config
|
||||||
(*RouteRewriteHeader)(nil), // 2: pomerium.config.RouteRewriteHeader
|
(*RouteRewriteHeader)(nil), // 2: pomerium.config.RouteRewriteHeader
|
||||||
|
@ -2805,7 +2805,7 @@ func file_config_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Config); i {
|
switch v := v.(*Config); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2817,7 +2817,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*RouteRewriteHeader); i {
|
switch v := v.(*RouteRewriteHeader); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2829,7 +2829,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*RouteRedirect); i {
|
switch v := v.(*RouteRedirect); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2841,7 +2841,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*RouteDirectResponse); i {
|
switch v := v.(*RouteDirectResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2853,7 +2853,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Route); i {
|
switch v := v.(*Route); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2865,7 +2865,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Policy); i {
|
switch v := v.(*Policy); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2877,7 +2877,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Settings); i {
|
switch v := v.(*Settings); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2889,7 +2889,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*DownstreamMtlsSettings); i {
|
switch v := v.(*DownstreamMtlsSettings); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2901,7 +2901,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Settings_Certificate); i {
|
switch v := v.(*Settings_Certificate); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2913,7 +2913,7 @@ func file_config_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
file_config_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Settings_StringList); i {
|
switch v := v.(*Settings_StringList); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -2926,13 +2926,13 @@ func file_config_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[1].OneofWrappers = []interface{}{
|
file_config_proto_msgTypes[1].OneofWrappers = []any{
|
||||||
(*RouteRewriteHeader_Prefix)(nil),
|
(*RouteRewriteHeader_Prefix)(nil),
|
||||||
}
|
}
|
||||||
file_config_proto_msgTypes[2].OneofWrappers = []interface{}{}
|
file_config_proto_msgTypes[2].OneofWrappers = []any{}
|
||||||
file_config_proto_msgTypes[4].OneofWrappers = []interface{}{}
|
file_config_proto_msgTypes[4].OneofWrappers = []any{}
|
||||||
file_config_proto_msgTypes[6].OneofWrappers = []interface{}{}
|
file_config_proto_msgTypes[6].OneofWrappers = []any{}
|
||||||
file_config_proto_msgTypes[7].OneofWrappers = []interface{}{}
|
file_config_proto_msgTypes[7].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: crypt.proto
|
// source: crypt.proto
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ func file_crypt_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_crypt_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
var file_crypt_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_crypt_proto_goTypes = []interface{}{
|
var file_crypt_proto_goTypes = []any{
|
||||||
(*SealedMessage)(nil), // 0: pomerium.crypt.SealedMessage
|
(*SealedMessage)(nil), // 0: pomerium.crypt.SealedMessage
|
||||||
(*PublicKeyEncryptionKey)(nil), // 1: pomerium.crypt.PublicKeyEncryptionKey
|
(*PublicKeyEncryptionKey)(nil), // 1: pomerium.crypt.PublicKeyEncryptionKey
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ func file_crypt_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_crypt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_crypt_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SealedMessage); i {
|
switch v := v.(*SealedMessage); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -220,7 +220,7 @@ func file_crypt_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_crypt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_crypt_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*PublicKeyEncryptionKey); i {
|
switch v := v.(*PublicKeyEncryptionKey); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"github.com/pomerium/pomerium/pkg/protoutil"
|
"github.com/pomerium/pomerium/pkg/protoutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run go.uber.org/mock/mockgen -source=databroker.pb.go -destination ./mock_databroker/databroker.pb.go DataBrokerServiceClient
|
//go:generate go run go.uber.org/mock/mockgen -source=databroker_grpc.pb.go -destination ./mock_databroker/databroker.pb.go DataBrokerServiceClient
|
||||||
//go:generate go run go.uber.org/mock/mockgen -source=leaser.go -destination ./mock_databroker/leaser.go LeaserHandler
|
//go:generate go run go.uber.org/mock/mockgen -source=leaser.go -destination ./mock_databroker/leaser.go LeaserHandler
|
||||||
|
|
||||||
type recordObject interface {
|
type recordObject interface {
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: databroker.proto
|
// source: databroker.proto
|
||||||
|
|
||||||
package databroker
|
package databroker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
|
||||||
grpc "google.golang.org/grpc"
|
|
||||||
codes "google.golang.org/grpc/codes"
|
|
||||||
status "google.golang.org/grpc/status"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
anypb "google.golang.org/protobuf/types/known/anypb"
|
anypb "google.golang.org/protobuf/types/known/anypb"
|
||||||
|
@ -1513,7 +1509,7 @@ func file_databroker_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_databroker_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
var file_databroker_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
||||||
var file_databroker_proto_goTypes = []interface{}{
|
var file_databroker_proto_goTypes = []any{
|
||||||
(*Record)(nil), // 0: databroker.Record
|
(*Record)(nil), // 0: databroker.Record
|
||||||
(*Versions)(nil), // 1: databroker.Versions
|
(*Versions)(nil), // 1: databroker.Versions
|
||||||
(*Options)(nil), // 2: databroker.Options
|
(*Options)(nil), // 2: databroker.Options
|
||||||
|
@ -1597,7 +1593,7 @@ func file_databroker_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_databroker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Record); i {
|
switch v := v.(*Record); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1609,7 +1605,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Versions); i {
|
switch v := v.(*Versions); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1621,7 +1617,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Options); i {
|
switch v := v.(*Options); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1633,7 +1629,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*GetRequest); i {
|
switch v := v.(*GetRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1645,7 +1641,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*GetResponse); i {
|
switch v := v.(*GetResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1657,7 +1653,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ListTypesResponse); i {
|
switch v := v.(*ListTypesResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1669,7 +1665,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*QueryRequest); i {
|
switch v := v.(*QueryRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1681,7 +1677,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*QueryResponse); i {
|
switch v := v.(*QueryResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1693,7 +1689,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*PutRequest); i {
|
switch v := v.(*PutRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1705,7 +1701,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*PutResponse); i {
|
switch v := v.(*PutResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1717,7 +1713,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*PatchRequest); i {
|
switch v := v.(*PatchRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1729,7 +1725,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*PatchResponse); i {
|
switch v := v.(*PatchResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1741,7 +1737,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SetOptionsRequest); i {
|
switch v := v.(*SetOptionsRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1753,7 +1749,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SetOptionsResponse); i {
|
switch v := v.(*SetOptionsResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1765,7 +1761,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[14].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SyncRequest); i {
|
switch v := v.(*SyncRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1777,7 +1773,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[15].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SyncResponse); i {
|
switch v := v.(*SyncResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1789,7 +1785,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[16].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SyncLatestRequest); i {
|
switch v := v.(*SyncLatestRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1801,7 +1797,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[17].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SyncLatestResponse); i {
|
switch v := v.(*SyncLatestResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1813,7 +1809,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[18].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*AcquireLeaseRequest); i {
|
switch v := v.(*AcquireLeaseRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1825,7 +1821,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[19].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*AcquireLeaseResponse); i {
|
switch v := v.(*AcquireLeaseResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1837,7 +1833,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[20].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ReleaseLeaseRequest); i {
|
switch v := v.(*ReleaseLeaseRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1849,7 +1845,7 @@ func file_databroker_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
file_databroker_proto_msgTypes[21].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*RenewLeaseRequest); i {
|
switch v := v.(*RenewLeaseRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1862,8 +1858,8 @@ func file_databroker_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_databroker_proto_msgTypes[2].OneofWrappers = []interface{}{}
|
file_databroker_proto_msgTypes[2].OneofWrappers = []any{}
|
||||||
file_databroker_proto_msgTypes[17].OneofWrappers = []interface{}{
|
file_databroker_proto_msgTypes[17].OneofWrappers = []any{
|
||||||
(*SyncLatestResponse_Record)(nil),
|
(*SyncLatestResponse_Record)(nil),
|
||||||
(*SyncLatestResponse_Versions)(nil),
|
(*SyncLatestResponse_Versions)(nil),
|
||||||
}
|
}
|
||||||
|
@ -1886,520 +1882,3 @@ func file_databroker_proto_init() {
|
||||||
file_databroker_proto_goTypes = nil
|
file_databroker_proto_goTypes = nil
|
||||||
file_databroker_proto_depIdxs = nil
|
file_databroker_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
|
||||||
var _ context.Context
|
|
||||||
var _ grpc.ClientConnInterface
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
const _ = grpc.SupportPackageIsVersion6
|
|
||||||
|
|
||||||
// DataBrokerServiceClient is the client API for DataBrokerService service.
|
|
||||||
//
|
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
||||||
type DataBrokerServiceClient interface {
|
|
||||||
// AcquireLease acquires a distributed mutex lease.
|
|
||||||
AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error)
|
|
||||||
// Get gets a record.
|
|
||||||
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
|
||||||
// ListTypes lists all the known record types.
|
|
||||||
ListTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTypesResponse, error)
|
|
||||||
// Put saves a record.
|
|
||||||
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
|
|
||||||
// Patch updates specific fields of an existing record.
|
|
||||||
Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*PatchResponse, error)
|
|
||||||
// Query queries for records.
|
|
||||||
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
|
|
||||||
// ReleaseLease releases a distributed mutex lease.
|
|
||||||
ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
||||||
// RenewLease renews a distributed mutex lease.
|
|
||||||
RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
||||||
// SetOptions sets the options for a type in the databroker.
|
|
||||||
SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error)
|
|
||||||
// Sync streams changes to records after the specified version.
|
|
||||||
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (DataBrokerService_SyncClient, error)
|
|
||||||
// SyncLatest streams the latest version of every record.
|
|
||||||
SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (DataBrokerService_SyncLatestClient, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type dataBrokerServiceClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewDataBrokerServiceClient(cc grpc.ClientConnInterface) DataBrokerServiceClient {
|
|
||||||
return &dataBrokerServiceClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error) {
|
|
||||||
out := new(AcquireLeaseResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/AcquireLease", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
|
|
||||||
out := new(GetResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/Get", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) ListTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTypesResponse, error) {
|
|
||||||
out := new(ListTypesResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/ListTypes", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
|
|
||||||
out := new(PutResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/Put", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*PatchResponse, error) {
|
|
||||||
out := new(PatchResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/Patch", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
|
|
||||||
out := new(QueryResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/Query", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
||||||
out := new(emptypb.Empty)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/ReleaseLease", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
||||||
out := new(emptypb.Empty)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/RenewLease", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error) {
|
|
||||||
out := new(SetOptionsResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/databroker.DataBrokerService/SetOptions", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (DataBrokerService_SyncClient, error) {
|
|
||||||
stream, err := c.cc.NewStream(ctx, &_DataBrokerService_serviceDesc.Streams[0], "/databroker.DataBrokerService/Sync", opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
x := &dataBrokerServiceSyncClient{stream}
|
|
||||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := x.ClientStream.CloseSend(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return x, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type DataBrokerService_SyncClient interface {
|
|
||||||
Recv() (*SyncResponse, error)
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type dataBrokerServiceSyncClient struct {
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *dataBrokerServiceSyncClient) Recv() (*SyncResponse, error) {
|
|
||||||
m := new(SyncResponse)
|
|
||||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *dataBrokerServiceClient) SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (DataBrokerService_SyncLatestClient, error) {
|
|
||||||
stream, err := c.cc.NewStream(ctx, &_DataBrokerService_serviceDesc.Streams[1], "/databroker.DataBrokerService/SyncLatest", opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
x := &dataBrokerServiceSyncLatestClient{stream}
|
|
||||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := x.ClientStream.CloseSend(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return x, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type DataBrokerService_SyncLatestClient interface {
|
|
||||||
Recv() (*SyncLatestResponse, error)
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type dataBrokerServiceSyncLatestClient struct {
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *dataBrokerServiceSyncLatestClient) Recv() (*SyncLatestResponse, error) {
|
|
||||||
m := new(SyncLatestResponse)
|
|
||||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DataBrokerServiceServer is the server API for DataBrokerService service.
|
|
||||||
type DataBrokerServiceServer interface {
|
|
||||||
// AcquireLease acquires a distributed mutex lease.
|
|
||||||
AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error)
|
|
||||||
// Get gets a record.
|
|
||||||
Get(context.Context, *GetRequest) (*GetResponse, error)
|
|
||||||
// ListTypes lists all the known record types.
|
|
||||||
ListTypes(context.Context, *emptypb.Empty) (*ListTypesResponse, error)
|
|
||||||
// Put saves a record.
|
|
||||||
Put(context.Context, *PutRequest) (*PutResponse, error)
|
|
||||||
// Patch updates specific fields of an existing record.
|
|
||||||
Patch(context.Context, *PatchRequest) (*PatchResponse, error)
|
|
||||||
// Query queries for records.
|
|
||||||
Query(context.Context, *QueryRequest) (*QueryResponse, error)
|
|
||||||
// ReleaseLease releases a distributed mutex lease.
|
|
||||||
ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error)
|
|
||||||
// RenewLease renews a distributed mutex lease.
|
|
||||||
RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error)
|
|
||||||
// SetOptions sets the options for a type in the databroker.
|
|
||||||
SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error)
|
|
||||||
// Sync streams changes to records after the specified version.
|
|
||||||
Sync(*SyncRequest, DataBrokerService_SyncServer) error
|
|
||||||
// SyncLatest streams the latest version of every record.
|
|
||||||
SyncLatest(*SyncLatestRequest, DataBrokerService_SyncLatestServer) error
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedDataBrokerServiceServer can be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedDataBrokerServiceServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AcquireLease not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) ListTypes(context.Context, *emptypb.Empty) (*ListTypesResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ListTypes not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) Put(context.Context, *PutRequest) (*PutResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) Patch(context.Context, *PatchRequest) (*PatchResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Patch not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseLease not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method RenewLease not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SetOptions not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) Sync(*SyncRequest, DataBrokerService_SyncServer) error {
|
|
||||||
return status.Errorf(codes.Unimplemented, "method Sync not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedDataBrokerServiceServer) SyncLatest(*SyncLatestRequest, DataBrokerService_SyncLatestServer) error {
|
|
||||||
return status.Errorf(codes.Unimplemented, "method SyncLatest not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterDataBrokerServiceServer(s *grpc.Server, srv DataBrokerServiceServer) {
|
|
||||||
s.RegisterService(&_DataBrokerService_serviceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_AcquireLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(AcquireLeaseRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).AcquireLease(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/AcquireLease",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).AcquireLease(ctx, req.(*AcquireLeaseRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GetRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).Get(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/Get",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).Get(ctx, req.(*GetRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_ListTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(emptypb.Empty)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).ListTypes(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/ListTypes",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).ListTypes(ctx, req.(*emptypb.Empty))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(PutRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).Put(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/Put",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).Put(ctx, req.(*PutRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_Patch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(PatchRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).Patch(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/Patch",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).Patch(ctx, req.(*PatchRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(QueryRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).Query(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/Query",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).Query(ctx, req.(*QueryRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_ReleaseLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ReleaseLeaseRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).ReleaseLease(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/ReleaseLease",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).ReleaseLease(ctx, req.(*ReleaseLeaseRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_RenewLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(RenewLeaseRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).RenewLease(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/RenewLease",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).RenewLease(ctx, req.(*RenewLeaseRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_SetOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(SetOptionsRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DataBrokerServiceServer).SetOptions(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/databroker.DataBrokerService/SetOptions",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DataBrokerServiceServer).SetOptions(ctx, req.(*SetOptionsRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_Sync_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
||||||
m := new(SyncRequest)
|
|
||||||
if err := stream.RecvMsg(m); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return srv.(DataBrokerServiceServer).Sync(m, &dataBrokerServiceSyncServer{stream})
|
|
||||||
}
|
|
||||||
|
|
||||||
type DataBrokerService_SyncServer interface {
|
|
||||||
Send(*SyncResponse) error
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type dataBrokerServiceSyncServer struct {
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *dataBrokerServiceSyncServer) Send(m *SyncResponse) error {
|
|
||||||
return x.ServerStream.SendMsg(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DataBrokerService_SyncLatest_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
||||||
m := new(SyncLatestRequest)
|
|
||||||
if err := stream.RecvMsg(m); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return srv.(DataBrokerServiceServer).SyncLatest(m, &dataBrokerServiceSyncLatestServer{stream})
|
|
||||||
}
|
|
||||||
|
|
||||||
type DataBrokerService_SyncLatestServer interface {
|
|
||||||
Send(*SyncLatestResponse) error
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type dataBrokerServiceSyncLatestServer struct {
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *dataBrokerServiceSyncLatestServer) Send(m *SyncLatestResponse) error {
|
|
||||||
return x.ServerStream.SendMsg(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var _DataBrokerService_serviceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "databroker.DataBrokerService",
|
|
||||||
HandlerType: (*DataBrokerServiceServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "AcquireLease",
|
|
||||||
Handler: _DataBrokerService_AcquireLease_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Get",
|
|
||||||
Handler: _DataBrokerService_Get_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "ListTypes",
|
|
||||||
Handler: _DataBrokerService_ListTypes_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Put",
|
|
||||||
Handler: _DataBrokerService_Put_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Patch",
|
|
||||||
Handler: _DataBrokerService_Patch_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Query",
|
|
||||||
Handler: _DataBrokerService_Query_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "ReleaseLease",
|
|
||||||
Handler: _DataBrokerService_ReleaseLease_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "RenewLease",
|
|
||||||
Handler: _DataBrokerService_RenewLease_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "SetOptions",
|
|
||||||
Handler: _DataBrokerService_SetOptions_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{
|
|
||||||
{
|
|
||||||
StreamName: "Sync",
|
|
||||||
Handler: _DataBrokerService_Sync_Handler,
|
|
||||||
ServerStreams: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
StreamName: "SyncLatest",
|
|
||||||
Handler: _DataBrokerService_SyncLatest_Handler,
|
|
||||||
ServerStreams: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Metadata: "databroker.proto",
|
|
||||||
}
|
|
||||||
|
|
533
pkg/grpc/databroker/databroker_grpc.pb.go
Normal file
533
pkg/grpc/databroker/databroker_grpc.pb.go
Normal file
|
@ -0,0 +1,533 @@
|
||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
|
// - protoc v3.21.7
|
||||||
|
// source: databroker.proto
|
||||||
|
|
||||||
|
package databroker
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.64.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
|
const (
|
||||||
|
DataBrokerService_AcquireLease_FullMethodName = "/databroker.DataBrokerService/AcquireLease"
|
||||||
|
DataBrokerService_Get_FullMethodName = "/databroker.DataBrokerService/Get"
|
||||||
|
DataBrokerService_ListTypes_FullMethodName = "/databroker.DataBrokerService/ListTypes"
|
||||||
|
DataBrokerService_Put_FullMethodName = "/databroker.DataBrokerService/Put"
|
||||||
|
DataBrokerService_Patch_FullMethodName = "/databroker.DataBrokerService/Patch"
|
||||||
|
DataBrokerService_Query_FullMethodName = "/databroker.DataBrokerService/Query"
|
||||||
|
DataBrokerService_ReleaseLease_FullMethodName = "/databroker.DataBrokerService/ReleaseLease"
|
||||||
|
DataBrokerService_RenewLease_FullMethodName = "/databroker.DataBrokerService/RenewLease"
|
||||||
|
DataBrokerService_SetOptions_FullMethodName = "/databroker.DataBrokerService/SetOptions"
|
||||||
|
DataBrokerService_Sync_FullMethodName = "/databroker.DataBrokerService/Sync"
|
||||||
|
DataBrokerService_SyncLatest_FullMethodName = "/databroker.DataBrokerService/SyncLatest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DataBrokerServiceClient is the client API for DataBrokerService service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
//
|
||||||
|
// The DataBrokerService stores key-value data.
|
||||||
|
type DataBrokerServiceClient interface {
|
||||||
|
// AcquireLease acquires a distributed mutex lease.
|
||||||
|
AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error)
|
||||||
|
// Get gets a record.
|
||||||
|
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
||||||
|
// ListTypes lists all the known record types.
|
||||||
|
ListTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTypesResponse, error)
|
||||||
|
// Put saves a record.
|
||||||
|
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
|
||||||
|
// Patch updates specific fields of an existing record.
|
||||||
|
Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*PatchResponse, error)
|
||||||
|
// Query queries for records.
|
||||||
|
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
|
||||||
|
// ReleaseLease releases a distributed mutex lease.
|
||||||
|
ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
|
// RenewLease renews a distributed mutex lease.
|
||||||
|
RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
|
// SetOptions sets the options for a type in the databroker.
|
||||||
|
SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error)
|
||||||
|
// Sync streams changes to records after the specified version.
|
||||||
|
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncResponse], error)
|
||||||
|
// SyncLatest streams the latest version of every record.
|
||||||
|
SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncLatestResponse], error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type dataBrokerServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDataBrokerServiceClient(cc grpc.ClientConnInterface) DataBrokerServiceClient {
|
||||||
|
return &dataBrokerServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(AcquireLeaseResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_AcquireLease_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_Get_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) ListTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTypesResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ListTypesResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_ListTypes_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(PutResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_Put_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*PatchResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(PatchResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_Patch_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(QueryResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_Query_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_ReleaseLease_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_RenewLease_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(SetOptionsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DataBrokerService_SetOptions_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncResponse], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &DataBrokerService_ServiceDesc.Streams[0], DataBrokerService_Sync_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[SyncRequest, SyncResponse]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type DataBrokerService_SyncClient = grpc.ServerStreamingClient[SyncResponse]
|
||||||
|
|
||||||
|
func (c *dataBrokerServiceClient) SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncLatestResponse], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &DataBrokerService_ServiceDesc.Streams[1], DataBrokerService_SyncLatest_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[SyncLatestRequest, SyncLatestResponse]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type DataBrokerService_SyncLatestClient = grpc.ServerStreamingClient[SyncLatestResponse]
|
||||||
|
|
||||||
|
// DataBrokerServiceServer is the server API for DataBrokerService service.
|
||||||
|
// All implementations should embed UnimplementedDataBrokerServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
//
|
||||||
|
// The DataBrokerService stores key-value data.
|
||||||
|
type DataBrokerServiceServer interface {
|
||||||
|
// AcquireLease acquires a distributed mutex lease.
|
||||||
|
AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error)
|
||||||
|
// Get gets a record.
|
||||||
|
Get(context.Context, *GetRequest) (*GetResponse, error)
|
||||||
|
// ListTypes lists all the known record types.
|
||||||
|
ListTypes(context.Context, *emptypb.Empty) (*ListTypesResponse, error)
|
||||||
|
// Put saves a record.
|
||||||
|
Put(context.Context, *PutRequest) (*PutResponse, error)
|
||||||
|
// Patch updates specific fields of an existing record.
|
||||||
|
Patch(context.Context, *PatchRequest) (*PatchResponse, error)
|
||||||
|
// Query queries for records.
|
||||||
|
Query(context.Context, *QueryRequest) (*QueryResponse, error)
|
||||||
|
// ReleaseLease releases a distributed mutex lease.
|
||||||
|
ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error)
|
||||||
|
// RenewLease renews a distributed mutex lease.
|
||||||
|
RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error)
|
||||||
|
// SetOptions sets the options for a type in the databroker.
|
||||||
|
SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error)
|
||||||
|
// Sync streams changes to records after the specified version.
|
||||||
|
Sync(*SyncRequest, grpc.ServerStreamingServer[SyncResponse]) error
|
||||||
|
// SyncLatest streams the latest version of every record.
|
||||||
|
SyncLatest(*SyncLatestRequest, grpc.ServerStreamingServer[SyncLatestResponse]) error
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedDataBrokerServiceServer should be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedDataBrokerServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedDataBrokerServiceServer) AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method AcquireLease not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) ListTypes(context.Context, *emptypb.Empty) (*ListTypesResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ListTypes not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) Put(context.Context, *PutRequest) (*PutResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) Patch(context.Context, *PatchRequest) (*PatchResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Patch not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ReleaseLease not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RenewLease not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method SetOptions not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) Sync(*SyncRequest, grpc.ServerStreamingServer[SyncResponse]) error {
|
||||||
|
return status.Errorf(codes.Unimplemented, "method Sync not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) SyncLatest(*SyncLatestRequest, grpc.ServerStreamingServer[SyncLatestResponse]) error {
|
||||||
|
return status.Errorf(codes.Unimplemented, "method SyncLatest not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDataBrokerServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeDataBrokerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to DataBrokerServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeDataBrokerServiceServer interface {
|
||||||
|
mustEmbedUnimplementedDataBrokerServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterDataBrokerServiceServer(s grpc.ServiceRegistrar, srv DataBrokerServiceServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedDataBrokerServiceServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&DataBrokerService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_AcquireLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AcquireLeaseRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).AcquireLease(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_AcquireLease_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).AcquireLease(ctx, req.(*AcquireLeaseRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).Get(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_Get_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).Get(ctx, req.(*GetRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_ListTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(emptypb.Empty)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).ListTypes(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_ListTypes_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).ListTypes(ctx, req.(*emptypb.Empty))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PutRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).Put(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_Put_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).Put(ctx, req.(*PutRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_Patch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PatchRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).Patch(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_Patch_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).Patch(ctx, req.(*PatchRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).Query(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_Query_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).Query(ctx, req.(*QueryRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_ReleaseLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ReleaseLeaseRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).ReleaseLease(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_ReleaseLease_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).ReleaseLease(ctx, req.(*ReleaseLeaseRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_RenewLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RenewLeaseRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).RenewLease(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_RenewLease_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).RenewLease(ctx, req.(*RenewLeaseRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_SetOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SetOptionsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DataBrokerServiceServer).SetOptions(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DataBrokerService_SetOptions_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DataBrokerServiceServer).SetOptions(ctx, req.(*SetOptionsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DataBrokerService_Sync_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(SyncRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(DataBrokerServiceServer).Sync(m, &grpc.GenericServerStream[SyncRequest, SyncResponse]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type DataBrokerService_SyncServer = grpc.ServerStreamingServer[SyncResponse]
|
||||||
|
|
||||||
|
func _DataBrokerService_SyncLatest_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(SyncLatestRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(DataBrokerServiceServer).SyncLatest(m, &grpc.GenericServerStream[SyncLatestRequest, SyncLatestResponse]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type DataBrokerService_SyncLatestServer = grpc.ServerStreamingServer[SyncLatestResponse]
|
||||||
|
|
||||||
|
// DataBrokerService_ServiceDesc is the grpc.ServiceDesc for DataBrokerService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var DataBrokerService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "databroker.DataBrokerService",
|
||||||
|
HandlerType: (*DataBrokerServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "AcquireLease",
|
||||||
|
Handler: _DataBrokerService_AcquireLease_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Get",
|
||||||
|
Handler: _DataBrokerService_Get_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListTypes",
|
||||||
|
Handler: _DataBrokerService_ListTypes_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Put",
|
||||||
|
Handler: _DataBrokerService_Put_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Patch",
|
||||||
|
Handler: _DataBrokerService_Patch_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Query",
|
||||||
|
Handler: _DataBrokerService_Query_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ReleaseLease",
|
||||||
|
Handler: _DataBrokerService_ReleaseLease_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RenewLease",
|
||||||
|
Handler: _DataBrokerService_RenewLease_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SetOptions",
|
||||||
|
Handler: _DataBrokerService_SetOptions_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{
|
||||||
|
{
|
||||||
|
StreamName: "Sync",
|
||||||
|
Handler: _DataBrokerService_Sync_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
StreamName: "SyncLatest",
|
||||||
|
Handler: _DataBrokerService_SyncLatest_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Metadata: "databroker.proto",
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: databroker.pb.go
|
// Source: databroker_grpc.pb.go
|
||||||
//
|
//
|
||||||
// Generated by this command:
|
// Generated by this command:
|
||||||
//
|
//
|
||||||
// mockgen -source=databroker.pb.go -destination ./mock_databroker/databroker.pb.go DataBrokerServiceClient
|
// mockgen -source=databroker_grpc.pb.go -destination ./mock_databroker/databroker.pb.go DataBrokerServiceClient
|
||||||
//
|
//
|
||||||
|
|
||||||
// Package mock_databroker is a generated GoMock package.
|
// Package mock_databroker is a generated GoMock package.
|
||||||
|
@ -16,45 +16,9 @@ import (
|
||||||
databroker "github.com/pomerium/pomerium/pkg/grpc/databroker"
|
databroker "github.com/pomerium/pomerium/pkg/grpc/databroker"
|
||||||
gomock "go.uber.org/mock/gomock"
|
gomock "go.uber.org/mock/gomock"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
metadata "google.golang.org/grpc/metadata"
|
|
||||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockisSyncLatestResponse_Response is a mock of isSyncLatestResponse_Response interface.
|
|
||||||
type MockisSyncLatestResponse_Response struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockisSyncLatestResponse_ResponseMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockisSyncLatestResponse_ResponseMockRecorder is the mock recorder for MockisSyncLatestResponse_Response.
|
|
||||||
type MockisSyncLatestResponse_ResponseMockRecorder struct {
|
|
||||||
mock *MockisSyncLatestResponse_Response
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockisSyncLatestResponse_Response creates a new mock instance.
|
|
||||||
func NewMockisSyncLatestResponse_Response(ctrl *gomock.Controller) *MockisSyncLatestResponse_Response {
|
|
||||||
mock := &MockisSyncLatestResponse_Response{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockisSyncLatestResponse_ResponseMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockisSyncLatestResponse_Response) EXPECT() *MockisSyncLatestResponse_ResponseMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// isSyncLatestResponse_Response mocks base method.
|
|
||||||
func (m *MockisSyncLatestResponse_Response) isSyncLatestResponse_Response() {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
m.ctrl.Call(m, "isSyncLatestResponse_Response")
|
|
||||||
}
|
|
||||||
|
|
||||||
// isSyncLatestResponse_Response indicates an expected call of isSyncLatestResponse_Response.
|
|
||||||
func (mr *MockisSyncLatestResponse_ResponseMockRecorder) isSyncLatestResponse_Response() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "isSyncLatestResponse_Response", reflect.TypeOf((*MockisSyncLatestResponse_Response)(nil).isSyncLatestResponse_Response))
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerServiceClient is a mock of DataBrokerServiceClient interface.
|
// MockDataBrokerServiceClient is a mock of DataBrokerServiceClient interface.
|
||||||
type MockDataBrokerServiceClient struct {
|
type MockDataBrokerServiceClient struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
|
@ -259,14 +223,14 @@ func (mr *MockDataBrokerServiceClientMockRecorder) SetOptions(ctx, in any, opts
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync mocks base method.
|
// Sync mocks base method.
|
||||||
func (m *MockDataBrokerServiceClient) Sync(ctx context.Context, in *databroker.SyncRequest, opts ...grpc.CallOption) (databroker.DataBrokerService_SyncClient, error) {
|
func (m *MockDataBrokerServiceClient) Sync(ctx context.Context, in *databroker.SyncRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[databroker.SyncResponse], error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
varargs := []any{ctx, in}
|
varargs := []any{ctx, in}
|
||||||
for _, a := range opts {
|
for _, a := range opts {
|
||||||
varargs = append(varargs, a)
|
varargs = append(varargs, a)
|
||||||
}
|
}
|
||||||
ret := m.ctrl.Call(m, "Sync", varargs...)
|
ret := m.ctrl.Call(m, "Sync", varargs...)
|
||||||
ret0, _ := ret[0].(databroker.DataBrokerService_SyncClient)
|
ret0, _ := ret[0].(grpc.ServerStreamingClient[databroker.SyncResponse])
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
@ -279,14 +243,14 @@ func (mr *MockDataBrokerServiceClientMockRecorder) Sync(ctx, in any, opts ...any
|
||||||
}
|
}
|
||||||
|
|
||||||
// SyncLatest mocks base method.
|
// SyncLatest mocks base method.
|
||||||
func (m *MockDataBrokerServiceClient) SyncLatest(ctx context.Context, in *databroker.SyncLatestRequest, opts ...grpc.CallOption) (databroker.DataBrokerService_SyncLatestClient, error) {
|
func (m *MockDataBrokerServiceClient) SyncLatest(ctx context.Context, in *databroker.SyncLatestRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[databroker.SyncLatestResponse], error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
varargs := []any{ctx, in}
|
varargs := []any{ctx, in}
|
||||||
for _, a := range opts {
|
for _, a := range opts {
|
||||||
varargs = append(varargs, a)
|
varargs = append(varargs, a)
|
||||||
}
|
}
|
||||||
ret := m.ctrl.Call(m, "SyncLatest", varargs...)
|
ret := m.ctrl.Call(m, "SyncLatest", varargs...)
|
||||||
ret0, _ := ret[0].(databroker.DataBrokerService_SyncLatestClient)
|
ret0, _ := ret[0].(grpc.ServerStreamingClient[databroker.SyncLatestResponse])
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
@ -298,252 +262,6 @@ func (mr *MockDataBrokerServiceClientMockRecorder) SyncLatest(ctx, in any, opts
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncLatest", reflect.TypeOf((*MockDataBrokerServiceClient)(nil).SyncLatest), varargs...)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncLatest", reflect.TypeOf((*MockDataBrokerServiceClient)(nil).SyncLatest), varargs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MockDataBrokerService_SyncClient is a mock of DataBrokerService_SyncClient interface.
|
|
||||||
type MockDataBrokerService_SyncClient struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockDataBrokerService_SyncClientMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerService_SyncClientMockRecorder is the mock recorder for MockDataBrokerService_SyncClient.
|
|
||||||
type MockDataBrokerService_SyncClientMockRecorder struct {
|
|
||||||
mock *MockDataBrokerService_SyncClient
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockDataBrokerService_SyncClient creates a new mock instance.
|
|
||||||
func NewMockDataBrokerService_SyncClient(ctrl *gomock.Controller) *MockDataBrokerService_SyncClient {
|
|
||||||
mock := &MockDataBrokerService_SyncClient{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockDataBrokerService_SyncClientMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockDataBrokerService_SyncClient) EXPECT() *MockDataBrokerService_SyncClientMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// CloseSend mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncClient) CloseSend() error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "CloseSend")
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// CloseSend indicates an expected call of CloseSend.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) CloseSend() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).CloseSend))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Context mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncClient) Context() context.Context {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Context")
|
|
||||||
ret0, _ := ret[0].(context.Context)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Context indicates an expected call of Context.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) Context() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).Context))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Header mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncClient) Header() (metadata.MD, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Header")
|
|
||||||
ret0, _ := ret[0].(metadata.MD)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// Header indicates an expected call of Header.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) Header() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).Header))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recv mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncClient) Recv() (*databroker.SyncResponse, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Recv")
|
|
||||||
ret0, _ := ret[0].(*databroker.SyncResponse)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recv indicates an expected call of Recv.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) Recv() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).Recv))
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncClient) RecvMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg indicates an expected call of RecvMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) RecvMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).RecvMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncClient) SendMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg indicates an expected call of SendMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) SendMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).SendMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trailer mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncClient) Trailer() metadata.MD {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Trailer")
|
|
||||||
ret0, _ := ret[0].(metadata.MD)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trailer indicates an expected call of Trailer.
|
|
||||||
func (mr *MockDataBrokerService_SyncClientMockRecorder) Trailer() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDataBrokerService_SyncClient)(nil).Trailer))
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerService_SyncLatestClient is a mock of DataBrokerService_SyncLatestClient interface.
|
|
||||||
type MockDataBrokerService_SyncLatestClient struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockDataBrokerService_SyncLatestClientMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerService_SyncLatestClientMockRecorder is the mock recorder for MockDataBrokerService_SyncLatestClient.
|
|
||||||
type MockDataBrokerService_SyncLatestClientMockRecorder struct {
|
|
||||||
mock *MockDataBrokerService_SyncLatestClient
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockDataBrokerService_SyncLatestClient creates a new mock instance.
|
|
||||||
func NewMockDataBrokerService_SyncLatestClient(ctrl *gomock.Controller) *MockDataBrokerService_SyncLatestClient {
|
|
||||||
mock := &MockDataBrokerService_SyncLatestClient{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockDataBrokerService_SyncLatestClientMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestClient) EXPECT() *MockDataBrokerService_SyncLatestClientMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// CloseSend mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestClient) CloseSend() error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "CloseSend")
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// CloseSend indicates an expected call of CloseSend.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) CloseSend() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).CloseSend))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Context mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestClient) Context() context.Context {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Context")
|
|
||||||
ret0, _ := ret[0].(context.Context)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Context indicates an expected call of Context.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) Context() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).Context))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Header mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestClient) Header() (metadata.MD, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Header")
|
|
||||||
ret0, _ := ret[0].(metadata.MD)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// Header indicates an expected call of Header.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) Header() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).Header))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recv mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestClient) Recv() (*databroker.SyncLatestResponse, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Recv")
|
|
||||||
ret0, _ := ret[0].(*databroker.SyncLatestResponse)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recv indicates an expected call of Recv.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) Recv() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).Recv))
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncLatestClient) RecvMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg indicates an expected call of RecvMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) RecvMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).RecvMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncLatestClient) SendMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg indicates an expected call of SendMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) SendMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).SendMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trailer mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestClient) Trailer() metadata.MD {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Trailer")
|
|
||||||
ret0, _ := ret[0].(metadata.MD)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trailer indicates an expected call of Trailer.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestClientMockRecorder) Trailer() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDataBrokerService_SyncLatestClient)(nil).Trailer))
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerServiceServer is a mock of DataBrokerServiceServer interface.
|
// MockDataBrokerServiceServer is a mock of DataBrokerServiceServer interface.
|
||||||
type MockDataBrokerServiceServer struct {
|
type MockDataBrokerServiceServer struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
|
@ -703,7 +421,7 @@ func (mr *MockDataBrokerServiceServerMockRecorder) SetOptions(arg0, arg1 any) *g
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync mocks base method.
|
// Sync mocks base method.
|
||||||
func (m *MockDataBrokerServiceServer) Sync(arg0 *databroker.SyncRequest, arg1 databroker.DataBrokerService_SyncServer) error {
|
func (m *MockDataBrokerServiceServer) Sync(arg0 *databroker.SyncRequest, arg1 grpc.ServerStreamingServer[databroker.SyncResponse]) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Sync", arg0, arg1)
|
ret := m.ctrl.Call(m, "Sync", arg0, arg1)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
|
@ -717,7 +435,7 @@ func (mr *MockDataBrokerServiceServerMockRecorder) Sync(arg0, arg1 any) *gomock.
|
||||||
}
|
}
|
||||||
|
|
||||||
// SyncLatest mocks base method.
|
// SyncLatest mocks base method.
|
||||||
func (m *MockDataBrokerServiceServer) SyncLatest(arg0 *databroker.SyncLatestRequest, arg1 databroker.DataBrokerService_SyncLatestServer) error {
|
func (m *MockDataBrokerServiceServer) SyncLatest(arg0 *databroker.SyncLatestRequest, arg1 grpc.ServerStreamingServer[databroker.SyncLatestResponse]) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SyncLatest", arg0, arg1)
|
ret := m.ctrl.Call(m, "SyncLatest", arg0, arg1)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
|
@ -730,240 +448,37 @@ func (mr *MockDataBrokerServiceServerMockRecorder) SyncLatest(arg0, arg1 any) *g
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncLatest", reflect.TypeOf((*MockDataBrokerServiceServer)(nil).SyncLatest), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncLatest", reflect.TypeOf((*MockDataBrokerServiceServer)(nil).SyncLatest), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MockDataBrokerService_SyncServer is a mock of DataBrokerService_SyncServer interface.
|
// MockUnsafeDataBrokerServiceServer is a mock of UnsafeDataBrokerServiceServer interface.
|
||||||
type MockDataBrokerService_SyncServer struct {
|
type MockUnsafeDataBrokerServiceServer struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
recorder *MockDataBrokerService_SyncServerMockRecorder
|
recorder *MockUnsafeDataBrokerServiceServerMockRecorder
|
||||||
}
|
}
|
||||||
|
|
||||||
// MockDataBrokerService_SyncServerMockRecorder is the mock recorder for MockDataBrokerService_SyncServer.
|
// MockUnsafeDataBrokerServiceServerMockRecorder is the mock recorder for MockUnsafeDataBrokerServiceServer.
|
||||||
type MockDataBrokerService_SyncServerMockRecorder struct {
|
type MockUnsafeDataBrokerServiceServerMockRecorder struct {
|
||||||
mock *MockDataBrokerService_SyncServer
|
mock *MockUnsafeDataBrokerServiceServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMockDataBrokerService_SyncServer creates a new mock instance.
|
// NewMockUnsafeDataBrokerServiceServer creates a new mock instance.
|
||||||
func NewMockDataBrokerService_SyncServer(ctrl *gomock.Controller) *MockDataBrokerService_SyncServer {
|
func NewMockUnsafeDataBrokerServiceServer(ctrl *gomock.Controller) *MockUnsafeDataBrokerServiceServer {
|
||||||
mock := &MockDataBrokerService_SyncServer{ctrl: ctrl}
|
mock := &MockUnsafeDataBrokerServiceServer{ctrl: ctrl}
|
||||||
mock.recorder = &MockDataBrokerService_SyncServerMockRecorder{mock}
|
mock.recorder = &MockUnsafeDataBrokerServiceServerMockRecorder{mock}
|
||||||
return mock
|
return mock
|
||||||
}
|
}
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||||
func (m *MockDataBrokerService_SyncServer) EXPECT() *MockDataBrokerService_SyncServerMockRecorder {
|
func (m *MockUnsafeDataBrokerServiceServer) EXPECT() *MockUnsafeDataBrokerServiceServerMockRecorder {
|
||||||
return m.recorder
|
return m.recorder
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context mocks base method.
|
// mustEmbedUnimplementedDataBrokerServiceServer mocks base method.
|
||||||
func (m *MockDataBrokerService_SyncServer) Context() context.Context {
|
func (m *MockUnsafeDataBrokerServiceServer) mustEmbedUnimplementedDataBrokerServiceServer() {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Context")
|
m.ctrl.Call(m, "mustEmbedUnimplementedDataBrokerServiceServer")
|
||||||
ret0, _ := ret[0].(context.Context)
|
|
||||||
return ret0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context indicates an expected call of Context.
|
// mustEmbedUnimplementedDataBrokerServiceServer indicates an expected call of mustEmbedUnimplementedDataBrokerServiceServer.
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) Context() *gomock.Call {
|
func (mr *MockUnsafeDataBrokerServiceServerMockRecorder) mustEmbedUnimplementedDataBrokerServiceServer() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).Context))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "mustEmbedUnimplementedDataBrokerServiceServer", reflect.TypeOf((*MockUnsafeDataBrokerServiceServer)(nil).mustEmbedUnimplementedDataBrokerServiceServer))
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncServer) RecvMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg indicates an expected call of RecvMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) RecvMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).RecvMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncServer) Send(arg0 *databroker.SyncResponse) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Send", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send indicates an expected call of Send.
|
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) Send(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).Send), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendHeader mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncServer) SendHeader(arg0 metadata.MD) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SendHeader", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendHeader indicates an expected call of SendHeader.
|
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) SendHeader(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).SendHeader), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncServer) SendMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg indicates an expected call of SendMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) SendMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).SendMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHeader mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncServer) SetHeader(arg0 metadata.MD) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SetHeader", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHeader indicates an expected call of SetHeader.
|
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) SetHeader(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).SetHeader), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTrailer mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncServer) SetTrailer(arg0 metadata.MD) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
m.ctrl.Call(m, "SetTrailer", arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTrailer indicates an expected call of SetTrailer.
|
|
||||||
func (mr *MockDataBrokerService_SyncServerMockRecorder) SetTrailer(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDataBrokerService_SyncServer)(nil).SetTrailer), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerService_SyncLatestServer is a mock of DataBrokerService_SyncLatestServer interface.
|
|
||||||
type MockDataBrokerService_SyncLatestServer struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockDataBrokerService_SyncLatestServerMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDataBrokerService_SyncLatestServerMockRecorder is the mock recorder for MockDataBrokerService_SyncLatestServer.
|
|
||||||
type MockDataBrokerService_SyncLatestServerMockRecorder struct {
|
|
||||||
mock *MockDataBrokerService_SyncLatestServer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockDataBrokerService_SyncLatestServer creates a new mock instance.
|
|
||||||
func NewMockDataBrokerService_SyncLatestServer(ctrl *gomock.Controller) *MockDataBrokerService_SyncLatestServer {
|
|
||||||
mock := &MockDataBrokerService_SyncLatestServer{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockDataBrokerService_SyncLatestServerMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestServer) EXPECT() *MockDataBrokerService_SyncLatestServerMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// Context mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestServer) Context() context.Context {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Context")
|
|
||||||
ret0, _ := ret[0].(context.Context)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Context indicates an expected call of Context.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) Context() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).Context))
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncLatestServer) RecvMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// RecvMsg indicates an expected call of RecvMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) RecvMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).RecvMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestServer) Send(arg0 *databroker.SyncLatestResponse) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Send", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send indicates an expected call of Send.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) Send(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).Send), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendHeader mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestServer) SendHeader(arg0 metadata.MD) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SendHeader", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendHeader indicates an expected call of SendHeader.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) SendHeader(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).SendHeader), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg mocks base method.
|
|
||||||
func (m_2 *MockDataBrokerService_SyncLatestServer) SendMsg(m any) error {
|
|
||||||
m_2.ctrl.T.Helper()
|
|
||||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg indicates an expected call of SendMsg.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) SendMsg(m any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).SendMsg), m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHeader mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestServer) SetHeader(arg0 metadata.MD) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SetHeader", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHeader indicates an expected call of SetHeader.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) SetHeader(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).SetHeader), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTrailer mocks base method.
|
|
||||||
func (m *MockDataBrokerService_SyncLatestServer) SetTrailer(arg0 metadata.MD) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
m.ctrl.Call(m, "SetTrailer", arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTrailer indicates an expected call of SetTrailer.
|
|
||||||
func (mr *MockDataBrokerService_SyncLatestServerMockRecorder) SetTrailer(arg0 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDataBrokerService_SyncLatestServer)(nil).SetTrailer), arg0)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: device.proto
|
// source: device.proto
|
||||||
|
|
||||||
|
@ -1112,7 +1112,7 @@ func file_device_proto_rawDescGZIP() []byte {
|
||||||
|
|
||||||
var file_device_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
|
var file_device_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
|
||||||
var file_device_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
var file_device_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||||
var file_device_proto_goTypes = []interface{}{
|
var file_device_proto_goTypes = []any{
|
||||||
(WebAuthnOptions_AttestationConveyancePreference)(0), // 0: pomerium.device.WebAuthnOptions.AttestationConveyancePreference
|
(WebAuthnOptions_AttestationConveyancePreference)(0), // 0: pomerium.device.WebAuthnOptions.AttestationConveyancePreference
|
||||||
(WebAuthnOptions_AuthenticatorAttachment)(0), // 1: pomerium.device.WebAuthnOptions.AuthenticatorAttachment
|
(WebAuthnOptions_AuthenticatorAttachment)(0), // 1: pomerium.device.WebAuthnOptions.AuthenticatorAttachment
|
||||||
(WebAuthnOptions_PublicKeyCredentialType)(0), // 2: pomerium.device.WebAuthnOptions.PublicKeyCredentialType
|
(WebAuthnOptions_PublicKeyCredentialType)(0), // 2: pomerium.device.WebAuthnOptions.PublicKeyCredentialType
|
||||||
|
@ -1154,7 +1154,7 @@ func file_device_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_device_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*WebAuthnOptions); i {
|
switch v := v.(*WebAuthnOptions); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1166,7 +1166,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Type); i {
|
switch v := v.(*Type); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1178,7 +1178,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Enrollment); i {
|
switch v := v.(*Enrollment); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1190,7 +1190,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Credential); i {
|
switch v := v.(*Credential); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1202,7 +1202,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*OwnerCredentialRecord); i {
|
switch v := v.(*OwnerCredentialRecord); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1214,7 +1214,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*WebAuthnOptions_AuthenticatorSelectionCriteria); i {
|
switch v := v.(*WebAuthnOptions_AuthenticatorSelectionCriteria); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1226,7 +1226,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*WebAuthnOptions_PublicKeyCredentialParameters); i {
|
switch v := v.(*WebAuthnOptions_PublicKeyCredentialParameters); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1238,7 +1238,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Type_WebAuthn); i {
|
switch v := v.(*Type_WebAuthn); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1250,7 +1250,7 @@ func file_device_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
file_device_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Credential_WebAuthn); i {
|
switch v := v.(*Credential_WebAuthn); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -1263,14 +1263,14 @@ func file_device_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
file_device_proto_msgTypes[0].OneofWrappers = []any{}
|
||||||
file_device_proto_msgTypes[1].OneofWrappers = []interface{}{
|
file_device_proto_msgTypes[1].OneofWrappers = []any{
|
||||||
(*Type_Webauthn)(nil),
|
(*Type_Webauthn)(nil),
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[3].OneofWrappers = []interface{}{
|
file_device_proto_msgTypes[3].OneofWrappers = []any{
|
||||||
(*Credential_Webauthn)(nil),
|
(*Credential_Webauthn)(nil),
|
||||||
}
|
}
|
||||||
file_device_proto_msgTypes[5].OneofWrappers = []interface{}{}
|
file_device_proto_msgTypes[5].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: last_error.proto
|
// source: last_error.proto
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ func file_last_error_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_last_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_last_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_last_error_proto_goTypes = []interface{}{
|
var file_last_error_proto_goTypes = []any{
|
||||||
(*LastError)(nil), // 0: pomerium.events.LastError
|
(*LastError)(nil), // 0: pomerium.events.LastError
|
||||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ func file_last_error_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_last_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_last_error_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*LastError); i {
|
switch v := v.(*LastError); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: identity.proto
|
// source: identity.proto
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ func file_identity_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
var file_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||||
var file_identity_proto_goTypes = []interface{}{
|
var file_identity_proto_goTypes = []any{
|
||||||
(*Provider)(nil), // 0: pomerium.identity.Provider
|
(*Provider)(nil), // 0: pomerium.identity.Provider
|
||||||
(*Profile)(nil), // 1: pomerium.identity.Profile
|
(*Profile)(nil), // 1: pomerium.identity.Profile
|
||||||
nil, // 2: pomerium.identity.Provider.RequestParamsEntry
|
nil, // 2: pomerium.identity.Provider.RequestParamsEntry
|
||||||
|
@ -277,7 +277,7 @@ func file_identity_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_identity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_identity_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Provider); i {
|
switch v := v.(*Provider); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -289,7 +289,7 @@ func file_identity_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_identity_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_identity_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Profile); i {
|
switch v := v.(*Profile); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
@ -52,7 +52,8 @@ _protos=(
|
||||||
)
|
)
|
||||||
_imports=()
|
_imports=()
|
||||||
for _proto in "${_protos[@]}"; do
|
for _proto in "${_protos[@]}"; do
|
||||||
_imports+=("M${_proto}=github.com/envoyproxy/go-control-plane/$(dirname "$_proto")")
|
_imports+=("--go_opt=M${_proto}=github.com/envoyproxy/go-control-plane/$(dirname "$_proto")")
|
||||||
|
_imports+=("--go-grpc_opt=M${_proto}=github.com/envoyproxy/go-control-plane/$(dirname "$_proto")")
|
||||||
done
|
done
|
||||||
_xds_protos=(
|
_xds_protos=(
|
||||||
"udpa/annotations/migrate.proto"
|
"udpa/annotations/migrate.proto"
|
||||||
|
@ -67,52 +68,37 @@ _xds_protos=(
|
||||||
"xds/annotations/v3/status.proto"
|
"xds/annotations/v3/status.proto"
|
||||||
)
|
)
|
||||||
for _proto in "${_xds_protos[@]}"; do
|
for _proto in "${_xds_protos[@]}"; do
|
||||||
_imports+=("M${_proto}=github.com/cncf/xds/go/$(dirname "$_proto")")
|
_imports+=("--go_opt=M${_proto}=github.com/cncf/xds/go/$(dirname "$_proto")")
|
||||||
|
_imports+=("--go-grpc_opt=M${_proto}=github.com/cncf/xds/go/$(dirname "$_proto")")
|
||||||
done
|
done
|
||||||
|
|
||||||
_import_paths=$(join_by , "${_imports[@]}")
|
_sub_directories=(
|
||||||
|
audit
|
||||||
|
cli
|
||||||
|
crypt
|
||||||
|
config
|
||||||
|
databroker
|
||||||
|
device
|
||||||
|
events
|
||||||
|
identity
|
||||||
|
registry
|
||||||
|
session
|
||||||
|
user
|
||||||
|
)
|
||||||
|
|
||||||
../../scripts/protoc -I ./audit/ \
|
for _d in "${_sub_directories[@]}"; do
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./audit/." \
|
../../scripts/protoc -I "./$_d/" -I "./" \
|
||||||
./audit/audit.proto
|
--go_out="./$_d" \
|
||||||
|
--go_opt="paths=source_relative" \
|
||||||
|
--go-grpc_out="./$_d" \
|
||||||
|
--go-grpc_opt="paths=source_relative" \
|
||||||
|
--go-grpc_opt="require_unimplemented_servers=false" \
|
||||||
|
"${_imports[@]}" \
|
||||||
|
"./$_d/"*.proto
|
||||||
|
done
|
||||||
|
|
||||||
../../scripts/protoc -I ./crypt/ \
|
../../scripts/protoc -I "./registry/" \
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./crypt/." \
|
--validate_out="./registry/" \
|
||||||
./crypt/crypt.proto
|
--validate_opt="lang=go" \
|
||||||
|
--validate_opt="paths=source_relative" \
|
||||||
../../scripts/protoc -I ./config/ -I ./ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./config/." \
|
|
||||||
./config/config.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./databroker/ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./databroker/." \
|
|
||||||
./databroker/databroker.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./device/ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./device/." \
|
|
||||||
./device/device.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./identity/ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./identity/." \
|
|
||||||
./identity/identity.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./registry/ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./registry/." \
|
|
||||||
--validate_out="lang=go,paths=source_relative:./registry" \
|
|
||||||
./registry/registry.proto
|
./registry/registry.proto
|
||||||
|
|
||||||
../../scripts/protoc -I ./session/ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./session/." \
|
|
||||||
./session/session.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./user/ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./user/." \
|
|
||||||
./user/user.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./events/ -I ./ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./events/." \
|
|
||||||
./events/last_error.proto
|
|
||||||
|
|
||||||
../../scripts/protoc -I ./cli/ -I ./ \
|
|
||||||
--go_out="$_import_paths,plugins=grpc,paths=source_relative:./cli/." \
|
|
||||||
./cli/api.proto
|
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: registry.proto
|
// source: registry.proto
|
||||||
|
|
||||||
package registry
|
package registry
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
|
||||||
_ "github.com/envoyproxy/protoc-gen-validate/validate"
|
_ "github.com/envoyproxy/protoc-gen-validate/validate"
|
||||||
grpc "google.golang.org/grpc"
|
|
||||||
codes "google.golang.org/grpc/codes"
|
|
||||||
status "google.golang.org/grpc/status"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
anypb "google.golang.org/protobuf/types/known/anypb"
|
anypb "google.golang.org/protobuf/types/known/anypb"
|
||||||
|
@ -513,7 +509,7 @@ func file_registry_proto_rawDescGZIP() []byte {
|
||||||
|
|
||||||
var file_registry_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
var file_registry_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||||
var file_registry_proto_goTypes = []interface{}{
|
var file_registry_proto_goTypes = []any{
|
||||||
(ServiceKind)(0), // 0: registry.ServiceKind
|
(ServiceKind)(0), // 0: registry.ServiceKind
|
||||||
(*Service)(nil), // 1: registry.Service
|
(*Service)(nil), // 1: registry.Service
|
||||||
(*RegisterRequest)(nil), // 2: registry.RegisterRequest
|
(*RegisterRequest)(nil), // 2: registry.RegisterRequest
|
||||||
|
@ -555,7 +551,7 @@ func file_registry_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_registry_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Service); i {
|
switch v := v.(*Service); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -567,7 +563,7 @@ func file_registry_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_registry_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*RegisterRequest); i {
|
switch v := v.(*RegisterRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -579,7 +575,7 @@ func file_registry_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_registry_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*RegisterResponse); i {
|
switch v := v.(*RegisterResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -591,7 +587,7 @@ func file_registry_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_registry_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ListRequest); i {
|
switch v := v.(*ListRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -603,7 +599,7 @@ func file_registry_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_registry_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ServiceRegistration); i {
|
switch v := v.(*ServiceRegistration); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -615,7 +611,7 @@ func file_registry_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_registry_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ServiceList); i {
|
switch v := v.(*ServiceList); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -648,195 +644,3 @@ func file_registry_proto_init() {
|
||||||
file_registry_proto_goTypes = nil
|
file_registry_proto_goTypes = nil
|
||||||
file_registry_proto_depIdxs = nil
|
file_registry_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
|
||||||
var _ context.Context
|
|
||||||
var _ grpc.ClientConnInterface
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
const _ = grpc.SupportPackageIsVersion6
|
|
||||||
|
|
||||||
// RegistryClient is the client API for Registry service.
|
|
||||||
//
|
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
||||||
type RegistryClient interface {
|
|
||||||
// Report is periodically sent by each service to confirm it is still serving
|
|
||||||
// with the registry data is persisted with a certain TTL
|
|
||||||
Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
|
|
||||||
// List returns current snapshot of the services known to the registry
|
|
||||||
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error)
|
|
||||||
// Watch returns a stream of updates
|
|
||||||
// for the simplicity of consumer its delivered as full snapshots
|
|
||||||
// and is only sent when change is detected
|
|
||||||
Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Registry_WatchClient, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type registryClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient {
|
|
||||||
return ®istryClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *registryClient) Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
|
||||||
out := new(RegisterResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/registry.Registry/Report", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *registryClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error) {
|
|
||||||
out := new(ServiceList)
|
|
||||||
err := c.cc.Invoke(ctx, "/registry.Registry/List", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *registryClient) Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) {
|
|
||||||
stream, err := c.cc.NewStream(ctx, &_Registry_serviceDesc.Streams[0], "/registry.Registry/Watch", opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
x := ®istryWatchClient{stream}
|
|
||||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := x.ClientStream.CloseSend(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return x, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Registry_WatchClient interface {
|
|
||||||
Recv() (*ServiceList, error)
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type registryWatchClient struct {
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *registryWatchClient) Recv() (*ServiceList, error) {
|
|
||||||
m := new(ServiceList)
|
|
||||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegistryServer is the server API for Registry service.
|
|
||||||
type RegistryServer interface {
|
|
||||||
// Report is periodically sent by each service to confirm it is still serving
|
|
||||||
// with the registry data is persisted with a certain TTL
|
|
||||||
Report(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
|
||||||
// List returns current snapshot of the services known to the registry
|
|
||||||
List(context.Context, *ListRequest) (*ServiceList, error)
|
|
||||||
// Watch returns a stream of updates
|
|
||||||
// for the simplicity of consumer its delivered as full snapshots
|
|
||||||
// and is only sent when change is detected
|
|
||||||
Watch(*ListRequest, Registry_WatchServer) error
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedRegistryServer can be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedRegistryServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*UnimplementedRegistryServer) Report(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Report not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ServiceList, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedRegistryServer) Watch(*ListRequest, Registry_WatchServer) error {
|
|
||||||
return status.Errorf(codes.Unimplemented, "method Watch not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterRegistryServer(s *grpc.Server, srv RegistryServer) {
|
|
||||||
s.RegisterService(&_Registry_serviceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Registry_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(RegisterRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(RegistryServer).Report(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/registry.Registry/Report",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(RegistryServer).Report(ctx, req.(*RegisterRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Registry_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ListRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(RegistryServer).List(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/registry.Registry/List",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(RegistryServer).List(ctx, req.(*ListRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Registry_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
||||||
m := new(ListRequest)
|
|
||||||
if err := stream.RecvMsg(m); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return srv.(RegistryServer).Watch(m, ®istryWatchServer{stream})
|
|
||||||
}
|
|
||||||
|
|
||||||
type Registry_WatchServer interface {
|
|
||||||
Send(*ServiceList) error
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type registryWatchServer struct {
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *registryWatchServer) Send(m *ServiceList) error {
|
|
||||||
return x.ServerStream.SendMsg(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var _Registry_serviceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "registry.Registry",
|
|
||||||
HandlerType: (*RegistryServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "Report",
|
|
||||||
Handler: _Registry_Report_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "List",
|
|
||||||
Handler: _Registry_List_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{
|
|
||||||
{
|
|
||||||
StreamName: "Watch",
|
|
||||||
Handler: _Registry_Watch_Handler,
|
|
||||||
ServerStreams: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Metadata: "registry.proto",
|
|
||||||
}
|
|
||||||
|
|
215
pkg/grpc/registry/registry_grpc.pb.go
Normal file
215
pkg/grpc/registry/registry_grpc.pb.go
Normal file
|
@ -0,0 +1,215 @@
|
||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
|
// - protoc v3.21.7
|
||||||
|
// source: registry.proto
|
||||||
|
|
||||||
|
package registry
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.64.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
|
const (
|
||||||
|
Registry_Report_FullMethodName = "/registry.Registry/Report"
|
||||||
|
Registry_List_FullMethodName = "/registry.Registry/List"
|
||||||
|
Registry_Watch_FullMethodName = "/registry.Registry/Watch"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegistryClient is the client API for Registry service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
//
|
||||||
|
// Registry is invoked by services to inform
|
||||||
|
type RegistryClient interface {
|
||||||
|
// Report is periodically sent by each service to confirm it is still serving
|
||||||
|
// with the registry data is persisted with a certain TTL
|
||||||
|
Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
|
||||||
|
// List returns current snapshot of the services known to the registry
|
||||||
|
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error)
|
||||||
|
// Watch returns a stream of updates
|
||||||
|
// for the simplicity of consumer its delivered as full snapshots
|
||||||
|
// and is only sent when change is detected
|
||||||
|
Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ServiceList], error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type registryClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient {
|
||||||
|
return ®istryClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *registryClient) Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(RegisterResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Registry_Report_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *registryClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ServiceList)
|
||||||
|
err := c.cc.Invoke(ctx, Registry_List_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *registryClient) Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ServiceList], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &Registry_ServiceDesc.Streams[0], Registry_Watch_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[ListRequest, ServiceList]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type Registry_WatchClient = grpc.ServerStreamingClient[ServiceList]
|
||||||
|
|
||||||
|
// RegistryServer is the server API for Registry service.
|
||||||
|
// All implementations should embed UnimplementedRegistryServer
|
||||||
|
// for forward compatibility.
|
||||||
|
//
|
||||||
|
// Registry is invoked by services to inform
|
||||||
|
type RegistryServer interface {
|
||||||
|
// Report is periodically sent by each service to confirm it is still serving
|
||||||
|
// with the registry data is persisted with a certain TTL
|
||||||
|
Report(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
||||||
|
// List returns current snapshot of the services known to the registry
|
||||||
|
List(context.Context, *ListRequest) (*ServiceList, error)
|
||||||
|
// Watch returns a stream of updates
|
||||||
|
// for the simplicity of consumer its delivered as full snapshots
|
||||||
|
// and is only sent when change is detected
|
||||||
|
Watch(*ListRequest, grpc.ServerStreamingServer[ServiceList]) error
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedRegistryServer should be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedRegistryServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedRegistryServer) Report(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Report not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ServiceList, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedRegistryServer) Watch(*ListRequest, grpc.ServerStreamingServer[ServiceList]) error {
|
||||||
|
return status.Errorf(codes.Unimplemented, "method Watch not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedRegistryServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to RegistryServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeRegistryServer interface {
|
||||||
|
mustEmbedUnimplementedRegistryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedRegistryServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&Registry_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Registry_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RegisterRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(RegistryServer).Report(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Registry_Report_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(RegistryServer).Report(ctx, req.(*RegisterRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Registry_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ListRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(RegistryServer).List(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Registry_List_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(RegistryServer).List(ctx, req.(*ListRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Registry_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(ListRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(RegistryServer).Watch(m, &grpc.GenericServerStream[ListRequest, ServiceList]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type Registry_WatchServer = grpc.ServerStreamingServer[ServiceList]
|
||||||
|
|
||||||
|
// Registry_ServiceDesc is the grpc.ServiceDesc for Registry service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Registry_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "registry.Registry",
|
||||||
|
HandlerType: (*RegistryServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Report",
|
||||||
|
Handler: _Registry_Report_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "List",
|
||||||
|
Handler: _Registry_List_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{
|
||||||
|
{
|
||||||
|
StreamName: "Watch",
|
||||||
|
Handler: _Registry_Watch_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Metadata: "registry.proto",
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: session.proto
|
// source: session.proto
|
||||||
|
|
||||||
|
@ -501,7 +501,7 @@ func file_session_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_session_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
var file_session_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
var file_session_proto_goTypes = []interface{}{
|
var file_session_proto_goTypes = []any{
|
||||||
(*IDToken)(nil), // 0: session.IDToken
|
(*IDToken)(nil), // 0: session.IDToken
|
||||||
(*OAuthToken)(nil), // 1: session.OAuthToken
|
(*OAuthToken)(nil), // 1: session.OAuthToken
|
||||||
(*Session)(nil), // 2: session.Session
|
(*Session)(nil), // 2: session.Session
|
||||||
|
@ -537,7 +537,7 @@ func file_session_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_session_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*IDToken); i {
|
switch v := v.(*IDToken); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -549,7 +549,7 @@ func file_session_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_session_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_session_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*OAuthToken); i {
|
switch v := v.(*OAuthToken); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -561,7 +561,7 @@ func file_session_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_session_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_session_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Session); i {
|
switch v := v.(*Session); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -573,7 +573,7 @@ func file_session_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_session_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_session_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Session_DeviceCredential); i {
|
switch v := v.(*Session_DeviceCredential); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -586,8 +586,8 @@ func file_session_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_session_proto_msgTypes[2].OneofWrappers = []interface{}{}
|
file_session_proto_msgTypes[2].OneofWrappers = []any{}
|
||||||
file_session_proto_msgTypes[3].OneofWrappers = []interface{}{
|
file_session_proto_msgTypes[3].OneofWrappers = []any{
|
||||||
(*Session_DeviceCredential_Unavailable)(nil),
|
(*Session_DeviceCredential_Unavailable)(nil),
|
||||||
(*Session_DeviceCredential_Id)(nil),
|
(*Session_DeviceCredential_Id)(nil),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc v3.21.7
|
// protoc v3.21.7
|
||||||
// source: user.proto
|
// source: user.proto
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ func file_user_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||||
var file_user_proto_goTypes = []interface{}{
|
var file_user_proto_goTypes = []any{
|
||||||
(*Claim)(nil), // 0: user.Claim
|
(*Claim)(nil), // 0: user.Claim
|
||||||
(*User)(nil), // 1: user.User
|
(*User)(nil), // 1: user.User
|
||||||
(*ServiceAccount)(nil), // 2: user.ServiceAccount
|
(*ServiceAccount)(nil), // 2: user.ServiceAccount
|
||||||
|
@ -355,7 +355,7 @@ func file_user_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_user_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Claim); i {
|
switch v := v.(*Claim); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -367,7 +367,7 @@ func file_user_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_user_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*User); i {
|
switch v := v.(*User); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -379,7 +379,7 @@ func file_user_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_user_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ServiceAccount); i {
|
switch v := v.(*ServiceAccount); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -392,7 +392,7 @@ func file_user_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_user_proto_msgTypes[2].OneofWrappers = []interface{}{}
|
file_user_proto_msgTypes[2].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
|
|
@ -12,12 +12,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type registryServer struct {
|
type registryServer struct {
|
||||||
|
registry.UnimplementedRegistryServer
|
||||||
*Backend
|
*Backend
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegistryServer returns a registry.RegistryServer for the backend.
|
// RegistryServer returns a registry.RegistryServer for the backend.
|
||||||
func (backend *Backend) RegistryServer() registry.RegistryServer {
|
func (backend *Backend) RegistryServer() registry.RegistryServer {
|
||||||
return registryServer{backend}
|
return registryServer{Backend: backend}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List lists services.
|
// List lists services.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
version: v1
|
version: v2
|
||||||
plugins:
|
plugins:
|
||||||
- name: go
|
- remote: buf.build/protocolbuffers/go:v1.34.2
|
||||||
out: .
|
out: .
|
||||||
opt: paths=source_relative
|
opt: paths=source_relative
|
||||||
- name: go-grpc
|
- remote: buf.build/grpc/go:v1.5.1
|
||||||
out: .
|
out: .
|
||||||
opt:
|
opt:
|
||||||
- paths=source_relative
|
- paths=source_relative
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
version: v1
|
version: v2
|
||||||
build: {}
|
|
||||||
lint:
|
lint:
|
||||||
use:
|
use:
|
||||||
- DEFAULT
|
- DEFAULT
|
||||||
|
except:
|
||||||
|
- FIELD_NOT_REQUIRED
|
||||||
|
- PACKAGE_NO_IMPORT_CYCLE
|
||||||
|
disallow_comment_ignores: true
|
||||||
breaking:
|
breaking:
|
||||||
use:
|
use:
|
||||||
- FILE
|
- FILE
|
||||||
|
except:
|
||||||
|
- EXTENSION_NO_DELETE
|
||||||
|
- FIELD_SAME_DEFAULT
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.30.0
|
// protoc-gen-go v1.34.2
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: connect.proto
|
// source: connect.proto
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ func file_connect_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_connect_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
var file_connect_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||||
var file_connect_proto_goTypes = []interface{}{
|
var file_connect_proto_goTypes = []any{
|
||||||
(*SubscribeRequest)(nil), // 0: pomerium.zero.SubscribeRequest
|
(*SubscribeRequest)(nil), // 0: pomerium.zero.SubscribeRequest
|
||||||
(*Message)(nil), // 1: pomerium.zero.Message
|
(*Message)(nil), // 1: pomerium.zero.Message
|
||||||
(*ConfigUpdated)(nil), // 2: pomerium.zero.ConfigUpdated
|
(*ConfigUpdated)(nil), // 2: pomerium.zero.ConfigUpdated
|
||||||
|
@ -601,7 +601,7 @@ func file_connect_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_connect_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SubscribeRequest); i {
|
switch v := v.(*SubscribeRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -613,7 +613,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Message); i {
|
switch v := v.(*Message); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -625,7 +625,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*ConfigUpdated); i {
|
switch v := v.(*ConfigUpdated); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -637,7 +637,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*BootstrapConfigUpdated); i {
|
switch v := v.(*BootstrapConfigUpdated); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -649,7 +649,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*TelemetryRequest); i {
|
switch v := v.(*TelemetryRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -661,7 +661,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*SessionAnalyticsRequest); i {
|
switch v := v.(*SessionAnalyticsRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -673,7 +673,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*EnvoyMetricsRequest); i {
|
switch v := v.(*EnvoyMetricsRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -685,7 +685,7 @@ func file_connect_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_connect_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*PomeriumMetricsRequest); i {
|
switch v := v.(*PomeriumMetricsRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
@ -698,12 +698,12 @@ func file_connect_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[1].OneofWrappers = []interface{}{
|
file_connect_proto_msgTypes[1].OneofWrappers = []any{
|
||||||
(*Message_ConfigUpdated)(nil),
|
(*Message_ConfigUpdated)(nil),
|
||||||
(*Message_BootstrapConfigUpdated)(nil),
|
(*Message_BootstrapConfigUpdated)(nil),
|
||||||
(*Message_TelemetryRequest)(nil),
|
(*Message_TelemetryRequest)(nil),
|
||||||
}
|
}
|
||||||
file_connect_proto_msgTypes[4].OneofWrappers = []interface{}{}
|
file_connect_proto_msgTypes[4].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: connect.proto
|
// source: connect.proto
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ import (
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.32.0 or later.
|
// Requires gRPC-Go v1.64.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion7
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Connect_Subscribe_FullMethodName = "/pomerium.zero.Connect/Subscribe"
|
Connect_Subscribe_FullMethodName = "/pomerium.zero.Connect/Subscribe"
|
||||||
|
@ -25,10 +25,13 @@ const (
|
||||||
// ConnectClient is the client API for Connect service.
|
// ConnectClient is the client API for Connect service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
//
|
||||||
|
// Connect service is used to maintain a persistent connection between the
|
||||||
|
// Pomerium Core and Zero Cloud and receive messages from the cloud.
|
||||||
type ConnectClient interface {
|
type ConnectClient interface {
|
||||||
// Subscribe is used to send a stream of messages from the Zero Cloud to the
|
// Subscribe is used to send a stream of messages from the Zero Cloud to the
|
||||||
// Pomerium Core in managed mode.
|
// Pomerium Core in managed mode.
|
||||||
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Connect_SubscribeClient, error)
|
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Message], error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type connectClient struct {
|
type connectClient struct {
|
||||||
|
@ -39,12 +42,13 @@ func NewConnectClient(cc grpc.ClientConnInterface) ConnectClient {
|
||||||
return &connectClient{cc}
|
return &connectClient{cc}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *connectClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Connect_SubscribeClient, error) {
|
func (c *connectClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Message], error) {
|
||||||
stream, err := c.cc.NewStream(ctx, &Connect_ServiceDesc.Streams[0], Connect_Subscribe_FullMethodName, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &Connect_ServiceDesc.Streams[0], Connect_Subscribe_FullMethodName, cOpts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
x := &connectSubscribeClient{stream}
|
x := &grpc.GenericClientStream[SubscribeRequest, Message]{ClientStream: stream}
|
||||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -54,39 +58,32 @@ func (c *connectClient) Subscribe(ctx context.Context, in *SubscribeRequest, opt
|
||||||
return x, nil
|
return x, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type Connect_SubscribeClient interface {
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
Recv() (*Message, error)
|
type Connect_SubscribeClient = grpc.ServerStreamingClient[Message]
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type connectSubscribeClient struct {
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *connectSubscribeClient) Recv() (*Message, error) {
|
|
||||||
m := new(Message)
|
|
||||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ConnectServer is the server API for Connect service.
|
// ConnectServer is the server API for Connect service.
|
||||||
// All implementations should embed UnimplementedConnectServer
|
// All implementations should embed UnimplementedConnectServer
|
||||||
// for forward compatibility
|
// for forward compatibility.
|
||||||
|
//
|
||||||
|
// Connect service is used to maintain a persistent connection between the
|
||||||
|
// Pomerium Core and Zero Cloud and receive messages from the cloud.
|
||||||
type ConnectServer interface {
|
type ConnectServer interface {
|
||||||
// Subscribe is used to send a stream of messages from the Zero Cloud to the
|
// Subscribe is used to send a stream of messages from the Zero Cloud to the
|
||||||
// Pomerium Core in managed mode.
|
// Pomerium Core in managed mode.
|
||||||
Subscribe(*SubscribeRequest, Connect_SubscribeServer) error
|
Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[Message]) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedConnectServer should be embedded to have forward compatible implementations.
|
// UnimplementedConnectServer should be embedded to have
|
||||||
type UnimplementedConnectServer struct {
|
// forward compatible implementations.
|
||||||
}
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedConnectServer struct{}
|
||||||
|
|
||||||
func (UnimplementedConnectServer) Subscribe(*SubscribeRequest, Connect_SubscribeServer) error {
|
func (UnimplementedConnectServer) Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[Message]) error {
|
||||||
return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedConnectServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
// UnsafeConnectServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeConnectServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to ConnectServer will
|
// Use of this interface is not recommended, as added methods to ConnectServer will
|
||||||
|
@ -96,6 +93,13 @@ type UnsafeConnectServer interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterConnectServer(s grpc.ServiceRegistrar, srv ConnectServer) {
|
func RegisterConnectServer(s grpc.ServiceRegistrar, srv ConnectServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedConnectServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
s.RegisterService(&Connect_ServiceDesc, srv)
|
s.RegisterService(&Connect_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,21 +108,11 @@ func _Connect_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error
|
||||||
if err := stream.RecvMsg(m); err != nil {
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return srv.(ConnectServer).Subscribe(m, &connectSubscribeServer{stream})
|
return srv.(ConnectServer).Subscribe(m, &grpc.GenericServerStream[SubscribeRequest, Message]{ServerStream: stream})
|
||||||
}
|
}
|
||||||
|
|
||||||
type Connect_SubscribeServer interface {
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
Send(*Message) error
|
type Connect_SubscribeServer = grpc.ServerStreamingServer[Message]
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type connectSubscribeServer struct {
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *connectSubscribeServer) Send(m *Message) error {
|
|
||||||
return x.ServerStream.SendMsg(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Connect_ServiceDesc is the grpc.ServiceDesc for Connect service.
|
// Connect_ServiceDesc is the grpc.ServiceDesc for Connect service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Package connect provides the way to listen for updates from the cloud
|
// Package connect provides the way to listen for updates from the cloud
|
||||||
package connect
|
package connect
|
||||||
|
|
||||||
//go:generate go run github.com/bufbuild/buf/cmd/buf@v1.32.2 generate --path connect.proto --config buf.yaml
|
//go:generate go run github.com/bufbuild/buf/cmd/buf@v1.36.0 generate --path connect.proto --config buf.yaml
|
||||||
|
|
|
@ -50,6 +50,7 @@ exec "$_protoc_path/bin/protoc" \
|
||||||
-I "$_protoc_3pp_path/googleapis" \
|
-I "$_protoc_3pp_path/googleapis" \
|
||||||
--experimental_allow_proto3_optional \
|
--experimental_allow_proto3_optional \
|
||||||
--plugin="protoc-gen-go=$_dir/protoc-gen-go" \
|
--plugin="protoc-gen-go=$_dir/protoc-gen-go" \
|
||||||
|
--plugin="protoc-gen-go-grpc=$_dir/protoc-gen-go-grpc" \
|
||||||
--plugin="protoc-gen-grpc-web=$_dir/protoc-gen-grpc-web" \
|
--plugin="protoc-gen-grpc-web=$_dir/protoc-gen-grpc-web" \
|
||||||
--plugin="protoc-gen-validate=$_dir/protoc-gen-validate" \
|
--plugin="protoc-gen-validate=$_dir/protoc-gen-validate" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
exec go run github.com/golang/protobuf/protoc-gen-go@v1.5.3 "$@"
|
exec go run google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 "$@"
|
||||||
|
|
3
scripts/protoc-gen-go-grpc
Executable file
3
scripts/protoc-gen-go-grpc
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
exec go run google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 "$@"
|
Loading…
Add table
Reference in a new issue