mysql

package
v1.57.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Runtime *env.Runtime
}

Scope provides data access to MySQL.

func (Scope) Add

func (s Scope) Add(ctx domain.RequestContext, u user.User) (err error)

Add adds the given user record to the user table.

func (Scope) CountActiveUsers

func (s Scope) CountActiveUsers() (c int)

CountActiveUsers returns the number of active users in the system.

func (Scope) DeactiveUser

func (s Scope) DeactiveUser(ctx domain.RequestContext, userID string) (err error)

DeactiveUser deletes the account record for the given userID and persister.Context.OrgID.

func (Scope) ForgotUserPassword

func (s Scope) ForgotUserPassword(ctx domain.RequestContext, email, token string) (err error)

ForgotUserPassword sets the password to ” and the reset field to token, for a user identified by email.

func (Scope) Get

func (s Scope) Get(ctx domain.RequestContext, id string) (u user.User, err error)

Get returns the user record for the given id.

func (Scope) GetActiveUsersForOrganization

func (s Scope) GetActiveUsersForOrganization(ctx domain.RequestContext) (u []user.User, err error)

GetActiveUsersForOrganization returns a slice containing of active user records for the organization identified in the Persister.

func (Scope) GetByDomain

func (s Scope) GetByDomain(ctx domain.RequestContext, domain, email string) (u user.User, err error)

GetByDomain matches user by email and domain.

func (Scope) GetByEmail

func (s Scope) GetByEmail(ctx domain.RequestContext, email string) (u user.User, err error)

GetByEmail returns a single row match on email.

func (Scope) GetBySerial

func (s Scope) GetBySerial(ctx domain.RequestContext, serial string) (u user.User, err error)

GetBySerial is used to retrieve a user via their temporary password salt value! This occurs when we you share a folder with a new user and they have to complete the onboarding process.

func (Scope) GetByToken

func (s Scope) GetByToken(ctx domain.RequestContext, token string) (u user.User, err error)

GetByToken returns a user record given a reset token value.

func (Scope) GetSpaceUsers

func (s Scope) GetSpaceUsers(ctx domain.RequestContext, spaceID string) (u []user.User, err error)

GetSpaceUsers returns a slice containing all user records for given space.

func (Scope) GetUsersForOrganization

func (s Scope) GetUsersForOrganization(ctx domain.RequestContext) (u []user.User, err error)

GetUsersForOrganization returns a slice containing all of the user records for the organizaiton identified in the Persister.

func (Scope) GetUsersForSpaces added in v1.54.0

func (s Scope) GetUsersForSpaces(ctx domain.RequestContext, spaces []string) (u []user.User, err error)

GetUsersForSpaces returns users with access to specified spaces.

func (Scope) UpdateUser

func (s Scope) UpdateUser(ctx domain.RequestContext, u user.User) (err error)

UpdateUser updates the user table using the given replacement user record.

func (Scope) UpdateUserPassword

func (s Scope) UpdateUserPassword(ctx domain.RequestContext, userID, salt, password string) (err error)

UpdateUserPassword updates a user record with new password and salt values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL