account

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package account is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Accounts_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hvx.api.v1alpha1.account.proto.Accounts",
	HandlerType: (*AccountsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IsExist",
			Handler:    _Accounts_IsExist_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Accounts_Create_Handler,
		},
		{
			MethodName: "GetByUsername",
			Handler:    _Accounts_GetByUsername_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Accounts_Delete_Handler,
		},
		{
			MethodName: "EditUsername",
			Handler:    _Accounts_EditUsername_Handler,
		},
		{
			MethodName: "EditPassword",
			Handler:    _Accounts_EditPassword_Handler,
		},
		{
			MethodName: "EditEmail",
			Handler:    _Accounts_EditEmail_Handler,
		},
		{
			MethodName: "Verify",
			Handler:    _Accounts_Verify_Handler,
		},
		{
			MethodName: "GetPrivateKey",
			Handler:    _Accounts_GetPrivateKey_Handler,
		},
		{
			MethodName: "IAm",
			Handler:    _Accounts_IAm_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/v1alpha1/account/account.proto",
}

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

View Source
var File_proto_v1alpha1_account_account_proto protoreflect.FileDescriptor

Functions

func RegisterAccountsHandler

func RegisterAccountsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAccountsHandler registers the http handlers for service Accounts to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAccountsHandlerClient

func RegisterAccountsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountsClient) error

RegisterAccountsHandlerClient registers the http handlers for service Accounts to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AccountsClient" to call the correct interceptors.

func RegisterAccountsHandlerFromEndpoint

func RegisterAccountsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAccountsHandlerFromEndpoint is same as RegisterAccountsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAccountsHandlerServer

func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountsServer) error

RegisterAccountsHandlerServer registers the http handlers for service Accounts to "mux". UnaryRPC :call AccountsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccountsHandlerFromEndpoint instead.

func RegisterAccountsServer

func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer)

Types

type AccountsClient

type AccountsClient interface {
	// IsExist checks if the account exists. The account name(username) is specified in the request.
	// If the account exists, it returns true. Otherwise, it returns false.
	IsExist(ctx context.Context, in *IsExistRequest, opts ...grpc.CallOption) (*IsExistResponse, error)
	// Create Anyone wishing to use hvx must first create an account using this API.
	// When registering, please take care to provide the user's public key, which is usually generated on the client side.
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	// GetByUsername to get all information about the account by username.
	// This API should only be called internally by the rpc, so the HTTP method of this API should be removed.
	// Even so, the method should not return private data about the account, such as password HASH, etc.
	GetByUsername(ctx context.Context, in *GetByUsernameRequest, opts ...grpc.CallOption) (*GetByUsernameResponse, error)
	// Delete all user information from the account system,
	// providing a TOKEN and password for verification of identity. and after confirmation of deletion, no account data will be retained,
	// including login information, all posted data, stored content and the matrix account used for instant messaging.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// EditUsername Update the account username.
	// will change the account username and the preferred_username in Actor.
	EditUsername(ctx context.Context, in *EditUsernameRequest, opts ...grpc.CallOption) (*EditUsernameResponse, error)
	// EditPassword Updating the password for the account requires logging out of all devices that have been logged in.
	EditPassword(ctx context.Context, in *EditPasswordRequest, opts ...grpc.CallOption) (*EditPasswordResponse, error)
	// EditEmail Edit the unique email for the account.
	EditEmail(ctx context.Context, in *EditEmailRequest, opts ...grpc.CallOption) (*EditEmailResponse, error)
	// Verify The API to verify that the account is correct.
	// Use this API for account verification, typically used when a user logs in.
	Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error)
	// GetPrivateKey Obtain the ActivityPub private key for use by ActivityPub.
	// Note that the private key is server-generated and, unlike the one generated by
	// the client and presented to the client when the account is created, the
	// key pair is only applied to the ActivityPub .
	GetPrivateKey(ctx context.Context, in *GetPrivateKeyRequest, opts ...grpc.CallOption) (*GetPrivateKeyResponse, error)
	// IAm The API for obtaining account information returns the user's personal data.
	IAm(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IAmResponse, error)
}

AccountsClient is the client API for Accounts 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 NewAccountsClient

func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient

type AccountsServer

