Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessHasher ¶
type AccessHasher struct {
// contains filtered or unexported fields
}
AccessHasher is a PostgreSQL-backed channel access hasher.
func NewAccessHasher ¶
func NewAccessHasher(pool *pgxpool.Pool, table string) *AccessHasher
NewAccessHasher creates a new AccessHasher for the given pool and table.
func (*AccessHasher) GetChannelAccessHash ¶
func (h *AccessHasher) GetChannelAccessHash(ctx context.Context, userID, channelID int64) (int64, bool, error)
GetChannelAccessHash retrieves the access hash for a given user and channel.
func (*AccessHasher) SetChannelAccessHash ¶
func (h *AccessHasher) SetChannelAccessHash(ctx context.Context, userID, channelID, accessHash int64) error
SetChannelAccessHash inserts or updates the access hash for a user and channel.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements kv.Storage on top of PostgreSQL single table.
type SessionStorage ¶
SessionStorage is a MTProto session PostgreSQL storage.
func NewSessionStorage ¶
func NewSessionStorage(pool *pgxpool.Pool, id int64, table string) SessionStorage
NewSessionStorage creates new SessionStorage for a given id and table.
Click to show internal directories.
Click to hide internal directories.