rpc

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveAndRegisterUserParams

type ApproveAndRegisterUserParams struct {
	rpc2.CommonParams

	// E-mail address of an approved user.
	Email simple.Email `json:"email"`
}

type ApproveAndRegisterUserResult

type ApproveAndRegisterUserResult = rpc2.CommonResultWithSuccess

type BanUserParams

type BanUserParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type BanUserResult

type BanUserResult = rpc2.CommonResultWithSuccess

type ChangeEmailParams

type ChangeEmailParams struct {
	rpc2.CommonParams

	// Step number.
	StepN simple.StepNumber `json:"stepN"`

	// New e-mail address.
	// Is used on step 1.
	NewEmail simple.Email `json:"newEmail"`

	// Request ID.
	// It protects e-mail changes from being hi-jacked.
	// Is used on step 2.
	RequestId simple.RequestId `json:"requestId"`

	// Authentication data provided for the challenge.
	// Is used on step 2.
	AuthChallengeResponse rpc2.AuthChallengeData `json:"authChallengeResponse"`

	// Verification Code for the old e-mail.
	// Is used on step 2.
	VerificationCodeOld simple.VerificationCode `json:"verificationCodeOld"`

	// Verification Code for the new e-mail.
	// Is used on step 2.
	VerificationCodeNew simple.VerificationCode `json:"verificationCodeNew"`

	// Captcha answer.
	// This field is optional and may be used on step 2.
	CaptchaAnswer simple.CaptchaAnswer `json:"captchaAnswer"`
}

type ChangeEmailResult

type ChangeEmailResult struct {
	rpc2.CommonResult
	rpc2.Success

	// Next required step. If set to zero, no further step is required.
	NextStep simple.StepNumber `json:"nextStep"`

	RequestId     simple.RequestId       `json:"requestId"`
	AuthDataBytes rpc2.AuthChallengeData `json:"authDataBytes"`

	// Captcha parameters.
	IsCaptchaNeeded base2.Flag       `json:"isCaptchaNeeded"`
	CaptchaId       simple.CaptchaId `json:"captchaId"`
}

type ChangePasswordParams

type ChangePasswordParams struct {
	rpc2.CommonParams

	// Step number.
	StepN simple.StepNumber `json:"stepN"`

	// New password.
	// Is used on step 1.
	NewPassword simple.Password `json:"newPassword"`

	// Request ID.
	// It protects password changes from being hi-jacked.
	// Is used on step 2.
	RequestId simple.RequestId `json:"requestId"`

	// Authentication data provided for the challenge.
	// Is used on step 2.
	AuthChallengeResponse rpc2.AuthChallengeData `json:"authChallengeResponse"`

	// Verification Code.
	// Is used on step 2.
	VerificationCode simple.VerificationCode `json:"verificationCode"`

	// Captcha answer.
	// This field is optional and may be used on step 2.
	CaptchaAnswer simple.CaptchaAnswer `json:"captchaAnswer"`
}

type ChangePasswordResult

type ChangePasswordResult struct {
	rpc2.CommonResult
	rpc2.Success

	// Next required step. If set to zero, no further step is required.
	NextStep simple.StepNumber `json:"nextStep"`

	RequestId     simple.RequestId       `json:"requestId"`
	AuthDataBytes rpc2.AuthChallengeData `json:"authDataBytes"`

	// Captcha parameters.
	IsCaptchaNeeded base2.Flag       `json:"isCaptchaNeeded"`
	CaptchaId       simple.CaptchaId `json:"captchaId"`
}

type GetListOfAllUsersOnPageParams

type GetListOfAllUsersOnPageParams struct {
	rpc2.CommonParams
	Page base2.Count `json:"page"`
}

type GetListOfAllUsersOnPageResult

type GetListOfAllUsersOnPageResult struct {
	rpc2.CommonResult
	UserIds  []base2.Id     `json:"userIds"`
	PageData *rpc2.PageData `json:"pageData,omitempty"`
}

