Documentation ¶
Index ¶
- type Field
- type Object
- func (o *Object) Columns() (columns []string)
- func (o *Object) FilterField(nameRequired string) (fielsOut Field)
- func (o *Object) FilterFields(namesRequired ...string) (fielsOut []Field)
- func (o *Object) FilterRemoveFields(namesToRemove ...string) (fielsOut []Field)
- func (o *Object) GetFieldByName(nameRq string) (fielOut Field)
- func (o *Object) GetID(data_search map[string]string) string
- func (o *Object) GetRepresentativeTextField(data_element map[string]string) (values string)
- func (o *Object) MainName() string
- func (o *Object) PrimaryKeyName() string
- func (o *Object) RenderFields() (fielsOut []Field)
- func (o *Object) RequiredFields() (fielsOut []Field)
- type Permissions
- type Request
- type Response
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { // si el campo comienza com id_ se considera como único y perteneciente a una tabla específica ej: id_user su tabla es user // otros ej: id_usuario, apellido, address, city etc Name string Unique bool //campo único en db Inalterable bool //la data en el campo sera inalterable después de la creación (¡no se puede modificar!) Legend string //como se mostrara al usuario el campo en el encabezado ej: "name" por "Nombre Usuario" Input input SkipValidation bool //sin validar SkipCompletionAllowed bool //si el campo es requerido obligatoriamente o no NotRenderHtml bool // si no se necesita en formulario html }
type Object ¶
type Object struct { Name string //nombre del objeto o tabla TextFieldNames []string //nombre de campos mas representativos del objeto o tabla ej: nombre, apellido Fields []Field //campos del objeto //operaciones permitidas según nivel de acceso ej: 0,1,2,3,4 + Create bool, Update bool, Delete bool OperationsAllowed map[uint8]Permissions }
func (*Object) FilterField ¶ added in v0.0.16
func (*Object) FilterFields ¶ added in v0.0.1
func (*Object) FilterRemoveFields ¶ added in v0.0.16
func (*Object) GetFieldByName ¶ added in v0.0.16
func (*Object) GetRepresentativeTextField ¶ added in v0.0.16
func (*Object) PrimaryKeyName ¶ added in v0.0.1
func (*Object) RenderFields ¶ added in v0.0.16
func (*Object) RequiredFields ¶ added in v0.0.16
type Permissions ¶
type Response ¶
type Response struct { Type string `json:"t,omitempty"` //tipo solicitud respuesta: create, read, update, delete o error Object string `json:"o,omitempty"` //nombre de la tabla u objeto controlador hacia donde va la solicitud Module string `json:"m,omitempty"` //nombre del modulo controlador hacia donde va la solicitud Message string `json:"g,omitempty"` //mensaje para el usuario de la solicitud Data []map[string]string `json:"d,omitempty"` //data entrada y respuesta json SkipMeInResponse bool `json:"-"` // saltarme al difundir Recipients []string `json:"-"` // lista de ip, token o ids según app para el reenvió al finalizar solicitud TargetArea bool `json:"-"` // si es falso el destino por defecto es publico de lo contrario sera para todos quines tengan la misma area del usuario solicitante }
type User ¶ added in v0.0.13
type User struct { Token string // token de sesión solicitante Ip string Name string Area byte //0 sin area.. un que byte y uint8 son lo mismo en go la idea que aca sea un valor de carácter ej: a,s,p... AccessLevel uint8 // aquí valor numérico 0 a 255 Packages chan []*Response LastConnection time.Time }
Click to show internal directories.
Click to hide internal directories.