api

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 144

Documentation

Index

Constants

View Source
const (
	// ConflictUpdate will update matching records returning no error
	ConflictUpdate Conflict = 1
	// ConflictAbort will reject the request with ErrorConflict
	ConflictAbort Conflict = 2

	// AccountTypeUser indicates this is a user account
	AccountTypeUser AccountType = 1
	// AccountTypeGuest indicates this is a guest account
	AccountTypeGuest AccountType = 2
	// AccountTypeAdmin indicates this is an admin account
	AccountTypeAdmin AccountType = 3
	// AccountTypeAppService indicates this is an appservice account
	AccountTypeAppService AccountType = 4
)
View Source
const DefaultLoginTokenLifetime = 2 * time.Minute

DefaultLoginTokenLifetime determines how old a valid token may be.

NOTSPEC: The current spec says "SHOULD be limited to around five seconds". Since TCP retries are on the order of 3 s, 5 s sounds very low. Synapse uses 2 min (https://github.com/matrix-org/synapse/blob/78d5f91de1a9baf4dbb0a794cb49a799f29f7a38/synapse/handlers/auth.py#L1323-L1325).

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	UserID       string
	Localpart    string
	ServerName   gomatrixserverlib.ServerName
	AppServiceID string
	AccountType  AccountType
}

Account represents a Matrix account on this home server.

type AccountType

type AccountType int

AccountType is an enum representing the kind of account

type AppserviceUserAPI added in v0.8.3

type AppserviceUserAPI interface {
	PerformAccountCreation(ctx context.Context, req *PerformAccountCreationRequest, res *PerformAccountCreationResponse) error
	PerformDeviceCreation(ctx context.Context, req *PerformDeviceCreationRequest, res *PerformDeviceCreationResponse) error
}

api functions required by the appservice api

type ClientUserAPI added in v0.8.3

type ClientUserAPI interface {
	QueryAcccessTokenAPI
	LoginTokenInternalAPI
	UserLoginAPI
	QueryNumericLocalpart(ctx context.Context, res *QueryNumericLocalpartResponse) error
	QueryDevices(ctx context.Context, req *QueryDevicesRequest, res *QueryDevicesResponse) error
	QueryProfile(ctx context.Context, req *QueryProfileRequest, res *QueryProfileResponse) error
	QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error
	QueryPushers(ctx context.Context, req *QueryPushersRequest, res *QueryPushersResponse) error
	QueryPushRules(ctx context.Context, req *QueryPushRulesRequest, res *QueryPushRulesResponse) error
	QueryAccountAvailability(ctx context.Context, req *QueryAccountAvailabilityRequest, res *QueryAccountAvailabilityResponse) error
	PerformAccountCreation(ctx context.Context, req *PerformAccountCreationRequest, res *PerformAccountCreationResponse) error
	PerformDeviceCreation(ctx context.Context, req *PerformDeviceCreationRequest, res *PerformDeviceCreationResponse) error
	PerformDeviceUpdate(ctx context.Context, req *PerformDeviceUpdateRequest, res *PerformDeviceUpdateResponse) error
	PerformDeviceDeletion(ctx context.Context, req *PerformDeviceDeletionRequest, res *PerformDeviceDeletionResponse) error
	PerformPasswordUpdate(ctx context.Context, req *PerformPasswordUpdateRequest, res *PerformPasswordUpdateResponse) error
	PerformPusherDeletion(ctx context.Context, req *PerformPusherDeletionRequest, res *struct{}) error
	PerformPusherSet(ctx context.Context, req *PerformPusherSetRequest, res *struct{}) error
	PerformPushRulesPut(ctx context.Context, req *PerformPushRulesPutRequest, res *struct{}) error
	PerformAccountDeactivation(ctx context.Context, req *PerformAccountDeactivationRequest, res *PerformAccountDeactivationResponse) error
	PerformOpenIDTokenCreation(ctx context.Context, req *PerformOpenIDTokenCreationRequest, res *PerformOpenIDTokenCreationResponse) error
	SetAvatarURL(ctx context.Context, req *PerformSetAvatarURLRequest, res *PerformSetAvatarURLResponse) error
	SetDisplayName(ctx context.Context, req *PerformUpdateDisplayNameRequest, res *struct{}) error
	QueryNotifications(ctx context.Context, req *QueryNotificationsRequest, res *QueryNotificationsResponse) error
	InputAccountData(ctx context.Context, req *InputAccountDataRequest, res *InputAccountDataResponse) error
	PerformKeyBackup(ctx context.Context, req *PerformKeyBackupRequest, res *PerformKeyBackupResponse) error
	QueryKeyBackup(ctx context.Context, req *QueryKeyBackupRequest, res *QueryKeyBackupResponse) error

	QueryThreePIDsForLocalpart(ctx context.Context, req *QueryThreePIDsForLocalpartRequest, res *QueryThreePIDsForLocalpartResponse) error
	QueryLocalpartForThreePID(ctx context.Context, req *QueryLocalpartForThreePIDRequest, res *QueryLocalpartForThreePIDResponse) error
	PerformForgetThreePID(ctx context.Context, req *PerformForgetThreePIDRequest, res *struct{}) error
	PerformSaveThreePIDAssociation(ctx context.Context, req *PerformSaveThreePIDAssociationRequest, res *struct{}) error
}

