entity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTodoParam

type CreateTodoParam struct {
	Task      string             `json:"task" bson:"task" validate:"required"`
	Completed bool               `json:"completed" bson:"completed" validate:"required"`
	UserID    primitive.ObjectID `json:"userId" bson:"userId,omitempty" validate:"required"`
}

type CreateUserParam

type CreateUserParam struct {
	Name     string `json:"name" bson:"name" validate:"required"`
	Email    string `json:"email" bson:"email" validate:"required"`
	ImageUrl string `json:"imageUrl" bson:"imageUrl" validate:"required"`
}

type GoogleAuth

type GoogleAuth struct {
	TokenID  string `json:"token_id,omitempty"`
	Name     string `json:"name,omitempty"`
	Email    string `json:"email,omitempty"`
	Imageurl string `json:"imageUrl,omitempty"`
}

type JWTPayload

type JWTPayload struct {
	ID       primitive.ObjectID `json:"id"`
	Name     string             `json:"name"`
	Email    string             `json:"email"`
	Imageurl string             `json:"imageUrl"`
	jwt.StandardClaims
}

type Todo

type Todo struct {
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	Task      string             `json:"task" bson:"task"`
	Completed bool               `json:"completed" bson:"completed"`
	UserID    primitive.ObjectID `json:"userId" bson:"userId,omitempty"`
}

type UpdateTodoParam

type UpdateTodoParam struct {
	Task      string `json:"task" bson:"task"`
	Completed bool   `json:"completed" bson:"completed"`
}

type User

type User struct {
	ID       primitive.ObjectID `json:"id" bson:"_id"`
	Name     string             `json:"name" bson:"name"`
	Email    string             `json:"email" bson:"email"`
	ImageUrl string             `json:"imageUrl" bson:"imageUrl"`
}

Jump to

Keyboard shortcuts

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