Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type NoContent
- type Session
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) CreateSession(context.Context, *User) (*Session, error)
- func (UnimplementedAuthServiceServer) DeleteSession(context.Context, *Session) (*NoContent, error)
- func (UnimplementedAuthServiceServer) GetUserIDBySession(context.Context, *Session) (*User, error)
- func (UnimplementedAuthServiceServer) Ping(context.Context, *NoContent) (*NoContent, error)
- type UnsafeAuthServiceServer
- type User
Constants ¶
const ( AuthService_GetUserIDBySession_FullMethodName = "/auth.AuthService/GetUserIDBySession" AuthService_CreateSession_FullMethodName = "/auth.AuthService/CreateSession" AuthService_DeleteSession_FullMethodName = "/auth.AuthService/DeleteSession" AuthService_Ping_FullMethodName = "/auth.AuthService/Ping" )
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUserIDBySession", Handler: _AuthService_GetUserIDBySession_Handler, }, { MethodName: "CreateSession", Handler: _AuthService_CreateSession_Handler, }, { MethodName: "DeleteSession", Handler: _AuthService_DeleteSession_Handler, }, { MethodName: "Ping", Handler: _AuthService_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", }
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 File_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface { GetUserIDBySession(ctx context.Context, in *Session, opts ...grpc.CallOption) (*User, error) CreateSession(ctx context.Context, in *User, opts ...grpc.CallOption) (*Session, error) DeleteSession(ctx context.Context, in *Session, opts ...grpc.CallOption) (*NoContent, error) Ping(ctx context.Context, in *NoContent, opts ...grpc.CallOption) (*NoContent, error) }
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.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { GetUserIDBySession(context.Context, *Session) (*User, error) CreateSession(context.Context, *User) (*Session, error) DeleteSession(context.Context, *Session) (*NoContent, error) Ping(context.Context, *NoContent) (*NoContent, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.
type NoContent ¶
type NoContent struct {
// contains filtered or unexported fields
}
func (*NoContent) Descriptor
deprecated
func (*NoContent) ProtoMessage ¶
func (*NoContent) ProtoMessage()
func (*NoContent) ProtoReflect ¶
func (x *NoContent) ProtoReflect() protoreflect.Message
type Session ¶
type Session struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
UnimplementedAuthServiceServer 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.
func (UnimplementedAuthServiceServer) CreateSession ¶
func (UnimplementedAuthServiceServer) DeleteSession ¶
func (UnimplementedAuthServiceServer) GetUserIDBySession ¶
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
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 User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message