authv1grpc

package
v1.6.0-20240902232541-... Latest Latest
Warning

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

Go to latest
Published: unknown License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthService_Register_FullMethodName     = "/listenup.auth.v1.AuthService/Register"
	AuthService_Login_FullMethodName        = "/listenup.auth.v1.AuthService/Login"
	AuthService_RefreshToken_FullMethodName = "/listenup.auth.v1.AuthService/RefreshToken"
)

Variables

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "listenup.auth.v1.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _AuthService_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _AuthService_Login_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _AuthService_RefreshToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "listenup/auth/v1/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)

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	// Registers a user and creates a [User] object behind the scenes
	Register(ctx context.Context, in *v1.RegisterRequest, opts ...grpc.CallOption) (*v1.RegisterResponse, error)
	// Logs the user in
	Login(ctx context.Context, in *v1.LoginRequest, opts ...grpc.CallOption) (*v1.LoginResponse, error)
	// Refreshes a users access token
	RefreshToken(ctx context.Context, in *v1.RefreshTokenRequest, opts ...grpc.CallOption) (*v1.RefreshTokenResponse, 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 {
	// Registers a user and creates a [User] object behind the scenes
	Register(context.Context, *v1.RegisterRequest) (*v1.RegisterResponse, error)
	// Logs the user in
	Login(context.Context, *v1.LoginRequest) (*v1.LoginResponse, error)
	// Refreshes a users access token
	RefreshToken(context.Context, *v1.RefreshTokenRequest) (*v1.RefreshTokenResponse, error)
}

AuthServiceServer is the server API for AuthService service. All implementations should embed UnimplementedAuthServiceServer for forward compatibility.

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct{}

UnimplementedAuthServiceServer should 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) Login

func (UnimplementedAuthServiceServer) RefreshToken

func (UnimplementedAuthServiceServer) Register

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.

Source Files

  • auth_grpc.pb.go

Jump to

Keyboard shortcuts

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