updater

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

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	Id     string `bson:"_id" json:"_id" binding:"required"`
	Author string `bson:"author" json:"author"`
	Image  string `bson:"image" json:"image"  binding:"required"`
	Text   string `bson:"text" json:"text" binding:"required"`
}

type Repository

type Repository interface {
	UpdateUser(string, User)
	UpdatePost(Post) error
}

type Service

type Service interface {
	UpdateUser(string, User)
	UpdatePost(Post) error
}

func NewService

func NewService(r Repository) Service

type User

type User struct {
	FirstName string `bson:"firstName" json:"firstName"  binding:"required"`
	LastName  string `bson:"lastName" json:"lastName"  binding:"required"`
	Email     string `bson:"email" json:"email"  binding:"required"`
	Password  string `bson:"password" json:"password" binding:"required"`
}

Jump to

Keyboard shortcuts

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