Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Collection is a name of the MongoDB collection for homes. Collection = "homes" // Bucket for storing photos. Bucket = "photos" )
Variables ¶
View Source
var ( ErrIDNotFound = errors.New("home id does not exist") ErrIDNotEmpty = errors.New("home id must be empty") )
Functions ¶
This section is empty.
Types ¶
type Home ¶
type Home interface { Set(ctx context.Context, home *model.Home, photos []model.Photo) error Get(ctx context.Context, id string) (model.Home, error) }
Home stores the home model into the database and minio. we use minio for storing the image files of each home.
Click to show internal directories.
Click to hide internal directories.