type AccountsServer interface {
	// IsExist checks if the account exists. The account name(username) is specified in the request.
	// If the account exists, it returns true. Otherwise, it returns false.
	IsExist(context.Context, *IsExistRequest) (*IsExistResponse, error)
	// Create Anyone wishing to use hvx must first create an account using this API.
	// When registering, please take care to provide the user's public key, which is usually generated on the client side.
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	// GetByUsername to get all information about the account by username.
	// This API should only be called internally by the rpc, so the HTTP method of this API should be removed.
	// Even so, the method should not return private data about the account, such as password HASH, etc.
	GetByUsername(context.Context, *GetByUsernameRequest) (*GetByUsernameResponse, error)
	// Delete all user information from the account system,
	// providing a TOKEN and password for verification of identity. and after confirmation of deletion, no account data will be retained,
	// including login information, all posted data, stored content and the matrix account used for instant messaging.
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// EditUsername Update the account username.
	// will change the account username and the preferred_username in Actor.
	EditUsername(context.Context, *EditUsernameRequest) (*EditUsernameResponse, error)
	// EditPassword Updating the password for the account requires logging out of all devices that have been logged in.
	EditPassword(context.Context, *EditPasswordRequest) (*EditPasswordResponse, error)
	// EditEmail Edit the unique email for the account.
	EditEmail(context.Context, *EditEmailRequest) (*EditEmailResponse, error)
	// Verify The API to verify that the account is correct.
	// Use this API for account verification, typically used when a user logs in.
	Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
	// GetPrivateKey Obtain the ActivityPub private key for use by ActivityPub.
	// Note that the private key is server-generated and, unlike the one generated by
	// the client and presented to the client when the account is created, the
	// key pair is only applied to the ActivityPub .
	GetPrivateKey(context.Context, *GetPrivateKeyRequest) (*GetPrivateKeyResponse, error)
	// IAm The API for obtaining account information returns the user's personal data.
	IAm(context.Context, *emptypb.Empty) (*IAmResponse, error)
}

AccountsServer is the server API for Accounts service. All implementations should embed UnimplementedAccountsServer for forward compatibility

type CreateRequest

type CreateRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Mail     string `protobuf:"bytes,2,opt,name=mail,proto3" json:"mail,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// publicKey As the public key of the account, it will be generated by the client and submitted to the server,
	// but the privateKey will be kept only on the client and the server should never get the user's private key.
	PublicKey string `protobuf:"bytes,4,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	// contains filtered or unexported fields
}

CreateRequest Use the following parameters to create the account.

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetMail

func (x *CreateRequest) GetMail() string

func (*CreateRequest) GetPassword

func (x *CreateRequest) GetPassword() string

func (*CreateRequest) GetPublicKey

func (x *CreateRequest) GetPublicKey() string

func (*CreateRequest) GetUsername

func (x *CreateRequest) GetUsername() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Code   string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

CreateResponse Create account return code with status.

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetCode

func (x *CreateResponse) GetCode() string

func (*CreateResponse) GetStatus

func (x *CreateResponse) GetStatus() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {

	// If requested via http, the account ID is obtained from the context.
	// https://github.com/hvxahv/hvx/blob/main/microsvc/auth.go#L31
	AccountId int64  `protobuf:"varint,1,opt,name=accountId,proto3" json:"accountId,omitempty"`
	Password  string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

DeleteRequest Request to delete an account.

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetAccountId

func (x *DeleteRequest) GetAccountId() int64

func (*DeleteRequest) GetPassword

func (x *DeleteRequest) GetPassword() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	Code   string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

DeleteResponse Returns the status of the deleted account.

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetCode

func (x *DeleteResponse) GetCode() string

func (*DeleteResponse) GetStatus

func (x *DeleteResponse) GetStatus() string

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type EditEmailRequest

type EditEmailRequest struct {
	AccountId int64  `protobuf:"varint,1,opt,name=accountId,proto3" json:"accountId,omitempty"`
	Mail      string `protobuf:"bytes,2,opt,name=mail,proto3" json:"mail,omitempty"`
	// contains filtered or unexported fields
}

func (*EditEmailRequest) Descriptor deprecated

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

Deprecated: Use EditEmailRequest.ProtoReflect.Descriptor instead.

func (*EditEmailRequest) GetAccountId

func (x *EditEmailRequest) GetAccountId() int64

func (*EditEmailRequest) GetMail

func (x *EditEmailRequest) GetMail() string

func (*EditEmailRequest) ProtoMessage

func (*EditEmailRequest) ProtoMessage()

func (*EditEmailRequest) ProtoReflect

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

func (*EditEmailRequest) Reset

func (x *EditEmailRequest) Reset()

func (*EditEmailRequest) String

func (x *EditEmailRequest) String() string

type EditEmailResponse

type EditEmailResponse struct {
	Code   string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*EditEmailResponse) Descriptor deprecated

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

Deprecated: Use EditEmailResponse.ProtoReflect.Descriptor instead.

func (*EditEmailResponse) GetCode

func (x *EditEmailResponse) GetCode() string

func (*EditEmailResponse) GetStatus

func (x *EditEmailResponse) GetStatus() string

func (*EditEmailResponse) ProtoMessage

func (*EditEmailResponse) ProtoMessage()

func (*EditEmailResponse) ProtoReflect

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

func (*EditEmailResponse) Reset

func (x *EditEmailResponse) Reset()

func (*EditEmailResponse) String

func (x *EditEmailResponse) String() string

type EditPasswordRequest

type EditPasswordRequest 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"`
	NewPassword string `protobuf:"bytes,3,opt,name=newPassword,json=new,proto3" json:"newPassword,omitempty"`
	// contains filtered or unexported fields
}

