Documentation ¶
Index ¶
- func GetNick(user *User, net *Network) string
- func GetRealname(user *User, net *Network) string
- func GetUsername(user *User, net *Network) string
- type Channel
- type Config
- type Database
- type DatabaseStats
- type DeliveryReceipt
- type Identd
- type Logger
- type MessageFilter
- type MetricsCollectorDatabase
- type Network
- type PostgresDB
- func (db *PostgresDB) Close() error
- func (db *PostgresDB) DeleteChannel(ctx context.Context, id int64) error
- func (db *PostgresDB) DeleteNetwork(ctx context.Context, id int64) error
- func (db *PostgresDB) DeleteUser(ctx context.Context, id int64) error
- func (db *PostgresDB) GetReadReceipt(ctx context.Context, networkID int64, name string) (*ReadReceipt, error)
- func (db *PostgresDB) GetUser(ctx context.Context, username string) (*User, error)
- func (db *PostgresDB) ListChannels(ctx context.Context, networkID int64) ([]Channel, error)
- func (db *PostgresDB) ListDeliveryReceipts(ctx context.Context, networkID int64) ([]DeliveryReceipt, error)
- func (db *PostgresDB) ListNetworks(ctx context.Context, userID int64) ([]Network, error)
- func (db *PostgresDB) ListUsers(ctx context.Context) ([]User, error)
- func (db *PostgresDB) RegisterMetrics(r prometheus.Registerer) error
- func (db *PostgresDB) Stats(ctx context.Context) (*DatabaseStats, error)
- func (db *PostgresDB) StoreChannel(ctx context.Context, networkID int64, ch *Channel) error
- func (db *PostgresDB) StoreClientDeliveryReceipts(ctx context.Context, networkID int64, client string, ...) error
- func (db *PostgresDB) StoreNetwork(ctx context.Context, userID int64, network *Network) error
- func (db *PostgresDB) StoreReadReceipt(ctx context.Context, networkID int64, receipt *ReadReceipt) error
- func (db *PostgresDB) StoreUser(ctx context.Context, user *User) error
- type ReadReceipt
- type SASL
- type Server
- type ServerStats
- type SqliteDB
- func (db *SqliteDB) Close() error
- func (db *SqliteDB) DeleteChannel(ctx context.Context, id int64) error
- func (db *SqliteDB) DeleteNetwork(ctx context.Context, id int64) error
- func (db *SqliteDB) DeleteUser(ctx context.Context, id int64) error
- func (db *SqliteDB) GetReadReceipt(ctx context.Context, networkID int64, name string) (*ReadReceipt, error)
- func (db *SqliteDB) GetUser(ctx context.Context, username string) (*User, error)
- func (db *SqliteDB) ListChannels(ctx context.Context, networkID int64) ([]Channel, error)
- func (db *SqliteDB) ListDeliveryReceipts(ctx context.Context, networkID int64) ([]DeliveryReceipt, error)
- func (db *SqliteDB) ListNetworks(ctx context.Context, userID int64) ([]Network, error)
- func (db *SqliteDB) ListUsers(ctx context.Context) ([]User, error)
- func (db *SqliteDB) RegisterMetrics(r prometheus.Registerer) error
- func (db *SqliteDB) Stats(ctx context.Context) (*DatabaseStats, error)
- func (db *SqliteDB) StoreChannel(ctx context.Context, networkID int64, ch *Channel) error
- func (db *SqliteDB) StoreClientDeliveryReceipts(ctx context.Context, networkID int64, client string, ...) error
- func (db *SqliteDB) StoreNetwork(ctx context.Context, userID int64, network *Network) error
- func (db *SqliteDB) StoreReadReceipt(ctx context.Context, networkID int64, receipt *ReadReceipt) error
- func (db *SqliteDB) StoreUser(ctx context.Context, user *User) error
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRealname ¶ added in v0.2.0
func GetUsername ¶ added in v0.3.0
Types ¶
type Channel ¶
type Channel struct { ID int64 Name string Key string Detached bool DetachedInternalMsgID string RelayDetached MessageFilter ReattachOn MessageFilter DetachAfter time.Duration DetachOn MessageFilter }
type Database ¶ added in v0.2.0
type Database interface { Close() error Stats(ctx context.Context) (*DatabaseStats, error) ListUsers(ctx context.Context) ([]User, error) GetUser(ctx context.Context, username string) (*User, error) StoreUser(ctx context.Context, user *User) error DeleteUser(ctx context.Context, id int64) error ListNetworks(ctx context.Context, userID int64) ([]Network, error) StoreNetwork(ctx context.Context, userID int64, network *Network) error DeleteNetwork(ctx context.Context, id int64) error ListChannels(ctx context.Context, networkID int64) ([]Channel, error) StoreChannel(ctx context.Context, networKID int64, ch *Channel) error DeleteChannel(ctx context.Context, id int64) error ListDeliveryReceipts(ctx context.Context, networkID int64) ([]DeliveryReceipt, error) StoreClientDeliveryReceipts(ctx context.Context, networkID int64, client string, receipts []DeliveryReceipt) error GetReadReceipt(ctx context.Context, networkID int64, name string) (*ReadReceipt, error) StoreReadReceipt(ctx context.Context, networkID int64, receipt *ReadReceipt) error }
func OpenPostgresDB ¶ added in v0.3.0
func OpenSqliteDB ¶ added in v0.2.0
type DatabaseStats ¶ added in v0.3.0
type DeliveryReceipt ¶
type Identd ¶
type Identd struct {
// contains filtered or unexported fields
}
Identd implements an ident server, as described in RFC 1413.
type Logger ¶
type MessageFilter ¶
type MessageFilter int
const ( // TODO: use customizable user defaults for FilterDefault FilterDefault MessageFilter = iota FilterNone FilterHighlight FilterMessage )
type MetricsCollectorDatabase ¶ added in v0.3.0
type MetricsCollectorDatabase interface { Database RegisterMetrics(r prometheus.Registerer) error }
type Network ¶
type PostgresDB ¶ added in v0.3.0
type PostgresDB struct {
// contains filtered or unexported fields
}
func (*PostgresDB) Close ¶ added in v0.3.0
func (db *PostgresDB) Close() error
func (*PostgresDB) DeleteChannel ¶ added in v0.3.0
func (db *PostgresDB) DeleteChannel(ctx context.Context, id int64) error
func (*PostgresDB) DeleteNetwork ¶ added in v0.3.0
func (db *PostgresDB) DeleteNetwork(ctx context.Context, id int64) error
func (*PostgresDB) DeleteUser ¶ added in v0.3.0
func (db *PostgresDB) DeleteUser(ctx context.Context, id int64) error
func (*PostgresDB) GetReadReceipt ¶ added in v0.4.0
func (db *PostgresDB) GetReadReceipt(ctx context.Context, networkID int64, name string) (*ReadReceipt, error)
func (*PostgresDB) ListChannels ¶ added in v0.3.0
func (*PostgresDB) ListDeliveryReceipts ¶ added in v0.3.0
func (db *PostgresDB) ListDeliveryReceipts(ctx context.Context, networkID int64) ([]DeliveryReceipt, error)
func (*PostgresDB) ListNetworks ¶ added in v0.3.0
func (*PostgresDB) ListUsers ¶ added in v0.3.0
func (db *PostgresDB) ListUsers(ctx context.Context) ([]User, error)
func (*PostgresDB) RegisterMetrics ¶ added in v0.4.0
func (db *PostgresDB) RegisterMetrics(r prometheus.Registerer) error
func (*PostgresDB) Stats ¶ added in v0.3.0
func (db *PostgresDB) Stats(ctx context.Context) (*DatabaseStats, error)
func (*PostgresDB) StoreChannel ¶ added in v0.3.0
func (*PostgresDB) StoreClientDeliveryReceipts ¶ added in v0.3.0
func (db *PostgresDB) StoreClientDeliveryReceipts(ctx context.Context, networkID int64, client string, receipts []DeliveryReceipt) error
func (*PostgresDB) StoreNetwork ¶ added in v0.3.0
func (*PostgresDB) StoreReadReceipt ¶ added in v0.4.0
func (db *PostgresDB) StoreReadReceipt(ctx context.Context, networkID int64, receipt *ReadReceipt) error
type ReadReceipt ¶ added in v0.4.0
type Server ¶
type Server struct { Logger Logger Identd *Identd // can be nil MetricsRegistry prometheus.Registerer // can be nil // contains filtered or unexported fields }
func (*Server) Stats ¶ added in v0.3.0
func (s *Server) Stats() *ServerStats
type ServerStats ¶ added in v0.3.0
type SqliteDB ¶ added in v0.2.0
type SqliteDB struct {
// contains filtered or unexported fields
}
func (*SqliteDB) DeleteChannel ¶ added in v0.2.0
func (*SqliteDB) DeleteNetwork ¶ added in v0.2.0
func (*SqliteDB) DeleteUser ¶ added in v0.2.0
func (*SqliteDB) GetReadReceipt ¶ added in v0.4.0
func (*SqliteDB) ListChannels ¶ added in v0.2.0
func (*SqliteDB) ListDeliveryReceipts ¶ added in v0.2.0
func (*SqliteDB) ListNetworks ¶ added in v0.2.0
func (*SqliteDB) RegisterMetrics ¶ added in v0.4.0
func (db *SqliteDB) RegisterMetrics(r prometheus.Registerer) error
func (*SqliteDB) Stats ¶ added in v0.3.0
func (db *SqliteDB) Stats(ctx context.Context) (*DatabaseStats, error)
func (*SqliteDB) StoreChannel ¶ added in v0.2.0
func (*SqliteDB) StoreClientDeliveryReceipts ¶ added in v0.2.0
func (*SqliteDB) StoreNetwork ¶ added in v0.2.0
func (*SqliteDB) StoreReadReceipt ¶ added in v0.4.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.