api functions required by the client api

type Conflict

type Conflict int

Conflict is an enum representing what to do when encountering conflicting when creating profiles/devices

type Device

type Device struct {
	ID     string
	UserID string
	// The access_token granted to this device.
	// This uniquely identifies the device from all other devices and clients.
	AccessToken string
	// The unique ID of the session identified by the access token.
	// Can be used as a secure substitution in places where data needs to be
	// associated with access tokens.
	SessionID   int64
	DisplayName string
	LastSeenTS  int64
	LastSeenIP  string
	UserAgent   string
	// If the device is for an appservice user,
	// this is the appservice ID.
	AppserviceID string
	AccountType  AccountType
}

Device represents a client's device (mobile, web, etc)

type ErrorConflict

type ErrorConflict struct {
	Message string
}

ErrorConflict is an error indicating that there was a conflict which resulted in the request being aborted.

func (*ErrorConflict) Error

func (e *ErrorConflict) Error() string

type ErrorForbidden

type ErrorForbidden struct {
	Message string
}

ErrorForbidden is an error indicating that the supplied access token is forbidden

func (*ErrorForbidden) Error

func (e *ErrorForbidden) Error() string

type FederationUserAPI added in v0.8.3

type FederationUserAPI interface {
	QueryOpenIDToken(ctx context.Context, req *QueryOpenIDTokenRequest, res *QueryOpenIDTokenResponse) error
	QueryProfile(ctx context.Context, req *QueryProfileRequest, res *QueryProfileResponse) error
}

api functions required by the federation api

type InputAccountDataRequest

type InputAccountDataRequest struct {
	UserID      string          // required: the user to set account data for
	RoomID      string          // optional: the room to associate the account data with
	DataType    string          // required: the data type of the data
	AccountData json.RawMessage // required: the message content
}

InputAccountDataRequest is the request for InputAccountData

type InputAccountDataResponse

type InputAccountDataResponse struct {
}

InputAccountDataResponse is the response for InputAccountData

type InternalKeyBackupSession added in v0.5.0

type InternalKeyBackupSession struct {
	KeyBackupSession
	RoomID    string
	SessionID string
}

Internal KeyBackupData for passing to/from the storage layer

type KeyBackupSession added in v0.5.0

type KeyBackupSession struct {
	FirstMessageIndex int             `json:"first_message_index"`
	ForwardedCount    int             `json:"forwarded_count"`
	IsVerified        bool            `json:"is_verified"`
	SessionData       json.RawMessage `json:"session_data"`
}

