Documentation
¶
Index ¶
- type Driver
- func (mdb *Driver) AddNodeToUser(ctx context.Context, userID string, node models.Node) (int, error)
- func (mdb *Driver) Connect() error
- func (mdb *Driver) CreateUser(ctx context.Context, user *models.User) error
- func (mdb *Driver) DeleteUserByIDs(ctx context.Context, ids []string) (int, error)
- func (mdb *Driver) Disconnect() error
- func (mdb *Driver) GetAllUsers(ctx context.Context) ([]*models.User, error)
- func (mdb *Driver) GetBootupState(ctx context.Context) (models.Bootupstate, error)
- func (mdb *Driver) GetJWTToken(ctx context.Context) (string, error)
- func (mdb *Driver) GetRootToken(ctx context.Context) (string, error)
- func (mdb *Driver) GetUserByEmail(ctx context.Context, email string) (*models.User, error)
- func (mdb *Driver) GetUserByID(ctx context.Context, id string) (*models.User, error)
- func (mdb *Driver) InitSystemConfig(ctx context.Context, id string) error
- func (mdb *Driver) SetBootupState(ctx context.Context, state models.Bootupstate) error
- func (mdb *Driver) SetJWTToken(ctx context.Context, token string) error
- func (mdb *Driver) SetRootToken(ctx context.Context, token string) error
- func (mdb *Driver) SetUserPassword(ctx context.Context, id, password string) error
- func (mdb *Driver) SetUserUsername(ctx context.Context, id, username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the adapter handling communication with the MongoDB persistant store
func (*Driver) AddNodeToUser ¶
AddNodeToUser updates a user with data identified by id
func (*Driver) CreateUser ¶
CreateUser creates a user in the MongoDB persistan storage
func (*Driver) DeleteUserByIDs ¶
DeleteUserByIDs deletes a user from the MongoDB persistant storage based on id
func (*Driver) Disconnect ¶
Disconnect attempts to disconnect the driver mdb from the MongoDB persistant store
func (*Driver) GetAllUsers ¶
GetAllUsers retrieves all the users from MongoDB persistant storage
func (*Driver) GetBootupState ¶
GetBootupState gets the bootup state of the system
func (*Driver) GetJWTToken ¶
GetJWTToken gets the bootup state of the system
func (*Driver) GetRootToken ¶
GetRootToken gets the bootup state of the system
func (*Driver) GetUserByEmail ¶
GetUserByEmail finds a user based on the given email
func (*Driver) GetUserByID ¶
GetUserByID retrieves a user from the MongoDB persistant storage based on id
func (*Driver) InitSystemConfig ¶
InitSystemConfig initialises the persistant system config with zero values
func (*Driver) SetBootupState ¶
SetBootupState updates the bootup state of the system
func (*Driver) SetJWTToken ¶
SetJWTToken updates the bootup state of the system
func (*Driver) SetRootToken ¶
SetRootToken updates the bootup state of the system
func (*Driver) SetUserPassword ¶
SetUserPassword deletes a user from the MongoDB persistant storage based on id