Discover Packages
github.com/btowers/blog-go
pkg
adder
package
Version:
v0.0.0-...-7f3334f
Opens a new window with list of versions in this module.
Published: Aug 11, 2021
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Post struct {
Author User `bson:"author" json:"author"`
Image string `bson:"image" json:"image" binding:"required"`
Text string `bson:"text" json:"text" binding:"required"`
}
type Repository interface {
AddPost(Post ) error
}
type Service interface {
AddPost(Post ) error
}
type User struct {
Id string `bson:"_id" json:"_id" binding:"required"`
FirstName string `bson:"firstName" json:"firstName" binding:"required"`
LastName string `bson:"lastName" json:"lastName" binding:"required"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.