KeyBackupData in https://spec.matrix.org/unstable/client-server-api/#get_matrixclientr0room_keyskeysroomidsessionid

func (*KeyBackupSession) ShouldReplaceRoomKey added in v0.5.0

func (a *KeyBackupSession) ShouldReplaceRoomKey(newKey *KeyBackupSession) bool

type KeyserverUserAPI added in v0.8.3

type KeyserverUserAPI interface {
	QueryDevices(ctx context.Context, req *QueryDevicesRequest, res *QueryDevicesResponse) error
	QueryDeviceInfos(ctx context.Context, req *QueryDeviceInfosRequest, res *QueryDeviceInfosResponse) error
}

type LoginTokenData added in v0.6.3

type LoginTokenData struct {
	// UserID is the full mxid of the user.
	UserID string
}

LoginTokenData is the data that can be retrieved given a login token. This is provided by the calling code.

type LoginTokenInternalAPI added in v0.6.3

type LoginTokenInternalAPI interface {
	// PerformLoginTokenCreation creates a new login token and associates it with the provided data.
	PerformLoginTokenCreation(ctx context.Context, req *PerformLoginTokenCreationRequest, res *PerformLoginTokenCreationResponse) error

	// PerformLoginTokenDeletion ensures the token doesn't exist. Success
	// is returned even if the token didn't exist, or was already deleted.
	PerformLoginTokenDeletion(ctx context.Context, req *PerformLoginTokenDeletionRequest, res *PerformLoginTokenDeletionResponse) error

	// QueryLoginToken returns the data associated with a login token. If
	// the token is not valid, success is returned, but res.Data == nil.
	QueryLoginToken(ctx context.Context, req *QueryLoginTokenRequest, res *QueryLoginTokenResponse) error
}

type LoginTokenMetadata added in v0.6.3

type LoginTokenMetadata struct {
	Token      string
	Expiration time.Time
}

LoginTokenMetadata contains metadata created and maintained by the User API.

type MediaUserAPI added in v0.8.3

type MediaUserAPI interface {
	QueryAcccessTokenAPI
}

api functions required by the media api

type Notification added in v0.6.5

type Notification struct {
	Actions    []*pushrules.Action           `json:"actions"`     // Required.
	Event      gomatrixserverlib.ClientEvent `json:"event"`       // Required.
	ProfileTag string                        `json:"profile_tag"` // Required by Sytest, but actually optional.
	Read       bool                          `json:"read"`        // Required.
	RoomID     string                        `json:"room_id"`     // Required.
	TS         gomatrixserverlib.Timestamp   `json:"ts"`          // Required.
}

type OpenIDToken added in v0.4.0

type OpenIDToken struct {
	Token       string
	UserID      string
	ExpiresAtMS int64
}

OpenIDToken represents an OpenID token

type OpenIDTokenAttributes added in v0.4.0

type OpenIDTokenAttributes struct {
	UserID      string
	ExpiresAtMS int64
}

OpenIDTokenInfo represents the attributes associated with an issued OpenID token

type PerformAccountCreationRequest

type PerformAccountCreationRequest struct {
	AccountType AccountType // Required: whether this is a guest or user account
	Localpart   string      // Required: The localpart for this account. Ignored if account type is guest.

	AppServiceID string // optional: the application service ID (not user ID) creating this account, if any.
	Password     string // optional: if missing then this account will be a passwordless account
	OnConflict   Conflict
}

PerformAccountCreationRequest is the request for PerformAccountCreation

type PerformAccountCreationResponse

type PerformAccountCreationResponse struct {
	AccountCreated bool
	Account        *Account
}

PerformAccountCreationResponse is the response for PerformAccountCreation

type PerformAccountDeactivationRequest

type PerformAccountDeactivationRequest struct {
	Localpart string
}

