authService

package
v0.0.0-...-9b6346a Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authService.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _AuthService_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _AuthService_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _AuthService_Logout_Handler,
		},
		{
			MethodName: "Refresh",
			Handler:    _AuthService_Refresh_Handler,
		},
		{
			MethodName: "GenerateKey",
			Handler:    _AuthService_GenerateKey_Handler,
		},
		{
			MethodName: "UpdatePassword",
			Handler:    _AuthService_UpdatePassword_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 {
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterRes, error)
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRes, error)
	Logout(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LogoutRes, error)
	Refresh(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*RefreshRes, error)
	GenerateKey(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateKeyRes, error)
	UpdatePassword(ctx context.Context, in *UpdatePasswordReq, opts ...grpc.CallOption) (*UpdatePasswordRes, 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 {
	Register(context.Context, *RegisterReq) (*RegisterRes, error)
	Login(context.Context, *LoginReq) (*LoginRes, error)
	Logout(context.Context, *Empty) (*LogoutRes, error)
	Refresh(context.Context, *Empty) (*RefreshRes, error)
	GenerateKey(context.Context, *Empty) (*GenerateKeyRes, error)
	UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordRes, error)
}

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

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GenerateKeyRes

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

func (*GenerateKeyRes) Descriptor deprecated

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

Deprecated: Use GenerateKeyRes.ProtoReflect.Descriptor instead.

func (*GenerateKeyRes) GetAPIKey

func (x *GenerateKeyRes) GetAPIKey() string

func (*GenerateKeyRes) ProtoMessage

func (*GenerateKeyRes) ProtoMessage()

func (*GenerateKeyRes) ProtoReflect

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

func (*GenerateKeyRes) Reset

func (x *GenerateKeyRes) Reset()

func (*GenerateKeyRes) String

func (x *GenerateKeyRes) String() string

type LoginReq

type LoginReq 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 (*LoginReq) Descriptor deprecated

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

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetEmail

func (x *LoginReq) GetEmail() string

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

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

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

type LoginRes

