Documentation ¶
Index ¶
- func NewAccount(kms security.KMS, password string) (proto.Account, *security.ManagedKey, error)
- func NewRoom(ctx scope.Context, kms security.KMS, private bool, name, version string, ...) (proto.ManagedRoom, error)
- func TestSession(id, agentID, ip string) proto.Session
- type EmailTracker
- func (et *EmailTracker) Get(ctx scope.Context, accountID snowflake.Snowflake, id string) (*emails.EmailRef, error)
- func (et *EmailTracker) List(ctx scope.Context, accountID snowflake.Snowflake, n int, before time.Time) ([]*emails.EmailRef, error)
- func (et *EmailTracker) MarkDelivered(ctx scope.Context, accountID snowflake.Snowflake, id string) error
- func (et *EmailTracker) Send(ctx scope.Context, js jobs.JobService, templater *templates.Templater, ...) (*emails.EmailRef, error)
- type JobQueue
- func (jq *JobQueue) Add(ctx scope.Context, jobType jobs.JobType, payload interface{}, ...) (snowflake.Snowflake, error)
- func (jq *JobQueue) AddAndClaim(ctx scope.Context, jobType jobs.JobType, payload interface{}, handlerID string, ...) (*jobs.Job, error)
- func (jq *JobQueue) Cancel(ctx scope.Context, jobID snowflake.Snowflake) error
- func (jq *JobQueue) Complete(ctx scope.Context, jobID snowflake.Snowflake, handlerID string, attempt int32, ...) error
- func (jq *JobQueue) Fail(ctx scope.Context, jobID snowflake.Snowflake, handlerID string, attempt int32, ...) error
- func (jq *JobQueue) Log(ctx scope.Context, jobID snowflake.Snowflake, attempt int32) (*jobs.JobLog, error)
- func (jq *JobQueue) Name() string
- func (jq *JobQueue) Stats(ctx scope.Context) (jobs.JobQueueStats, error)
- func (jq *JobQueue) TryClaim(ctx scope.Context, handlerID string) (*jobs.Job, error)
- func (jq *JobQueue) TrySteal(ctx scope.Context, handlerID string) (*jobs.Job, error)
- func (jq *JobQueue) WaitForJob(ctx scope.Context) error
- type JobService
- type PM
- type PMTracker
- type RoomBase
- func (r *RoomBase) EditMessage(ctx scope.Context, session proto.Session, edit proto.EditMessageCommand) (proto.EditMessageReply, error)
- func (r *RoomBase) GetMessage(ctx scope.Context, id snowflake.Snowflake) (*proto.Message, error)
- func (r *RoomBase) ID() string
- func (r *RoomBase) IsValidParent(id snowflake.Snowflake) (bool, error)
- func (r *RoomBase) Join(ctx scope.Context, session proto.Session) (string, error)
- func (r *RoomBase) Latest(ctx scope.Context, n int, before snowflake.Snowflake) ([]proto.Message, error)
- func (r *RoomBase) Listing(ctx scope.Context, level proto.PrivilegeLevel, exclude ...proto.Session) (proto.Listing, error)
- func (r *RoomBase) MessageKeyID(ctx scope.Context) (string, bool, error)
- func (r *RoomBase) Part(ctx scope.Context, session proto.Session) error
- func (r *RoomBase) RenameUser(ctx scope.Context, session proto.Session, formerName string) (*proto.NickEvent, error)
- func (r *RoomBase) ResolveClientAddress(ctx scope.Context, addr string) (net.IP, error)
- func (r *RoomBase) ResolveNick(ctx scope.Context, userID proto.UserID) (string, bool, error)
- func (r *RoomBase) Send(ctx scope.Context, session proto.Session, message proto.Message) (proto.Message, error)
- func (r *RoomBase) Snapshot(ctx scope.Context, session proto.Session, level proto.PrivilegeLevel, ...) (*proto.SnapshotEvent, error)
- func (r *RoomBase) Title() string
- func (r *RoomBase) Version() string
- func (r *RoomBase) WaitForPart(sessionID string) error
- type TestBackend
- func (b *TestBackend) AccountManager() proto.AccountManager
- func (b *TestBackend) AgentTracker() proto.AgentTracker
- func (b *TestBackend) Ban(ctx scope.Context, ban proto.Ban, until time.Time) error
- func (b *TestBackend) Close()
- func (b *TestBackend) CreateRoom(ctx scope.Context, kms security.KMS, private bool, name string, ...) (proto.ManagedRoom, error)
- func (b *TestBackend) EmailTracker() proto.EmailTracker
- func (b *TestBackend) GetRoom(ctx scope.Context, name string) (proto.ManagedRoom, error)
- func (b *TestBackend) Jobs() jobs.JobService
- func (b *TestBackend) NotifyUser(ctx scope.Context, userID proto.UserID, packetType proto.PacketType, ...) error
- func (b *TestBackend) PMTracker() proto.PMTracker
- func (b *TestBackend) Peers() []cluster.PeerDesc
- func (b *TestBackend) Unban(ctx scope.Context, ban proto.Ban) error
- func (b *TestBackend) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccount ¶
func TestSession ¶
Types ¶
type EmailTracker ¶
type EmailTracker struct {
// contains filtered or unexported fields
}
func (*EmailTracker) MarkDelivered ¶
type JobQueue ¶
type JobQueue struct {
// contains filtered or unexported fields
}
func (*JobQueue) AddAndClaim ¶
type JobService ¶
type JobService struct {
// contains filtered or unexported fields
}
type PM ¶
type PM struct { RoomBase // contains filtered or unexported fields }
func (*PM) ResolveNick ¶
type PMTracker ¶
type PMTracker struct {
// contains filtered or unexported fields
}
type RoomBase ¶
type RoomBase struct {
// contains filtered or unexported fields
}
func (*RoomBase) EditMessage ¶
func (r *RoomBase) EditMessage( ctx scope.Context, session proto.Session, edit proto.EditMessageCommand) ( proto.EditMessageReply, error)
func (*RoomBase) GetMessage ¶
func (*RoomBase) IsValidParent ¶
func (*RoomBase) MessageKeyID ¶
func (*RoomBase) RenameUser ¶
func (*RoomBase) ResolveClientAddress ¶
func (*RoomBase) ResolveNick ¶
func (*RoomBase) WaitForPart ¶
type TestBackend ¶
func (*TestBackend) AccountManager ¶
func (b *TestBackend) AccountManager() proto.AccountManager
func (*TestBackend) AgentTracker ¶
func (b *TestBackend) AgentTracker() proto.AgentTracker
func (*TestBackend) Close ¶
func (b *TestBackend) Close()
func (*TestBackend) CreateRoom ¶
func (*TestBackend) EmailTracker ¶
func (b *TestBackend) EmailTracker() proto.EmailTracker
func (*TestBackend) GetRoom ¶
func (b *TestBackend) GetRoom(ctx scope.Context, name string) (proto.ManagedRoom, error)
func (*TestBackend) Jobs ¶
func (b *TestBackend) Jobs() jobs.JobService
func (*TestBackend) NotifyUser ¶
func (b *TestBackend) NotifyUser(ctx scope.Context, userID proto.UserID, packetType proto.PacketType, payload interface{}, excluding ...proto.Session) error
func (*TestBackend) PMTracker ¶
func (b *TestBackend) PMTracker() proto.PMTracker
func (*TestBackend) Peers ¶
func (b *TestBackend) Peers() []cluster.PeerDesc
func (*TestBackend) Version ¶
func (b *TestBackend) Version() string
Click to show internal directories.
Click to hide internal directories.