feat: analysis admin
This commit is contained in:
@@ -1693,6 +1693,7 @@ var AnalysisStore_ServiceDesc = grpc.ServiceDesc{
|
||||
}
|
||||
|
||||
const (
|
||||
AnalysisDevice_FaceLogin_FullMethodName = "/analysis.AnalysisDevice/FaceLogin"
|
||||
AnalysisDevice_Policy_FullMethodName = "/analysis.AnalysisDevice/Policy"
|
||||
AnalysisDevice_Display_FullMethodName = "/analysis.AnalysisDevice/Display"
|
||||
AnalysisDevice_OssCallback_FullMethodName = "/analysis.AnalysisDevice/OssCallback"
|
||||
@@ -1703,6 +1704,7 @@ const (
|
||||
//
|
||||
// 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 AnalysisDeviceClient interface {
|
||||
FaceLogin(ctx context.Context, in *FaceLoginReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Display(ctx context.Context, in *DeviceDisplayReq, opts ...grpc.CallOption) (*Response, error)
|
||||
OssCallback(ctx context.Context, in *OssCallbackReq, opts ...grpc.CallOption) (*OssCallbackResp, error)
|
||||
@@ -1717,6 +1719,16 @@ func NewAnalysisDeviceClient(cc grpc.ClientConnInterface) AnalysisDeviceClient {
|
||||
return &analysisDeviceClient{cc}
|
||||
}
|
||||
|
||||
func (c *analysisDeviceClient) FaceLogin(ctx context.Context, in *FaceLoginReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, AnalysisDevice_FaceLogin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *analysisDeviceClient) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
@@ -1761,6 +1773,7 @@ func (c *analysisDeviceClient) PyCallback(ctx context.Context, in *PyCallbackReq
|
||||
// All implementations must embed UnimplementedAnalysisDeviceServer
|
||||
// for forward compatibility.
|
||||
type AnalysisDeviceServer interface {
|
||||
FaceLogin(context.Context, *FaceLoginReq) (*Response, error)
|
||||
Policy(context.Context, *DevicePolicyReq) (*Response, error)
|
||||
Display(context.Context, *DeviceDisplayReq) (*Response, error)
|
||||
OssCallback(context.Context, *OssCallbackReq) (*OssCallbackResp, error)
|
||||
@@ -1775,6 +1788,9 @@ type AnalysisDeviceServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAnalysisDeviceServer struct{}
|
||||
|
||||
func (UnimplementedAnalysisDeviceServer) FaceLogin(context.Context, *FaceLoginReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method FaceLogin not implemented")
|
||||
}
|
||||
func (UnimplementedAnalysisDeviceServer) Policy(context.Context, *DevicePolicyReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Policy not implemented")
|
||||
}
|
||||
@@ -1808,6 +1824,24 @@ func RegisterAnalysisDeviceServer(s grpc.ServiceRegistrar, srv AnalysisDeviceSer
|
||||
s.RegisterService(&AnalysisDevice_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AnalysisDevice_FaceLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FaceLoginReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AnalysisDeviceServer).FaceLogin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AnalysisDevice_FaceLogin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AnalysisDeviceServer).FaceLogin(ctx, req.(*FaceLoginReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AnalysisDevice_Policy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DevicePolicyReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -1887,6 +1921,10 @@ var AnalysisDevice_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "analysis.AnalysisDevice",
|
||||
HandlerType: (*AnalysisDeviceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "FaceLogin",
|
||||
Handler: _AnalysisDevice_FaceLogin_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Policy",
|
||||
Handler: _AnalysisDevice_Policy_Handler,
|
||||
@@ -1907,3 +1945,181 @@ var AnalysisDevice_ServiceDesc = grpc.ServiceDesc{
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "analysis/analysis.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
AnalysisAdmin_UserList_FullMethodName = "/analysis.AnalysisAdmin/UserList"
|
||||
AnalysisAdmin_UserArchive_FullMethodName = "/analysis.AnalysisAdmin/UserArchive"
|
||||
AnalysisAdmin_UserDetail_FullMethodName = "/analysis.AnalysisAdmin/UserDetail"
|
||||
)
|
||||
|
||||
// AnalysisAdminClient is the client API for AnalysisAdmin 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 AnalysisAdminClient interface {
|
||||
UserList(ctx context.Context, in *AdminUserListReq, opts ...grpc.CallOption) (*Response, error)
|
||||
UserArchive(ctx context.Context, in *AdminUserArchiveReq, opts ...grpc.CallOption) (*Response, error)
|
||||
UserDetail(ctx context.Context, in *AdminUserDetailReq, opts ...grpc.CallOption) (*Response, error)
|
||||
}
|
||||
|
||||
type analysisAdminClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAnalysisAdminClient(cc grpc.ClientConnInterface) AnalysisAdminClient {
|
||||
return &analysisAdminClient{cc}
|
||||
}
|
||||
|
||||
func (c *analysisAdminClient) UserList(ctx context.Context, in *AdminUserListReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, AnalysisAdmin_UserList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *analysisAdminClient) UserArchive(ctx context.Context, in *AdminUserArchiveReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, AnalysisAdmin_UserArchive_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *analysisAdminClient) UserDetail(ctx context.Context, in *AdminUserDetailReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, AnalysisAdmin_UserDetail_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AnalysisAdminServer is the server API for AnalysisAdmin service.
|
||||
// All implementations must embed UnimplementedAnalysisAdminServer
|
||||
// for forward compatibility.
|
||||
type AnalysisAdminServer interface {
|
||||
UserList(context.Context, *AdminUserListReq) (*Response, error)
|
||||
UserArchive(context.Context, *AdminUserArchiveReq) (*Response, error)
|
||||
UserDetail(context.Context, *AdminUserDetailReq) (*Response, error)
|
||||
mustEmbedUnimplementedAnalysisAdminServer()
|
||||
}
|
||||
|
||||
// UnimplementedAnalysisAdminServer must 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 UnimplementedAnalysisAdminServer struct{}
|
||||
|
||||
func (UnimplementedAnalysisAdminServer) UserList(context.Context, *AdminUserListReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UserList not implemented")
|
||||
}
|
||||
func (UnimplementedAnalysisAdminServer) UserArchive(context.Context, *AdminUserArchiveReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UserArchive not implemented")
|
||||
}
|
||||
func (UnimplementedAnalysisAdminServer) UserDetail(context.Context, *AdminUserDetailReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UserDetail not implemented")
|
||||
}
|
||||
func (UnimplementedAnalysisAdminServer) mustEmbedUnimplementedAnalysisAdminServer() {}
|
||||
func (UnimplementedAnalysisAdminServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAnalysisAdminServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AnalysisAdminServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAnalysisAdminServer interface {
|
||||
mustEmbedUnimplementedAnalysisAdminServer()
|
||||
}
|
||||
|
||||
func RegisterAnalysisAdminServer(s grpc.ServiceRegistrar, srv AnalysisAdminServer) {
|
||||
// If the following call panics, it indicates UnimplementedAnalysisAdminServer 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(&AnalysisAdmin_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AnalysisAdmin_UserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AdminUserListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AnalysisAdminServer).UserList(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AnalysisAdmin_UserList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AnalysisAdminServer).UserList(ctx, req.(*AdminUserListReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AnalysisAdmin_UserArchive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AdminUserArchiveReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AnalysisAdminServer).UserArchive(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AnalysisAdmin_UserArchive_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AnalysisAdminServer).UserArchive(ctx, req.(*AdminUserArchiveReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AnalysisAdmin_UserDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AdminUserDetailReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AnalysisAdminServer).UserDetail(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AnalysisAdmin_UserDetail_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AnalysisAdminServer).UserDetail(ctx, req.(*AdminUserDetailReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AnalysisAdmin_ServiceDesc is the grpc.ServiceDesc for AnalysisAdmin service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AnalysisAdmin_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "analysis.AnalysisAdmin",
|
||||
HandlerType: (*AnalysisAdminServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "UserList",
|
||||
Handler: _AnalysisAdmin_UserList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UserArchive",
|
||||
Handler: _AnalysisAdmin_UserArchive_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UserDetail",
|
||||
Handler: _AnalysisAdmin_UserDetail_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "analysis/analysis.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user