Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements topology operations
func NewHandler ¶
func NewHandler(repo Repository) *Handler
NewHandler returns a new topology Handler
type Property ¶
type Property struct { ID primitive.ObjectID `json:"id" bson:"_id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Text string `json:"text" bson:"text"` }
Property struct contains information about the properties to be verified
type Repository ¶
type Repository interface { // FindAll returns all the packets from storage FindAll() ([]Property, error) // Store stores a new packet Store(p Property) error // Update updates a property Update(t Property) error // Count counts the properties objects stored Count() (int64, error) }
Repository defines the methods to be implemented by the storage layer.
func NewRepository ¶
func NewRepository(c *mongo.Client) Repository
NewRepository returns a new mongo Repository
Click to show internal directories.
Click to hide internal directories.