Documentation ¶
Overview ¶
Package model contains the models ie. structs of the different entities, responses and inputs that are used by the graphql server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangePasswordInput ¶
type ChangePasswordInput struct { Token string `json:"token" validate:"required"` NewPassword string `json:"newPassword" validate:"required,gt=4"` }
ChangePasswordInput is the structure input that is received by the change password resolver
type ConfirmEmailResponse ¶
type ConfirmEmailResponse struct { Errors []*FieldError `json:"errors"` Successful *bool `json:"successful"` }
ConfirmEmailResponse is the structure of the response returned by the confirm email resolver
type FieldError ¶
FieldError is the structure of the error that is returned in many responses of the graphql resolvers
type ForgotPasswordInput ¶
type ForgotPasswordInput struct {
UsernameOrEmail string `json:"usernameOrEmail" validate:"required"`
}
ForgotPasswordInput is the structure input that is received by the forgot password resolver
type LoginInput ¶
type LoginInput struct { UsernameOrEmail string `json:"usernameOrEmail" validate:"required"` Password string `json:"password" validate:"required"` }
LoginInput is the structure input that is received by the login resolver
type RegisterInput ¶
type RegisterInput struct { Email string `json:"email" validate:"required,email"` Username string `json:"username" validate:"required,excludesrune=@"` Password string `json:"password" validate:"required,gt=4"` }
RegisterInput is the structure input that is received by the register resolver
type ResetPasswordResponse ¶
type ResetPasswordResponse struct { Errors []*FieldError `json:"errors"` Successful *bool `json:"successful"` }
ResetPasswordResponse is the structure of the response returned by the reset password resolver
type User ¶
type User struct { ID string `json:"id" gorm:"type:uuid;primaryKey"` Email string `json:"email" gorm:"not null;unique;size:256"` Username string `json:"username" gorm:"not null;unique;size:256"` Password string `json:"password" gorm:"not null;size:256"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Confirmed bool `json:"confirmed" gorm:"type:bool;not null;default:false"` ForgotPasswordLocked bool `json:"forgotPasswordLocked" gorm:"type:bool;not null;default:false"` }
User is the user model that is used for the graphql queries and database tables
type UserResponse ¶
type UserResponse struct { Errors []*FieldError `json:"errors"` User *User `json:"user"` }
UserResponse is the structure of the response returned by many resolvers related to the user entity