models

package
v0.0.0-...-5aa440a Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDbProblem = errors.New("models: problem with db")
View Source
var ErrNoRecord = errors.New("models: no matching record found")

Functions

This section is empty.

Types

type Person

type Person struct {
	FirstName string   `json:"first_name" bson:"firstName"`
	LastName  string   `json:"last_name" bson:"lastName"`
	Email     string   `json:"email" bson:"email"`
	ID        string   `json:"id" bson:"id"`
	Encodings []string `json:"encodings" bson:"encodings"`
}

Person

type PersonModel

type PersonModel interface {
	Update(id, firstName, lastName, email string, encodings []string) (string, error)
	Get(id string) (*Person, error)
	Remove(id string) (int64, error)
	GetAll() ([]*Person, error)
}

PersonModel defines model/DAO methods for Person

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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