// 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_ListTotpKeys_FullMethodName = "/org.signal.chat.account.Accounts/ListTotpKeys" Accounts_SetTotpKeyMetadata_FullMethodName = "/org.signal.chat.account.Accounts/SetTotpKeyMetadata" Accounts_RemoveTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/RemoveTotpKey" ) // 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. 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 ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) // Returns a list of confirmed TOTP keys for the authenticated account ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) // Updates encrypted, user-supplied metadata (e.g. a human-readable name and // creation timestamp) for an existing, confirmed TOTP key SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) // Removes a TOTP from the authenticated account RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, 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) ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTotpKeysResponse) err := c.cc.Invoke(ctx, Accounts_ListTotpKeys_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *accountsClient) SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetTotpKeyMetadataResponse) err := c.cc.Invoke(ctx, Accounts_SetTotpKeyMetadata_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *accountsClient) RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveTotpKeyResponse) err := c.cc.Invoke(ctx, Accounts_RemoveTotpKey_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. 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 ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) // Returns a list of confirmed TOTP keys for the authenticated account ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) // Updates encrypted, user-supplied metadata (e.g. a human-readable name and // creation timestamp) for an existing, confirmed TOTP key SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) // Removes a TOTP from the authenticated account RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, 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) ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListTotpKeys not implemented") } func (UnimplementedAccountsServer) SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) { return nil, status.Error(codes.Unimplemented, "method SetTotpKeyMetadata not implemented") } func (UnimplementedAccountsServer) RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveTotpKey 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_ListTotpKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListTotpKeysRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountsServer).ListTotpKeys(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Accounts_ListTotpKeys_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountsServer).ListTotpKeys(ctx, req.(*ListTotpKeysRequest)) } return interceptor(ctx, in, info, handler) } func _Accounts_SetTotpKeyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetTotpKeyMetadataRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountsServer).SetTotpKeyMetadata(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Accounts_SetTotpKeyMetadata_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountsServer).SetTotpKeyMetadata(ctx, req.(*SetTotpKeyMetadataRequest)) } return interceptor(ctx, in, info, handler) } func _Accounts_RemoveTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RemoveTotpKeyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountsServer).RemoveTotpKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Accounts_RemoveTotpKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountsServer).RemoveTotpKey(ctx, req.(*RemoveTotpKeyRequest)) } 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: "ListTotpKeys", Handler: _Accounts_ListTotpKeys_Handler, }, { MethodName: "SetTotpKeyMetadata", Handler: _Accounts_SetTotpKeyMetadata_Handler, }, { MethodName: "RemoveTotpKey", Handler: _Accounts_RemoveTotpKey_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", }