Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStatus ¶
type AuthStatus string
const ( AuthAccepted AuthStatus = "Accepted" AuthDisconnected AuthStatus = "Disconnected" AuthFailed AuthStatus = "Failed" )
type AuthStorage ¶
type AuthStorage interface { UpsetAuthEvent(authInfo AuthInfo) (Session, error) GetUserSessions(username string) ([]Session, error) }
Auth Storage Schema: Bucket<username> -*> Key<ip> -> Value<Session>
type Session ¶
type Session struct { ID uint64 `json:"session_id"` Status AuthStatus `json:"status"` Username string `json:"username"` AuthMethods map[string]int32 `json:"auth_methods,omitempty"` RemoteAddr string `json:"remote_addr"` ConnsCount int32 `json:"conns_count"` FirstLogInTime *time.Time `json:"login_time,omitempty"` LastLogInTime *time.Time `json:"login_time,omitempty"` LastLogOutTime *time.Time `json:"logout_time,omitempty"` FailsCount int32 `json:"fails_count,omitempty"` LastAttemptTime *time.Time `json:"last_attempt_time,omitempty"` }
func NewSession ¶
type SlackStorage ¶
type SlackStorage interface { }
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) Auth ¶
func (st *Storage) Auth() AuthStorage
func (*Storage) Slack ¶
func (st *Storage) Slack() SlackStorage
type StorageI ¶
type StorageI interface { Auth() AuthStorage TG() TGStorage Slack() SlackStorage }
func NewStorage ¶
type TGChatInfo ¶
Click to show internal directories.
Click to hide internal directories.