EditPasswordRequest The structure of the request to change the account password.

{
 "username": "username",
 "password": "password",
 "new": "newPassword"
}

func (*EditPasswordRequest) Descriptor deprecated

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

Deprecated: Use EditPasswordRequest.ProtoReflect.Descriptor instead.

func (*EditPasswordRequest) GetNewPassword

func (x *EditPasswordRequest) GetNewPassword() string

func (*EditPasswordRequest) GetPassword

func (x *EditPasswordRequest) GetPassword() string

func (*EditPasswordRequest) GetUsername

func (x *EditPasswordRequest) GetUsername() string

func (*EditPasswordRequest) ProtoMessage

func (*EditPasswordRequest) ProtoMessage()

func (*EditPasswordRequest) ProtoReflect

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

func (*EditPasswordRequest) Reset

func (x *EditPasswordRequest) Reset()

func (*EditPasswordRequest) String

func (x *EditPasswordRequest) String() string

type EditPasswordResponse

type EditPasswordResponse struct {
	Code   string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*EditPasswordResponse) Descriptor deprecated

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

Deprecated: Use EditPasswordResponse.ProtoReflect.Descriptor instead.

func (*EditPasswordResponse) GetCode

func (x *EditPasswordResponse) GetCode() string

func (*EditPasswordResponse) GetStatus

func (x *EditPasswordResponse) GetStatus() string

func (*EditPasswordResponse) ProtoMessage

func (*EditPasswordResponse) ProtoMessage()

func (*EditPasswordResponse) ProtoReflect

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

func (*EditPasswordResponse) Reset

func (x *EditPasswordResponse) Reset()

func (*EditPasswordResponse) String

func (x *EditPasswordResponse) String() string

type EditUsernameRequest

type EditUsernameRequest struct {
	AccountId int64  `protobuf:"varint,1,opt,name=accountId,proto3" json:"accountId,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*EditUsernameRequest) Descriptor deprecated

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

Deprecated: Use EditUsernameRequest.ProtoReflect.Descriptor instead.

func (*EditUsernameRequest) GetAccountId

func (x *EditUsernameRequest) GetAccountId() int64

func (*EditUsernameRequest) GetUsername

func (x *EditUsernameRequest) GetUsername() string

func (*EditUsernameRequest) ProtoMessage

func (*EditUsernameRequest) ProtoMessage()

func (*EditUsernameRequest) ProtoReflect

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

func (*EditUsernameRequest) Reset

func (x *EditUsernameRequest) Reset()

func (*EditUsernameRequest) String

func (x *EditUsernameRequest) String() string

type EditUsernameResponse

type EditUsernameResponse struct {
	Code   string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*EditUsernameResponse) Descriptor deprecated

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

Deprecated: Use EditUsernameResponse.ProtoReflect.Descriptor instead.

func (*EditUsernameResponse) GetCode

func (x *EditUsernameResponse) GetCode() string

func (*EditUsernameResponse) GetStatus

func (x *EditUsernameResponse) GetStatus() string

func (*EditUsernameResponse) ProtoMessage

func (*EditUsernameResponse) ProtoMessage()

func (*EditUsernameResponse) ProtoReflect

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

func (*EditUsernameResponse) Reset

func (x *EditUsernameResponse) Reset()

func (*EditUsernameResponse) String

func (x *EditUsernameResponse) String() string

type GetByUsernameRequest

type GetByUsernameRequest struct {

	// The user name field is used as a dynamic parameter.
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

GetByUsernameRequest The username included in the request address is dynamic.

func (*GetByUsernameRequest) Descriptor deprecated

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

Deprecated: Use GetByUsernameRequest.ProtoReflect.Descriptor instead.

func (*GetByUsernameRequest) GetUsername

func (x *GetByUsernameRequest) GetUsername() string

func (*GetByUsernameRequest) ProtoMessage

func (*GetByUsernameRequest) ProtoMessage()

func (*GetByUsernameRequest) ProtoReflect

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

func (*GetByUsernameRequest) Reset

func (x *GetByUsernameRequest) Reset()

func (*GetByUsernameRequest) String

func (x *GetByUsernameRequest) String() string

type GetByUsernameResponse

type GetByUsernameResponse struct {
	AccountId int64  `protobuf:"varint,1,opt,name=accountId,proto3" json:"accountId,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Mail      string `protobuf:"bytes,3,opt,name=mail,proto3" json:"mail,omitempty"`
	Password  string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	ActorId   int64  `protobuf:"varint,5,opt,name=actorId,proto3" json:"actorId,omitempty"`
	// Whether the account is private or not.
	IsPrivate bool `protobuf:"varint,6,opt,name=isPrivate,proto3" json:"isPrivate,omitempty"`
	// contains filtered or unexported fields
}