type GetListOfAllUsersParams

type GetListOfAllUsersParams struct {
	rpc2.CommonParams
}

type GetListOfAllUsersResult

type GetListOfAllUsersResult struct {
	rpc2.CommonResult
	UserIds []base2.Id `json:"userIds"`
}

type GetListOfLoggedUsersOnPageParams

type GetListOfLoggedUsersOnPageParams struct {
	rpc2.CommonParams
	Page base2.Count `json:"page"`
}

type GetListOfLoggedUsersOnPageResult

type GetListOfLoggedUsersOnPageResult struct {
	rpc2.CommonResult
	LoggedUserIds []base2.Id     `json:"loggedUserIds"`
	PageData      *rpc2.PageData `json:"pageData,omitempty"`
}

type GetListOfLoggedUsersParams

type GetListOfLoggedUsersParams struct {
	rpc2.CommonParams
}

type GetListOfLoggedUsersResult

type GetListOfLoggedUsersResult struct {
	rpc2.CommonResult
	LoggedUserIds []base2.Id `json:"loggedUserIds"`
}

type GetListOfRegistrationsReadyForApprovalParams

type GetListOfRegistrationsReadyForApprovalParams struct {
	rpc2.CommonParams
	Page base2.Count `json:"page"`
}

type GetListOfRegistrationsReadyForApprovalResult

type GetListOfRegistrationsReadyForApprovalResult struct {
	rpc2.CommonResult
	RRFA     []models.RegistrationReadyForApproval `json:"rrfa"`
	PageData *rpc2.PageData                        `json:"pageData,omitempty"`
}

type GetSelfRolesParams

type GetSelfRolesParams struct {
	rpc2.CommonParams
}

type GetSelfRolesResult

type GetSelfRolesResult struct {
	rpc2.CommonResult
	User derived1.IUser `json:"user"`
}

type GetUserNameParams

type GetUserNameParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type GetUserNameResult

type GetUserNameResult struct {
	rpc2.CommonResult
	User derived1.IUser `json:"user"`
}

type GetUserRolesParams

type GetUserRolesParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type GetUserRolesResult

type GetUserRolesResult struct {
	rpc2.CommonResult
	User derived1.IUser `json:"user"`
}

type GetUserSessionParams

type GetUserSessionParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type GetUserSessionResult

type GetUserSessionResult struct {
	rpc2.CommonResult
	User    derived1.IUser  `json:"user"`
	Session *models.Session `json:"session"`
}

type IsUserLoggedInParams

type IsUserLoggedInParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type IsUserLoggedInResult

type IsUserLoggedInResult struct {
	rpc2.CommonResult
	UserId         base2.Id   `json:"userId"`
	IsUserLoggedIn base2.Flag `json:"isUserLoggedIn"`
}

type LogUserInParams

type LogUserInParams struct {
	rpc2.CommonParams

	// Step number.
	StepN simple.StepNumber `json:"stepN"`

	// E-mail address.
	// This is the main identifier of a user.
	// It is used on all steps.
	Email simple.Email `json:"email"`

	// Request ID.
	// It protects preliminary sessions from being hi-jacked.
	// Is used on steps 2 and 3.
	RequestId simple.RequestId `json:"requestId"`

	// Captcha answer.
	// This field is optional and may be used on step 2.
	CaptchaAnswer simple.CaptchaAnswer `json:"captchaAnswer"`

	// Authentication data provided for the challenge.
	// Is used on step 2.
	AuthChallengeResponse rpc2.AuthChallengeData `json:"authChallengeResponse"`

	// Verification Code.
	// Is used on step 3.
	VerificationCode simple.VerificationCode `json:"verificationCode"`
}

type LogUserInResult

