service

package
v0.0.0-...-c7ec203 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCursor

func DecodeCursor(after *string) (*string, error)

func EncodeCursor

func EncodeCursor(i *string) graphql.ID

func NewLogger

func NewLogger(config *context.Config) *logging.Logger

Types

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(config *context.Config, log *logging.Logger) *AuthService

func (*AuthService) SignJWT

func (a *AuthService) SignJWT(user *model.User) (*string, error)

func (*AuthService) ValidateJWT

func (a *AuthService) ValidateJWT(tokenString *string) (*jwt.Token, error)

type RoleService

type RoleService struct {
	// contains filtered or unexported fields
}

func NewRoleService

func NewRoleService(db *sqlx.DB, log *logging.Logger) *RoleService

func (*RoleService) FindByUserId

func (r *RoleService) FindByUserId(userId *string) ([]*model.Role, error)

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(db *sqlx.DB, roleService *RoleService, log *logging.Logger) *UserService

func (*UserService) ComparePassword

func (u *UserService) ComparePassword(userCredentials *model.UserCredentials) (*model.User, error)

func (*UserService) Count

func (u *UserService) Count() (int, error)

func (*UserService) CreateUser

func (u *UserService) CreateUser(user *model.User) (*model.User, error)

func (*UserService) FindByEmail

func (u *UserService) FindByEmail(email string) (*model.User, error)

func (*UserService) List

func (u *UserService) List(first *int32, after *string) ([]*model.User, error)

Jump to

Keyboard shortcuts

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