services

package
v0.0.0-...-3f9f8fd Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conect

func Conect() (db *gorm.DB)

Types

type Contact

type Contact struct {
	ID                     int64          `json:"id" db:"id" gorm:"primary_key"`
	Nombre                 string         `json:"nombre" db:"nombre"`
	Telefono               sql.NullString `json:"telefono" db:"telefono"`
	Fax                    sql.NullString `json:"fax" db:"fax"`
	Correo                 sql.NullString `json:"correo" db:"correo"`
	Celular                sql.NullString `json:"celular" db:"celular"`
	Apellido               sql.NullString `json:"apellido" db:"apellido"`
	Municipio              sql.NullInt64  `json:"municipio" db:"municipio"`
	MunicipioResidencia    sql.NullInt64  `json:"municipioResidencia" db:"municipioResidencia"`
	DepartamentoResidencia sql.NullInt64  `json:"departamentoResidencia" db:"departamentoResidencia"`
	FechaActualizacion     *time.Time     `json:"fechaActualizacion" db:"fechaActualizacion"`
	Tematica               Thematic       `gorm:"ForeignKey:TematicaID.Int64;AssociationForeignKey:ID"`
	Idtematica             sql.NullInt64  `json:"idTematica" db:"idTematica" gorm:"index"`
	Organizacion           Organization   `gorm:"ForeignKey:OrganizacionID.Int64;AssociationForeignKey:ID"`
	Idorganizacion         sql.NullInt64  `json:"idOrganizacion" db:"idOrganization" gorm:"index"`
}

func (*Contact) Create

func (contact *Contact) Create() (responseStatus int, err error)

func (*Contact) Delete

func (contact *Contact) Delete() (responseStatus int, err error)

func (*Contact) Get

func (contact *Contact) Get() (responseStatus int, err error)

func (*Contact) Update

func (contact *Contact) Update() (responseStatus int, err error)

type Contacts

type Contacts struct {
	List   []Contact `json:"list"`
	Page   int       `json:"page"`
	IDLast int       `json:"idLast"`
	Limit  int       `json:"limit"`
}

func (*Contacts) Create

func (contacts *Contacts) Create() (responseStatus int, err error)

func (*Contacts) Delete

func (contacts *Contacts) Delete() (responseStatus int, err error)

func (*Contacts) Get

func (contacts *Contacts) Get() (responseStatus int, err error)

func (*Contacts) Update

func (contacts *Contacts) Update() (responseStatus int, err error)

type Organization

type Organization struct {
	ID                 int64          `json:"id" db:"id"`
	Nombre             sql.NullString `json:"nombre" db:"nombre"`
	Sigla              sql.NullString `json:"sigla" db:"sigla"`
	Sede               sql.NullString `json:"sede" db:"sede"`
	Direccion          sql.NullString `json:"direccion" db:"direccion"`
	Telefono           sql.NullString `json:"telefono" db:"telefono"`
	Representante      sql.NullString `json:"representante" db:"representante"`
	FechaActualizacion *time.Time     `json:"fechaActualizacion" db:"fechaActualizacion"`
}

func (*Organization) Create

func (organization *Organization) Create() (responseStatus int, err error)

func (*Organization) Delete

func (organization *Organization) Delete() (responseStatus int, err error)

func (*Organization) Get

func (organization *Organization) Get(db *gorm.DB) (responseStatus int, err error)

func (*Organization) Update

func (organization *Organization) Update() (responseStatus int, err error)

type Organizations

type Organizations struct {
	List   []Organization `json:"list"`
	Page   int            `json:"page"`
	IDLast int            `json:"idLast"`
	Limit  int            `json:"limit"`
}

func (*Organizations) Create

func (organizations *Organizations) Create() (responseStatus int, err error)

func (*Organizations) Delete

func (organizations *Organizations) Delete() (responseStatus int, err error)

func (*Organizations) Get

func (organizations *Organizations) Get() (responseStatus int, err error)

func (*Organizations) Update

func (organizations *Organizations) Update() (responseStatus int, err error)

type Thematic

type Thematic struct {
	ID             int64          `json:"id" db:"id" gorm:"primary_key"`
	Nombre         string         `json:"nombre" db:"nombre"`
	Typeofthematic Typeofthematic `gorm:"ForeignKey:Idtype;AssociationForeignKey:ID"`
	Idtype         int64          `json:"idType" db:"idtype"`
}

func (*Thematic) Get

func (thematic *Thematic) Get(db *gorm.DB) (responseStatus int, err error)

type Thematics

type Thematics struct {
	List []Thematic
}

func (*Thematics) Get

func (thematics *Thematics) Get() (responseStatus int, err error)

type Typeofthematic

type Typeofthematic struct {
	ID     int64  `json:"id" db:"id" gorm:"primary_key"`
	Nombre string `json:"nombre" db:"nombre"`
}

type Typeofthematics

type Typeofthematics struct {
	List []Typeofthematic
}

func (*Typeofthematics) Get

func (typeOfThematics *Typeofthematics) Get() (responseStatus int, err error)

type User

type User struct {
	ID       int64  `json:"id" db:"id"`
	Name     string `json:"name" db:"name"`
	Password string `json:"password" db:"password"`
}

func (*User) Login

func (user *User) Login(rw http.ResponseWriter, r *http.Request) (responseStatus int, err error)

func (*User) Logout

func (user *User) Logout(rw http.ResponseWriter, r *http.Request) (responseStatus int, err error)

func (*User) Session

func (user *User) Session(rw http.ResponseWriter, r *http.Request) (responseStatus int, err error)

func (*User) Validation

func (user *User) Validation(rw http.ResponseWriter, r *http.Request) (responseStatus int, err error)

Jump to

Keyboard shortcuts

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