Documentation
¶
Index ¶
- type ListOption
- type ListOptions
- type Presences
- func (srv *Presences) Delete(PresenceId string) (*interface{}, error)
- func (srv *Presences) Get(PresenceId string) (*models.Presence, error)
- func (srv *Presences) List(optionalSetters ...ListOption) (*models.PresenceList, error)
- func (srv *Presences) Update(PresenceId string, UserId string, optionalSetters ...UpdateOption) (*models.Presence, error)
- func (srv *Presences) Upsert(PresenceId string, UserId string, Status string, ...) (*models.Presence, error)
- func (srv *Presences) WithListQueries(v []string) ListOption
- func (srv *Presences) WithListTotal(v bool) ListOption
- func (srv *Presences) WithListTtl(v int) ListOption
- func (srv *Presences) WithUpdateExpiresAt(v string) UpdateOption
- func (srv *Presences) WithUpdateMetadata(v interface{}) UpdateOption
- func (srv *Presences) WithUpdatePermissions(v []string) UpdateOption
- func (srv *Presences) WithUpdatePurge(v bool) UpdateOption
- func (srv *Presences) WithUpdateStatus(v string) UpdateOption
- func (srv *Presences) WithUpsertExpiresAt(v string) UpsertOption
- func (srv *Presences) WithUpsertMetadata(v interface{}) UpsertOption
- func (srv *Presences) WithUpsertPermissions(v []string) UpsertOption
- type UpdateOption
- type UpdateOptions
- type UpsertOption
- type UpsertOptions
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 (*Presences) Get ¶
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
Click to show internal directories.
Click to hide internal directories.