Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Paciente ¶
type Paciente struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` Nombre string `json:"nombre,omitempty" bson:"nombre,omitempty"` Apellido string `json:"apellido,omitempty" bson:"apellido,omitempty"` Identificacion string `json:"identificacion,omitempty" bson:"identificacion,omitempty"` Prestador string `json:"prestador,omitempty" bson:"prestador,omitempty"` Afiliado string `json:"afiliado,omitempty" bson:"afiliado,omitempty"` Data map[string]interface{} `json:"data,omitempty" bson:"data,omitempty"` // data opcional cualquier key:value }
func NewPaciente ¶
type PaginatedResponse ¶
type PaginatedResponse struct { Count int `json:"count"` Next string `json:"next"` Previous string `json:"previous"` Results interface{} `json:"results"` }
PaginatedResponse is the paginated response json schema we not use it yet
type Person ¶
type Person struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` FirstName string `json:"first_name,omitempty" bson:"first_name,omitempty"` LastName string `json:"last_name,omitempty" bson:"last_name,omitempty"` Username string `json:"username,omitempty" bson:"username,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Data map[string]interface{} `json:"data,omitempty" bson:"data,omitempty"` // data is a optional fields that can hold anything in key:value format. }
Person is the data structure that we will save and receive.
type Response ¶
type Response struct { Status int `json:"status"` Message string `json:"message"` Content interface{} `json:"content"` }
Response is the http json response schema
func NewPaginatedResponse ¶
func NewPaginatedResponse(status, count int, message, next, prev string, results interface{}) *Response
NewPaginatedResponse will created http paginated response
func NewResponse ¶
NewResponse is the Response struct factory function.
Click to show internal directories.
Click to hide internal directories.