Postman the notifier

This commit is contained in:
2024-07-21 13:51:46 +08:00
parent 037fc8a18c
commit d74cdddbaf
22 changed files with 1361 additions and 195 deletions

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: auth.proto
@ -15,14 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
Auth_Authenticate_FullMethodName = "/proto.Auth/Authenticate"
Auth_EnsurePermGranted_FullMethodName = "/proto.Auth/EnsurePermGranted"
Auth_EnsureUserPermGranted_FullMethodName = "/proto.Auth/EnsureUserPermGranted"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// AuthClient is the client API for Auth service.
//
@ -42,9 +36,8 @@ func NewAuthClient(cc grpc.ClientConnInterface) AuthClient {
}
func (c *authClient) Authenticate(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AuthReply)
err := c.cc.Invoke(ctx, Auth_Authenticate_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Auth/Authenticate", in, out, opts...)
if err != nil {
return nil, err
}
@ -52,9 +45,8 @@ func (c *authClient) Authenticate(ctx context.Context, in *AuthRequest, opts ...
}
func (c *authClient) EnsurePermGranted(ctx context.Context, in *CheckPermRequest, opts ...grpc.CallOption) (*CheckPermResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckPermResponse)
err := c.cc.Invoke(ctx, Auth_EnsurePermGranted_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Auth/EnsurePermGranted", in, out, opts...)
if err != nil {
return nil, err
}
@ -62,9 +54,8 @@ func (c *authClient) EnsurePermGranted(ctx context.Context, in *CheckPermRequest
}
func (c *authClient) EnsureUserPermGranted(ctx context.Context, in *CheckUserPermRequest, opts ...grpc.CallOption) (*CheckUserPermResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckUserPermResponse)
err := c.cc.Invoke(ctx, Auth_EnsureUserPermGranted_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Auth/EnsureUserPermGranted", in, out, opts...)
if err != nil {
return nil, err
}
@ -117,7 +108,7 @@ func _Auth_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(i
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Auth_Authenticate_FullMethodName,
FullMethod: "/proto.Auth/Authenticate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServer).Authenticate(ctx, req.(*AuthRequest))
@ -135,7 +126,7 @@ func _Auth_EnsurePermGranted_Handler(srv interface{}, ctx context.Context, dec f
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Auth_EnsurePermGranted_FullMethodName,
FullMethod: "/proto.Auth/EnsurePermGranted",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServer).EnsurePermGranted(ctx, req.(*CheckPermRequest))
@ -153,7 +144,7 @@ func _Auth_EnsureUserPermGranted_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Auth_EnsureUserPermGranted_FullMethodName,
FullMethod: "/proto.Auth/EnsureUserPermGranted",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServer).EnsureUserPermGranted(ctx, req.(*CheckUserPermRequest))