2024-11-28 05:12:22 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.12
// source: auth.proto
package auth
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.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
// AuthServiceClient is the client API for AuthService 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 AuthServiceClient interface {
2024-11-29 04:10:00 +00:00
GetSessionUser ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * SessionUserResponse , error )
2024-11-28 05:12:22 +00:00
GetGroupRole ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * RoleReponse , error )
ValidateSession ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * ValidateResponse , error )
}
type authServiceClient struct {
cc grpc . ClientConnInterface
}
func NewAuthServiceClient ( cc grpc . ClientConnInterface ) AuthServiceClient {
return & authServiceClient { cc }
}
2024-11-29 04:10:00 +00:00
func ( c * authServiceClient ) GetSessionUser ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * SessionUserResponse , error ) {
out := new ( SessionUserResponse )
err := c . cc . Invoke ( ctx , "/auth.AuthService/GetSessionUser" , in , out , opts ... )
2024-11-28 05:12:22 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * authServiceClient ) GetGroupRole ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * RoleReponse , error ) {
out := new ( RoleReponse )
err := c . cc . Invoke ( ctx , "/auth.AuthService/GetGroupRole" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * authServiceClient ) ValidateSession ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * ValidateResponse , error ) {
out := new ( ValidateResponse )
err := c . cc . Invoke ( ctx , "/auth.AuthService/ValidateSession" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// AuthServiceServer is the server API for AuthService service.
// All implementations must embed UnimplementedAuthServiceServer
// for forward compatibility
type AuthServiceServer interface {
2024-11-29 04:10:00 +00:00
GetSessionUser ( context . Context , * IdMessage ) ( * SessionUserResponse , error )
2024-11-28 05:12:22 +00:00
GetGroupRole ( context . Context , * IdMessage ) ( * RoleReponse , error )
ValidateSession ( context . Context , * IdMessage ) ( * ValidateResponse , error )
mustEmbedUnimplementedAuthServiceServer ( )
}
// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
type UnimplementedAuthServiceServer struct {
}
2024-11-29 04:10:00 +00:00
func ( UnimplementedAuthServiceServer ) GetSessionUser ( context . Context , * IdMessage ) ( * SessionUserResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetSessionUser not implemented" )
2024-11-28 05:12:22 +00:00
}
func ( UnimplementedAuthServiceServer ) GetGroupRole ( context . Context , * IdMessage ) ( * RoleReponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetGroupRole not implemented" )
}
func ( UnimplementedAuthServiceServer ) ValidateSession ( context . Context , * IdMessage ) ( * ValidateResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ValidateSession not implemented" )
}
func ( UnimplementedAuthServiceServer ) mustEmbedUnimplementedAuthServiceServer ( ) { }
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AuthServiceServer will
// result in compilation errors.
type UnsafeAuthServiceServer interface {
mustEmbedUnimplementedAuthServiceServer ( )
}
func RegisterAuthServiceServer ( s grpc . ServiceRegistrar , srv AuthServiceServer ) {
s . RegisterService ( & AuthService_ServiceDesc , srv )
}
2024-11-29 04:10:00 +00:00
func _AuthService_GetSessionUser_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-11-28 05:12:22 +00:00
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-11-29 04:10:00 +00:00
return srv . ( AuthServiceServer ) . GetSessionUser ( ctx , in )
2024-11-28 05:12:22 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-29 04:10:00 +00:00
FullMethod : "/auth.AuthService/GetSessionUser" ,
2024-11-28 05:12:22 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-11-29 04:10:00 +00:00
return srv . ( AuthServiceServer ) . GetSessionUser ( ctx , req . ( * IdMessage ) )
2024-11-28 05:12:22 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _AuthService_GetGroupRole_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( AuthServiceServer ) . GetGroupRole ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/auth.AuthService/GetGroupRole" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( AuthServiceServer ) . GetGroupRole ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _AuthService_ValidateSession_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( AuthServiceServer ) . ValidateSession ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/auth.AuthService/ValidateSession" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( AuthServiceServer ) . ValidateSession ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AuthService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "auth.AuthService" ,
HandlerType : ( * AuthServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
2024-11-29 04:10:00 +00:00
MethodName : "GetSessionUser" ,
Handler : _AuthService_GetSessionUser_Handler ,
2024-11-28 05:12:22 +00:00
} ,
{
MethodName : "GetGroupRole" ,
Handler : _AuthService_GetGroupRole_Handler ,
} ,
{
MethodName : "ValidateSession" ,
Handler : _AuthService_ValidateSession_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "auth.proto" ,
}