auth

package
v0.0.0-...-931afa0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Signup",
			Handler:    _AuthService_Signup_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _AuthService_Login_Handler,
		},
		{
			MethodName: "Validate",
			Handler:    _AuthService_Validate_Handler,
		},
		{
			MethodName: "RenewAccessToken",
			Handler:    _AuthService_RenewAccessToken_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _AuthService_Logout_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)

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
	RenewAccessToken(ctx context.Context, in *RenewAccessTokenRequest, opts ...grpc.CallOption) (*RenewAccessTokenResponse, error)
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, 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.

type AuthServiceServer

type AuthServiceServer interface {
	Signup(context.Context, *SignupRequest) (*SignupResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
	RenewAccessToken(context.Context, *RenewAccessTokenRequest) (*RenewAccessTokenResponse, error)
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
	// contains filtered or unexported methods
}

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

type LoginRequest

type LoginRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

func (*LoginRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetEmail

func (x *LoginRequest) GetEmail() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

func (x *LoginRequest) ProtoReflect() protoreflect.Message

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	AccessToken           string                 `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken          string                 `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	SessionId             string                 `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	User                  *UserDetail            `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
	AccessTokenExpiresAt  *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=access_token_expires_at,json=accessTokenExpiresAt,proto3" json:"access_token_expires_at,omitempty"`
	RefreshTokenExpiresAt *timestamppb.Timestamp `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

func (*LoginResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAccessToken

func (x *LoginResponse) GetAccessToken() string

func (*LoginResponse) GetAccessTokenExpiresAt

func (x *LoginResponse) GetAccessTokenExpiresAt() *timestamppb.Timestamp

func (*LoginResponse) GetRefreshToken

func (x *LoginResponse) GetRefreshToken() string

func (*LoginResponse) GetRefreshTokenExpiresAt

func (x *LoginResponse) GetRefreshTokenExpiresAt() *timestamppb.Timestamp

func (*LoginResponse) GetSessionId

func (x *LoginResponse) GetSessionId() string

func (*LoginResponse) GetUser

func (x *LoginResponse) GetUser() *UserDetail

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

func (x *LoginResponse) ProtoReflect() protoreflect.Message

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type LogoutRequest

type LogoutRequest struct {
	AccessToken  string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutRequest) Descriptor deprecated

func (*LogoutRequest) Descriptor() ([]byte, []int)

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) GetAccessToken

func (x *LogoutRequest) GetAccessToken() string

func (*LogoutRequest) GetRefreshToken

func (x *LogoutRequest) GetRefreshToken() string

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

func (x *LogoutRequest) ProtoReflect() protoreflect.Message

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

type LogoutResponse

type LogoutResponse struct {
	// contains filtered or unexported fields
}

func (*LogoutResponse) Descriptor deprecated

func (*LogoutResponse) Descriptor() ([]byte, []int)

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

func (x *LogoutResponse) ProtoReflect() protoreflect.Message

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

type MockAuthServiceClient

type MockAuthServiceClient struct {
	// contains filtered or unexported fields
}

MockAuthServiceClient is a mock of AuthServiceClient interface.

func NewMockAuthServiceClient

func NewMockAuthServiceClient(ctrl *gomock.Controller) *MockAuthServiceClient

NewMockAuthServiceClient creates a new mock instance.

func (*MockAuthServiceClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthServiceClient) Login

Login mocks base method.

func (*MockAuthServiceClient) Logout

Logout mocks base method.

func (*MockAuthServiceClient) RenewAccessToken

RenewAccessToken mocks base method.

func (*MockAuthServiceClient) Signup

Signup mocks base method.

func (*MockAuthServiceClient) Validate

Validate mocks base method.

type MockAuthServiceClientMockRecorder

type MockAuthServiceClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthServiceClientMockRecorder is the mock recorder for MockAuthServiceClient.

func (*MockAuthServiceClientMockRecorder) Login

func (mr *MockAuthServiceClientMockRecorder) Login(ctx, in interface{}, opts ...interface{}) *gomock.Call

Login indicates an expected call of Login.

func (*MockAuthServiceClientMockRecorder) Logout

func (mr *MockAuthServiceClientMockRecorder) Logout(ctx, in interface{}, opts ...interface{}) *gomock.Call

Logout indicates an expected call of Logout.

func (*MockAuthServiceClientMockRecorder) RenewAccessToken

func (mr *MockAuthServiceClientMockRecorder) RenewAccessToken(ctx, in interface{}, opts ...interface{}) *gomock.Call

RenewAccessToken indicates an expected call of RenewAccessToken.

func (*MockAuthServiceClientMockRecorder) Signup

func (mr *MockAuthServiceClientMockRecorder) Signup(ctx, in interface{}, opts ...interface{}) *gomock.Call

Signup indicates an expected call of Signup.

func (*MockAuthServiceClientMockRecorder) Validate

func (mr *MockAuthServiceClientMockRecorder) Validate(ctx, in interface{}, opts ...interface{}) *gomock.Call

Validate indicates an expected call of Validate.

type MockAuthServiceServer

type MockAuthServiceServer struct {
	// contains filtered or unexported fields
}

MockAuthServiceServer is a mock of AuthServiceServer interface.

func NewMockAuthServiceServer

func NewMockAuthServiceServer(ctrl *gomock.Controller) *MockAuthServiceServer

NewMockAuthServiceServer creates a new mock instance.

func (*MockAuthServiceServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthServiceServer) Login

Login mocks base method.

func (*MockAuthServiceServer) Logout

Logout mocks base method.

func (*MockAuthServiceServer) RenewAccessToken

RenewAccessToken mocks base method.

func (*MockAuthServiceServer) Signup

Signup mocks base method.

func (*MockAuthServiceServer) Validate

Validate mocks base method.

type MockAuthServiceServerMockRecorder

type MockAuthServiceServerMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthServiceServerMockRecorder is the mock recorder for MockAuthServiceServer.

func (*MockAuthServiceServerMockRecorder) Login

func (mr *MockAuthServiceServerMockRecorder) Login(ctx, in interface{}) *gomock.Call

Login indicates an expected call of Login.

func (*MockAuthServiceServerMockRecorder) Logout

func (mr *MockAuthServiceServerMockRecorder) Logout(ctx, in interface{}) *gomock.Call

Logout indicates an expected call of Logout.

func (*MockAuthServiceServerMockRecorder) RenewAccessToken

func (mr *MockAuthServiceServerMockRecorder) RenewAccessToken(ctx, in interface{}) *gomock.Call

RenewAccessToken indicates an expected call of RenewAccessToken.

func (*MockAuthServiceServerMockRecorder) Signup

func (mr *MockAuthServiceServerMockRecorder) Signup(ctx, in interface{}) *gomock.Call

Signup indicates an expected call of Signup.

func (*MockAuthServiceServerMockRecorder) Validate

func (mr *MockAuthServiceServerMockRecorder) Validate(ctx, in interface{}) *gomock.Call

Validate indicates an expected call of Validate.

type RenewAccessTokenRequest

type RenewAccessTokenRequest struct {
	RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*RenewAccessTokenRequest) Descriptor deprecated

func (*RenewAccessTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use RenewAccessTokenRequest.ProtoReflect.Descriptor instead.

func (*RenewAccessTokenRequest) GetRefreshToken

func (x *RenewAccessTokenRequest) GetRefreshToken() string

func (*RenewAccessTokenRequest) ProtoMessage

func (*RenewAccessTokenRequest) ProtoMessage()

func (*RenewAccessTokenRequest) ProtoReflect

func (x *RenewAccessTokenRequest) ProtoReflect() protoreflect.Message

func (*RenewAccessTokenRequest) Reset

func (x *RenewAccessTokenRequest) Reset()

func (*RenewAccessTokenRequest) String

func (x *RenewAccessTokenRequest) String() string

type RenewAccessTokenResponse

type RenewAccessTokenResponse struct {
	AccessToken          string                 `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	AccessTokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=access_token_expires_at,json=accessTokenExpiresAt,proto3" json:"access_token_expires_at,omitempty"`
	// contains filtered or unexported fields
}

func (*RenewAccessTokenResponse) Descriptor deprecated

func (*RenewAccessTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use RenewAccessTokenResponse.ProtoReflect.Descriptor instead.

func (*RenewAccessTokenResponse) GetAccessToken

func (x *RenewAccessTokenResponse) GetAccessToken() string

func (*RenewAccessTokenResponse) GetAccessTokenExpiresAt

func (x *RenewAccessTokenResponse) GetAccessTokenExpiresAt() *timestamppb.Timestamp

func (*RenewAccessTokenResponse) ProtoMessage

func (*RenewAccessTokenResponse) ProtoMessage()

func (*RenewAccessTokenResponse) ProtoReflect

func (x *RenewAccessTokenResponse) ProtoReflect() protoreflect.Message

func (*RenewAccessTokenResponse) Reset

func (x *RenewAccessTokenResponse) Reset()

func (*RenewAccessTokenResponse) String

func (x *RenewAccessTokenResponse) String() string

type SignupRequest

type SignupRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SignupRequest) Descriptor deprecated

func (*SignupRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.

func (*SignupRequest) GetEmail

func (x *SignupRequest) GetEmail() string

func (*SignupRequest) GetName

func (x *SignupRequest) GetName() string

func (*SignupRequest) GetPassword

func (x *SignupRequest) GetPassword() string

func (*SignupRequest) ProtoMessage

func (*SignupRequest) ProtoMessage()

func (*SignupRequest) ProtoReflect

func (x *SignupRequest) ProtoReflect() protoreflect.Message

func (*SignupRequest) Reset

func (x *SignupRequest) Reset()

func (*SignupRequest) String

func (x *SignupRequest) String() string

type SignupResponse

type SignupResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*SignupResponse) Descriptor deprecated

func (*SignupResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.

func (*SignupResponse) GetMessage

func (x *SignupResponse) GetMessage() string

func (*SignupResponse) ProtoMessage

func (*SignupResponse) ProtoMessage()

func (*SignupResponse) ProtoReflect

func (x *SignupResponse) ProtoReflect() protoreflect.Message

func (*SignupResponse) Reset

func (x *SignupResponse) Reset()

func (*SignupResponse) String

func (x *SignupResponse) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) Login

func (UnimplementedAuthServiceServer) Logout

func (UnimplementedAuthServiceServer) RenewAccessToken

func (UnimplementedAuthServiceServer) Signup

func (UnimplementedAuthServiceServer) Validate

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 UserDetail

type UserDetail struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDetail) Descriptor deprecated

