transformations

package
v0.0.0-...-7daae65 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBProductToGQLProduct

func DBProductToGQLProduct(p *product.Product, db *gorm.DB) (*gql.Product, error)

func DBReviewToGQLReview

func DBReviewToGQLReview(i *review.Review, db *gorm.DB) (*gql.Review, error)

func DBUserProfileToGQLUserProfile

func DBUserProfileToGQLUserProfile(up *user.UserProfile, u *user.User) (o *gql.UserProfile, err error)

func DBUserToGQLUser

func DBUserToGQLUser(i *user.User) (o *gql.User, err error)

DBUserToGQLUser transforms user db input to gql type

func GQLInputUserToDBUser

func GQLInputUserToDBUser(i *gql.NewUser, update bool) (o *user.User, err error)

GQLInputUserToDBUser transforms user gql input to db model

func GQLProductToDBProduct

func GQLProductToDBProduct(i *gql.NewProduct, adminId int) (*product.Product, error)

func GQLReviewToDBReview

func GQLReviewToDBReview(i *gql.NewReview, productId int, userId int) (*review.Review, error)

func GQLUpdateUserProfileToDBUserProfile

func GQLUpdateUserProfileToDBUserProfile(i *gql.UpdatedProfile, db *gorm.DB) (*user.UserProfile, error)

func UpdatedDBUserProfileToGQLUserProfile

func UpdatedDBUserProfileToGQLUserProfile(up *user.UserProfile, email string) (o *gql.UserProfile, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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