Skip to content

Commit

Permalink
fix: make proto/all format
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
  • Loading branch information
hlts2 committed Sep 13, 2024
1 parent eac4d2c commit b406be6
Show file tree
Hide file tree
Showing 15 changed files with 4,287 additions and 2,611 deletions.
140 changes: 99 additions & 41 deletions apis/docs/v1/docs.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apis/grpc/v1/agent/sidecar/sidecar_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const _ = grpc.SupportPackageIsVersion7
// SidecarClient is the client API for Sidecar 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 SidecarClient any
type SidecarClient interface{}

type sidecarClient struct {
cc grpc.ClientConnInterface
Expand Down
60 changes: 32 additions & 28 deletions apis/grpc/v1/filter/egress/egress_filter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions apis/grpc/v1/filter/egress/egress_filter_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ const _ = grpc.SupportPackageIsVersion7
// 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 FilterClient interface {
// Represent the RPC to filter the distance.
FilterDistance(ctx context.Context, in *payload.Object_Distance, opts ...grpc.CallOption) (*payload.Object_Distance, error)
FilterDistance(ctx context.Context, in *payload.Filter_DistanceRequest, opts ...grpc.CallOption) (*payload.Filter_DistanceResponse, error)
// Represent the RPC to filter the vector.
FilterVector(ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption) (*payload.Object_Vector, error)
FilterVector(ctx context.Context, in *payload.Filter_VectorRequest, opts ...grpc.CallOption) (*payload.Filter_VectorResponse, error)
}

type filterClient struct {
Expand All @@ -57,9 +57,9 @@ func NewFilterClient(cc grpc.ClientConnInterface) FilterClient {
}

func (c *filterClient) FilterDistance(
ctx context.Context, in *payload.Object_Distance, opts ...grpc.CallOption,
) (*payload.Object_Distance, error) {
out := new(payload.Object_Distance)
ctx context.Context, in *payload.Filter_DistanceRequest, opts ...grpc.CallOption,
) (*payload.Filter_DistanceResponse, error) {
out := new(payload.Filter_DistanceResponse)
err := c.cc.Invoke(ctx, "/filter.egress.v1.Filter/FilterDistance", in, out, opts...)
if err != nil {
return nil, err
Expand All @@ -68,9 +68,9 @@ func (c *filterClient) FilterDistance(
}

func (c *filterClient) FilterVector(
ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption,
) (*payload.Object_Vector, error) {
out := new(payload.Object_Vector)
ctx context.Context, in *payload.Filter_VectorRequest, opts ...grpc.CallOption,
) (*payload.Filter_VectorResponse, error) {
out := new(payload.Filter_VectorResponse)
err := c.cc.Invoke(ctx, "/filter.egress.v1.Filter/FilterVector", in, out, opts...)
if err != nil {
return nil, err
Expand All @@ -83,24 +83,24 @@ func (c *filterClient) FilterVector(
// for forward compatibility
type FilterServer interface {
// Represent the RPC to filter the distance.
FilterDistance(context.Context, *payload.Object_Distance) (*payload.Object_Distance, error)
FilterDistance(context.Context, *payload.Filter_DistanceRequest) (*payload.Filter_DistanceResponse, error)
// Represent the RPC to filter the vector.
FilterVector(context.Context, *payload.Object_Vector) (*payload.Object_Vector, error)
FilterVector(context.Context, *payload.Filter_VectorRequest) (*payload.Filter_VectorResponse, error)
mustEmbedUnimplementedFilterServer()
}

// UnimplementedFilterServer must be embedded to have forward compatible implementations.
type UnimplementedFilterServer struct{}

func (UnimplementedFilterServer) FilterDistance(
context.Context, *payload.Object_Distance,
) (*payload.Object_Distance, error) {
context.Context, *payload.Filter_DistanceRequest,
) (*payload.Filter_DistanceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FilterDistance not implemented")
}

func (UnimplementedFilterServer) FilterVector(
context.Context, *payload.Object_Vector,
) (*payload.Object_Vector, error) {
context.Context, *payload.Filter_VectorRequest,
) (*payload.Filter_VectorResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FilterVector not implemented")
}
func (UnimplementedFilterServer) mustEmbedUnimplementedFilterServer() {}
Expand All @@ -119,7 +119,7 @@ func RegisterFilterServer(s grpc.ServiceRegistrar, srv FilterServer) {
func _Filter_FilterDistance_Handler(
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Object_Distance)
in := new(payload.Filter_DistanceRequest)
if err := dec(in); err != nil {
return nil, err
}
Expand All @@ -131,15 +131,15 @@ func _Filter_FilterDistance_Handler(
FullMethod: "/filter.egress.v1.Filter/FilterDistance",
}
handler := func(ctx context.Context, req any) (any, error) {
return srv.(FilterServer).FilterDistance(ctx, req.(*payload.Object_Distance))
return srv.(FilterServer).FilterDistance(ctx, req.(*payload.Filter_DistanceRequest))
}
return interceptor(ctx, in, info, handler)
}

func _Filter_FilterVector_Handler(
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor,
) (any, error) {
in := new(payload.Object_Vector)
in := new(payload.Filter_VectorRequest)
if err := dec(in); err != nil {
return nil, err
}
Expand All @@ -151,7 +151,7 @@ func _Filter_FilterVector_Handler(
FullMethod: "/filter.egress.v1.Filter/FilterVector",
}
handler := func(ctx context.Context, req any) (any, error) {
return srv.(FilterServer).FilterVector(ctx, req.(*payload.Object_Vector))
return srv.(FilterServer).FilterVector(ctx, req.(*payload.Filter_VectorRequest))
}
return interceptor(ctx, in, info, handler)
}
Expand Down
Loading

0 comments on commit b406be6

Please sign in to comment.