func (*UserDetail) Descriptor() ([]byte, []int)

Deprecated: Use UserDetail.ProtoReflect.Descriptor instead.

func (*UserDetail) GetEmail

func (x *UserDetail) GetEmail() string

func (*UserDetail) GetName

func (x *UserDetail) GetName() string

func (*UserDetail) ProtoMessage

func (*UserDetail) ProtoMessage()

func (*UserDetail) ProtoReflect

func (x *UserDetail) ProtoReflect() protoreflect.Message

func (*UserDetail) Reset

func (x *UserDetail) Reset()

func (*UserDetail) String

func (x *UserDetail) String() string

type ValidateRequest

type ValidateRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateRequest) Descriptor deprecated

func (*ValidateRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.

func (*ValidateRequest) GetToken

func (x *ValidateRequest) GetToken() string

func (*ValidateRequest) ProtoMessage

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) ProtoReflect

func (x *ValidateRequest) ProtoReflect() protoreflect.Message

func (*ValidateRequest) Reset

func (x *ValidateRequest) Reset()

func (*ValidateRequest) String

func (x *ValidateRequest) String() string

type ValidateResponse

type ValidateResponse struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Email  string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Role   string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateResponse) Descriptor deprecated

func (*ValidateResponse) Descriptor() ([]byte, []int)

Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.

func (*ValidateResponse) GetEmail

func (x *ValidateResponse) GetEmail() string

func (*ValidateResponse) GetRole

func (x *ValidateResponse) GetRole() string

func (*ValidateResponse) GetUserId

func (x *ValidateResponse) GetUserId() string

func (*ValidateResponse) ProtoMessage

func (*ValidateResponse) ProtoMessage()

func (*ValidateResponse) ProtoReflect

func (x *ValidateResponse) ProtoReflect() protoreflect.Message

func (*ValidateResponse) Reset

func (x *ValidateResponse) Reset()

func (*ValidateResponse) String

func (x *ValidateResponse) String() string

Jump to

Keyboard shortcuts

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