Documentation
¶
Index ¶
- Variables
- type GetCallJobOpts
- type GetCallOpts
- type GetCallSessionOpts
- type GetCallsChannelOpts
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateCall(call *public.Call) error
- func (s *Store) CreateCallJob(job *public.CallJob) error
- func (s *Store) CreateCallSession(session *public.CallSession) error
- func (s *Store) CreateCallsChannel(channel *public.CallsChannel) error
- func (s *Store) DeleteCall(callID string) error
- func (s *Store) DeleteCallByChannelID(channelID string) error
- func (s *Store) DeleteCallSession(id string) error
- func (s *Store) DeleteCallsSessions(callID string) error
- func (s *Store) GetActiveCallByChannelID(channelID string, opts GetCallOpts) (*public.Call, error)
- func (s *Store) GetActiveCallJobs(callID string, opts GetCallJobOpts) (map[public.JobType]*public.CallJob, error)
- func (s *Store) GetAllActiveCalls(opts GetCallOpts) ([]*public.Call, error)
- func (s *Store) GetAllCallsChannels(opts GetCallsChannelOpts) ([]*public.CallsChannel, error)
- func (s *Store) GetAvgCallDuration() (int64, error)
- func (s *Store) GetAvgCallParticipants() (int64, error)
- func (s *Store) GetCall(callID string, opts GetCallOpts) (*public.Call, error)
- func (s *Store) GetCallActive(channelID string, opts GetCallOpts) (bool, error)
- func (s *Store) GetCallJob(id string, opts GetCallJobOpts) (*public.CallJob, error)
- func (s *Store) GetCallSession(id string, opts GetCallSessionOpts) (*public.CallSession, error)
- func (s *Store) GetCallSessions(callID string, opts GetCallSessionOpts) (map[string]*public.CallSession, error)
- func (s *Store) GetCallSessionsCount(callID string, opts GetCallSessionOpts) (int, error)
- func (s *Store) GetCallsByChannelType() (map[string]int64, error)
- func (s *Store) GetCallsByDay() (map[string]int64, error)
- func (s *Store) GetCallsByMonth() (map[string]int64, error)
- func (s *Store) GetCallsChannel(channelID string, opts GetCallsChannelOpts) (*public.CallsChannel, error)
- func (s *Store) GetCallsStats() (*public.CallsStats, error)
- func (s *Store) GetPost(postID string) (*model.Post, error)
- func (s *Store) GetRTCDHostForCall(callID string, opts GetCallOpts) (string, error)
- func (s *Store) GetRecordingJobsByDay() (map[string]int64, error)
- func (s *Store) GetRecordingJobsByMonth() (map[string]int64, error)
- func (s *Store) GetTotalActiveSessions() (int64, error)
- func (s *Store) GetTotalCalls(active bool) (int64, error)
- func (s *Store) IsUserInCall(userID, callID string, opts GetCallSessionOpts) (bool, error)
- func (s *Store) KVGet(pluginID, key string, fromWriter bool) ([]byte, error)
- func (s *Store) Migrate(direction models.Direction, dryRun bool) error
- func (s *Store) UpdateCall(call *public.Call) error
- func (s *Store) UpdateCallJob(job *public.CallJob) error
- func (s *Store) UpdateCallSession(session *public.CallSession) error
- func (s *Store) UpdateCallsChannel(channel *public.CallsChannel) error
- func (s *Store) UpdateFileInfoPostID(fileID, channelID, postID string) error
- func (s *Store) WriterDB() *sql.DB
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type GetCallJobOpts ¶
func (GetCallJobOpts) UseWriter ¶
func (o GetCallJobOpts) UseWriter() bool
type GetCallOpts ¶
type GetCallOpts struct {
FromWriter bool
}
func (GetCallOpts) UseWriter ¶
func (o GetCallOpts) UseWriter() bool
type GetCallSessionOpts ¶
type GetCallSessionOpts struct {
FromWriter bool
}
func (GetCallSessionOpts) UseWriter ¶
func (o GetCallSessionOpts) UseWriter() bool
type GetCallsChannelOpts ¶
type GetCallsChannelOpts struct {
FromWriter bool
}
func (GetCallsChannelOpts) UseWriter ¶
func (o GetCallsChannelOpts) UseWriter() bool
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(settings model.SqlSettings, rConnector driver.Connector, log mlog.LoggerIFace, metrics interfaces.StoreMetrics) (*Store, error)
func (*Store) CreateCallSession ¶
func (s *Store) CreateCallSession(session *public.CallSession) error
func (*Store) CreateCallsChannel ¶
func (s *Store) CreateCallsChannel(channel *public.CallsChannel) error
func (*Store) DeleteCall ¶
func (*Store) DeleteCallByChannelID ¶
func (*Store) DeleteCallSession ¶
func (*Store) DeleteCallsSessions ¶
func (*Store) GetActiveCallByChannelID ¶
func (*Store) GetActiveCallJobs ¶
func (*Store) GetAllActiveCalls ¶
func (s *Store) GetAllActiveCalls(opts GetCallOpts) ([]*public.Call, error)
func (*Store) GetAllCallsChannels ¶
func (s *Store) GetAllCallsChannels(opts GetCallsChannelOpts) ([]*public.CallsChannel, error)
func (*Store) GetAvgCallDuration ¶ added in v0.28.0
func (*Store) GetAvgCallParticipants ¶ added in v0.28.0
func (*Store) GetCallActive ¶ added in v0.28.0
func (s *Store) GetCallActive(channelID string, opts GetCallOpts) (bool, error)
func (*Store) GetCallJob ¶
func (*Store) GetCallSession ¶
func (s *Store) GetCallSession(id string, opts GetCallSessionOpts) (*public.CallSession, error)
func (*Store) GetCallSessions ¶
func (s *Store) GetCallSessions(callID string, opts GetCallSessionOpts) (map[string]*public.CallSession, error)
func (*Store) GetCallSessionsCount ¶ added in v0.28.0
func (s *Store) GetCallSessionsCount(callID string, opts GetCallSessionOpts) (int, error)
func (*Store) GetCallsByChannelType ¶ added in v0.28.0
func (*Store) GetCallsByDay ¶ added in v0.28.0
func (*Store) GetCallsByMonth ¶ added in v0.28.0
func (*Store) GetCallsChannel ¶
func (s *Store) GetCallsChannel(channelID string, opts GetCallsChannelOpts) (*public.CallsChannel, error)
func (*Store) GetCallsStats ¶ added in v0.28.0
func (s *Store) GetCallsStats() (*public.CallsStats, error)
func (*Store) GetPost ¶
GetPost is an alternative to p.API.GetPost() that fetches from the writer DB node. This should only be used internally to get calls posts as it doesn't take care of more advanced logic needed by clients like populating reply counts.
func (*Store) GetRTCDHostForCall ¶
func (s *Store) GetRTCDHostForCall(callID string, opts GetCallOpts) (string, error)
func (*Store) GetRecordingJobsByDay ¶ added in v1.0.0
func (*Store) GetRecordingJobsByMonth ¶ added in v1.0.0
func (*Store) GetTotalActiveSessions ¶ added in v0.28.0
func (*Store) GetTotalCalls ¶ added in v0.28.0
func (*Store) IsUserInCall ¶ added in v0.29.0
func (s *Store) IsUserInCall(userID, callID string, opts GetCallSessionOpts) (bool, error)
func (*Store) UpdateCallSession ¶
func (s *Store) UpdateCallSession(session *public.CallSession) error
func (*Store) UpdateCallsChannel ¶
func (s *Store) UpdateCallsChannel(channel *public.CallsChannel) error
func (*Store) UpdateFileInfoPostID ¶
Click to show internal directories.
Click to hide internal directories.