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) GetBackupAuthCredentials(_ context.Context, req *backuppb.GetBackupAuthCredentialsRequest) (*backuppb.GetBackupAuthCredentialsResponse, 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) GetPreKeys(_ context.Context, req *keyspb.GetPreKeysAnonymousRequest) (*keyspb.GetPreKeysAnonymousResponse, 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) SendMessage(_ context.Context, req *messagespb.SendAuthenticatedSenderMessageRequest) (*messagespb.SendMessageAuthenticatedSenderResponse, 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
DevicesResponse *devicepb.GetDevicesResponse
PreKeysResponse *keyspb.GetPreKeysAnonymousResponse
MessageResponse *messagespb.SendMessageAuthenticatedSenderResponse
ProfileResponse *profilepb.GetVersionedProfileAnonymousResponse
BackupAuthCredentials *backuppb.GetBackupAuthCredentialsResponse
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) GetBackupAuthCredentials ¶
func (r *Remote) GetBackupAuthCredentials(_ context.Context, req *backuppb.GetBackupAuthCredentialsRequest) (*backuppb.GetBackupAuthCredentialsResponse, 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) GetPreKeys ¶
func (r *Remote) GetPreKeys(_ context.Context, req *keyspb.GetPreKeysAnonymousRequest) (*keyspb.GetPreKeysAnonymousResponse, 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) SendMessage ¶
func (r *Remote) SendMessage(_ context.Context, req *messagespb.SendAuthenticatedSenderMessageRequest) (*messagespb.SendMessageAuthenticatedSenderResponse, 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.