PerformAccountDeactivationRequest is the request for PerformAccountDeactivation

type PerformAccountDeactivationResponse

type PerformAccountDeactivationResponse struct {
	AccountDeactivated bool
}

PerformAccountDeactivationResponse is the response for PerformAccountDeactivation

type PerformDeviceCreationRequest

type PerformDeviceCreationRequest struct {
	Localpart   string
	AccessToken string // optional: if blank one will be made on your behalf
	// optional: if nil an ID is generated for you. If set, replaces any existing device session,
	// which will generate a new access token and invalidate the old one.
	DeviceID *string
	// optional: if nil no display name will be associated with this device.
	DeviceDisplayName *string
	// IP address of this device
	IPAddr string
	// Useragent for this device
	UserAgent string
	// NoDeviceListUpdate determines whether we should avoid sending a device list
	// update for this account. Generally the only reason to do this is if the account
	// is an appservice account.
	NoDeviceListUpdate bool
}

PerformDeviceCreationRequest is the request for PerformDeviceCreation

type PerformDeviceCreationResponse

type PerformDeviceCreationResponse struct {
	DeviceCreated bool
	Device        *Device
}

PerformDeviceCreationResponse is the response for PerformDeviceCreation

type PerformDeviceDeletionRequest

type PerformDeviceDeletionRequest struct {
	UserID string
	// The devices to delete. An empty slice means delete all devices.
	DeviceIDs []string
	// The requesting device ID to exclude from deletion. This is needed
	// so that a password change doesn't cause that client to be logged
	// out. Only specify when DeviceIDs is empty.
	ExceptDeviceID string
}

type PerformDeviceDeletionResponse

type PerformDeviceDeletionResponse struct {
}

type PerformDeviceUpdateRequest

type PerformDeviceUpdateRequest struct {
	RequestingUserID string
	DeviceID         string
	DisplayName      *string
}

type PerformDeviceUpdateResponse

type PerformDeviceUpdateResponse struct {
	DeviceExists bool
	Forbidden    bool
}

type PerformForgetThreePIDRequest added in v0.7.0

type PerformForgetThreePIDRequest QueryLocalpartForThreePIDRequest

type PerformKeyBackupRequest added in v0.5.0

type PerformKeyBackupRequest struct {
	UserID       string
	Version      string // optional if modifying a key backup
	AuthData     json.RawMessage
	Algorithm    string
	DeleteBackup bool // if true will delete the backup based on 'Version'.

	// The keys to upload, if any. If blank, creates/updates/deletes key version metadata only.
	Keys struct {
		Rooms map[string]struct {
			Sessions map[string]KeyBackupSession `json:"sessions"`
		} `json:"rooms"`
	}
}

type PerformKeyBackupResponse added in v0.5.0

type PerformKeyBackupResponse struct {
	Error    string // set if there was a problem performing the request
	BadInput bool   // if set, the Error was due to bad input (HTTP 400)

	Exists  bool   // set to true if the Version exists
	Version string // the newly created version

	KeyCount int64  // only set if Keys were given in the request
	KeyETag  string // only set if Keys were given in the request
}

type PerformLastSeenUpdateRequest added in v0.3.1

type PerformLastSeenUpdateRequest struct {
	UserID     string
	DeviceID   string
	RemoteAddr string
	UserAgent  string
}

PerformLastSeenUpdateRequest is the request for PerformLastSeenUpdate.

type PerformLastSeenUpdateResponse added in v0.3.1

type PerformLastSeenUpdateResponse struct {
}

PerformLastSeenUpdateResponse is the response for PerformLastSeenUpdate.

type PerformLoginTokenCreationRequest added in v0.6.3

type PerformLoginTokenCreationRequest struct {
	Data LoginTokenData
}

type PerformLoginTokenCreationResponse added in v0.6.3

type PerformLoginTokenCreationResponse struct {
	Metadata LoginTokenMetadata
}

