securityService

package
v0.0.0-...-7261592 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_security_proto protoreflect.FileDescriptor

Functions

func RegisterSecurityServiceServer

func RegisterSecurityServiceServer(s *grpc.Server, srv SecurityServiceServer)

Types

type AuthenticateUserRequest

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

func (*AuthenticateUserRequest) Descriptor deprecated

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

Deprecated: Use AuthenticateUserRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateUserRequest) GetPassword

func (x *AuthenticateUserRequest) GetPassword() string

func (*AuthenticateUserRequest) GetUsername

func (x *AuthenticateUserRequest) GetUsername() string

func (*AuthenticateUserRequest) ProtoMessage

func (*AuthenticateUserRequest) ProtoMessage()

func (*AuthenticateUserRequest) ProtoReflect

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

func (*AuthenticateUserRequest) Reset

func (x *AuthenticateUserRequest) Reset()

func (*AuthenticateUserRequest) String

func (x *AuthenticateUserRequest) String() string

type ChangePasswordRequest

type ChangePasswordRequest struct {
	UserName        string                 `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	OldPassword     string                 `protobuf:"bytes,2,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"`
	NewPassword     string                 `protobuf:"bytes,3,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	Comment         string                 `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`
	TransactionTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=transaction_time,json=transactionTime,proto3" json:"transaction_time,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangePasswordRequest) Descriptor deprecated

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

Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.

func (*ChangePasswordRequest) GetComment

func (x *ChangePasswordRequest) GetComment() string

func (*ChangePasswordRequest) GetNewPassword

func (x *ChangePasswordRequest) GetNewPassword() string

func (*ChangePasswordRequest) GetOldPassword

func (x *ChangePasswordRequest) GetOldPassword() string

func (*ChangePasswordRequest) GetTransactionTime

func (x *ChangePasswordRequest) GetTransactionTime() *timestamppb.Timestamp

func (*ChangePasswordRequest) GetUserName

func (x *ChangePasswordRequest) GetUserName() string

func (*ChangePasswordRequest) ProtoMessage

func (*ChangePasswordRequest) ProtoMessage()

func (*ChangePasswordRequest) ProtoReflect

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

func (*ChangePasswordRequest) Reset

func (x *ChangePasswordRequest) Reset()

func (*ChangePasswordRequest) String

func (x *ChangePasswordRequest) String() string

type LoginResponse

type LoginResponse struct {
	User        *dto.DUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	AccessToken string     `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// 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) GetUser

func (x *LoginResponse) GetUser() *dto.DUser

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 SecurityServiceClient

type SecurityServiceClient interface {
	// user login
	Login(ctx context.Context, in *UsernameAndPasswordToken, opts ...grpc.CallOption) (*LoginResponse, error)
	// user logout
	Logout(ctx context.Context, in *UsernameAndPasswordToken, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// change user password
	ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

SecurityServiceClient is the client API for SecurityService 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 SecurityServiceServer

type SecurityServiceServer interface {
	// user login
	Login(context.Context, *UsernameAndPasswordToken) (*LoginResponse, error)
	// user logout
	Logout(context.Context, *UsernameAndPasswordToken) (*emptypb.Empty, error)
	// change user password
	ChangePassword(context.Context, *ChangePasswordRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

SecurityServiceServer is the server API for SecurityService service. All implementations must embed UnimplementedSecurityServiceServer for forward compatibility

type UnimplementedSecurityServiceServer

type UnimplementedSecurityServiceServer struct {
}

UnimplementedSecurityServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSecurityServiceServer) ChangePassword

func (UnimplementedSecurityServiceServer) Login

func (UnimplementedSecurityServiceServer) Logout

type UnsafeSecurityServiceServer

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

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

type UsernameAndPasswordToken

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

func (*UsernameAndPasswordToken) Descriptor deprecated

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

Deprecated: Use UsernameAndPasswordToken.ProtoReflect.Descriptor instead.

func (*UsernameAndPasswordToken) GetPassword

func (x *UsernameAndPasswordToken) GetPassword() string

func (*UsernameAndPasswordToken) GetUsername

func (x *UsernameAndPasswordToken) GetUsername() string

func (*UsernameAndPasswordToken) ProtoMessage

func (*UsernameAndPasswordToken) ProtoMessage()

func (*UsernameAndPasswordToken) ProtoReflect

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

func (*UsernameAndPasswordToken) Reset

func (x *UsernameAndPasswordToken) Reset()

func (*UsernameAndPasswordToken) String

func (x *UsernameAndPasswordToken) String() string

Jump to

Keyboard shortcuts

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