2026-09-05 00:57:28 +03:00
//
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
// 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/profile.proto
package profile
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 (
2026-10-08 15:18:56 +03:00
Profile_SetProfile_FullMethodName = "/org.signal.chat.profile.Profile/SetProfile"
Profile_GetProfile_FullMethodName = "/org.signal.chat.profile.Profile/GetProfile"
Profile_GetAvatarCredential_FullMethodName = "/org.signal.chat.profile.Profile/GetAvatarCredential"
Profile_SetV1Avatar_FullMethodName = "/org.signal.chat.profile.Profile/SetV1Avatar"
2026-09-05 00:57:28 +03:00
)
// ProfileClient is the client API for Profile 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 profiles and profile-related data.
type ProfileClient interface {
2026-10-08 15:18:56 +03:00
// Sets profile data and, if needed, returns a credential used by clients to upload a v1 avatar.
2026-09-05 00:57:28 +03:00
SetProfile ( ctx context . Context , in * SetProfileRequest , opts ... grpc . CallOption ) ( * SetProfileResponse , error )
// Retrieves profile data. Callers with an unidentified access key for the account
// should use the version of this method in `ProfileAnonymous` instead.
GetProfile ( ctx context . Context , in * GetProfileRequest , opts ... grpc . CallOption ) ( * GetProfileResponse , error )
2026-10-08 15:18:56 +03:00
// Returns an anonymous credential that may be presented with avatar operations in ProfilesAnonymous
2026-09-05 00:57:28 +03:00
//
// Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC
2026-10-08 15:18:56 +03:00
GetAvatarCredential ( ctx context . Context , in * GetAvatarCredentialRequest , opts ... grpc . CallOption ) ( * GetAvatarCredentialResponse , error )
// Returns a credential used by clients to upload a v1 avatar, deleting any current avatar.
2026-10-01 18:12:17 +03:00
//
// This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads:
// 1. SetV1Avatar
// 2. Upload to CDN
// 3. SetProfile with v1 `AVATAR_CHANGE_UNCHANGED` and the v1 avatar in the v2 profile body
//
// Clients that do this will be required to upload current avatars using `ProfilesAnonymous.GetAvatarUploadFormRequest`
// once v1 Profile APIs are no longer supported.
SetV1Avatar ( ctx context . Context , in * SetV1AvatarRequest , opts ... grpc . CallOption ) ( * SetV1AvatarResponse , error )
2026-09-05 00:57:28 +03:00
}
type profileClient struct {
cc grpc . ClientConnInterface
}
func NewProfileClient ( cc grpc . ClientConnInterface ) ProfileClient {
return & profileClient { cc }
}
func ( c * profileClient ) SetProfile ( ctx context . Context , in * SetProfileRequest , opts ... grpc . CallOption ) ( * SetProfileResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( SetProfileResponse )
err := c . cc . Invoke ( ctx , Profile_SetProfile_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * profileClient ) GetProfile ( ctx context . Context , in * GetProfileRequest , opts ... grpc . CallOption ) ( * GetProfileResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( GetProfileResponse )
err := c . cc . Invoke ( ctx , Profile_GetProfile_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-10-08 15:18:56 +03:00
func ( c * profileClient ) GetAvatarCredential ( ctx context . Context , in * GetAvatarCredentialRequest , opts ... grpc . CallOption ) ( * GetAvatarCredentialResponse , error ) {
2026-09-05 00:57:28 +03:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-10-08 15:18:56 +03:00
out := new ( GetAvatarCredentialResponse )
err := c . cc . Invoke ( ctx , Profile_GetAvatarCredential_FullMethodName , in , out , cOpts ... )
2026-09-05 00:57:28 +03:00
if err != nil {
return nil , err
}
return out , nil
}
2026-10-01 18:12:17 +03:00
func ( c * profileClient ) SetV1Avatar ( ctx context . Context , in * SetV1AvatarRequest , opts ... grpc . CallOption ) ( * SetV1AvatarResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( SetV1AvatarResponse )
err := c . cc . Invoke ( ctx , Profile_SetV1Avatar_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-09-05 00:57:28 +03:00
// ProfileServer is the server API for Profile service.
// All implementations must embed UnimplementedProfileServer
// for forward compatibility.
//
// Provides methods for working with profiles and profile-related data.
type ProfileServer interface {
2026-10-08 15:18:56 +03:00
// Sets profile data and, if needed, returns a credential used by clients to upload a v1 avatar.
2026-09-05 00:57:28 +03:00
SetProfile ( context . Context , * SetProfileRequest ) ( * SetProfileResponse , error )
// Retrieves profile data. Callers with an unidentified access key for the account
// should use the version of this method in `ProfileAnonymous` instead.
GetProfile ( context . Context , * GetProfileRequest ) ( * GetProfileResponse , error )
2026-10-08 15:18:56 +03:00
// Returns an anonymous credential that may be presented with avatar operations in ProfilesAnonymous
2026-09-05 00:57:28 +03:00
//
// Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC
2026-10-08 15:18:56 +03:00
GetAvatarCredential ( context . Context , * GetAvatarCredentialRequest ) ( * GetAvatarCredentialResponse , error )
// Returns a credential used by clients to upload a v1 avatar, deleting any current avatar.
2026-10-01 18:12:17 +03:00
//
// This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads:
// 1. SetV1Avatar
// 2. Upload to CDN
// 3. SetProfile with v1 `AVATAR_CHANGE_UNCHANGED` and the v1 avatar in the v2 profile body
//
// Clients that do this will be required to upload current avatars using `ProfilesAnonymous.GetAvatarUploadFormRequest`
// once v1 Profile APIs are no longer supported.
SetV1Avatar ( context . Context , * SetV1AvatarRequest ) ( * SetV1AvatarResponse , error )
2026-09-05 00:57:28 +03:00
mustEmbedUnimplementedProfileServer ( )
}
// UnimplementedProfileServer 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 UnimplementedProfileServer struct { }
func ( UnimplementedProfileServer ) SetProfile ( context . Context , * SetProfileRequest ) ( * SetProfileResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method SetProfile not implemented" )
}
func ( UnimplementedProfileServer ) GetProfile ( context . Context , * GetProfileRequest ) ( * GetProfileResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetProfile not implemented" )
}
2026-10-08 15:18:56 +03:00
func ( UnimplementedProfileServer ) GetAvatarCredential ( context . Context , * GetAvatarCredentialRequest ) ( * GetAvatarCredentialResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetAvatarCredential not implemented" )
2026-09-05 00:57:28 +03:00
}
2026-10-01 18:12:17 +03:00
func ( UnimplementedProfileServer ) SetV1Avatar ( context . Context , * SetV1AvatarRequest ) ( * SetV1AvatarResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method SetV1Avatar not implemented" )
}
2026-09-05 00:57:28 +03:00
func ( UnimplementedProfileServer ) mustEmbedUnimplementedProfileServer ( ) { }
func ( UnimplementedProfileServer ) testEmbeddedByValue ( ) { }
// UnsafeProfileServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProfileServer will
// result in compilation errors.
type UnsafeProfileServer interface {
mustEmbedUnimplementedProfileServer ( )
}
func RegisterProfileServer ( s grpc . ServiceRegistrar , srv ProfileServer ) {
// If the following call panics, it indicates UnimplementedProfileServer 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 ( & Profile_ServiceDesc , srv )
}
func _Profile_SetProfile_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetProfileRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileServer ) . SetProfile ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Profile_SetProfile_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileServer ) . SetProfile ( ctx , req . ( * SetProfileRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Profile_GetProfile_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetProfileRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileServer ) . GetProfile ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Profile_GetProfile_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileServer ) . GetProfile ( ctx , req . ( * GetProfileRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2026-10-08 15:18:56 +03:00
func _Profile_GetAvatarCredential_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetAvatarCredentialRequest )
2026-09-05 00:57:28 +03:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2026-10-08 15:18:56 +03:00
return srv . ( ProfileServer ) . GetAvatarCredential ( ctx , in )
2026-09-05 00:57:28 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2026-10-08 15:18:56 +03:00
FullMethod : Profile_GetAvatarCredential_FullMethodName ,
2026-09-05 00:57:28 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-10-08 15:18:56 +03:00
return srv . ( ProfileServer ) . GetAvatarCredential ( ctx , req . ( * GetAvatarCredentialRequest ) )
2026-09-05 00:57:28 +03:00
}
return interceptor ( ctx , in , info , handler )
}
2026-10-01 18:12:17 +03:00
func _Profile_SetV1Avatar_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetV1AvatarRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileServer ) . SetV1Avatar ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Profile_SetV1Avatar_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileServer ) . SetV1Avatar ( ctx , req . ( * SetV1AvatarRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2026-09-05 00:57:28 +03:00
// Profile_ServiceDesc is the grpc.ServiceDesc for Profile service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Profile_ServiceDesc = grpc . ServiceDesc {
ServiceName : "org.signal.chat.profile.Profile" ,
HandlerType : ( * ProfileServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "SetProfile" ,
Handler : _Profile_SetProfile_Handler ,
} ,
{
MethodName : "GetProfile" ,
Handler : _Profile_GetProfile_Handler ,
} ,
{
2026-10-08 15:18:56 +03:00
MethodName : "GetAvatarCredential" ,
Handler : _Profile_GetAvatarCredential_Handler ,
2026-09-05 00:57:28 +03:00
} ,
2026-10-01 18:12:17 +03:00
{
MethodName : "SetV1Avatar" ,
Handler : _Profile_SetV1Avatar_Handler ,
} ,
2026-09-05 00:57:28 +03:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "org/signal/chat/profile.proto" ,
}
const (
2026-10-08 15:18:56 +03:00
ProfileAnonymous_GetProfile_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfile"
ProfileAnonymous_GetProfileKeyCredential_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfileKeyCredential"
ProfileAnonymous_GetAvatarUploadForm_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetAvatarUploadForm"
ProfileAnonymous_ExtendAvatarTTL_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/ExtendAvatarTTL"
ProfileAnonymous_DeleteAvatar_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/DeleteAvatar"
2026-09-05 00:57:28 +03:00
)
// ProfileAnonymousClient is the client API for ProfileAnonymous 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 profiles and profile-related data using "unidentified access"
// credentials. Callers must not submit any self-identifying credentials
// when calling methods in this service and must instead present the targeted account's
// unidentified access key as an anonymous authentication mechanism. Callers
// without an unidentified access key should use the equivalent, authenticated
// methods in `Profile` instead.
type ProfileAnonymousClient interface {
// Retrieves profile data.
GetProfile ( ctx context . Context , in * GetProfileAnonymousRequest , opts ... grpc . CallOption ) ( * GetProfileAnonymousResponse , error )
// Retrieves a profile key credential.
2026-10-08 15:18:56 +03:00
GetProfileKeyCredential ( ctx context . Context , in * GetProfileKeyCredentialRequest , opts ... grpc . CallOption ) ( * GetProfileKeyCredentialResponse , error )
// Returns a credential to upload a v2 avatar. After uploading the avatar, the client
2026-09-05 00:57:28 +03:00
// must call SetProfile with the new avatar URL in the encrypted `data`.
//
// Because avatars are uploaded anonymously, they have an expiration equal to the
// idle account expiration. Clients must periodically (recommended: every 90 days)
// call ExtendAvatarTTL to extend the TTl.
//
2026-10-08 15:18:56 +03:00
// Note: any existing avatar associated with this credential will be deleted immediately
2026-09-05 00:57:28 +03:00
GetAvatarUploadForm ( ctx context . Context , in * GetAvatarUploadFormRequest , opts ... grpc . CallOption ) ( * GetAvatarUploadFormResponse , error )
// Extends the TTL of the avatar currently associated with the request’ s avatar auth credential
ExtendAvatarTTL ( ctx context . Context , in * ExtendAvatarTTLRequest , opts ... grpc . CallOption ) ( * ExtendAvatarTTLResponse , error )
// Deletes the avatar currently associated with the request’ s avatar auth credential.
//
// Clients must also call SetProfile to remove the avatar from the encrypted `data`.
DeleteAvatar ( ctx context . Context , in * DeleteAvatarRequest , opts ... grpc . CallOption ) ( * DeleteAvatarResponse , error )
}
type profileAnonymousClient struct {
cc grpc . ClientConnInterface
}
func NewProfileAnonymousClient ( cc grpc . ClientConnInterface ) ProfileAnonymousClient {
return & profileAnonymousClient { cc }
}
func ( c * profileAnonymousClient ) GetProfile ( ctx context . Context , in * GetProfileAnonymousRequest , opts ... grpc . CallOption ) ( * GetProfileAnonymousResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( GetProfileAnonymousResponse )
err := c . cc . Invoke ( ctx , ProfileAnonymous_GetProfile_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-10-08 15:18:56 +03:00
func ( c * profileAnonymousClient ) GetProfileKeyCredential ( ctx context . Context , in * GetProfileKeyCredentialRequest , opts ... grpc . CallOption ) ( * GetProfileKeyCredentialResponse , error ) {
2026-09-05 00:57:28 +03:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-10-08 15:18:56 +03:00
out := new ( GetProfileKeyCredentialResponse )
err := c . cc . Invoke ( ctx , ProfileAnonymous_GetProfileKeyCredential_FullMethodName , in , out , cOpts ... )
2026-09-05 00:57:28 +03:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * profileAnonymousClient ) GetAvatarUploadForm ( ctx context . Context , in * GetAvatarUploadFormRequest , opts ... grpc . CallOption ) ( * GetAvatarUploadFormResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( GetAvatarUploadFormResponse )
err := c . cc . Invoke ( ctx , ProfileAnonymous_GetAvatarUploadForm_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * profileAnonymousClient ) ExtendAvatarTTL ( ctx context . Context , in * ExtendAvatarTTLRequest , opts ... grpc . CallOption ) ( * ExtendAvatarTTLResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( ExtendAvatarTTLResponse )
err := c . cc . Invoke ( ctx , ProfileAnonymous_ExtendAvatarTTL_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * profileAnonymousClient ) DeleteAvatar ( ctx context . Context , in * DeleteAvatarRequest , opts ... grpc . CallOption ) ( * DeleteAvatarResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( DeleteAvatarResponse )
err := c . cc . Invoke ( ctx , ProfileAnonymous_DeleteAvatar_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// ProfileAnonymousServer is the server API for ProfileAnonymous service.
// All implementations must embed UnimplementedProfileAnonymousServer
// for forward compatibility.
//
// Provides methods for working with profiles and profile-related data using "unidentified access"
// credentials. Callers must not submit any self-identifying credentials
// when calling methods in this service and must instead present the targeted account's
// unidentified access key as an anonymous authentication mechanism. Callers
// without an unidentified access key should use the equivalent, authenticated
// methods in `Profile` instead.
type ProfileAnonymousServer interface {
// Retrieves profile data.
GetProfile ( context . Context , * GetProfileAnonymousRequest ) ( * GetProfileAnonymousResponse , error )
// Retrieves a profile key credential.
2026-10-08 15:18:56 +03:00
GetProfileKeyCredential ( context . Context , * GetProfileKeyCredentialRequest ) ( * GetProfileKeyCredentialResponse , error )
// Returns a credential to upload a v2 avatar. After uploading the avatar, the client
2026-09-05 00:57:28 +03:00
// must call SetProfile with the new avatar URL in the encrypted `data`.
//
// Because avatars are uploaded anonymously, they have an expiration equal to the
// idle account expiration. Clients must periodically (recommended: every 90 days)
// call ExtendAvatarTTL to extend the TTl.
//
2026-10-08 15:18:56 +03:00
// Note: any existing avatar associated with this credential will be deleted immediately
2026-09-05 00:57:28 +03:00
GetAvatarUploadForm ( context . Context , * GetAvatarUploadFormRequest ) ( * GetAvatarUploadFormResponse , error )
// Extends the TTL of the avatar currently associated with the request’ s avatar auth credential
ExtendAvatarTTL ( context . Context , * ExtendAvatarTTLRequest ) ( * ExtendAvatarTTLResponse , error )
// Deletes the avatar currently associated with the request’ s avatar auth credential.
//
// Clients must also call SetProfile to remove the avatar from the encrypted `data`.
DeleteAvatar ( context . Context , * DeleteAvatarRequest ) ( * DeleteAvatarResponse , error )
mustEmbedUnimplementedProfileAnonymousServer ( )
}
// UnimplementedProfileAnonymousServer 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 UnimplementedProfileAnonymousServer struct { }
func ( UnimplementedProfileAnonymousServer ) GetProfile ( context . Context , * GetProfileAnonymousRequest ) ( * GetProfileAnonymousResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetProfile not implemented" )
}
2026-10-08 15:18:56 +03:00
func ( UnimplementedProfileAnonymousServer ) GetProfileKeyCredential ( context . Context , * GetProfileKeyCredentialRequest ) ( * GetProfileKeyCredentialResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetProfileKeyCredential not implemented" )
2026-09-05 00:57:28 +03:00
}
func ( UnimplementedProfileAnonymousServer ) GetAvatarUploadForm ( context . Context , * GetAvatarUploadFormRequest ) ( * GetAvatarUploadFormResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetAvatarUploadForm not implemented" )
}
func ( UnimplementedProfileAnonymousServer ) ExtendAvatarTTL ( context . Context , * ExtendAvatarTTLRequest ) ( * ExtendAvatarTTLResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method ExtendAvatarTTL not implemented" )
}
func ( UnimplementedProfileAnonymousServer ) DeleteAvatar ( context . Context , * DeleteAvatarRequest ) ( * DeleteAvatarResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method DeleteAvatar not implemented" )
}
func ( UnimplementedProfileAnonymousServer ) mustEmbedUnimplementedProfileAnonymousServer ( ) { }
func ( UnimplementedProfileAnonymousServer ) testEmbeddedByValue ( ) { }
// UnsafeProfileAnonymousServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProfileAnonymousServer will
// result in compilation errors.
type UnsafeProfileAnonymousServer interface {
mustEmbedUnimplementedProfileAnonymousServer ( )
}
func RegisterProfileAnonymousServer ( s grpc . ServiceRegistrar , srv ProfileAnonymousServer ) {
// If the following call panics, it indicates UnimplementedProfileAnonymousServer 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 ( & ProfileAnonymous_ServiceDesc , srv )
}
func _ProfileAnonymous_GetProfile_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetProfileAnonymousRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileAnonymousServer ) . GetProfile ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : ProfileAnonymous_GetProfile_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileAnonymousServer ) . GetProfile ( ctx , req . ( * GetProfileAnonymousRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2026-10-08 15:18:56 +03:00
func _ProfileAnonymous_GetProfileKeyCredential_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetProfileKeyCredentialRequest )
2026-09-05 00:57:28 +03:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2026-10-08 15:18:56 +03:00
return srv . ( ProfileAnonymousServer ) . GetProfileKeyCredential ( ctx , in )
2026-09-05 00:57:28 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2026-10-08 15:18:56 +03:00
FullMethod : ProfileAnonymous_GetProfileKeyCredential_FullMethodName ,
2026-09-05 00:57:28 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-10-08 15:18:56 +03:00
return srv . ( ProfileAnonymousServer ) . GetProfileKeyCredential ( ctx , req . ( * GetProfileKeyCredentialRequest ) )
2026-09-05 00:57:28 +03:00
}
return interceptor ( ctx , in , info , handler )
}
func _ProfileAnonymous_GetAvatarUploadForm_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetAvatarUploadFormRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileAnonymousServer ) . GetAvatarUploadForm ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : ProfileAnonymous_GetAvatarUploadForm_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileAnonymousServer ) . GetAvatarUploadForm ( ctx , req . ( * GetAvatarUploadFormRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _ProfileAnonymous_ExtendAvatarTTL_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ExtendAvatarTTLRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileAnonymousServer ) . ExtendAvatarTTL ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : ProfileAnonymous_ExtendAvatarTTL_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileAnonymousServer ) . ExtendAvatarTTL ( ctx , req . ( * ExtendAvatarTTLRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _ProfileAnonymous_DeleteAvatar_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DeleteAvatarRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProfileAnonymousServer ) . DeleteAvatar ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : ProfileAnonymous_DeleteAvatar_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProfileAnonymousServer ) . DeleteAvatar ( ctx , req . ( * DeleteAvatarRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// ProfileAnonymous_ServiceDesc is the grpc.ServiceDesc for ProfileAnonymous service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ProfileAnonymous_ServiceDesc = grpc . ServiceDesc {
ServiceName : "org.signal.chat.profile.ProfileAnonymous" ,
HandlerType : ( * ProfileAnonymousServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "GetProfile" ,
Handler : _ProfileAnonymous_GetProfile_Handler ,
} ,
{
2026-10-08 15:18:56 +03:00
MethodName : "GetProfileKeyCredential" ,
Handler : _ProfileAnonymous_GetProfileKeyCredential_Handler ,
2026-09-05 00:57:28 +03:00
} ,
{
MethodName : "GetAvatarUploadForm" ,
Handler : _ProfileAnonymous_GetAvatarUploadForm_Handler ,
} ,
{
MethodName : "ExtendAvatarTTL" ,
Handler : _ProfileAnonymous_ExtendAvatarTTL_Handler ,
} ,
{
MethodName : "DeleteAvatar" ,
Handler : _ProfileAnonymous_DeleteAvatar_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "org/signal/chat/profile.proto" ,
}