Documentation
¶
Index ¶
- Constants
- type ActivityItem
- type KeyChainItem
- type KeyType
- type User
- type UserId
- type UserRepo
- func (repo *UserRepo) Create(ctx context.Context, user User) (string, error)
- func (repo *UserRepo) Delete(ctx context.Context) (int, error)
- func (repo *UserRepo) DeleteKeychain(ctx context.Context) (bson.M, error)
- func (repo *UserRepo) Read(ctx context.Context, sort string, limit int64, offset int64, id string) ([]User, error)
- func (repo *UserRepo) Update(ctx context.Context, user User) (int, error)
- func (repo *UserRepo) UpsertKeychain(ctx context.Context, keychain *KeyChainItem) (bson.M, error)
- func (repo *UserRepo) ValidatePassword(ctx context.Context, username string, password string) (*User, error)
Constants ¶
View Source
const USER_COLLECTION_NAME = "user"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityItem ¶
type KeyChainItem ¶
type User ¶
type User struct { ID string `json:"id,omitempty" bson:"_id,omitempty"` Username string `json:"username,omitempty" bson:",omitempty"` Email string `json:"email,omitempty" bson:",omitempty"` AccessControl string `json:"accessControl,omitempty" bson:",omitempty"` Activity []ActivityItem `bson:",omitempty"` KeyChain map[string]KeyChainItem `bson:",omitempty"` }
type UserRepo ¶
type UserRepo struct { Client mongo.Client Coll *mongo.Collection // contains filtered or unexported fields }
func (*UserRepo) DeleteKeychain ¶
func (*UserRepo) UpsertKeychain ¶
Click to show internal directories.
Click to hide internal directories.