type PerformLoginTokenDeletionRequest added in v0.6.3

type PerformLoginTokenDeletionRequest struct {
	Token string
}

type PerformLoginTokenDeletionResponse added in v0.6.3

type PerformLoginTokenDeletionResponse struct{}

type PerformOpenIDTokenCreationRequest added in v0.4.0

type PerformOpenIDTokenCreationRequest struct {
	UserID string
}

PerformOpenIDTokenCreationRequest is the request for PerformOpenIDTokenCreation

type PerformOpenIDTokenCreationResponse added in v0.4.0

type PerformOpenIDTokenCreationResponse struct {
	Token OpenIDToken
}

PerformOpenIDTokenCreationResponse is the response for PerformOpenIDTokenCreation

type PerformPasswordUpdateRequest

type PerformPasswordUpdateRequest struct {
	Localpart     string // Required: The localpart for this account.
	Password      string // Required: The new password to set.
	LogoutDevices bool   // Optional: Whether to log out all user devices.
}

PerformAccountCreationRequest is the request for PerformAccountCreation

type PerformPasswordUpdateResponse

type PerformPasswordUpdateResponse struct {
	PasswordUpdated bool
	Account         *Account
}

PerformAccountCreationResponse is the response for PerformAccountCreation

type PerformPushRulesPutRequest added in v0.6.5

type PerformPushRulesPutRequest struct {
	UserID   string                     `json:"user_id"`
	RuleSets *pushrules.AccountRuleSets `json:"rule_sets"`
}

type PerformPusherDeletionRequest added in v0.6.5

type PerformPusherDeletionRequest struct {
	Localpart string
	SessionID int64
}

type PerformPusherSetRequest added in v0.6.5

type PerformPusherSetRequest struct {
	Pusher    // Anonymous field because that's how clientapi unmarshals it.
	Localpart string
	Append    bool `json:"append"`
}

type PerformSaveThreePIDAssociationRequest added in v0.7.0

type PerformSaveThreePIDAssociationRequest struct {
	ThreePID, Localpart, Medium string
}

type PerformSetAvatarURLRequest added in v0.7.0

type PerformSetAvatarURLRequest struct {
	Localpart, AvatarURL string
}

type PerformSetAvatarURLResponse added in v0.7.0

type PerformSetAvatarURLResponse struct{}

type PerformUpdateDisplayNameRequest added in v0.7.0

type PerformUpdateDisplayNameRequest struct {
	Localpart, DisplayName string
}

type Pusher added in v0.6.5

type Pusher struct {
	SessionID         int64                  `json:"session_id,omitempty"`
	PushKey           string                 `json:"pushkey"`
	PushKeyTS         int64                  `json:"pushkey_ts,omitempty"`
	Kind              PusherKind             `json:"kind"`
	AppID             string                 `json:"app_id"`
	AppDisplayName    string                 `json:"app_display_name"`
	DeviceDisplayName string                 `json:"device_display_name"`
	ProfileTag        string                 `json:"profile_tag"`
	Language          string                 `json:"lang"`
	Data              map[string]interface{} `json:"data"`
}

Pusher represents a push notification subscriber

type PusherKind added in v0.6.5

type PusherKind string
const (
	EmailKind PusherKind = "email"
	HTTPKind  PusherKind = "http"
)

type QueryAcccessTokenAPI added in v0.8.3

type QueryAcccessTokenAPI interface {
	QueryAccessToken(ctx context.Context, req *QueryAccessTokenRequest, res *QueryAccessTokenResponse) error
}

common function for creating authenticated endpoints (used in client/media/sync api)

type QueryAccessTokenRequest

type QueryAccessTokenRequest struct {
	AccessToken string
	// optional user ID, valid only if the token is an appservice.
	// https://matrix.org/docs/spec/application_service/r0.1.2#using-sync-and-events
	AppServiceUserID string
}

QueryAccessTokenRequest is the request for QueryAccessToken

