Documentation
¶
Index ¶
- Variables
- type Adapter
- type AdapterRecord
- type LedgerRecord
- type Remote
- func (r *Remote) AnswerChallenge(_ context.Context, req *challengepb.AnswerChallengeRequest) (*challengepb.AnswerChallengeResponse, error)
- func (r *Remote) ConfirmUsernameHash(_ context.Context, req *accountpb.ConfirmUsernameHashRequest) (*accountpb.ConfirmUsernameHashResponse, error)
- func (r *Remote) DeleteUsernameHash(_ context.Context, req *accountpb.DeleteUsernameHashRequest) (*accountpb.DeleteUsernameHashResponse, error)
- func (r *Remote) DeleteUsernameLink(_ context.Context, req *accountpb.DeleteUsernameLinkRequest) (*accountpb.DeleteUsernameLinkResponse, error)
- func (r *Remote) GetBackupAuthCredentials(_ context.Context, req *backuppb.GetBackupAuthCredentialsRequest) (*backuppb.GetBackupAuthCredentialsResponse, error)
- func (r *Remote) GetCdnCredentials(_ context.Context, req *backuppb.GetCdnCredentialsRequest) (*backuppb.GetCdnCredentialsResponse, error)
- func (r *Remote) GetDevices(_ context.Context, req *devicepb.GetDevicesRequest) (*devicepb.GetDevicesResponse, error)
- func (r *Remote) GetExternalServiceCredentials(_ context.Context, req *credentialspb.GetExternalServiceCredentialsRequest) (*credentialspb.GetExternalServiceCredentialsResponse, error)
- func (r *Remote) GetMediaBackupInfo(_ context.Context, req *backuppb.GetBackupInfoRequest) (*backuppb.GetMediaBackupInfoResponse, error)
- func (r *Remote) GetMessageBackupInfo(_ context.Context, req *backuppb.GetBackupInfoRequest) (*backuppb.GetMessageBackupInfoResponse, error)
- func (r *Remote) GetPreKeys(_ context.Context, req *keyspb.GetPreKeysAnonymousRequest) (*keyspb.GetPreKeysAnonymousResponse, error)
- func (r *Remote) GetSvrBCredentials(_ context.Context, req *backuppb.GetSvrBCredentialsRequest) (*backuppb.GetSvrBCredentialsResponse, error)
- func (r *Remote) GetVersionedProfile(_ context.Context, req *profilepb.GetVersionedProfileAnonymousRequest) (*profilepb.GetVersionedProfileAnonymousResponse, error)
- func (r *Remote) LookupUsernameHash(_ context.Context, req *accountpb.LookupUsernameHashRequest) (*accountpb.LookupUsernameHashResponse, error)
- func (r *Remote) LookupUsernameLink(_ context.Context, req *accountpb.LookupUsernameLinkRequest) (*accountpb.LookupUsernameLinkResponse, error)
- func (r *Remote) Records() []RequestRecord
- func (r *Remote) ReserveUsernameHash(_ context.Context, req *accountpb.ReserveUsernameHashRequest) (*accountpb.ReserveUsernameHashResponse, error)
- func (r *Remote) SendMessage(_ context.Context, req *messagespb.SendAuthenticatedSenderMessageRequest) (*messagespb.SendMessageAuthenticatedSenderResponse, error)
- func (r *Remote) SetBackupId(_ context.Context, req *backuppb.SetBackupIdRequest) (*backuppb.SetBackupIdResponse, error)
- func (r *Remote) SetUsernameLink(_ context.Context, req *accountpb.SetUsernameLinkRequest) (*accountpb.SetUsernameLinkResponse, error)
- type RequestRecord
- type ServiceClient
- func (c *ServiceClient) DownloadBackup(_ context.Context, req serviceclient.DownloadBackupRequest) (serviceclient.DownloadBackupResponse, error)
- func (c *ServiceClient) Ledger() map[string]LedgerRecord
- func (c *ServiceClient) LinkDevice(_ context.Context, req serviceclient.LinkDeviceRequest) (serviceclient.LinkDeviceResponse, error)
- func (c *ServiceClient) Receive(_ context.Context, req serviceclient.ReceiveRequest) (serviceclient.ReceiveResponse, error)
- func (c *ServiceClient) Records() []ServiceClientRecord
- func (c *ServiceClient) Register(_ context.Context, req serviceclient.RegisterRequest) (serviceclient.RegisterResponse, error)
- func (c *ServiceClient) ReserveUsername(_ context.Context, req serviceclient.ReserveUsernameRequest) (serviceclient.ReserveUsernameResponse, error)
- func (c *ServiceClient) RespondToChallenge(_ context.Context, req serviceclient.RespondToChallengeRequest) (serviceclient.RespondToChallengeResponse, error)
- func (c *ServiceClient) Send(_ context.Context, req serviceclient.SendRequest) (serviceclient.SendResponse, error)
- func (c *ServiceClient) UploadBackup(_ context.Context, req serviceclient.UploadBackupRequest) (serviceclient.UploadBackupResponse, error)
- type ServiceClientOption
- type ServiceClientRecord
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingIdempotencyKey = errors.New("missing idempotency key") ErrIdempotencyConflict = errors.New("idempotency key reused with different request") )
Functions ¶
This section is empty.
Types ¶
type Adapter ¶ added in v0.5.0
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶ added in v0.5.0
func NewAdapter() *Adapter
func (*Adapter) Records ¶ added in v0.5.0
func (a *Adapter) Records() []AdapterRecord
func (*Adapter) SubmitOperation ¶ added in v0.5.0
func (a *Adapter) SubmitOperation(_ context.Context, env service.OperationEnvelope) (service.OperationResult, error)
type AdapterRecord ¶ added in v0.5.0
type LedgerRecord ¶ added in v0.3.0
type LedgerRecord struct {
Operation string
Fingerprint string
Response serviceclient.ResponseMetadata
}
type Remote ¶
type Remote struct {
UsernameHashResponse *accountpb.LookupUsernameHashResponse
UsernameLinkResponse *accountpb.LookupUsernameLinkResponse
ReserveUsernameHashResponse *accountpb.ReserveUsernameHashResponse
ConfirmUsernameHashResponse *accountpb.ConfirmUsernameHashResponse
DeleteUsernameHashResponse *accountpb.DeleteUsernameHashResponse
SetUsernameLinkResponse *accountpb.SetUsernameLinkResponse
DeleteUsernameLinkResponse *accountpb.DeleteUsernameLinkResponse
DevicesResponse *devicepb.GetDevicesResponse
PreKeysResponse *keyspb.GetPreKeysAnonymousResponse
MessageResponse *messagespb.SendMessageAuthenticatedSenderResponse
ProfileResponse *profilepb.GetVersionedProfileAnonymousResponse
SetBackupIDResponse *backuppb.SetBackupIdResponse
BackupAuthCredentials *backuppb.GetBackupAuthCredentialsResponse
CdnCredentials *backuppb.GetCdnCredentialsResponse
SvrBCredentials *backuppb.GetSvrBCredentialsResponse
MessageBackupInfo *backuppb.GetMessageBackupInfoResponse
MediaBackupInfo *backuppb.GetMediaBackupInfoResponse
ChallengeResponse *challengepb.AnswerChallengeResponse
ExternalCredentialResponse *credentialspb.GetExternalServiceCredentialsResponse
// contains filtered or unexported fields
}
func (*Remote) AnswerChallenge ¶
func (r *Remote) AnswerChallenge(_ context.Context, req *challengepb.AnswerChallengeRequest) (*challengepb.AnswerChallengeResponse, error)
func (*Remote) ConfirmUsernameHash ¶ added in v0.6.0
func (r *Remote) ConfirmUsernameHash(_ context.Context, req *accountpb.ConfirmUsernameHashRequest) (*accountpb.ConfirmUsernameHashResponse, error)
func (*Remote) DeleteUsernameHash ¶ added in v0.6.0
func (r *Remote) DeleteUsernameHash(_ context.Context, req *accountpb.DeleteUsernameHashRequest) (*accountpb.DeleteUsernameHashResponse, error)
func (*Remote) DeleteUsernameLink ¶ added in v0.6.0
func (r *Remote) DeleteUsernameLink(_ context.Context, req *accountpb.DeleteUsernameLinkRequest) (*accountpb.DeleteUsernameLinkResponse, error)
func (*Remote) GetBackupAuthCredentials ¶
func (r *Remote) GetBackupAuthCredentials(_ context.Context, req *backuppb.GetBackupAuthCredentialsRequest) (*backuppb.GetBackupAuthCredentialsResponse, error)
func (*Remote) GetCdnCredentials ¶ added in v0.6.0
func (r *Remote) GetCdnCredentials(_ context.Context, req *backuppb.GetCdnCredentialsRequest) (*backuppb.GetCdnCredentialsResponse, error)
func (*Remote) GetDevices ¶
func (r *Remote) GetDevices(_ context.Context, req *devicepb.GetDevicesRequest) (*devicepb.GetDevicesResponse, error)
func (*Remote) GetExternalServiceCredentials ¶
func (r *Remote) GetExternalServiceCredentials(_ context.Context, req *credentialspb.GetExternalServiceCredentialsRequest) (*credentialspb.GetExternalServiceCredentialsResponse, error)
func (*Remote) GetMediaBackupInfo ¶ added in v0.6.0
func (r *Remote) GetMediaBackupInfo(_ context.Context, req *backuppb.GetBackupInfoRequest) (*backuppb.GetMediaBackupInfoResponse, error)
func (*Remote) GetMessageBackupInfo ¶ added in v0.6.0
func (r *Remote) GetMessageBackupInfo(_ context.Context, req *backuppb.GetBackupInfoRequest) (*backuppb.GetMessageBackupInfoResponse, error)
func (*Remote) GetPreKeys ¶
func (r *Remote) GetPreKeys(_ context.Context, req *keyspb.GetPreKeysAnonymousRequest) (*keyspb.GetPreKeysAnonymousResponse, error)
func (*Remote) GetSvrBCredentials ¶ added in v0.6.0
func (r *Remote) GetSvrBCredentials(_ context.Context, req *backuppb.GetSvrBCredentialsRequest) (*backuppb.GetSvrBCredentialsResponse, error)
func (*Remote) GetVersionedProfile ¶
func (r *Remote) GetVersionedProfile(_ context.Context, req *profilepb.GetVersionedProfileAnonymousRequest) (*profilepb.GetVersionedProfileAnonymousResponse, error)
func (*Remote) LookupUsernameHash ¶
func (r *Remote) LookupUsernameHash(_ context.Context, req *accountpb.LookupUsernameHashRequest) (*accountpb.LookupUsernameHashResponse, error)
func (*Remote) LookupUsernameLink ¶
func (r *Remote) LookupUsernameLink(_ context.Context, req *accountpb.LookupUsernameLinkRequest) (*accountpb.LookupUsernameLinkResponse, error)
func (*Remote) Records ¶
func (r *Remote) Records() []RequestRecord
func (*Remote) ReserveUsernameHash ¶ added in v0.6.0
func (r *Remote) ReserveUsernameHash(_ context.Context, req *accountpb.ReserveUsernameHashRequest) (*accountpb.ReserveUsernameHashResponse, error)
func (*Remote) SendMessage ¶
func (r *Remote) SendMessage(_ context.Context, req *messagespb.SendAuthenticatedSenderMessageRequest) (*messagespb.SendMessageAuthenticatedSenderResponse, error)
func (*Remote) SetBackupId ¶ added in v0.6.0
func (r *Remote) SetBackupId(_ context.Context, req *backuppb.SetBackupIdRequest) (*backuppb.SetBackupIdResponse, error)
func (*Remote) SetUsernameLink ¶ added in v0.6.0
func (r *Remote) SetUsernameLink(_ context.Context, req *accountpb.SetUsernameLinkRequest) (*accountpb.SetUsernameLinkResponse, error)
type RequestRecord ¶
type ServiceClient ¶ added in v0.3.0
type ServiceClient struct {
// contains filtered or unexported fields
}
func NewServiceClient ¶ added in v0.3.0
func NewServiceClient(opts ...ServiceClientOption) *ServiceClient
func (*ServiceClient) DownloadBackup ¶ added in v0.3.0
func (c *ServiceClient) DownloadBackup(_ context.Context, req serviceclient.DownloadBackupRequest) (serviceclient.DownloadBackupResponse, error)
func (*ServiceClient) Ledger ¶ added in v0.3.0
func (c *ServiceClient) Ledger() map[string]LedgerRecord
func (*ServiceClient) LinkDevice ¶ added in v0.3.0
func (c *ServiceClient) LinkDevice(_ context.Context, req serviceclient.LinkDeviceRequest) (serviceclient.LinkDeviceResponse, error)
func (*ServiceClient) Receive ¶ added in v0.3.0
func (c *ServiceClient) Receive(_ context.Context, req serviceclient.ReceiveRequest) (serviceclient.ReceiveResponse, error)
func (*ServiceClient) Records ¶ added in v0.3.0
func (c *ServiceClient) Records() []ServiceClientRecord
func (*ServiceClient) Register ¶ added in v0.3.0
func (c *ServiceClient) Register(_ context.Context, req serviceclient.RegisterRequest) (serviceclient.RegisterResponse, error)
func (*ServiceClient) ReserveUsername ¶ added in v0.3.0
func (c *ServiceClient) ReserveUsername(_ context.Context, req serviceclient.ReserveUsernameRequest) (serviceclient.ReserveUsernameResponse, error)
func (*ServiceClient) RespondToChallenge ¶ added in v0.3.0
func (c *ServiceClient) RespondToChallenge(_ context.Context, req serviceclient.RespondToChallengeRequest) (serviceclient.RespondToChallengeResponse, error)
func (*ServiceClient) Send ¶ added in v0.3.0
func (c *ServiceClient) Send(_ context.Context, req serviceclient.SendRequest) (serviceclient.SendResponse, error)
func (*ServiceClient) UploadBackup ¶ added in v0.3.0
func (c *ServiceClient) UploadBackup(_ context.Context, req serviceclient.UploadBackupRequest) (serviceclient.UploadBackupResponse, error)
type ServiceClientOption ¶ added in v0.3.0
type ServiceClientOption func(*ServiceClient)
func WithChallenge ¶ added in v0.3.0
func WithChallenge(operation, challengeRef string) ServiceClientOption
func WithExpiredCredentials ¶ added in v0.3.0
func WithExpiredCredentials() ServiceClientOption
func WithLedger ¶ added in v0.3.0
func WithLedger(ledger map[string]LedgerRecord) ServiceClientOption
Click to show internal directories.
Click to hide internal directories.