mirror of
https://github.com/mautrix/signal.git
synced 2026-11-11 08:39:17 -05:00
1407 lines
65 KiB
Go
Generated
1407 lines
65 KiB
Go
Generated
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc v7.34.1
|
|
// source: org/signal/chat/account.proto
|
|
|
|
package account
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
Accounts_GetAccountIdentity_FullMethodName = "/org.signal.chat.account.Accounts/GetAccountIdentity"
|
|
Accounts_GetEntitlements_FullMethodName = "/org.signal.chat.account.Accounts/GetEntitlements"
|
|
Accounts_DeleteAccount_FullMethodName = "/org.signal.chat.account.Accounts/DeleteAccount"
|
|
Accounts_SetRegistrationLock_FullMethodName = "/org.signal.chat.account.Accounts/SetRegistrationLock"
|
|
Accounts_ClearRegistrationLock_FullMethodName = "/org.signal.chat.account.Accounts/ClearRegistrationLock"
|
|
Accounts_ReserveUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/ReserveUsernameHash"
|
|
Accounts_ConfirmUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmUsernameHash"
|
|
Accounts_DeleteUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/DeleteUsernameHash"
|
|
Accounts_SetUsernameLink_FullMethodName = "/org.signal.chat.account.Accounts/SetUsernameLink"
|
|
Accounts_DeleteUsernameLink_FullMethodName = "/org.signal.chat.account.Accounts/DeleteUsernameLink"
|
|
Accounts_ConfigureUnidentifiedAccess_FullMethodName = "/org.signal.chat.account.Accounts/ConfigureUnidentifiedAccess"
|
|
Accounts_SetDiscoverableByPhoneNumber_FullMethodName = "/org.signal.chat.account.Accounts/SetDiscoverableByPhoneNumber"
|
|
Accounts_SetRegistrationRecoveryPassword_FullMethodName = "/org.signal.chat.account.Accounts/SetRegistrationRecoveryPassword"
|
|
Accounts_SetZkCredentialKey_FullMethodName = "/org.signal.chat.account.Accounts/SetZkCredentialKey"
|
|
Accounts_ChangeNumber_FullMethodName = "/org.signal.chat.account.Accounts/ChangeNumber"
|
|
Accounts_GetAccountDataReport_FullMethodName = "/org.signal.chat.account.Accounts/GetAccountDataReport"
|
|
Accounts_GetCapabilities_FullMethodName = "/org.signal.chat.account.Accounts/GetCapabilities"
|
|
Accounts_GenerateTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/GenerateTotpKey"
|
|
Accounts_ConfirmTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmTotpKey"
|
|
Accounts_StartWebAuthnRegistration_FullMethodName = "/org.signal.chat.account.Accounts/StartWebAuthnRegistration"
|
|
Accounts_FinishWebAuthnRegistration_FullMethodName = "/org.signal.chat.account.Accounts/FinishWebAuthnRegistration"
|
|
Accounts_ListMfaKeys_FullMethodName = "/org.signal.chat.account.Accounts/ListMfaKeys"
|
|
Accounts_SetMfaKeyMetadata_FullMethodName = "/org.signal.chat.account.Accounts/SetMfaKeyMetadata"
|
|
Accounts_RemoveMfaKey_FullMethodName = "/org.signal.chat.account.Accounts/RemoveMfaKey"
|
|
Accounts_StartMfaVerification_FullMethodName = "/org.signal.chat.account.Accounts/StartMfaVerification"
|
|
Accounts_FinishMfaVerification_FullMethodName = "/org.signal.chat.account.Accounts/FinishMfaVerification"
|
|
)
|
|
|
|
// 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.
|
|
//
|
|
// Provides methods for working with Signal accounts.
|
|
type AccountsClient interface {
|
|
// Returns basic identifiers for the authenticated account.
|
|
GetAccountIdentity(ctx context.Context, in *GetAccountIdentityRequest, opts ...grpc.CallOption) (*GetAccountIdentityResponse, error)
|
|
// Returns entitlements for the authenticated account.
|
|
GetEntitlements(ctx context.Context, in *GetEntitlementsRequest, opts ...grpc.CallOption) (*GetEntitlementsResponse, error)
|
|
// Deletes the authenticated account, purging all associated data in the
|
|
// process.
|
|
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error)
|
|
// Sets the registration lock secret for the authenticated account. To remove
|
|
// a registration lock, please use `ClearRegistrationLock`.
|
|
SetRegistrationLock(ctx context.Context, in *SetRegistrationLockRequest, opts ...grpc.CallOption) (*SetRegistrationLockResponse, error)
|
|
// Removes any registration lock credentials from the authenticated account.
|
|
ClearRegistrationLock(ctx context.Context, in *ClearRegistrationLockRequest, opts ...grpc.CallOption) (*ClearRegistrationLockResponse, error)
|
|
// Attempts to reserve one of multiple given username hashes. Reserved
|
|
// usernames may be claimed later via `ConfirmUsernameHash`.
|
|
ReserveUsernameHash(ctx context.Context, in *ReserveUsernameHashRequest, opts ...grpc.CallOption) (*ReserveUsernameHashResponse, error)
|
|
// Sets the username hash/encrypted username to a previously-reserved value
|
|
// (see `ReserveUsernameHash`).
|
|
ConfirmUsernameHash(ctx context.Context, in *ConfirmUsernameHashRequest, opts ...grpc.CallOption) (*ConfirmUsernameHashResponse, error)
|
|
// Clears the current username hash, ciphertext, and link for the
|
|
// authenticated user.
|
|
DeleteUsernameHash(ctx context.Context, in *DeleteUsernameHashRequest, opts ...grpc.CallOption) (*DeleteUsernameHashResponse, error)
|
|
// Associates the given username ciphertext with the account, replacing any
|
|
// previously stored ciphertext. A new link handle will optionally be created,
|
|
// and the link handle to use will be returned in any event.
|
|
SetUsernameLink(ctx context.Context, in *SetUsernameLinkRequest, opts ...grpc.CallOption) (*SetUsernameLinkResponse, error)
|
|
// Clears any username link associated with the authenticated account.
|
|
DeleteUsernameLink(ctx context.Context, in *DeleteUsernameLinkRequest, opts ...grpc.CallOption) (*DeleteUsernameLinkResponse, error)
|
|
// Configures "unidentified access" keys and preferences for the authenticated
|
|
// account. Other users permitted to interact with this account anonymously
|
|
// may take actions like fetching pre-keys and profiles for this account or
|
|
// sending sealed-sender messages without providing identifying credentials.
|
|
ConfigureUnidentifiedAccess(ctx context.Context, in *ConfigureUnidentifiedAccessRequest, opts ...grpc.CallOption) (*ConfigureUnidentifiedAccessResponse, error)
|
|
// Sets whether the authenticated account may be discovered by phone number
|
|
// via the Contact Discovery Service (CDS).
|
|
SetDiscoverableByPhoneNumber(ctx context.Context, in *SetDiscoverableByPhoneNumberRequest, opts ...grpc.CallOption) (*SetDiscoverableByPhoneNumberResponse, error)
|
|
// Sets the registration recovery password for the authenticated account.
|
|
SetRegistrationRecoveryPassword(ctx context.Context, in *SetRegistrationRecoveryPasswordRequest, opts ...grpc.CallOption) (*SetRegistrationRecoveryPasswordResponse, error)
|
|
// Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account.
|
|
SetZkCredentialKey(ctx context.Context, in *SetZkCredentialKeyRequest, opts ...grpc.CallOption) (*SetZkCredentialKeyResponse, error)
|
|
// Changes the phone number associated with the authenticated account.
|
|
ChangeNumber(ctx context.Context, in *ChangeNumberRequest, opts ...grpc.CallOption) (*ChangeNumberResponse, error)
|
|
// Produces a report of non-ephemeral account data stored by the service
|
|
GetAccountDataReport(ctx context.Context, in *GetAccountDataReportRequest, opts ...grpc.CallOption) (*GetAccountDataReportResponse, error)
|
|
// Gets the capabilities for the authenticated account.
|
|
GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error)
|
|
// Generates and stores a pending TOTP key for the authenticated account.
|
|
// To "activate" the key, callers must call the `ConfirmTotpKey` endpoint.
|
|
//
|
|
// TOTP keys may only be generated for accounts without phone numbers.
|
|
GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error)
|
|
// Confirms that the caller has stored and can derive one-time passwords from
|
|
// a pending TOTP key generated via `GenerateTotpKey` and stores/activates the
|
|
// key for the caller's account
|
|
//
|
|
// TOTP keys may only be generated for accounts without phone numbers.
|
|
ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error)
|
|
// Returns parameters for initiating a WebAuthn registration ceremony
|
|
//
|
|
// WebAuthn credentials may only be registered for accounts without phone numbers
|
|
StartWebAuthnRegistration(ctx context.Context, in *StartWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*StartWebAuthnRegistrationResponse, error)
|
|
// Concludes a WebAuthn registration ceremony to add a passkey to the authenticated account
|
|
//
|
|
// WebAuthn credentials may only be registered for accounts without phone numbers
|
|
FinishWebAuthnRegistration(ctx context.Context, in *FinishWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*FinishWebAuthnRegistrationResponse, error)
|
|
// Returns a list of confirmed MFA keys for the authenticated account
|
|
ListMfaKeys(ctx context.Context, in *ListMfaKeysRequest, opts ...grpc.CallOption) (*ListMfaKeysResponse, error)
|
|
// Updates encrypted, user-supplied metadata (e.g. a human-readable name and
|
|
// creation timestamp) for an existing, confirmed MFA key
|
|
SetMfaKeyMetadata(ctx context.Context, in *SetMfaKeyMetadataRequest, opts ...grpc.CallOption) (*SetMfaKeyMetadataResponse, error)
|
|
// Removes an MFA key from the authenticated account
|
|
RemoveMfaKey(ctx context.Context, in *RemoveMfaKeyRequest, opts ...grpc.CallOption) (*RemoveMfaKeyResponse, error)
|
|
// Requests the parameters needed to verify with an MFA factor associated with this account.
|
|
StartMfaVerification(ctx context.Context, in *StartMfaVerificationRequest, opts ...grpc.CallOption) (*StartMfaVerificationResponse, error)
|
|
// Attemps to verify an MFA factor associated with this account.
|
|
FinishMfaVerification(ctx context.Context, in *FinishMfaVerificationRequest, opts ...grpc.CallOption) (*FinishMfaVerificationResponse, error)
|
|
}
|
|
|
|
type accountsClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient {
|
|
return &accountsClient{cc}
|
|
}
|
|
|
|
func (c *accountsClient) GetAccountIdentity(ctx context.Context, in *GetAccountIdentityRequest, opts ...grpc.CallOption) (*GetAccountIdentityResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetAccountIdentityResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_GetAccountIdentity_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) GetEntitlements(ctx context.Context, in *GetEntitlementsRequest, opts ...grpc.CallOption) (*GetEntitlementsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetEntitlementsResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_GetEntitlements_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteAccountResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_DeleteAccount_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) SetRegistrationLock(ctx context.Context, in *SetRegistrationLockRequest, opts ...grpc.CallOption) (*SetRegistrationLockResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetRegistrationLockResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_SetRegistrationLock_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ClearRegistrationLock(ctx context.Context, in *ClearRegistrationLockRequest, opts ...grpc.CallOption) (*ClearRegistrationLockResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ClearRegistrationLockResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ClearRegistrationLock_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ReserveUsernameHash(ctx context.Context, in *ReserveUsernameHashRequest, opts ...grpc.CallOption) (*ReserveUsernameHashResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ReserveUsernameHashResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ReserveUsernameHash_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ConfirmUsernameHash(ctx context.Context, in *ConfirmUsernameHashRequest, opts ...grpc.CallOption) (*ConfirmUsernameHashResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ConfirmUsernameHashResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ConfirmUsernameHash_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) DeleteUsernameHash(ctx context.Context, in *DeleteUsernameHashRequest, opts ...grpc.CallOption) (*DeleteUsernameHashResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteUsernameHashResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_DeleteUsernameHash_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) SetUsernameLink(ctx context.Context, in *SetUsernameLinkRequest, opts ...grpc.CallOption) (*SetUsernameLinkResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetUsernameLinkResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_SetUsernameLink_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) DeleteUsernameLink(ctx context.Context, in *DeleteUsernameLinkRequest, opts ...grpc.CallOption) (*DeleteUsernameLinkResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteUsernameLinkResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_DeleteUsernameLink_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ConfigureUnidentifiedAccess(ctx context.Context, in *ConfigureUnidentifiedAccessRequest, opts ...grpc.CallOption) (*ConfigureUnidentifiedAccessResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ConfigureUnidentifiedAccessResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ConfigureUnidentifiedAccess_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) SetDiscoverableByPhoneNumber(ctx context.Context, in *SetDiscoverableByPhoneNumberRequest, opts ...grpc.CallOption) (*SetDiscoverableByPhoneNumberResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetDiscoverableByPhoneNumberResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_SetDiscoverableByPhoneNumber_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) SetRegistrationRecoveryPassword(ctx context.Context, in *SetRegistrationRecoveryPasswordRequest, opts ...grpc.CallOption) (*SetRegistrationRecoveryPasswordResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetRegistrationRecoveryPasswordResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_SetRegistrationRecoveryPassword_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) SetZkCredentialKey(ctx context.Context, in *SetZkCredentialKeyRequest, opts ...grpc.CallOption) (*SetZkCredentialKeyResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetZkCredentialKeyResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_SetZkCredentialKey_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ChangeNumber(ctx context.Context, in *ChangeNumberRequest, opts ...grpc.CallOption) (*ChangeNumberResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ChangeNumberResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ChangeNumber_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) GetAccountDataReport(ctx context.Context, in *GetAccountDataReportRequest, opts ...grpc.CallOption) (*GetAccountDataReportResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetAccountDataReportResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_GetAccountDataReport_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetCapabilitiesResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_GetCapabilities_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GenerateTotpKeyResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_GenerateTotpKey_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ConfirmTotpKeyResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ConfirmTotpKey_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) StartWebAuthnRegistration(ctx context.Context, in *StartWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*StartWebAuthnRegistrationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StartWebAuthnRegistrationResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_StartWebAuthnRegistration_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) FinishWebAuthnRegistration(ctx context.Context, in *FinishWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*FinishWebAuthnRegistrationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(FinishWebAuthnRegistrationResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_FinishWebAuthnRegistration_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) ListMfaKeys(ctx context.Context, in *ListMfaKeysRequest, opts ...grpc.CallOption) (*ListMfaKeysResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListMfaKeysResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_ListMfaKeys_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) SetMfaKeyMetadata(ctx context.Context, in *SetMfaKeyMetadataRequest, opts ...grpc.CallOption) (*SetMfaKeyMetadataResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetMfaKeyMetadataResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_SetMfaKeyMetadata_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) RemoveMfaKey(ctx context.Context, in *RemoveMfaKeyRequest, opts ...grpc.CallOption) (*RemoveMfaKeyResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RemoveMfaKeyResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_RemoveMfaKey_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) StartMfaVerification(ctx context.Context, in *StartMfaVerificationRequest, opts ...grpc.CallOption) (*StartMfaVerificationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StartMfaVerificationResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_StartMfaVerification_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsClient) FinishMfaVerification(ctx context.Context, in *FinishMfaVerificationRequest, opts ...grpc.CallOption) (*FinishMfaVerificationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(FinishMfaVerificationResponse)
|
|
err := c.cc.Invoke(ctx, Accounts_FinishMfaVerification_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AccountsServer is the server API for Accounts service.
|
|
// All implementations must embed UnimplementedAccountsServer
|
|
// for forward compatibility.
|
|
//
|
|
// Provides methods for working with Signal accounts.
|
|
type AccountsServer interface {
|
|
// Returns basic identifiers for the authenticated account.
|
|
GetAccountIdentity(context.Context, *GetAccountIdentityRequest) (*GetAccountIdentityResponse, error)
|
|
// Returns entitlements for the authenticated account.
|
|
GetEntitlements(context.Context, *GetEntitlementsRequest) (*GetEntitlementsResponse, error)
|
|
// Deletes the authenticated account, purging all associated data in the
|
|
// process.
|
|
DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error)
|
|
// Sets the registration lock secret for the authenticated account. To remove
|
|
// a registration lock, please use `ClearRegistrationLock`.
|
|
SetRegistrationLock(context.Context, *SetRegistrationLockRequest) (*SetRegistrationLockResponse, error)
|
|
// Removes any registration lock credentials from the authenticated account.
|
|
ClearRegistrationLock(context.Context, *ClearRegistrationLockRequest) (*ClearRegistrationLockResponse, error)
|
|
// Attempts to reserve one of multiple given username hashes. Reserved
|
|
// usernames may be claimed later via `ConfirmUsernameHash`.
|
|
ReserveUsernameHash(context.Context, *ReserveUsernameHashRequest) (*ReserveUsernameHashResponse, error)
|
|
// Sets the username hash/encrypted username to a previously-reserved value
|
|
// (see `ReserveUsernameHash`).
|
|
ConfirmUsernameHash(context.Context, *ConfirmUsernameHashRequest) (*ConfirmUsernameHashResponse, error)
|
|
// Clears the current username hash, ciphertext, and link for the
|
|
// authenticated user.
|
|
DeleteUsernameHash(context.Context, *DeleteUsernameHashRequest) (*DeleteUsernameHashResponse, error)
|
|
// Associates the given username ciphertext with the account, replacing any
|
|
// previously stored ciphertext. A new link handle will optionally be created,
|
|
// and the link handle to use will be returned in any event.
|
|
SetUsernameLink(context.Context, *SetUsernameLinkRequest) (*SetUsernameLinkResponse, error)
|
|
// Clears any username link associated with the authenticated account.
|
|
DeleteUsernameLink(context.Context, *DeleteUsernameLinkRequest) (*DeleteUsernameLinkResponse, error)
|
|
// Configures "unidentified access" keys and preferences for the authenticated
|
|
// account. Other users permitted to interact with this account anonymously
|
|
// may take actions like fetching pre-keys and profiles for this account or
|
|
// sending sealed-sender messages without providing identifying credentials.
|
|
ConfigureUnidentifiedAccess(context.Context, *ConfigureUnidentifiedAccessRequest) (*ConfigureUnidentifiedAccessResponse, error)
|
|
// Sets whether the authenticated account may be discovered by phone number
|
|
// via the Contact Discovery Service (CDS).
|
|
SetDiscoverableByPhoneNumber(context.Context, *SetDiscoverableByPhoneNumberRequest) (*SetDiscoverableByPhoneNumberResponse, error)
|
|
// Sets the registration recovery password for the authenticated account.
|
|
SetRegistrationRecoveryPassword(context.Context, *SetRegistrationRecoveryPasswordRequest) (*SetRegistrationRecoveryPasswordResponse, error)
|
|
// Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account.
|
|
SetZkCredentialKey(context.Context, *SetZkCredentialKeyRequest) (*SetZkCredentialKeyResponse, error)
|
|
// Changes the phone number associated with the authenticated account.
|
|
ChangeNumber(context.Context, *ChangeNumberRequest) (*ChangeNumberResponse, error)
|
|
// Produces a report of non-ephemeral account data stored by the service
|
|
GetAccountDataReport(context.Context, *GetAccountDataReportRequest) (*GetAccountDataReportResponse, error)
|
|
// Gets the capabilities for the authenticated account.
|
|
GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error)
|
|
// Generates and stores a pending TOTP key for the authenticated account.
|
|
// To "activate" the key, callers must call the `ConfirmTotpKey` endpoint.
|
|
//
|
|
// TOTP keys may only be generated for accounts without phone numbers.
|
|
GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error)
|
|
// Confirms that the caller has stored and can derive one-time passwords from
|
|
// a pending TOTP key generated via `GenerateTotpKey` and stores/activates the
|
|
// key for the caller's account
|
|
//
|
|
// TOTP keys may only be generated for accounts without phone numbers.
|
|
ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error)
|
|
// Returns parameters for initiating a WebAuthn registration ceremony
|
|
//
|
|
// WebAuthn credentials may only be registered for accounts without phone numbers
|
|
StartWebAuthnRegistration(context.Context, *StartWebAuthnRegistrationRequest) (*StartWebAuthnRegistrationResponse, error)
|
|
// Concludes a WebAuthn registration ceremony to add a passkey to the authenticated account
|
|
//
|
|
// WebAuthn credentials may only be registered for accounts without phone numbers
|
|
FinishWebAuthnRegistration(context.Context, *FinishWebAuthnRegistrationRequest) (*FinishWebAuthnRegistrationResponse, error)
|
|
// Returns a list of confirmed MFA keys for the authenticated account
|
|
ListMfaKeys(context.Context, *ListMfaKeysRequest) (*ListMfaKeysResponse, error)
|
|
// Updates encrypted, user-supplied metadata (e.g. a human-readable name and
|
|
// creation timestamp) for an existing, confirmed MFA key
|
|
SetMfaKeyMetadata(context.Context, *SetMfaKeyMetadataRequest) (*SetMfaKeyMetadataResponse, error)
|
|
// Removes an MFA key from the authenticated account
|
|
RemoveMfaKey(context.Context, *RemoveMfaKeyRequest) (*RemoveMfaKeyResponse, error)
|
|
// Requests the parameters needed to verify with an MFA factor associated with this account.
|
|
StartMfaVerification(context.Context, *StartMfaVerificationRequest) (*StartMfaVerificationResponse, error)
|
|
// Attemps to verify an MFA factor associated with this account.
|
|
FinishMfaVerification(context.Context, *FinishMfaVerificationRequest) (*FinishMfaVerificationResponse, error)
|
|
mustEmbedUnimplementedAccountsServer()
|
|
}
|
|
|
|
// UnimplementedAccountsServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedAccountsServer struct{}
|
|
|
|
func (UnimplementedAccountsServer) GetAccountIdentity(context.Context, *GetAccountIdentityRequest) (*GetAccountIdentityResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetAccountIdentity not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) GetEntitlements(context.Context, *GetEntitlementsRequest) (*GetEntitlementsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetEntitlements not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteAccount not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) SetRegistrationLock(context.Context, *SetRegistrationLockRequest) (*SetRegistrationLockResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetRegistrationLock not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ClearRegistrationLock(context.Context, *ClearRegistrationLockRequest) (*ClearRegistrationLockResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ClearRegistrationLock not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ReserveUsernameHash(context.Context, *ReserveUsernameHashRequest) (*ReserveUsernameHashResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ReserveUsernameHash not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ConfirmUsernameHash(context.Context, *ConfirmUsernameHashRequest) (*ConfirmUsernameHashResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ConfirmUsernameHash not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) DeleteUsernameHash(context.Context, *DeleteUsernameHashRequest) (*DeleteUsernameHashResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteUsernameHash not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) SetUsernameLink(context.Context, *SetUsernameLinkRequest) (*SetUsernameLinkResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetUsernameLink not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) DeleteUsernameLink(context.Context, *DeleteUsernameLinkRequest) (*DeleteUsernameLinkResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteUsernameLink not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ConfigureUnidentifiedAccess(context.Context, *ConfigureUnidentifiedAccessRequest) (*ConfigureUnidentifiedAccessResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ConfigureUnidentifiedAccess not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) SetDiscoverableByPhoneNumber(context.Context, *SetDiscoverableByPhoneNumberRequest) (*SetDiscoverableByPhoneNumberResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetDiscoverableByPhoneNumber not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) SetRegistrationRecoveryPassword(context.Context, *SetRegistrationRecoveryPasswordRequest) (*SetRegistrationRecoveryPasswordResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetRegistrationRecoveryPassword not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) SetZkCredentialKey(context.Context, *SetZkCredentialKeyRequest) (*SetZkCredentialKeyResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetZkCredentialKey not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ChangeNumber(context.Context, *ChangeNumberRequest) (*ChangeNumberResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ChangeNumber not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) GetAccountDataReport(context.Context, *GetAccountDataReportRequest) (*GetAccountDataReportResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetAccountDataReport not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCapabilities not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GenerateTotpKey not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ConfirmTotpKey not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) StartWebAuthnRegistration(context.Context, *StartWebAuthnRegistrationRequest) (*StartWebAuthnRegistrationResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method StartWebAuthnRegistration not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) FinishWebAuthnRegistration(context.Context, *FinishWebAuthnRegistrationRequest) (*FinishWebAuthnRegistrationResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method FinishWebAuthnRegistration not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) ListMfaKeys(context.Context, *ListMfaKeysRequest) (*ListMfaKeysResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListMfaKeys not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) SetMfaKeyMetadata(context.Context, *SetMfaKeyMetadataRequest) (*SetMfaKeyMetadataResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetMfaKeyMetadata not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) RemoveMfaKey(context.Context, *RemoveMfaKeyRequest) (*RemoveMfaKeyResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RemoveMfaKey not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) StartMfaVerification(context.Context, *StartMfaVerificationRequest) (*StartMfaVerificationResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method StartMfaVerification not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) FinishMfaVerification(context.Context, *FinishMfaVerificationRequest) (*FinishMfaVerificationResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method FinishMfaVerification not implemented")
|
|
}
|
|
func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {}
|
|
func (UnimplementedAccountsServer) testEmbeddedByValue() {}
|
|
|
|
// 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 UnsafeAccountsServer interface {
|
|
mustEmbedUnimplementedAccountsServer()
|
|
}
|
|
|
|
func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer) {
|
|
// If the following call panics, it indicates UnimplementedAccountsServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&Accounts_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Accounts_GetAccountIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetAccountIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).GetAccountIdentity(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_GetAccountIdentity_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).GetAccountIdentity(ctx, req.(*GetAccountIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_GetEntitlements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetEntitlementsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).GetEntitlements(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_GetEntitlements_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).GetEntitlements(ctx, req.(*GetEntitlementsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).DeleteAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_DeleteAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).DeleteAccount(ctx, req.(*DeleteAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_SetRegistrationLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetRegistrationLockRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).SetRegistrationLock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_SetRegistrationLock_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).SetRegistrationLock(ctx, req.(*SetRegistrationLockRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ClearRegistrationLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClearRegistrationLockRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ClearRegistrationLock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ClearRegistrationLock_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ClearRegistrationLock(ctx, req.(*ClearRegistrationLockRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ReserveUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ReserveUsernameHashRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ReserveUsernameHash(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ReserveUsernameHash_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ReserveUsernameHash(ctx, req.(*ReserveUsernameHashRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ConfirmUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConfirmUsernameHashRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ConfirmUsernameHash(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ConfirmUsernameHash_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ConfirmUsernameHash(ctx, req.(*ConfirmUsernameHashRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_DeleteUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUsernameHashRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).DeleteUsernameHash(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_DeleteUsernameHash_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).DeleteUsernameHash(ctx, req.(*DeleteUsernameHashRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_SetUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetUsernameLinkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).SetUsernameLink(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_SetUsernameLink_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).SetUsernameLink(ctx, req.(*SetUsernameLinkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_DeleteUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUsernameLinkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).DeleteUsernameLink(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_DeleteUsernameLink_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).DeleteUsernameLink(ctx, req.(*DeleteUsernameLinkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ConfigureUnidentifiedAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConfigureUnidentifiedAccessRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ConfigureUnidentifiedAccess(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ConfigureUnidentifiedAccess_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ConfigureUnidentifiedAccess(ctx, req.(*ConfigureUnidentifiedAccessRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_SetDiscoverableByPhoneNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetDiscoverableByPhoneNumberRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).SetDiscoverableByPhoneNumber(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_SetDiscoverableByPhoneNumber_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).SetDiscoverableByPhoneNumber(ctx, req.(*SetDiscoverableByPhoneNumberRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_SetRegistrationRecoveryPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetRegistrationRecoveryPasswordRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).SetRegistrationRecoveryPassword(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_SetRegistrationRecoveryPassword_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).SetRegistrationRecoveryPassword(ctx, req.(*SetRegistrationRecoveryPasswordRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_SetZkCredentialKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetZkCredentialKeyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).SetZkCredentialKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_SetZkCredentialKey_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).SetZkCredentialKey(ctx, req.(*SetZkCredentialKeyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ChangeNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ChangeNumberRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ChangeNumber(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ChangeNumber_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ChangeNumber(ctx, req.(*ChangeNumberRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_GetAccountDataReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetAccountDataReportRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).GetAccountDataReport(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_GetAccountDataReport_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).GetAccountDataReport(ctx, req.(*GetAccountDataReportRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCapabilitiesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).GetCapabilities(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_GetCapabilities_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).GetCapabilities(ctx, req.(*GetCapabilitiesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_GenerateTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GenerateTotpKeyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).GenerateTotpKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_GenerateTotpKey_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).GenerateTotpKey(ctx, req.(*GenerateTotpKeyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ConfirmTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConfirmTotpKeyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ConfirmTotpKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ConfirmTotpKey_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ConfirmTotpKey(ctx, req.(*ConfirmTotpKeyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_StartWebAuthnRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StartWebAuthnRegistrationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).StartWebAuthnRegistration(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_StartWebAuthnRegistration_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).StartWebAuthnRegistration(ctx, req.(*StartWebAuthnRegistrationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_FinishWebAuthnRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(FinishWebAuthnRegistrationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).FinishWebAuthnRegistration(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_FinishWebAuthnRegistration_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).FinishWebAuthnRegistration(ctx, req.(*FinishWebAuthnRegistrationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_ListMfaKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListMfaKeysRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).ListMfaKeys(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_ListMfaKeys_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).ListMfaKeys(ctx, req.(*ListMfaKeysRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_SetMfaKeyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetMfaKeyMetadataRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).SetMfaKeyMetadata(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_SetMfaKeyMetadata_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).SetMfaKeyMetadata(ctx, req.(*SetMfaKeyMetadataRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_RemoveMfaKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemoveMfaKeyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).RemoveMfaKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_RemoveMfaKey_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).RemoveMfaKey(ctx, req.(*RemoveMfaKeyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_StartMfaVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StartMfaVerificationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).StartMfaVerification(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_StartMfaVerification_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).StartMfaVerification(ctx, req.(*StartMfaVerificationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Accounts_FinishMfaVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(FinishMfaVerificationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsServer).FinishMfaVerification(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Accounts_FinishMfaVerification_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsServer).FinishMfaVerification(ctx, req.(*FinishMfaVerificationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// 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)
|
|
var Accounts_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "org.signal.chat.account.Accounts",
|
|
HandlerType: (*AccountsServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetAccountIdentity",
|
|
Handler: _Accounts_GetAccountIdentity_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetEntitlements",
|
|
Handler: _Accounts_GetEntitlements_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteAccount",
|
|
Handler: _Accounts_DeleteAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetRegistrationLock",
|
|
Handler: _Accounts_SetRegistrationLock_Handler,
|
|
},
|
|
{
|
|
MethodName: "ClearRegistrationLock",
|
|
Handler: _Accounts_ClearRegistrationLock_Handler,
|
|
},
|
|
{
|
|
MethodName: "ReserveUsernameHash",
|
|
Handler: _Accounts_ReserveUsernameHash_Handler,
|
|
},
|
|
{
|
|
MethodName: "ConfirmUsernameHash",
|
|
Handler: _Accounts_ConfirmUsernameHash_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUsernameHash",
|
|
Handler: _Accounts_DeleteUsernameHash_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetUsernameLink",
|
|
Handler: _Accounts_SetUsernameLink_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUsernameLink",
|
|
Handler: _Accounts_DeleteUsernameLink_Handler,
|
|
},
|
|
{
|
|
MethodName: "ConfigureUnidentifiedAccess",
|
|
Handler: _Accounts_ConfigureUnidentifiedAccess_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetDiscoverableByPhoneNumber",
|
|
Handler: _Accounts_SetDiscoverableByPhoneNumber_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetRegistrationRecoveryPassword",
|
|
Handler: _Accounts_SetRegistrationRecoveryPassword_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetZkCredentialKey",
|
|
Handler: _Accounts_SetZkCredentialKey_Handler,
|
|
},
|
|
{
|
|
MethodName: "ChangeNumber",
|
|
Handler: _Accounts_ChangeNumber_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAccountDataReport",
|
|
Handler: _Accounts_GetAccountDataReport_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCapabilities",
|
|
Handler: _Accounts_GetCapabilities_Handler,
|
|
},
|
|
{
|
|
MethodName: "GenerateTotpKey",
|
|
Handler: _Accounts_GenerateTotpKey_Handler,
|
|
},
|
|
{
|
|
MethodName: "ConfirmTotpKey",
|
|
Handler: _Accounts_ConfirmTotpKey_Handler,
|
|
},
|
|
{
|
|
MethodName: "StartWebAuthnRegistration",
|
|
Handler: _Accounts_StartWebAuthnRegistration_Handler,
|
|
},
|
|
{
|
|
MethodName: "FinishWebAuthnRegistration",
|
|
Handler: _Accounts_FinishWebAuthnRegistration_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListMfaKeys",
|
|
Handler: _Accounts_ListMfaKeys_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetMfaKeyMetadata",
|
|
Handler: _Accounts_SetMfaKeyMetadata_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemoveMfaKey",
|
|
Handler: _Accounts_RemoveMfaKey_Handler,
|
|
},
|
|
{
|
|
MethodName: "StartMfaVerification",
|
|
Handler: _Accounts_StartMfaVerification_Handler,
|
|
},
|
|
{
|
|
MethodName: "FinishMfaVerification",
|
|
Handler: _Accounts_FinishMfaVerification_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "org/signal/chat/account.proto",
|
|
}
|
|
|
|
const (
|
|
AccountsAnonymous_CheckAccountExistence_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/CheckAccountExistence"
|
|
AccountsAnonymous_LookupUsernameHash_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/LookupUsernameHash"
|
|
AccountsAnonymous_LookupUsernameLink_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/LookupUsernameLink"
|
|
AccountsAnonymous_GetCapabilities_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/GetCapabilities"
|
|
)
|
|
|
|
// AccountsAnonymousClient is the client API for AccountsAnonymous 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.
|
|
//
|
|
// Provides methods for looking up Signal accounts. Callers must not provide
|
|
// identifying credentials when calling methods in this service.
|
|
type AccountsAnonymousClient interface {
|
|
// Checks whether an account with the given service identifier exists.
|
|
CheckAccountExistence(ctx context.Context, in *CheckAccountExistenceRequest, opts ...grpc.CallOption) (*CheckAccountExistenceResponse, error)
|
|
// Finds the service identifier of the account associated with the given
|
|
// username hash.
|
|
LookupUsernameHash(ctx context.Context, in *LookupUsernameHashRequest, opts ...grpc.CallOption) (*LookupUsernameHashResponse, error)
|
|
// Finds the encrypted username identified by a given username link handle.
|
|
LookupUsernameLink(ctx context.Context, in *LookupUsernameLinkRequest, opts ...grpc.CallOption) (*LookupUsernameLinkResponse, error)
|
|
// Gets the publicly-visible capabilities enabled on the account identified by
|
|
// the provided ACI.
|
|
GetCapabilities(ctx context.Context, in *GetCapabilitiesAnonymousRequest, opts ...grpc.CallOption) (*GetCapabilitiesAnonymousResponse, error)
|
|
}
|
|
|
|
type accountsAnonymousClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAccountsAnonymousClient(cc grpc.ClientConnInterface) AccountsAnonymousClient {
|
|
return &accountsAnonymousClient{cc}
|
|
}
|
|
|
|
func (c *accountsAnonymousClient) CheckAccountExistence(ctx context.Context, in *CheckAccountExistenceRequest, opts ...grpc.CallOption) (*CheckAccountExistenceResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CheckAccountExistenceResponse)
|
|
err := c.cc.Invoke(ctx, AccountsAnonymous_CheckAccountExistence_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsAnonymousClient) LookupUsernameHash(ctx context.Context, in *LookupUsernameHashRequest, opts ...grpc.CallOption) (*LookupUsernameHashResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LookupUsernameHashResponse)
|
|
err := c.cc.Invoke(ctx, AccountsAnonymous_LookupUsernameHash_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsAnonymousClient) LookupUsernameLink(ctx context.Context, in *LookupUsernameLinkRequest, opts ...grpc.CallOption) (*LookupUsernameLinkResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LookupUsernameLinkResponse)
|
|
err := c.cc.Invoke(ctx, AccountsAnonymous_LookupUsernameLink_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountsAnonymousClient) GetCapabilities(ctx context.Context, in *GetCapabilitiesAnonymousRequest, opts ...grpc.CallOption) (*GetCapabilitiesAnonymousResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetCapabilitiesAnonymousResponse)
|
|
err := c.cc.Invoke(ctx, AccountsAnonymous_GetCapabilities_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AccountsAnonymousServer is the server API for AccountsAnonymous service.
|
|
// All implementations must embed UnimplementedAccountsAnonymousServer
|
|
// for forward compatibility.
|
|
//
|
|
// Provides methods for looking up Signal accounts. Callers must not provide
|
|
// identifying credentials when calling methods in this service.
|
|
type AccountsAnonymousServer interface {
|
|
// Checks whether an account with the given service identifier exists.
|
|
CheckAccountExistence(context.Context, *CheckAccountExistenceRequest) (*CheckAccountExistenceResponse, error)
|
|
// Finds the service identifier of the account associated with the given
|
|
// username hash.
|
|
LookupUsernameHash(context.Context, *LookupUsernameHashRequest) (*LookupUsernameHashResponse, error)
|
|
// Finds the encrypted username identified by a given username link handle.
|
|
LookupUsernameLink(context.Context, *LookupUsernameLinkRequest) (*LookupUsernameLinkResponse, error)
|
|
// Gets the publicly-visible capabilities enabled on the account identified by
|
|
// the provided ACI.
|
|
GetCapabilities(context.Context, *GetCapabilitiesAnonymousRequest) (*GetCapabilitiesAnonymousResponse, error)
|
|
mustEmbedUnimplementedAccountsAnonymousServer()
|
|
}
|
|
|
|
// UnimplementedAccountsAnonymousServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedAccountsAnonymousServer struct{}
|
|
|
|
func (UnimplementedAccountsAnonymousServer) CheckAccountExistence(context.Context, *CheckAccountExistenceRequest) (*CheckAccountExistenceResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CheckAccountExistence not implemented")
|
|
}
|
|
func (UnimplementedAccountsAnonymousServer) LookupUsernameHash(context.Context, *LookupUsernameHashRequest) (*LookupUsernameHashResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method LookupUsernameHash not implemented")
|
|
}
|
|
func (UnimplementedAccountsAnonymousServer) LookupUsernameLink(context.Context, *LookupUsernameLinkRequest) (*LookupUsernameLinkResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method LookupUsernameLink not implemented")
|
|
}
|
|
func (UnimplementedAccountsAnonymousServer) GetCapabilities(context.Context, *GetCapabilitiesAnonymousRequest) (*GetCapabilitiesAnonymousResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCapabilities not implemented")
|
|
}
|
|
func (UnimplementedAccountsAnonymousServer) mustEmbedUnimplementedAccountsAnonymousServer() {}
|
|
func (UnimplementedAccountsAnonymousServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeAccountsAnonymousServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AccountsAnonymousServer will
|
|
// result in compilation errors.
|
|
type UnsafeAccountsAnonymousServer interface {
|
|
mustEmbedUnimplementedAccountsAnonymousServer()
|
|
}
|
|
|
|
func RegisterAccountsAnonymousServer(s grpc.ServiceRegistrar, srv AccountsAnonymousServer) {
|
|
// If the following call panics, it indicates UnimplementedAccountsAnonymousServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&AccountsAnonymous_ServiceDesc, srv)
|
|
}
|
|
|
|
func _AccountsAnonymous_CheckAccountExistence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckAccountExistenceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsAnonymousServer).CheckAccountExistence(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AccountsAnonymous_CheckAccountExistence_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsAnonymousServer).CheckAccountExistence(ctx, req.(*CheckAccountExistenceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountsAnonymous_LookupUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LookupUsernameHashRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsAnonymousServer).LookupUsernameHash(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AccountsAnonymous_LookupUsernameHash_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsAnonymousServer).LookupUsernameHash(ctx, req.(*LookupUsernameHashRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountsAnonymous_LookupUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LookupUsernameLinkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsAnonymousServer).LookupUsernameLink(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AccountsAnonymous_LookupUsernameLink_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsAnonymousServer).LookupUsernameLink(ctx, req.(*LookupUsernameLinkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountsAnonymous_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCapabilitiesAnonymousRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountsAnonymousServer).GetCapabilities(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AccountsAnonymous_GetCapabilities_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountsAnonymousServer).GetCapabilities(ctx, req.(*GetCapabilitiesAnonymousRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// AccountsAnonymous_ServiceDesc is the grpc.ServiceDesc for AccountsAnonymous service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var AccountsAnonymous_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "org.signal.chat.account.AccountsAnonymous",
|
|
HandlerType: (*AccountsAnonymousServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CheckAccountExistence",
|
|
Handler: _AccountsAnonymous_CheckAccountExistence_Handler,
|
|
},
|
|
{
|
|
MethodName: "LookupUsernameHash",
|
|
Handler: _AccountsAnonymous_LookupUsernameHash_Handler,
|
|
},
|
|
{
|
|
MethodName: "LookupUsernameLink",
|
|
Handler: _AccountsAnonymous_LookupUsernameLink_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCapabilities",
|
|
Handler: _AccountsAnonymous_GetCapabilities_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "org/signal/chat/account.proto",
|
|
}
|