type QueryAccessTokenResponse

type QueryAccessTokenResponse struct {
	Device *Device
	Err    string // e.g ErrorForbidden
}

QueryAccessTokenResponse is the response for QueryAccessToken

type QueryAccountAvailabilityRequest added in v0.7.0

type QueryAccountAvailabilityRequest struct {
	Localpart string
}

type QueryAccountAvailabilityResponse added in v0.7.0

type QueryAccountAvailabilityResponse struct {
	Available bool
}

type QueryAccountByPasswordRequest added in v0.7.0

type QueryAccountByPasswordRequest struct {
	Localpart, PlaintextPassword string
}

type QueryAccountByPasswordResponse added in v0.7.0

type QueryAccountByPasswordResponse struct {
	Account *Account
	Exists  bool
}

type QueryAccountDataRequest

type QueryAccountDataRequest struct {
	UserID   string // required: the user to get account data for.
	RoomID   string // optional: the room ID, or global account data if not specified.
	DataType string // optional: the data type, or all types if not specified.
}

QueryAccountDataRequest is the request for QueryAccountData

type QueryAccountDataResponse

type QueryAccountDataResponse struct {
	GlobalAccountData map[string]json.RawMessage            // type -> data
	RoomAccountData   map[string]map[string]json.RawMessage // room -> type -> data
}

QueryAccountDataResponse is the response for QueryAccountData

type QueryDeviceInfosRequest

type QueryDeviceInfosRequest struct {
	DeviceIDs []string
}

QueryDeviceInfosRequest is the request to QueryDeviceInfos

type QueryDeviceInfosResponse

type QueryDeviceInfosResponse struct {
	DeviceInfo map[string]struct {
		DisplayName string
		UserID      string
	}
}

QueryDeviceInfosResponse is the response to QueryDeviceInfos

type QueryDevicesRequest

type QueryDevicesRequest struct {
	UserID string
}

QueryDevicesRequest is the request for QueryDevices

type QueryDevicesResponse

type QueryDevicesResponse struct {
	UserExists bool
	Devices    []Device
}

QueryDevicesResponse is the response for QueryDevices

type QueryKeyBackupRequest added in v0.5.0

type QueryKeyBackupRequest struct {
	UserID  string
	Version string // the version to query, if blank it means the latest

	ReturnKeys       bool   // whether to return keys in the backup response or just the metadata
	KeysForRoomID    string // optional string to return keys which belong to this room
	KeysForSessionID string // optional string to return keys which belong to this (room, session)
}

type QueryKeyBackupResponse added in v0.5.0

type QueryKeyBackupResponse struct {
	Error  string
	Exists bool

	Algorithm string          `json:"algorithm"`
	AuthData  json.RawMessage `json:"auth_data"`
	Count     int64           `json:"count"`
	ETag      string          `json:"etag"`
	Version   string          `json:"version"`

	Keys map[string]map[string]KeyBackupSession // the keys if ReturnKeys=true
}

type QueryLocalpartForThreePIDRequest added in v0.7.0

type QueryLocalpartForThreePIDRequest struct {
	ThreePID, Medium string
}

type QueryLocalpartForThreePIDResponse added in v0.7.0

type QueryLocalpartForThreePIDResponse struct {
	Localpart string
}

type QueryLoginTokenRequest added in v0.6.3

type QueryLoginTokenRequest struct {
	Token string
}

type QueryLoginTokenResponse added in v0.6.3

type QueryLoginTokenResponse struct {
	// Data is nil if the token was invalid.
	Data *LoginTokenData
}

type QueryNotificationsRequest added in v0.6.5

type QueryNotificationsRequest struct {
	Localpart string `json:"localpart"` // Required.
	From      string `json:"from,omitempty"`
	Limit     int    `json:"limit,omitempty"`
	Only      string `json:"only,omitempty"`
}

type QueryNotificationsResponse added in v0.6.5

