Documentation ¶
Index ¶
- Variables
- type Hub
- func (h *Hub) AppHash() string
- func (h *Hub) AppID() int
- func (h *Hub) AuthPutCode(ctx context.Context, user store.User, phone, code string) (need2fa bool, err error)
- func (h *Hub) AuthPutPass2FA(ctx context.Context, user store.User, phone, pass2fa string) error
- func (h *Hub) AuthStart(ctx context.Context, user store.User, phone string) error
- func (h *Hub) Run(ctx context.Context) error
- func (h *Hub) SendReport(ctx context.Context, user store.User, phone, url, msg string) (store.Report, error)
- type Opts
- type ResolveURLErr
- type StoreSession
- type UserStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotAuthorizedErr = errors.New("not authorized") AlreadyAuthorizedErr = errors.New("already authorized") )
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func (*Hub) AuthPutCode ¶
func (*Hub) AuthPutPass2FA ¶
type ResolveURLErr ¶
func (*ResolveURLErr) Error ¶
func (r *ResolveURLErr) Error() string
type StoreSession ¶
type StoreSession struct {
// contains filtered or unexported fields
}
func NewStoreSession ¶
func NewStoreSession(user store.User, phone string, db UserStore) *StoreSession
func (*StoreSession) LoadSession ¶
func (s *StoreSession) LoadSession(_ context.Context) ([]byte, error)
LoadSession loads session from store
func (*StoreSession) StoreSession ¶
func (s *StoreSession) StoreSession(ctx context.Context, data []byte) error
StoreSession stores session to store
Click to show internal directories.
Click to hide internal directories.