presences

package
v7.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListOption

type ListOption func(*ListOptions)

type ListOptions

type ListOptions struct {
	Queries []string
	Total   bool
	Ttl     int
	// contains filtered or unexported fields
}

func (ListOptions) New

func (options ListOptions) New() *ListOptions

type Presences

type Presences struct {
	// contains filtered or unexported fields
}

Presences service

func New

func New(clt client.Client) *Presences

func (*Presences) Delete

func (srv *Presences) Delete(PresenceId string) (*interface{}, error)

Delete delete a presence log by its unique ID.

func (*Presences) Get

func (srv *Presences) Get(PresenceId string) (*models.Presence, error)

Get get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found.

func (*Presences) List

func (srv *Presences) List(optionalSetters ...ListOption) (*models.PresenceList, error)

List list presence logs. Expired entries are filtered out automatically.

func (*Presences) Update

func (srv *Presences) Update(PresenceId string, UserId string, optionalSetters ...UpdateOption) (*models.Presence, error)

Update update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.

func (*Presences) Upsert

func (srv *Presences) Upsert(PresenceId string, UserId string, Status string, optionalSetters ...UpsertOption) (*models.Presence, error)

Upsert create or update a presence log by its user ID.

func (*Presences) WithListQueries

func (srv *Presences) WithListQueries(v []string) ListOption

func (*Presences) WithListTotal

func (srv *Presences) WithListTotal(v bool) ListOption

func (*Presences) WithListTtl

func (srv *Presences) WithListTtl(v int) ListOption

func (*Presences) WithUpdateExpiresAt

func (srv *Presences) WithUpdateExpiresAt(v string) UpdateOption

func (*Presences) WithUpdateMetadata

func (srv *Presences) WithUpdateMetadata(v interface{}) UpdateOption

func (*Presences) WithUpdatePermissions

func (srv *Presences) WithUpdatePermissions(v []string) UpdateOption

func (*Presences) WithUpdatePurge

func (srv *Presences) WithUpdatePurge(v bool) UpdateOption

func (*Presences) WithUpdateStatus

func (srv *Presences) WithUpdateStatus(v string) UpdateOption

func (*Presences) WithUpsertExpiresAt

func (srv *Presences) WithUpsertExpiresAt(v string) UpsertOption

func (*Presences) WithUpsertMetadata

func (srv *Presences) WithUpsertMetadata(v interface{}) UpsertOption

func (*Presences) WithUpsertPermissions

func (srv *Presences) WithUpsertPermissions(v []string) UpsertOption

type UpdateOption

type UpdateOption func(*UpdateOptions)

type UpdateOptions

type UpdateOptions struct {
	Status      string
	ExpiresAt   string
	Metadata    interface{}
	Permissions []string
	Purge       bool
	// contains filtered or unexported fields
}

func (UpdateOptions) New

func (options UpdateOptions) New() *UpdateOptions

type UpsertOption

type UpsertOption func(*UpsertOptions)

type UpsertOptions

type UpsertOptions struct {
	Permissions []string
	ExpiresAt   string
	Metadata    interface{}
	// contains filtered or unexported fields
}

func (UpsertOptions) New

func (options UpsertOptions) New() *UpsertOptions

Jump to

Keyboard shortcuts

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