GetByUsernameResponse Account data found and returned by username.

func (*GetByUsernameResponse) Descriptor deprecated

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

Deprecated: Use GetByUsernameResponse.ProtoReflect.Descriptor instead.

func (*GetByUsernameResponse) GetAccountId

func (x *GetByUsernameResponse) GetAccountId() int64

func (*GetByUsernameResponse) GetActorId

func (x *GetByUsernameResponse) GetActorId() int64

func (*GetByUsernameResponse) GetIsPrivate

func (x *GetByUsernameResponse) GetIsPrivate() bool

func (*GetByUsernameResponse) GetMail

func (x *GetByUsernameResponse) GetMail() string

func (*GetByUsernameResponse) GetPassword

func (x *GetByUsernameResponse) GetPassword() string

func (*GetByUsernameResponse) GetUsername

func (x *GetByUsernameResponse) GetUsername() string

func (*GetByUsernameResponse) ProtoMessage

func (*GetByUsernameResponse) ProtoMessage()

func (*GetByUsernameResponse) ProtoReflect

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

func (*GetByUsernameResponse) Reset

func (x *GetByUsernameResponse) Reset()

func (*GetByUsernameResponse) String

func (x *GetByUsernameResponse) String() string

type GetPrivateKeyRequest

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

func (*GetPrivateKeyRequest) Descriptor deprecated

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

Deprecated: Use GetPrivateKeyRequest.ProtoReflect.Descriptor instead.

func (*GetPrivateKeyRequest) GetAccountId

func (x *GetPrivateKeyRequest) GetAccountId() int64

func (*GetPrivateKeyRequest) ProtoMessage

func (*GetPrivateKeyRequest) ProtoMessage()

func (*GetPrivateKeyRequest) ProtoReflect

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

func (*GetPrivateKeyRequest) Reset

func (x *GetPrivateKeyRequest) Reset()

func (*GetPrivateKeyRequest) String

func (x *GetPrivateKeyRequest) String() string

type GetPrivateKeyResponse

type GetPrivateKeyResponse struct {
	Code       string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status     string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	PrivateKey string `protobuf:"bytes,3,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPrivateKeyResponse) Descriptor deprecated

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

Deprecated: Use GetPrivateKeyResponse.ProtoReflect.Descriptor instead.

func (*GetPrivateKeyResponse) GetCode

func (x *GetPrivateKeyResponse) GetCode() string

func (*GetPrivateKeyResponse) GetPrivateKey

func (x *GetPrivateKeyResponse) GetPrivateKey() string

func (*GetPrivateKeyResponse) GetStatus

func (x *GetPrivateKeyResponse) GetStatus() string

func (*GetPrivateKeyResponse) ProtoMessage

func (*GetPrivateKeyResponse) ProtoMessage()

func (*GetPrivateKeyResponse) ProtoReflect

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

func (*GetPrivateKeyResponse) Reset

func (x *GetPrivateKeyResponse) Reset()

func (*GetPrivateKeyResponse) String

func (x *GetPrivateKeyResponse) String() string

type IAmResponse

type IAmResponse struct {
	Account *GetByUsernameResponse `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Actor   *actor.ActorData       `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"`
	// contains filtered or unexported fields
}

func (*IAmResponse) Descriptor deprecated

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

Deprecated: Use IAmResponse.ProtoReflect.Descriptor instead.

func (*IAmResponse) GetAccount

func (x *IAmResponse) GetAccount() *GetByUsernameResponse

func (*IAmResponse) GetActor

func (x *IAmResponse) GetActor() *actor.ActorData

func (*IAmResponse) ProtoMessage

func (*IAmResponse) ProtoMessage()

