fake

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

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

type AdapterRecord added in v0.5.0

type AdapterRecord struct {
	Operation      service.Operation
	OperationID    string
	IdempotencyKey string
	Audit          service.AuditMetadata
}

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 NewRemote

func NewRemote() *Remote

func (*Remote) GetDevices

func (*Remote) Records

func (r *Remote) Records() []RequestRecord

type RequestRecord

type RequestRecord struct {
	Operation    string
	RequestType  string
	RequestBytes int
}

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 (*ServiceClient) Ledger added in v0.3.0

func (c *ServiceClient) Ledger() map[string]LedgerRecord

func (*ServiceClient) LinkDevice added in v0.3.0

func (*ServiceClient) Receive added in v0.3.0

func (*ServiceClient) Records added in v0.3.0

func (c *ServiceClient) Records() []ServiceClientRecord

func (*ServiceClient) Register added in v0.3.0

func (*ServiceClient) ReserveUsername added in v0.3.0

func (*ServiceClient) RespondToChallenge added in v0.3.0

func (*ServiceClient) Send added in v0.3.0

func (*ServiceClient) UploadBackup added in v0.3.0

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

type ServiceClientRecord added in v0.3.0

type ServiceClientRecord struct {
	Operation      string
	IdempotencyKey string
	RequestID      string
	Status         string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL