authgrpc

package
v1.3.0-20230531113704-... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: unknown License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Ping_FullMethodName              = "/nuntio.sdk.api.auth.Service/Ping"
	Service_Login_FullMethodName             = "/nuntio.sdk.api.auth.Service/Login"
	Service_Logout_FullMethodName            = "/nuntio.sdk.api.auth.Service/Logout"
	Service_Get_FullMethodName               = "/nuntio.sdk.api.auth.Service/Get"
	Service_Register_FullMethodName          = "/nuntio.sdk.api.auth.Service/Register"
	Service_SendPasswordReset_FullMethodName = "/nuntio.sdk.api.auth.Service/SendPasswordReset"
	Service_ResetPassword_FullMethodName     = "/nuntio.sdk.api.auth.Service/ResetPassword"
	Service_Delete_FullMethodName            = "/nuntio.sdk.api.auth.Service/Delete"
	Service_RefreshToken_FullMethodName      = "/nuntio.sdk.api.auth.Service/RefreshToken"
	Service_GetAuthConfig_FullMethodName     = "/nuntio.sdk.api.auth.Service/GetAuthConfig"
	Service_VerifyEmail_FullMethodName       = "/nuntio.sdk.api.auth.Service/VerifyEmail"
	Service_VerifyPhoneNumber_FullMethodName = "/nuntio.sdk.api.auth.Service/VerifyPhoneNumber"
)

Variables

View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nuntio.sdk.api.auth.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _Service_Ping_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Service_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _Service_Logout_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Service_Get_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _Service_Register_Handler,
		},
		{
			MethodName: "SendPasswordReset",
			Handler:    _Service_SendPasswordReset_Handler,
		},
		{
			MethodName: "ResetPassword",
			Handler:    _Service_ResetPassword_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_Delete_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _Service_RefreshToken_Handler,
		},
		{
			MethodName: "GetAuthConfig",
			Handler:    _Service_GetAuthConfig_Handler,
		},
		{
			MethodName: "VerifyEmail",
			Handler:    _Service_VerifyEmail_Handler,
		},
		{
			MethodName: "VerifyPhoneNumber",
			Handler:    _Service_VerifyPhoneNumber_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "nuntio/sdk/api/auth/service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type ServiceClient

type ServiceClient interface {
	// Login a user from the frontend
	Ping(ctx context.Context, in *auth.PingRequest, opts ...grpc.CallOption) (*auth.PingResponse, error)
	// Login authenticats a user and returns a access/refresh token
	Login(ctx context.Context, in *auth.LoginRequest, opts ...grpc.CallOption) (*auth.LoginResponse, error)
	// Logout validates the access token and blocks it afterwards
	Logout(ctx context.Context, in *auth.LogoutRequest, opts ...grpc.CallOption) (*auth.LogoutResponse, error)
	// Get the logged in user
	Get(ctx context.Context, in *auth.GetRequest, opts ...grpc.CallOption) (*auth.GetResponse, error)
	// Register creates a new user
	Register(ctx context.Context, in *auth.RegisterRequest, opts ...grpc.CallOption) (*auth.RegisterResponse, error)
	// Send reset password email to the user
	SendPasswordReset(ctx context.Context, in *auth.SendPasswordResetRequest, opts ...grpc.CallOption) (*auth.SendPasswordResetResponse, error)
	// Reset password of the user
	ResetPassword(ctx context.Context, in *auth.ResetPasswordRequest, opts ...grpc.CallOption) (*auth.ResetPasswordResponse, error)
	// Delete logged in user
	Delete(ctx context.Context, in *auth.DeleteRequest, opts ...grpc.CallOption) (*auth.DeleteResponse, error)
	// Refresh logged in token pair
	RefreshToken(ctx context.Context, in *auth.RefreshTokenRequest, opts ...grpc.CallOption) (*auth.RefreshTokenResponse, error)
	// Get auth config for how available login methods
	GetAuthConfig(ctx context.Context, in *auth.GetAuthConfigRequest, opts ...grpc.CallOption) (*auth.GetAuthConfigResponse, error)
	// Verify email
	VerifyEmail(ctx context.Context, in *auth.VerifyEmailRequest, opts ...grpc.CallOption) (*auth.VerifyEmailResponse, error)
	// Verify phone number
	VerifyPhoneNumber(ctx context.Context, in *auth.VerifyPhoneNumberRequest, opts ...grpc.CallOption) (*auth.VerifyPhoneNumberResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Login a user from the frontend
	Ping(context.Context, *auth.PingRequest) (*auth.PingResponse, error)
	// Login authenticats a user and returns a access/refresh token
	Login(context.Context, *auth.LoginRequest) (*auth.LoginResponse, error)
	// Logout validates the access token and blocks it afterwards
	Logout(context.Context, *auth.LogoutRequest) (*auth.LogoutResponse, error)
	// Get the logged in user
	Get(context.Context, *auth.GetRequest) (*auth.GetResponse, error)
	// Register creates a new user
	Register(context.Context, *auth.RegisterRequest) (*auth.RegisterResponse, error)
	// Send reset password email to the user
	SendPasswordReset(context.Context, *auth.SendPasswordResetRequest) (*auth.SendPasswordResetResponse, error)
	// Reset password of the user
	ResetPassword(context.Context, *auth.ResetPasswordRequest) (*auth.ResetPasswordResponse, error)
	// Delete logged in user
	Delete(context.Context, *auth.DeleteRequest) (*auth.DeleteResponse, error)
	// Refresh logged in token pair
	RefreshToken(context.Context, *auth.RefreshTokenRequest) (*auth.RefreshTokenResponse, error)
	// Get auth config for how available login methods
	GetAuthConfig(context.Context, *auth.GetAuthConfigRequest) (*auth.GetAuthConfigResponse, error)
	// Verify email
	VerifyEmail(context.Context, *auth.VerifyEmailRequest) (*auth.VerifyEmailResponse, error)
	// Verify phone number
	VerifyPhoneNumber(context.Context, *auth.VerifyPhoneNumberRequest) (*auth.VerifyPhoneNumberResponse, error)
}

ServiceServer is the server API for Service service. All implementations should embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) GetAuthConfig

func (UnimplementedServiceServer) Login

func (UnimplementedServiceServer) Logout

func (UnimplementedServiceServer) Ping

func (UnimplementedServiceServer) RefreshToken

func (UnimplementedServiceServer) Register

func (UnimplementedServiceServer) ResetPassword

func (UnimplementedServiceServer) SendPasswordReset

func (UnimplementedServiceServer) VerifyEmail

func (UnimplementedServiceServer) VerifyPhoneNumber

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL