Versions in this module Expand all Collapse all v1 v1.1.0 Dec 4, 2026 Changes in this version + func WrapHTTP(base *http.Client, logger Logger, layers ...Middleware) *http.Client + type LogEntry struct + Duration time.Duration + Level slog.Level + Method string + Status int + type Logger interface + LogHTTP func(context.Context, LogEntry) + func SlogLogger(l *slog.Logger) Logger + type LoggerFunc func(context.Context, LogEntry) + func (f LoggerFunc) LogHTTP(ctx context.Context, entry LogEntry) + type Middleware func(http.RoundTripper) http.RoundTripper + type RoundTripFunc func(*http.Request) (*http.Response, error) + func (f RoundTripFunc) RoundTrip(r *http.Request) (*http.Response, error) v1.0.0 Dec 4, 2026 Changes in this version + var ErrSignature = errors.New("pereval: invalid webhook signature") + type Balance struct + Balance int64 + Currency string + TestOnly bool + type BatchError struct + Code string + Message string + type BatchMember struct + ExternalID string + type BatchResult struct + Error *BatchError + ExternalID string + type BlockRequest struct + Erase bool + From string + To string + type BoostState struct + Generation uuid.UUID + Placements int64 + RemainingMS int64 + StartedAt time.Time + State string + Until *time.Time + type Capabilities struct + ClientMessageID bool + CommerceEnabled bool + CommerceLiveZeroOnly bool + CommercePilot bool + Mode string + PhotoChecks bool + ProfileModeration bool + ProtocolVersion string + Videos bool + type CapabilitiesService struct + func (s CapabilitiesService) Get(ctx context.Context) (*Capabilities, error) + type CheckPhoto struct + ID string + URL string + type City struct + Country string + Lat *float64 + Lon *float64 + Name string + type Client struct + Capabilities CapabilitiesService + Commerce CommerceService + Events EventsService + Feed FeedService + Health HealthService + Languages LanguagesService + Likes LikesService + MCP MCPService + Matches MatchesService + Members MembersService + Messages MessagesService + Moderation ModerationService + Photos PhotosService + Webhooks WebhooksService + func New(baseURL, apiKey string) (*Client, error) + func NewClient(cfg Config) *Client + func (c *Client) Enabled() bool + type CommerceCatalog struct + Currency string + Items []CommerceProduct + TestOnly bool + type CommerceGrant struct + Capability string + ID uuid.UUID + Quantity int64 + RevokedAt *time.Time + Used int64 + ValidFrom time.Time + ValidUntil *time.Time + type CommerceOrder struct + CreatedAt time.Time + Currency string + GrantID uuid.UUID + ID uuid.UUID + QuoteID uuid.UUID + Reference string + Total int64 + ValidFrom time.Time + ValidUntil *time.Time + type CommerceProduct struct + Capability string + Currency string + MaxQuantity int64 + MinQuantity int64 + Ready bool + SKU string + Unit string + UnitPrice int64 + Version int64 + type CommerceQuote struct + Capability string + CatalogVersion int64 + Currency string + ExpiresAt time.Time + ID uuid.UUID + MemberID uuid.UUID + Quantity int64 + SKU string + Total int64 + Unit string + UnitPrice int64 + type CommerceService struct + func (s CommerceService) Balance(ctx context.Context) (Balance, error) + func (s CommerceService) Boost(ctx context.Context, member string) (*BoostState, error) + func (s CommerceService) Catalog(ctx context.Context) (*CommerceCatalog, error) + func (s CommerceService) Grants(ctx context.Context, member string) ([]CommerceGrant, error) + func (s CommerceService) Incognito(ctx context.Context, member string, enabled *bool) (bool, error) + func (s CommerceService) Order(ctx context.Context, quoteID uuid.UUID, externalOrderRef string) (*CommerceOrder, error) + func (s CommerceService) Quote(ctx context.Context, member string, sku string, quantity int64) (*CommerceQuote, error) + func (s CommerceService) SetDelivery(ctx context.Context, format string, enabled bool) (Delivery, error) + type Config struct + APIKey string + BaseURL string + CommerceKey string + HTTP *http.Client + WebhookSecret string + type Consent struct + CrossLanguage bool + GivenAt time.Time + Network bool + TextVersion string + World bool + type Delivery struct + Enabled bool + Format string + Version int + type EndMatchRequest struct + By string + CooldownDays int + Erase bool + MatchID string + type Error struct + Code string + Msg string + Status int + func (e *Error) Error() string + type Event struct + CreatedAt time.Time + Data json.RawMessage + ID string + Seq int64 + Type string + type EventPage struct + Items []Event + NextAfter int64 + type EventsService struct + func (s EventsService) List(ctx context.Context, after int64, limit int) (EventPage, error) + type FeedPage struct + Items []Profile + NextCursor string + RemainingToday int + type FeedParams struct + AgeMax int + AgeMin int + City string + Country string + Cursor string + Gender string + HeightMax int + HeightMin int + Intent string + Language string + Lat *float64 + Limit int + Lon *float64 + RadiusKM int + RequestRef string + Scope string + VerifiedOnly bool + type FeedService struct + func (s FeedService) List(ctx context.Context, externalID string, f FeedParams) (FeedPage, error) + type HealthService struct + func (s HealthService) Live(ctx context.Context) error + func (s HealthService) Ready(ctx context.Context) error + type IncomingLike struct + From Profile + LikedAt time.Time + type LanguagesService struct + func (s LanguagesService) List(ctx context.Context) ([]string, error) + type LikeRequest struct + ActionRef string + From string + Message string + Super bool + To string + type LikeResult struct + MatchID string + Matched bool + type LikesService struct + func (s LikesService) Create(ctx context.Context, req LikeRequest) (*LikeResult, error) + func (s LikesService) Dislike(ctx context.Context, from, to string) error + func (s LikesService) DislikeBatch(ctx context.Context, pairs []Pair) error + func (s LikesService) List(ctx context.Context, member string, limit int) ([]IncomingLike, error) + func (s LikesService) UndoDislike(ctx context.Context, from, to string, actionRef string) error + func (s LikesService) Withdraw(ctx context.Context, from, to string, actionRef string) error + type MCPService struct + func (s MCPService) Call(ctx context.Context, method string, params, result any) error + type Match struct + CreatedAt time.Time + FreezeReason string + Frozen bool + MatchID string + With Profile + type MatchesService struct + func (s MatchesService) ClearHistory(ctx context.Context, matchID, as string) error + func (s MatchesService) End(ctx context.Context, req EndMatchRequest) error + func (s MatchesService) List(ctx context.Context, member string) ([]Match, error) + type Member struct + AgeMax int + AgeMin int + ArrangementRole string + Bio string + BirthYear int + City City + Consent Consent + DisplayName string + Gender string + HeightCM *int + Intents []string + Languages []string + LastActiveAt *time.Time + PhotoVerified bool + Photos []string + ShowDistance bool + Verification *Verification + Videos []Video + type MemberResult struct + NetworkID string + PhotoVerified *bool + Verification string + type MembersService struct + func (s MembersService) Deactivate(ctx context.Context, externalID string) error + func (s MembersService) Reinstate(ctx context.Context, externalID string) error + func (s MembersService) Remove(ctx context.Context, externalID, reason string) error + func (s MembersService) Restore(ctx context.Context, externalID string) error + func (s MembersService) Touch(ctx context.Context, externalID string) error + func (s MembersService) TouchBatch(ctx context.Context, ids []string) (int, error) + func (s MembersService) Upsert(ctx context.Context, externalID string, m *Member) (MemberResult, error) + func (s MembersService) UpsertBatch(ctx context.Context, members []BatchMember) ([]BatchResult, error) + type Message struct + ClientMessageID string + CreatedAt time.Time + Flags []string + From string + ID string + Lang string + ReadAt *time.Time + Suspicious bool + Text string + TextOriginal string + Translated bool + type MessagesService struct + func (s MessagesService) List(ctx context.Context, matchID, as, before string, limit int) ([]Message, error) + func (s MessagesService) MarkRead(ctx context.Context, matchID, as, upTo string) error + func (s MessagesService) Send(ctx context.Context, req SendRequest) (*Message, error) + type ModerationService struct + func (s ModerationService) Block(ctx context.Context, req BlockRequest) error + func (s ModerationService) Report(ctx context.Context, from, to, reason, comment string) error + type Pair struct + From string + To string + type Partner struct + ID string + Name string + type PhotoCheck struct + Attempts int + CheckedAt *time.Time + CreatedAt time.Time + DecidedAt *time.Time + DisputeUntil *time.Time + DisputedAt *time.Time + ExpiresAt time.Time + ID string + Note string + Photos []struct{ ... } + Reason string + Ref string + Status string + URL string + type PhotosService struct + func (s PhotosService) Browse(ctx context.Context, viewer, peer, key string) ([]byte, string, error) + func (s PhotosService) CreateCheck(ctx context.Context, ref, lang, returnURL string, photos []CheckPhoto) (*PhotoCheck, error) + func (s PhotosService) GetCheck(ctx context.Context, id string) (*PhotoCheck, error) + type Profile struct + Age int + ArrangementRole string + Bio string + BioOriginal string + BioTranslated bool + City string + Country string + DisplayName string + DistanceKM *int + Gender string + HeightCM *int + Intents []string + Languages []string + NetworkID string + Partner Partner + PhotoVerified bool + Photos []string + Promotion *Promotion + SuperLike *SuperLike + VerifiedBy string + Videos []Video + type Promotion struct + Generation string + Kind string + type RPCError struct + Code int + Message string + func (e *RPCError) Error() string + type SendRequest struct + ClientMessageID string + From string + MatchID string + Text string + type SuperLike struct + Flags []string + Lang string + Message string + MessageOriginal string + Translated bool + type Verification struct + CheckID string + Method string + Provider string + VerifiedAt *time.Time + type Video struct + Poster string + URL string + type WebhooksService struct + func (s WebhooksService) Parse(body []byte, signature string) (*Event, error) + func (s WebhooksService) Verify(body []byte, signature string) bool