type QueryNotificationsResponse struct {
	NextToken     string          `json:"next_token"`
	Notifications []*Notification `json:"notifications"` // Required.
}

type QueryNumericLocalpartResponse added in v0.7.0

type QueryNumericLocalpartResponse struct {
	ID int64
}

type QueryOpenIDTokenRequest added in v0.4.0

type QueryOpenIDTokenRequest struct {
	Token string
}

QueryOpenIDTokenRequest is the request for QueryOpenIDToken

type QueryOpenIDTokenResponse added in v0.4.0

type QueryOpenIDTokenResponse struct {
	Sub         string // The Matrix User ID that generated the token
	ExpiresAtMS int64
}

QueryOpenIDTokenResponse is the response for QueryOpenIDToken

type QueryProfileRequest

type QueryProfileRequest struct {
	// The user ID to query
	UserID string
}

QueryProfileRequest is the request for QueryProfile

type QueryProfileResponse

type QueryProfileResponse struct {
	// True if the user exists. Querying for a profile does not create them.
	UserExists bool
	// The current display name if set.
	DisplayName string
	// The current avatar URL if set.
	AvatarURL string
}

QueryProfileResponse is the response for QueryProfile

type QueryPushRulesRequest added in v0.6.5

type QueryPushRulesRequest struct {
	UserID string `json:"user_id"`
}

type QueryPushRulesResponse added in v0.6.5

type QueryPushRulesResponse struct {
	RuleSets *pushrules.AccountRuleSets `json:"rule_sets"`
}

type QueryPushersRequest added in v0.6.5

type QueryPushersRequest struct {
	Localpart string
}

type QueryPushersResponse added in v0.6.5

type QueryPushersResponse struct {
	Pushers []Pusher `json:"pushers"`
}

type QuerySearchProfilesAPI added in v0.8.3

type QuerySearchProfilesAPI interface {
	QuerySearchProfiles(ctx context.Context, req *QuerySearchProfilesRequest, res *QuerySearchProfilesResponse) error
}

custom api functions required by pinecone / p2p demos

type QuerySearchProfilesRequest

type QuerySearchProfilesRequest struct {
	// The search string to match
	SearchString string
	// How many results to return
	Limit int
}

QuerySearchProfilesRequest is the request for QueryProfile

type QuerySearchProfilesResponse

type QuerySearchProfilesResponse struct {
	// Profiles matching the search
	Profiles []authtypes.Profile
}

QuerySearchProfilesResponse is the response for QuerySearchProfilesRequest

type QueryThreePIDsForLocalpartRequest added in v0.7.0

type QueryThreePIDsForLocalpartRequest struct {
	Localpart string
}

type QueryThreePIDsForLocalpartResponse added in v0.7.0

type QueryThreePIDsForLocalpartResponse struct {
	ThreePIDs []authtypes.ThreePID
}

type RoomserverUserAPI added in v0.8.3

type RoomserverUserAPI interface {
	QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error
}

type SyncUserAPI added in v0.8.3

api functions required by the sync api

type UserInfo added in v0.4.0

type UserInfo struct {
	Sub string // The Matrix user's ID who generated the token
}

UserInfo is for returning information about the user an OpenID token was issued for

type UserInternalAPI

UserInternalAPI is the internal API for information about users and devices.

type UserInternalAPITrace added in v0.5.0

type UserInternalAPITrace struct {
	Impl UserInternalAPI
}

UserInternalAPITrace wraps a RoomserverInternalAPI and logs the complete request/response/error

func (*UserInternalAPITrace) InputAccountData added in v0.5.0

func (*UserInternalAPITrace) PerformAccountCreation added in v0.5.0

func (*UserInternalAPITrace) PerformAccountDeactivation added in v0.5.0

func (*UserInternalAPITrace) PerformDeviceCreation added in v0.5.0

func (*UserInternalAPITrace) PerformDeviceDeletion added in v0.5.0