func (*IAmResponse) ProtoReflect

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

func (*IAmResponse) Reset

func (x *IAmResponse) Reset()

func (*IAmResponse) String

func (x *IAmResponse) String() string

type IsExistRequest

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

IsExistRequest Provide the user name and check if the user name exists.

func (*IsExistRequest) Descriptor deprecated

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

Deprecated: Use IsExistRequest.ProtoReflect.Descriptor instead.

func (*IsExistRequest) GetUsername

func (x *IsExistRequest) GetUsername() string

func (*IsExistRequest) ProtoMessage

func (*IsExistRequest) ProtoMessage()

func (*IsExistRequest) ProtoReflect

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

func (*IsExistRequest) Reset

func (x *IsExistRequest) Reset()

func (*IsExistRequest) String

func (x *IsExistRequest) String() string

type IsExistResponse

type IsExistResponse struct {
	IsExist bool `protobuf:"varint,1,opt,name=isExist,proto3" json:"isExist,omitempty"`
	// contains filtered or unexported fields
}

IsExistResponse Returns a boolean result, true if the username exists, flase otherwise.

func (*IsExistResponse) Descriptor deprecated

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

Deprecated: Use IsExistResponse.ProtoReflect.Descriptor instead.

func (*IsExistResponse) GetIsExist

func (x *IsExistResponse) GetIsExist() bool

func (*IsExistResponse) ProtoMessage

func (*IsExistResponse) ProtoMessage()

func (*IsExistResponse) ProtoReflect

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

func (*IsExistResponse) Reset

func (x *IsExistResponse) Reset()

func (*IsExistResponse) String

func (x *IsExistResponse) String() string

type UnimplementedAccountsServer

type UnimplementedAccountsServer struct {
}

UnimplementedAccountsServer should be embedded to have forward compatible implementations.

func (UnimplementedAccountsServer) Create

func (UnimplementedAccountsServer) Delete

func (UnimplementedAccountsServer) EditEmail

func (UnimplementedAccountsServer) EditPassword

func (UnimplementedAccountsServer) EditUsername

func (UnimplementedAccountsServer) GetByUsername

func (UnimplementedAccountsServer) GetPrivateKey

func (UnimplementedAccountsServer) IAm

func (UnimplementedAccountsServer) IsExist

func (UnimplementedAccountsServer) Verify

type UnsafeAccountsServer

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

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

type VerifyRequest

type VerifyRequest 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
}

VerifyRequest Verify the request for the account, submit the account name and password.

func (*VerifyRequest) Descriptor deprecated

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

Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.

func (*VerifyRequest) GetPassword

func (x *VerifyRequest) GetPassword() string

func (*VerifyRequest) GetUsername

func (x *VerifyRequest) GetUsername() string

func (*VerifyRequest) ProtoMessage

func (*VerifyRequest) ProtoMessage()

func (*VerifyRequest) ProtoReflect

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

func (*VerifyRequest) Reset

func (x *VerifyRequest) Reset()

func (*VerifyRequest) String

func (x *VerifyRequest) String() string

type VerifyResponse

type VerifyResponse struct {
	Code      string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Status    string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	AccountId int64  `protobuf:"varint,3,opt,name=accountId,proto3" json:"accountId,omitempty"`
	Username  string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	Mail      string `protobuf:"bytes,5,opt,name=mail,proto3" json:"mail,omitempty"`
	ActorId   int64  `protobuf:"varint,6,opt,name=actorId,proto3" json:"actorId,omitempty"`
	// contains filtered or unexported fields
}

VerifyResponse Returns the data after validation, the status code, the status, and the data needed for the next operation.

func (*VerifyResponse) Descriptor deprecated

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

Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.

func (*VerifyResponse) GetAccountId

func (x *VerifyResponse) GetAccountId() int64

func (*VerifyResponse) GetActorId

func (x *VerifyResponse) GetActorId() int64

func (*VerifyResponse) GetCode

func (x *VerifyResponse) GetCode() string

func (*VerifyResponse) GetMail

func (x *VerifyResponse) GetMail() string

func (*VerifyResponse) GetStatus

func (x *VerifyResponse) GetStatus() string

func (*VerifyResponse) GetUsername

func (x *VerifyResponse) GetUsername() string

func (*VerifyResponse) ProtoMessage

func (*VerifyResponse) ProtoMessage()

func (*VerifyResponse) ProtoReflect

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

func (*VerifyResponse) Reset

func (x *VerifyResponse) Reset()

func (*VerifyResponse) String

func (x *VerifyResponse) String() string

Jump to

Keyboard shortcuts

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