Documentation ¶
Index ¶
- Variables
- type MongoStorage
- func (s *MongoStorage) AddPermission(u string, p *Permission) error
- func (s *MongoStorage) AddUser(u *User) error
- func (s *MongoStorage) ExistUser(u string) (bool, error)
- func (s *MongoStorage) GetUser(u string) (*User, error)
- func (s *MongoStorage) RemovePermission(u string, t string) error
- func (s *MongoStorage) RemoveUser(u string) error
- type MongoStorageFactory
- type MongoStorageOption
- type Permission
- type Storage
- type StorageFactory
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnknownStorageDriver = errors.New(" unknown storage driver")
)
Functions ¶
This section is empty.
Types ¶
type MongoStorage ¶
type MongoStorage struct {
// contains filtered or unexported fields
}
func (*MongoStorage) AddPermission ¶
func (s *MongoStorage) AddPermission(u string, p *Permission) error
func (*MongoStorage) AddUser ¶
func (s *MongoStorage) AddUser(u *User) error
func (*MongoStorage) RemovePermission ¶
func (s *MongoStorage) RemovePermission(u string, t string) error
func (*MongoStorage) RemoveUser ¶
func (s *MongoStorage) RemoveUser(u string) error
type MongoStorageFactory ¶
type MongoStorageFactory struct{}
func (*MongoStorageFactory) New ¶
func (*MongoStorageFactory) New(args ...interface{}) (Storage, error)
type MongoStorageOption ¶
type Permission ¶
type Storage ¶
type Storage interface { AddUser(*User) error RemoveUser(string) error AddPermission(string, *Permission) error RemovePermission(username string, topic string) error GetUser(string) (*User, error) ExistUser(string) (bool, error) }
func NewStorage ¶
type StorageFactory ¶
Click to show internal directories.
Click to hide internal directories.