Documentation ¶
Index ¶
- type AuthRepository
- func (r *AuthRepository) Create(auth *model.Authorization) error
- func (r *AuthRepository) FindByID(id int64) (*model.Authorization, error)
- func (r *AuthRepository) StatsByToken(token string) (*model.TokenStat, error)
- func (r *AuthRepository) StatsByTokenPeriod(from, to time.Time, token string) (*model.TokenStat, error)
- func (r *AuthRepository) StatsForPeriod(from, to time.Time) ([]model.AuthStat, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
func (*AuthRepository) Create ¶
func (r *AuthRepository) Create(auth *model.Authorization) error
func (*AuthRepository) FindByID ¶
func (r *AuthRepository) FindByID(id int64) (*model.Authorization, error)
func (*AuthRepository) StatsByToken ¶
func (r *AuthRepository) StatsByToken(token string) (*model.TokenStat, error)
func (*AuthRepository) StatsByTokenPeriod ¶
func (*AuthRepository) StatsForPeriod ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an implementation of store.Store interface based on SQL.
func (*Store) Authorization ¶
func (s *Store) Authorization() store.AuthRepository
Authorization returns repository, which is responsible for authorizations.
Click to show internal directories.
Click to hide internal directories.