Documentation ¶
Index ¶
- type AuthenticationToken
- type CreateAuthenticationTokenParams
- type CreateOauthUserParams
- type CreateResetPasswordTokenParams
- type CreateUserCredentialsParams
- type CreateUserParams
- type CreateVerifyEmailTokenParams
- type DBTX
- type DataStore
- type Database
- type GetAllUsersRow
- type GetUserByEmailRow
- type GetUserByIDRow
- type GetUserByOauthProviderParams
- type GetUserByOauthProviderRow
- type GetUserByResetPasswordTokenRow
- type GetUserByUUIDRow
- type GetUserByVerifyEmailTokenRow
- type OauthProvider
- type OauthUser
- type Querier
- type Queries
- func (q *Queries) CreateAuthenticationToken(ctx context.Context, arg CreateAuthenticationTokenParams) (AuthenticationToken, error)
- func (q *Queries) CreateOauthUser(ctx context.Context, arg CreateOauthUserParams) (OauthUser, error)
- func (q *Queries) CreateResetPasswordToken(ctx context.Context, arg CreateResetPasswordTokenParams) (ResetPasswordToken, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) CreateUserCredentials(ctx context.Context, arg CreateUserCredentialsParams) (UserCredentials, error)
- func (q *Queries) CreateVerifyEmailToken(ctx context.Context, arg CreateVerifyEmailTokenParams) (VerifyEmailToken, error)
- func (q *Queries) DeleteAuthenticationToken(ctx context.Context, userID int64) error
- func (q *Queries) DeleteResetPasswordToken(ctx context.Context, userID int64) error
- func (q *Queries) DeleteUser(ctx context.Context, uuid string) error
- func (q *Queries) DeleteVerifyEmailToken(ctx context.Context, userID int64) error
- func (q *Queries) GetAllUsers(ctx context.Context) ([]GetAllUsersRow, error)
- func (q *Queries) GetAuthenticationTokenByAccessToken(ctx context.Context, accessToken string) (AuthenticationToken, error)
- func (q *Queries) GetAuthenticationTokenByRefreshToken(ctx context.Context, refreshToken string) (AuthenticationToken, error)
- func (q *Queries) GetOauthProviders(ctx context.Context) ([]OauthProvider, error)
- func (q *Queries) GetRoles(ctx context.Context) ([]Role, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error)
- func (q *Queries) GetUserByID(ctx context.Context, id int64) (GetUserByIDRow, error)
- func (q *Queries) GetUserByOauthProvider(ctx context.Context, arg GetUserByOauthProviderParams) (GetUserByOauthProviderRow, error)
- func (q *Queries) GetUserByResetPasswordToken(ctx context.Context, token string) (GetUserByResetPasswordTokenRow, error)
- func (q *Queries) GetUserByUUID(ctx context.Context, uuid string) (GetUserByUUIDRow, error)
- func (q *Queries) GetUserByVerifyEmailToken(ctx context.Context, token string) (GetUserByVerifyEmailTokenRow, error)
- func (q *Queries) GetVerifyEmailTokenByToken(ctx context.Context, token string) (VerifyEmailToken, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) UpdateUserIsEmailVerified(ctx context.Context, arg UpdateUserIsEmailVerifiedParams) error
- func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ResetPasswordToken
- type Role
- type UpdateUserIsEmailVerifiedParams
- type UpdateUserParams
- type UpdateUserPasswordParams
- type User
- type UserCredentials
- type VerifyEmailToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationToken ¶
type AuthenticationToken struct { UserID int64 `json:"userId"` AccessToken string `json:"accessToken"` AccessTokenExpiresAt string `json:"accessTokenExpiresAt"` RefreshToken string `json:"refreshToken"` RefreshTokenExpiresAt string `json:"refreshTokenExpiresAt"` CreatedAt string `json:"createdAt"` }
type CreateAuthenticationTokenParams ¶
type CreateAuthenticationTokenParams struct { UserID int64 `json:"userId"` AccessToken string `json:"accessToken"` AccessTokenExpiresAt string `json:"accessTokenExpiresAt"` RefreshToken string `json:"refreshToken"` RefreshTokenExpiresAt string `json:"refreshTokenExpiresAt"` CreatedAt string `json:"createdAt"` }
type CreateOauthUserParams ¶
type CreateUserParams ¶
type CreateUserParams struct { Uuid string `json:"uuid"` Name string `json:"name"` IsActive int64 `json:"isActive"` ImageID sql.NullString `json:"imageId"` ImageUrl sql.NullString `json:"imageUrl"` CreatedAt string `json:"createdAt"` UpdatedAt sql.NullString `json:"updatedAt"` RoleID int64 `json:"roleId"` }
type DataStore ¶
type DataStore interface { Querier Connect() error Close() error MigrateUp() error MigrateDown() error ExecTx(ctx context.Context, fn func(*Queries) error) error }
func NewDataStore ¶
func NewDataStore(db *sql.DB) DataStore {
type Database ¶
type Database struct { *Queries // contains filtered or unexported fields }
func (*Database) MigrateDown ¶
type GetAllUsersRow ¶
type GetAllUsersRow struct { User User `json:"user"` UserCredentials UserCredentials `json:"userCredentials"` }
type GetUserByEmailRow ¶
type GetUserByEmailRow struct { User User `json:"user"` UserCredentials UserCredentials `json:"userCredentials"` }
type GetUserByIDRow ¶
type GetUserByIDRow struct {
User User `json:"user"`
}
type GetUserByResetPasswordTokenRow ¶
type GetUserByResetPasswordTokenRow struct { User User `json:"user"` ResetPasswordToken ResetPasswordToken `json:"resetPasswordToken"` }
type GetUserByUUIDRow ¶
type GetUserByUUIDRow struct { ID int64 `json:"id"` Uuid string `json:"uuid"` Name string `json:"name"` IsActive int64 `json:"isActive"` ImageID sql.NullString `json:"imageId"` ImageUrl sql.NullString `json:"imageUrl"` CreatedAt string `json:"createdAt"` UpdatedAt sql.NullString `json:"updatedAt"` RoleID int64 `json:"roleId"` UserID sql.NullInt64 `json:"userId"` Password sql.NullString `json:"password"` Email sql.NullString `json:"email"` IsEmailVerified sql.NullInt64 `json:"isEmailVerified"` OauthProviderID sql.NullInt64 `json:"oauthProviderId"` UserID_2 sql.NullInt64 `json:"userId2"` ExternalUserID sql.NullString `json:"externalUserId"` Email_2 interface{} `json:"email2"` }
type GetUserByVerifyEmailTokenRow ¶
type GetUserByVerifyEmailTokenRow struct { User User `json:"user"` VerifyEmailToken VerifyEmailToken `json:"verifyEmailToken"` }
type OauthProvider ¶
type Querier ¶
type Querier interface { CreateAuthenticationToken(ctx context.Context, arg CreateAuthenticationTokenParams) (AuthenticationToken, error) CreateOauthUser(ctx context.Context, arg CreateOauthUserParams) (OauthUser, error) CreateResetPasswordToken(ctx context.Context, arg CreateResetPasswordTokenParams) (ResetPasswordToken, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) CreateUserCredentials(ctx context.Context, arg CreateUserCredentialsParams) (UserCredentials, error) CreateVerifyEmailToken(ctx context.Context, arg CreateVerifyEmailTokenParams) (VerifyEmailToken, error) DeleteAuthenticationToken(ctx context.Context, userID int64) error DeleteResetPasswordToken(ctx context.Context, userID int64) error DeleteUser(ctx context.Context, uuid string) error DeleteVerifyEmailToken(ctx context.Context, userID int64) error // SELECT user.*, user_credentials.* GetAllUsers(ctx context.Context) ([]GetAllUsersRow, error) GetAuthenticationTokenByAccessToken(ctx context.Context, accessToken string) (AuthenticationToken, error) GetAuthenticationTokenByRefreshToken(ctx context.Context, refreshToken string) (AuthenticationToken, error) GetOauthProviders(ctx context.Context) ([]OauthProvider, error) GetRoles(ctx context.Context) ([]Role, error) // SELECT user.*, user_credentials.* GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error) // SELECT user.*, user_credentials.* GetUserByID(ctx context.Context, id int64) (GetUserByIDRow, error) GetUserByOauthProvider(ctx context.Context, arg GetUserByOauthProviderParams) (GetUserByOauthProviderRow, error) GetUserByResetPasswordToken(ctx context.Context, token string) (GetUserByResetPasswordTokenRow, error) // SELECT sqlc.embed(user), sqlc.embed(user_credentials), sqlc.embed(oauth_user) GetUserByUUID(ctx context.Context, uuid string) (GetUserByUUIDRow, error) GetUserByVerifyEmailToken(ctx context.Context, token string) (GetUserByVerifyEmailTokenRow, error) GetVerifyEmailTokenByToken(ctx context.Context, token string) (VerifyEmailToken, error) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) UpdateUserIsEmailVerified(ctx context.Context, arg UpdateUserIsEmailVerifiedParams) error UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAuthenticationToken ¶
func (q *Queries) CreateAuthenticationToken(ctx context.Context, arg CreateAuthenticationTokenParams) (AuthenticationToken, error)
func (*Queries) CreateOauthUser ¶
func (*Queries) CreateResetPasswordToken ¶
func (q *Queries) CreateResetPasswordToken(ctx context.Context, arg CreateResetPasswordTokenParams) (ResetPasswordToken, error)
func (*Queries) CreateUser ¶
func (*Queries) CreateUserCredentials ¶
func (q *Queries) CreateUserCredentials(ctx context.Context, arg CreateUserCredentialsParams) (UserCredentials, error)
func (*Queries) CreateVerifyEmailToken ¶
func (q *Queries) CreateVerifyEmailToken(ctx context.Context, arg CreateVerifyEmailTokenParams) (VerifyEmailToken, error)
func (*Queries) DeleteAuthenticationToken ¶
func (*Queries) DeleteResetPasswordToken ¶
func (*Queries) DeleteVerifyEmailToken ¶
func (*Queries) GetAllUsers ¶
func (q *Queries) GetAllUsers(ctx context.Context) ([]GetAllUsersRow, error)
SELECT user.*, user_credentials.*
func (*Queries) GetAuthenticationTokenByAccessToken ¶
func (*Queries) GetAuthenticationTokenByRefreshToken ¶
func (*Queries) GetOauthProviders ¶
func (q *Queries) GetOauthProviders(ctx context.Context) ([]OauthProvider, error)
func (*Queries) GetUserByEmail ¶
SELECT user.*, user_credentials.*
func (*Queries) GetUserByID ¶
SELECT user.*, user_credentials.*
func (*Queries) GetUserByOauthProvider ¶
func (q *Queries) GetUserByOauthProvider(ctx context.Context, arg GetUserByOauthProviderParams) (GetUserByOauthProviderRow, error)
func (*Queries) GetUserByResetPasswordToken ¶
func (*Queries) GetUserByUUID ¶
SELECT sqlc.embed(user), sqlc.embed(user_credentials), sqlc.embed(oauth_user)
func (*Queries) GetUserByVerifyEmailToken ¶
func (*Queries) GetVerifyEmailTokenByToken ¶
func (*Queries) UpdateUser ¶
func (*Queries) UpdateUserIsEmailVerified ¶
func (q *Queries) UpdateUserIsEmailVerified(ctx context.Context, arg UpdateUserIsEmailVerifiedParams) error
func (*Queries) UpdateUserPassword ¶
func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
type ResetPasswordToken ¶
type UpdateUserIsEmailVerifiedParams ¶
type UpdateUserIsEmailVerifiedParams struct { IsEmailVerified int64 `json:"isEmailVerified"` UserID interface{} `json:"userId"` }
type UpdateUserParams ¶
type UpdateUserParams struct { Name sql.NullString `json:"name"` ImageID sql.NullString `json:"imageId"` ImageUrl sql.NullString `json:"imageUrl"` IsActive sql.NullInt64 `json:"isActive"` UpdatedAt sql.NullString `json:"updatedAt"` Uuid string `json:"uuid"` }
type UpdateUserPasswordParams ¶
type UpdateUserPasswordParams struct { Password string `json:"password"` UserID interface{} `json:"userId"` }
type User ¶
type User struct { ID int64 `json:"id"` Uuid string `json:"uuid"` Name string `json:"name"` IsActive int64 `json:"isActive"` ImageID sql.NullString `json:"imageId"` ImageUrl sql.NullString `json:"imageUrl"` CreatedAt string `json:"createdAt"` UpdatedAt sql.NullString `json:"updatedAt"` RoleID int64 `json:"roleId"` }
type UserCredentials ¶
type VerifyEmailToken ¶
Click to show internal directories.
Click to hide internal directories.