func (*UserInternalAPITrace) PerformDeviceUpdate added in v0.5.0

func (*UserInternalAPITrace) PerformForgetThreePID added in v0.7.0

func (t *UserInternalAPITrace) PerformForgetThreePID(ctx context.Context, req *PerformForgetThreePIDRequest, res *struct{}) error

func (*UserInternalAPITrace) PerformKeyBackup added in v0.5.0

func (*UserInternalAPITrace) PerformLastSeenUpdate added in v0.5.0

func (*UserInternalAPITrace) PerformLoginTokenCreation added in v0.6.3

func (*UserInternalAPITrace) PerformLoginTokenDeletion added in v0.6.3

func (*UserInternalAPITrace) PerformOpenIDTokenCreation added in v0.5.0

func (*UserInternalAPITrace) PerformPasswordUpdate added in v0.5.0

func (*UserInternalAPITrace) PerformPushRulesPut added in v0.6.5

func (t *UserInternalAPITrace) PerformPushRulesPut(ctx context.Context, req *PerformPushRulesPutRequest, res *struct{}) error

func (*UserInternalAPITrace) PerformPusherDeletion added in v0.6.5

func (t *UserInternalAPITrace) PerformPusherDeletion(ctx context.Context, req *PerformPusherDeletionRequest, res *struct{}) error

func (*UserInternalAPITrace) PerformPusherSet added in v0.6.5

func (t *UserInternalAPITrace) PerformPusherSet(ctx context.Context, req *PerformPusherSetRequest, res *struct{}) error

func (*UserInternalAPITrace) PerformSaveThreePIDAssociation added in v0.7.0

func (t *UserInternalAPITrace) PerformSaveThreePIDAssociation(ctx context.Context, req *PerformSaveThreePIDAssociationRequest, res *struct{}) error

func (*UserInternalAPITrace) QueryAccessToken added in v0.5.0

func (*UserInternalAPITrace) QueryAccountAvailability added in v0.7.0

func (*UserInternalAPITrace) QueryAccountByPassword added in v0.7.0

func (*UserInternalAPITrace) QueryAccountData added in v0.5.0

func (*UserInternalAPITrace) QueryDeviceInfos added in v0.5.0

func (*UserInternalAPITrace) QueryDevices added in v0.5.0

func (*UserInternalAPITrace) QueryKeyBackup added in v0.5.0

func (*UserInternalAPITrace) QueryLocalpartForThreePID added in v0.7.0

func (*UserInternalAPITrace) QueryLoginToken added in v0.6.3

func (*UserInternalAPITrace) QueryNotifications added in v0.6.5

func (*UserInternalAPITrace) QueryNumericLocalpart added in v0.7.0

func (t *UserInternalAPITrace) QueryNumericLocalpart(ctx context.Context, res *QueryNumericLocalpartResponse) error

func (*UserInternalAPITrace) QueryOpenIDToken added in v0.5.0

func (*UserInternalAPITrace) QueryProfile added in v0.5.0

func (*UserInternalAPITrace) QueryPushRules added in v0.6.5

func (*UserInternalAPITrace) QueryPushers added in v0.6.5

func (*UserInternalAPITrace) QuerySearchProfiles added in v0.5.0

func (*UserInternalAPITrace) QueryThreePIDsForLocalpart added in v0.7.0

func (*UserInternalAPITrace) SetAvatarURL added in v0.7.0

func (*UserInternalAPITrace) SetDisplayName added in v0.7.0

func (t *UserInternalAPITrace) SetDisplayName(ctx context.Context, req *PerformUpdateDisplayNameRequest, res *struct{}) error

type UserLoginAPI added in v0.8.3

type UserLoginAPI interface {
	QueryAccountByPassword(ctx context.Context, req *QueryAccountByPasswordRequest, res *QueryAccountByPasswordResponse) error
}

Jump to

Keyboard shortcuts

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