type LogUserInResult struct {
	rpc2.CommonResult

	// Next required step. If set to zero, no further step is required.
	NextStep simple.StepNumber `json:"nextStep"`

	RequestId     simple.RequestId       `json:"requestId"`
	AuthDataBytes rpc2.AuthChallengeData `json:"authDataBytes"`

	// Captcha parameters.
	IsCaptchaNeeded base2.Flag        `json:"isCaptchaNeeded"`
	CaptchaId       *simple.CaptchaId `json:"captchaId"`

	// JWT key maker.
	IsWebTokenSet  base2.Flag            `json:"isWebTokenSet"`
	WebTokenString simple.WebTokenString `json:"wts,omitempty"`
}

type LogUserOutAParams

type LogUserOutAParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type LogUserOutAResult

type LogUserOutAResult = rpc2.CommonResultWithSuccess

type LogUserOutParams

type LogUserOutParams struct {
	rpc2.CommonParams
}

type LogUserOutResult

type LogUserOutResult = rpc2.CommonResultWithSuccess

type PingParams

type PingParams = rpc2.PingParams

type PingResult

type PingResult = rpc2.PingResult

type RegisterUserParams

type RegisterUserParams struct {
	rpc2.CommonParams

	// Step number.
	StepN simple.StepNumber `json:"stepN"`

	// E-mail address. Is used on steps 1, 2 and 3.
	Email simple.Email `json:"email"`

	// Verification code. Is used on steps 2 and 3.
	VerificationCode simple.VerificationCode `json:"verificationCode"`

	// Name. Is used on step 3.
	Name simple.Name `json:"name"`

	// Password. Is used on step 3.
	Password simple.Password `json:"password"`
}

type RegisterUserResult

type RegisterUserResult struct {
	rpc2.CommonResult

	// Next required step. If set to zero, no further step is required.
	NextStep simple.StepNumber `json:"nextStep"`
}

type RejectRegistrationRequestParams

type RejectRegistrationRequestParams struct {
	rpc2.CommonParams
	RegistrationRequestId base2.Id `json:"registrationRequestId"`
}

type RejectRegistrationRequestResult

type RejectRegistrationRequestResult = rpc2.CommonResultWithSuccess

type SetUserRoleAuthorParams

type SetUserRoleAuthorParams = SetUserRoleCommonParams

type SetUserRoleAuthorResult

type SetUserRoleAuthorResult = SetUserRoleCommonResult

type SetUserRoleCommonParams

type SetUserRoleCommonParams struct {
	rpc2.CommonParams
	UserId        base2.Id   `json:"userId"`
	IsRoleEnabled base2.Flag `json:"isRoleEnabled"`
}

type SetUserRoleCommonResult

type SetUserRoleCommonResult = rpc2.CommonResultWithSuccess

type SetUserRoleReaderParams

type SetUserRoleReaderParams = SetUserRoleCommonParams

type SetUserRoleReaderResult

type SetUserRoleReaderResult = SetUserRoleCommonResult

type SetUserRoleWriterParams

type SetUserRoleWriterParams = SetUserRoleCommonParams

type SetUserRoleWriterResult

type SetUserRoleWriterResult = SetUserRoleCommonResult

type ShowDiagnosticDataParams

type ShowDiagnosticDataParams struct{}

type ShowDiagnosticDataResult

type ShowDiagnosticDataResult struct {
	rpc2.CommonResult
	rpc2.RequestsCount
}

type TestParams

type TestParams struct{}

type TestResult

type TestResult struct {
	rpc2.CommonResult
}

type UnbanUserParams

type UnbanUserParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type UnbanUserResult

type UnbanUserResult = rpc2.CommonResultWithSuccess

type ViewUserParametersParams

type ViewUserParametersParams struct {
	rpc2.CommonParams
	UserId base2.Id `json:"userId"`
}

type ViewUserParametersResult

type ViewUserParametersResult struct {
	rpc2.CommonResult
	User derived1.IUser `json:"user"`
}

Jump to

Keyboard shortcuts

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