type LoginRes struct {
	User        *User  `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	AccessToken string `protobuf:"bytes,2,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRes) Descriptor deprecated

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

Deprecated: Use LoginRes.ProtoReflect.Descriptor instead.

func (*LoginRes) GetAccessToken

func (x *LoginRes) GetAccessToken() string

func (*LoginRes) GetUser

func (x *LoginRes) GetUser() *User

func (*LoginRes) ProtoMessage

func (*LoginRes) ProtoMessage()

func (*LoginRes) ProtoReflect

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

func (*LoginRes) Reset

func (x *LoginRes) Reset()

func (*LoginRes) String

func (x *LoginRes) String() string

type LogoutRes

type LogoutRes struct {
	Status int64 `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutRes) Descriptor deprecated

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

Deprecated: Use LogoutRes.ProtoReflect.Descriptor instead.

func (*LogoutRes) GetStatus

func (x *LogoutRes) GetStatus() int64

func (*LogoutRes) ProtoMessage

func (*LogoutRes) ProtoMessage()

func (*LogoutRes) ProtoReflect

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

func (*LogoutRes) Reset

func (x *LogoutRes) Reset()

func (*LogoutRes) String

func (x *LogoutRes) String() string

type RefreshRes

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

func (*RefreshRes) Descriptor deprecated

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

Deprecated: Use RefreshRes.ProtoReflect.Descriptor instead.

func (*RefreshRes) GetAccessToken

func (x *RefreshRes) GetAccessToken() string

func (*RefreshRes) ProtoMessage

func (*RefreshRes) ProtoMessage()

func (*RefreshRes) ProtoReflect

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

func (*RefreshRes) Reset

func (x *RefreshRes) Reset()

func (*RefreshRes) String

func (x *RefreshRes) String() string

type RegisterReq

type RegisterReq struct {
	FirstName string `protobuf:"bytes,1,opt,name=FirstName,proto3" json:"FirstName,omitempty"`
	LastName  string `protobuf:"bytes,2,opt,name=LastName,proto3" json:"LastName,omitempty"`
	Email     string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"`
	Username  string `protobuf:"bytes,4,opt,name=Username,proto3" json:"Username,omitempty"`
	Password  string `protobuf:"bytes,5,opt,name=Password,proto3" json:"Password,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

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

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetEmail

func (x *RegisterReq) GetEmail() string

func (*RegisterReq) GetFirstName

func (x *RegisterReq) GetFirstName() string

func (*RegisterReq) GetLastName

func (x *RegisterReq) GetLastName() string

func (*RegisterReq) GetPassword

func (x *RegisterReq) GetPassword() string

func (*RegisterReq) GetUsername

func (x *RegisterReq) GetUsername() string

func (*RegisterReq) ProtoMessage

func (*RegisterReq) ProtoMessage()

func (*RegisterReq) ProtoReflect

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

func (*RegisterReq) Reset

func (x *RegisterReq) Reset()

func (*RegisterReq) String

func (x *RegisterReq) String() string

type RegisterRes

type RegisterRes struct {
	User        *User  `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	AccessToken string `protobuf:"bytes,2,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRes) Descriptor deprecated

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

Deprecated: Use RegisterRes.ProtoReflect.Descriptor instead.

func (*RegisterRes) GetAccessToken

func (x *RegisterRes) GetAccessToken() string

func (*RegisterRes) GetUser

func (x *RegisterRes) GetUser() *User

func (*RegisterRes) ProtoMessage

func (*RegisterRes) ProtoMessage()

func (*RegisterRes) ProtoReflect

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

func (*RegisterRes) Reset

func (x *RegisterRes) Reset()

func (*RegisterRes) String

func (x *RegisterRes) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) GenerateKey

func (UnimplementedAuthServiceServer) Login

func (UnimplementedAuthServiceServer) Logout

func (UnimplementedAuthServiceServer) Refresh

func (UnimplementedAuthServiceServer) Register

func (UnimplementedAuthServiceServer) UpdatePassword

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 UpdatePasswordReq

type UpdatePasswordReq struct {
	NewPassword     string `protobuf:"bytes,1,opt,name=NewPassword,proto3" json:"NewPassword,omitempty"`
	CurrentPassword string `protobuf:"bytes,2,opt,name=CurrentPassword,proto3" json:"CurrentPassword,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePasswordReq) Descriptor deprecated

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

Deprecated: Use UpdatePasswordReq.ProtoReflect.Descriptor instead.

func (*UpdatePasswordReq) GetCurrentPassword

func (x *UpdatePasswordReq) GetCurrentPassword() string

func (*UpdatePasswordReq) GetNewPassword

func (x *UpdatePasswordReq) GetNewPassword() string

func (*UpdatePasswordReq) ProtoMessage

func (*UpdatePasswordReq) ProtoMessage()

func (*UpdatePasswordReq) ProtoReflect

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

func (*UpdatePasswordReq) Reset

func (x *UpdatePasswordReq) Reset()

func (*UpdatePasswordReq) String

func (x *UpdatePasswordReq) String() string

type UpdatePasswordRes

type UpdatePasswordRes struct {
	Status int64 `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePasswordRes) Descriptor deprecated

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

Deprecated: Use UpdatePasswordRes.ProtoReflect.Descriptor instead.

func (*UpdatePasswordRes) GetStatus

func (x *UpdatePasswordRes) GetStatus() int64

func (*UpdatePasswordRes) ProtoMessage

func (*UpdatePasswordRes) ProtoMessage()

func (*UpdatePasswordRes) ProtoReflect

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

func (*UpdatePasswordRes) Reset

func (x *UpdatePasswordRes) Reset()

func (*UpdatePasswordRes) String

func (x *UpdatePasswordRes) String() string

type User

type User struct {
	Id           string                 `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Username     string                 `protobuf:"bytes,2,opt,name=Username,proto3" json:"Username,omitempty"`
	FirstName    string                 `protobuf:"bytes,3,opt,name=FirstName,proto3" json:"FirstName,omitempty"`
	LastName     string                 `protobuf:"bytes,4,opt,name=LastName,proto3" json:"LastName,omitempty"`
	Email        string                 `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"`
	Role         string                 `protobuf:"bytes,6,opt,name=Role,proto3" json:"Role,omitempty"`
	RootAdmin    bool                   `protobuf:"varint,7,opt,name=RootAdmin,proto3" json:"RootAdmin,omitempty"`
	GroupId      string                 `protobuf:"bytes,8,opt,name=GroupId,proto3" json:"GroupId,omitempty"`
	ImageId      string                 `protobuf:"bytes,9,opt,name=ImageId,proto3" json:"ImageId,omitempty"`
	LastModified *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=LastModified,proto3" json:"LastModified,omitempty"`
	CreatedAt    *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	DeletedAt    *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=DeletedAt,proto3" json:"DeletedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetDeletedAt

func (x *User) GetDeletedAt() *timestamppb.Timestamp

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFirstName

func (x *User) GetFirstName() string

func (*User) GetGroupId

func (x *User) GetGroupId() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetImageId

func (x *User) GetImageId() string

func (*User) GetLastModified

func (x *User) GetLastModified() *timestamppb.Timestamp

func (*User) GetLastName

func (x *User) GetLastName() string

func (*User) GetRole

func (x *User) GetRole() string

func (*User) GetRootAdmin

func (x *User) GetRootAdmin() bool

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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