Documentation ¶
Overview ¶
El paquete deployer define los modelos de datos básicos de urbo-deployer. El principal modelo es el de Vertical, que es el punto de entrada a partir del cual se accede al conjunto de datos de la vertical. El resto de tipos corresponden a sub-atributos dentro de la vertical.
Index ¶
- Constants
- func SummaryOf[V any](items map[string]V, summary func(k string, v V) string) []string
- func ValuesOf[V any](items map[string]V) []V
- type Attribute
- type AttributeMapping
- type DeploymentManifest
- type Device
- type DeviceAttribute
- type DeviceCommand
- type DeviceStatus
- type Entity
- type EntityMapping
- type EntityType
- type Environment
- type GroupStatus
- type LongtermKind
- type Manifest
- type ManifestSource
- type Notification
- type NotificationCustom
- type NotificationHTTP
- type NotificationMQTT
- type NotificationMQTTCustom
- type NotificationStatus
- type PanelManifest
- type Project
- type ProjectStatus
- type Registration
- type RegistrationStatus
- type Rule
- type RuleStatus
- type Service
- type ServiceMapping
- type ServicePathMapping
- type Subject
- type SubjectCondition
- type SubjectEntity
- type SubjectExpression
- type Subscription
- type SubscriptionStatus
- type Table
- type TableColumn
- type TableIndex
- type UrboPanel
- type UrboVerticalStatus
- type Vertical
- type View
- type ViewColumn
Constants ¶
const ( LongtermNone LongtermKind = "" LongtermCounter = "counter" LongtermGauge = "gauge" LongtermEnum = "enum" LongtermModal = "modal" LongtermDimension = "dimension" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute struct { Name string `json:"name"` Type string `json:"type"` Description []string `json:"description,omitempty"` Value json.RawMessage `json:"value,omitempty" compact:"true"` Metadatas json.RawMessage `json:"metadatas,omitempty" compact:"true"` // Si la entidad es Singleton, este atributo se puede marcar // como parte de la identidad del singleton, y se añadirá a la // primary key de la tabla. SingletonKey bool `json:"singletonKey,omitempty"` // Indica si este atributo forma parte d ela simulación Simulated bool `json:"simulated,omitempty"` // Indica si este atributo debe conservarse de alguna forma en longterm Longterm LongtermKind `json:"longterm,omitempty"` // Si longterm == LongtermEnum, estas serían las opciones LongtermOptions []string `json:"longtermOptions,omitempty" sort:"true"` }
Attribute representa un atributo de una entidad
func (Attribute) MarshalJSON ¶ added in v0.1.8
func (Attribute) Serialize ¶ added in v0.1.5
func (x Attribute) Serialize(s serialize.Serializer)
type AttributeMapping ¶
type AttributeMapping struct { OriginalAttributeName string `json:"originalAttributeName,omitempty"` OriginalAttributeType string `json:"originalAttributeType,omitempty"` NewAttributeName string `json:"newAttributeName,omitempty"` NewAttributeType string `json:"newAttributeType,omitempty"` }
AttributeMapping es cada uno de los AttributeMappings de un EntityMapping
func (AttributeMapping) MarshalJSON ¶ added in v0.1.8
func (x AttributeMapping) MarshalJSON() ([]byte, error)
func (AttributeMapping) Serialize ¶ added in v0.1.5
func (x AttributeMapping) Serialize(s serialize.Serializer)
type DeploymentManifest ¶ added in v0.3.7
type DeploymentManifest struct {
Sources map[string]ManifestSource `json:"sources,omitempty"`
}
func (DeploymentManifest) IsEmpty ¶ added in v0.3.7
func (d DeploymentManifest) IsEmpty() bool
func (DeploymentManifest) MarshalJSON ¶ added in v0.3.7
func (x DeploymentManifest) MarshalJSON() ([]byte, error)
func (DeploymentManifest) Serialize ¶ added in v0.3.7
func (x DeploymentManifest) Serialize(s serialize.Serializer)
type Device ¶
type Device struct { DeviceId string `json:"device_id"` APIKey string `json:"apikey,omitempty"` EntityName string `json:"entity_name,omitempty"` EntityType string `json:"entity_type"` Polling bool `json:"polling,omitempty"` Transport string `json:"transport"` Timestamp bool `json:"timestamp,omitempty"` Endpoint string `json:"endpoint,omitempty"` Attributes []DeviceAttribute `json:"attributes,omitempty"` Lazy []DeviceAttribute `json:"lazy,omitempty"` Commands []DeviceCommand `json:"commands,omitempty"` StaticAttributes []DeviceAttribute `json:"static_attributes,omitempty"` Protocol string `json:"protocol"` ExpressionLanguage string `json:"expressionLanguage,omitempty"` ExplicitAttrs json.RawMessage `json:"explicitAttrs,omitempty"` DeviceStatus }
Device representa un dispositivo
func (Device) MarshalJSON ¶ added in v0.1.8
func (Device) Serialize ¶ added in v0.1.5
func (x Device) Serialize(s serialize.Serializer)
type DeviceAttribute ¶
type DeviceAttribute struct { ObjectId string `json:"object_id"` Name string `json:"name"` Type string `json:"type,omitempty"` Value json.RawMessage `json:"value,omitempty"` // para los staticAttribs Expression string `json:"expression,omitempty"` EntityName string `json:"entity_name,omitempty"` EntityType string `json:"entity_type,omitempty"` }
DeviceAttribute describe un atributo de dispositivo
func (DeviceAttribute) MarshalJSON ¶ added in v0.1.8
func (x DeviceAttribute) MarshalJSON() ([]byte, error)
func (DeviceAttribute) Serialize ¶ added in v0.1.5
func (x DeviceAttribute) Serialize(s serialize.Serializer)
type DeviceCommand ¶
type DeviceCommand struct { ObjectId string `json:"object_id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Value string `json:"value,omitempty"` MQTT json.RawMessage `json:"mqtt,omitempty"` }
DeviceCommand describe un comando de dispositivo
func (DeviceCommand) MarshalJSON ¶ added in v0.1.8
func (x DeviceCommand) MarshalJSON() ([]byte, error)
func (DeviceCommand) Serialize ¶ added in v0.1.5
func (x DeviceCommand) Serialize(s serialize.Serializer)
type DeviceStatus ¶
type DeviceStatus struct { Service string `json:"service,omitempty"` ServicePath string `json:"service_path,omitempty"` }
GroupStatus agrupa atributos de estado que no se usan al crear un Device
func (DeviceStatus) MarshalJSON ¶ added in v0.1.8
func (x DeviceStatus) MarshalJSON() ([]byte, error)
func (DeviceStatus) Serialize ¶ added in v0.1.5
func (x DeviceStatus) Serialize(s serialize.Serializer)
type Entity ¶
type Entity struct { ID string `json:"entityID"` Type string `json:"entityType"` // Aquí no hace falta mantener el orden, // porque el orden correcto de los atributos ya // está en el EntityType. // Los Metadatas se sacan aparte porque generalmente // el json generado es más tratable de esta forma Attrs map[string]json.RawMessage `json:"attrs" compact:"true"` MetaDatas map[string]json.RawMessage `json:"metadatas,omitempty" compact:"true"` }
Entity representa una instancia de EntityType
func (Entity) MarshalJSON ¶ added in v0.1.8
func (Entity) Serialize ¶ added in v0.1.5
func (x Entity) Serialize(s serialize.Serializer)
type EntityMapping ¶
type EntityMapping struct { OriginalEntityId string `json:"originalEntityId,omitempty"` NewEntityId string `json:"newEntityId,omitempty"` OriginalEntityType string `json:"originalEntityType,omitempty"` NewEntityType string `json:"newEntityType,omitempty"` AttributeMappings []AttributeMapping `json:"attributeMappings"` }
EntityMaping es cada uno de los EntityMappings de un servicePathMapping
func (EntityMapping) MarshalJSON ¶ added in v0.1.8
func (x EntityMapping) MarshalJSON() ([]byte, error)
func (EntityMapping) Serialize ¶ added in v0.1.5
func (x EntityMapping) Serialize(s serialize.Serializer)
type EntityType ¶ added in v0.1.2
type EntityType struct { ID string `json:"entityID,omitempty"` Type string `json:"entityType"` // Usamos una lista en vez de un map para poder // establecer un orden específico, por si nos interesa // conservar el orden de atributos para algo. Attrs []Attribute `json:"attrs"` }
EntityType representa un tipo de entidad
func (EntityType) MarshalJSON ¶ added in v0.1.8
func (x EntityType) MarshalJSON() ([]byte, error)
func (EntityType) Serialize ¶ added in v0.1.5
func (x EntityType) Serialize(s serialize.Serializer)
type Environment ¶ added in v0.3.7
Environment settings
func (Environment) IsEmpty ¶ added in v0.3.7
func (e Environment) IsEmpty() bool
Environment is empty?
func (Environment) MarshalJSON ¶ added in v0.3.7
func (x Environment) MarshalJSON() ([]byte, error)
func (Environment) Serialize ¶ added in v0.3.7
func (x Environment) Serialize(s serialize.Serializer)
type GroupStatus ¶
type GroupStatus struct { ID string `json:"_id,omitempty"` V int `json:"__v,omitempty"` IOTAgent string `json:"iotagent,omitempty"` ServicePath string `json:"service_path,omitempty"` Service string `json:"service,omitempty"` CBHost string `json:"cbHost,omitempty"` }
GroupStatus agrupa atributos de estado que no se usan al crear un Service
func (GroupStatus) MarshalJSON ¶ added in v0.1.8
func (x GroupStatus) MarshalJSON() ([]byte, error)
func (GroupStatus) Serialize ¶ added in v0.1.5
func (x GroupStatus) Serialize(s serialize.Serializer)
type LongtermKind ¶ added in v0.2.9
type LongtermKind string
type Manifest ¶ added in v0.3.7
type Manifest struct { Name string `json:"name,omitempty"` // `tourism`, `wifi`, `watermeter`, etc Subservice string `json:"subservice,omitempty"` // `turismo`, `wifi`, `contadores`, etc. // Tipos de entidad definidos en la vertical. // El ID y los valores de los atributos son opcionales. EntityTypes []EntityType `json:"entityTypes,omitempty"` // Entidades específicas de alguno de los tipos anteriores Entities []Entity `json:"entities,omitempty"` // Contenidos compatibles con urbo-deployer Environment Environment `json:"environment,omitempty"` Deployment DeploymentManifest `json:"deployment,omitempty"` ManifestPanels PanelManifest `json:"panels,omitempty"` Subscriptions map[string]Subscription `json:"subscriptions,omitempty"` Rules map[string]Rule `json:"rules,omitempty"` Verticals map[string]Vertical `json:"verticals,omitempty"` Services []Service `json:"services,omitempty"` Devices []Device `json:"devices,omitempty"` Registrations []Registration `json:"registrations,omitempty"` // Solo por compatibilidad con urbo-deployer, no se usan SQL json.RawMessage `json:"sql,omitempty"` Cdas json.RawMessage `json:"cdas,omitempty"` Etls json.RawMessage `json:"etls,omitempty"` // Otros datos de estado no asociados al manifest ServiceMappings []ServiceMapping `json:"serviceMappings,omitempty"` Projects []Project `json:"projects,omitempty"` Panels map[string]UrboPanel `json:"urboPanels,omitempty"` Tables []Table `json:"tables,omitempty"` Views []View `json:"views,omitempty"` }
Manifest representa un manifiesto de vertical
func (*Manifest) ClearStatus ¶ added in v0.3.7
func (m *Manifest) ClearStatus()
func (Manifest) MarshalJSON ¶ added in v0.3.7
func (Manifest) Serialize ¶ added in v0.3.7
func (x Manifest) Serialize(s serialize.Serializer)
type ManifestSource ¶ added in v0.3.7
type ManifestSource struct { Path string `json:"path,omitempty"` Files []string `json:"files,omitempty"` }
func (ManifestSource) MarshalJSON ¶ added in v0.3.7
func (x ManifestSource) MarshalJSON() ([]byte, error)
func (ManifestSource) Serialize ¶ added in v0.3.7
func (x ManifestSource) Serialize(s serialize.Serializer)
type Notification ¶
type Notification struct { Attrs []string `json:"attrs,omitempty" sort:"true" compact:"true"` ExceptAttrs []string `json:"exceptAttrs,omitempty" sort:"true" compact:"true"` AttrsFormat string `json:"attrsFormat"` HTTP NotificationHTTP `json:"http,omitempty"` HTTPCustom NotificationCustom `json:"httpCustom,omitempty"` MQTT NotificationMQTT `json:"mqtt,omitempty"` MQTTCustom NotificationMQTTCustom `json:"mqttCustom,omitempty"` OnlyChangedAttrs bool `json:"onlyChangedAttrs,omitempty"` Covered bool `json:"covered,omitempty"` NotificationStatus }
Notification es la configuración de notificación de la suscripción
func (Notification) MarshalJSON ¶ added in v0.1.8
func (x Notification) MarshalJSON() ([]byte, error)
func (Notification) Serialize ¶ added in v0.1.5
func (x Notification) Serialize(s serialize.Serializer)
type NotificationCustom ¶
type NotificationCustom struct { URL string `json:"url"` Timeout int `json:"timeout,omitempty"` Headers map[string]string `json:"headers,omitempty"` Qs map[string]string `json:"qs,omitempty"` Method string `json:"method,omitempty"` Payload json.RawMessage `json:"payload,omitempty" compact:"true"` Json json.RawMessage `json:"json,omitempty" compact:"true"` NGSI json.RawMessage `json:"ngsi,omitempty" compact:"true"` }
NotificationHTTP son los datos de una notificacion
func (NotificationCustom) IsEmpty ¶ added in v0.1.5
func (n NotificationCustom) IsEmpty() bool
func (NotificationCustom) MarshalJSON ¶ added in v0.1.8
func (x NotificationCustom) MarshalJSON() ([]byte, error)
func (NotificationCustom) Serialize ¶ added in v0.1.5
func (x NotificationCustom) Serialize(s serialize.Serializer)
type NotificationHTTP ¶
NotificationHTTP son los datos de una notificacion
func (NotificationHTTP) IsEmpty ¶ added in v0.1.5
func (n NotificationHTTP) IsEmpty() bool
func (NotificationHTTP) MarshalJSON ¶ added in v0.1.8
func (x NotificationHTTP) MarshalJSON() ([]byte, error)
func (NotificationHTTP) Serialize ¶ added in v0.1.5
func (x NotificationHTTP) Serialize(s serialize.Serializer)
type NotificationMQTT ¶ added in v0.3.7
type NotificationMQTT struct { URL string `json:"url"` Topic string `json:"topic"` QoS string `json:"qos,omitempty"` User string `json:"user,omitempty"` Passwd string `json:"passwd,omitempty"` }
NotificationMQTT son los datos de una notificacion MQTT
func (NotificationMQTT) IsEmpty ¶ added in v0.3.7
func (n NotificationMQTT) IsEmpty() bool
func (NotificationMQTT) MarshalJSON ¶ added in v0.3.7
func (x NotificationMQTT) MarshalJSON() ([]byte, error)
func (NotificationMQTT) Serialize ¶ added in v0.3.7
func (x NotificationMQTT) Serialize(s serialize.Serializer)
type NotificationMQTTCustom ¶ added in v0.3.7
type NotificationMQTTCustom struct { URL string `json:"url"` Topic string `json:"topic"` QoS int `json:"qos,omitempty"` User string `json:"user,omitempty"` Passwd string `json:"passwd,omitempty"` Payload json.RawMessage `json:"payload,omitempty" compact:"true"` Json json.RawMessage `json:"json,omitempty" compact:"true"` NGSI json.RawMessage `json:"ngsi,omitempty" compact:"true"` }
NotificationMQTTCustom son los datos de una notificacion MQTT Custom
func (NotificationMQTTCustom) IsEmpty ¶ added in v0.3.7
func (n NotificationMQTTCustom) IsEmpty() bool
func (NotificationMQTTCustom) MarshalJSON ¶ added in v0.3.7
func (x NotificationMQTTCustom) MarshalJSON() ([]byte, error)
func (NotificationMQTTCustom) Serialize ¶ added in v0.3.7
func (x NotificationMQTTCustom) Serialize(s serialize.Serializer)
type NotificationStatus ¶
type NotificationStatus struct { LastFailure string `json:"lastFailure,omitempty"` LastFailureReason string `json:"lastFailureReason,omitempty"` LastNotification string `json:"lastNotification,omitempty"` LastSuccess string `json:"lastSuccess,omitempty"` LastSuccessCode int `json:"lastSuccessCode,omitempty"` FailsCounter int `json:"failsCounter,omitempty"` TimesSent int `json:"timesSent,omitempty"` }
NotificationStatus agrupa los datos de estado de la suscripción
func (NotificationStatus) MarshalJSON ¶ added in v0.1.8
func (x NotificationStatus) MarshalJSON() ([]byte, error)
func (NotificationStatus) Serialize ¶ added in v0.1.5
func (x NotificationStatus) Serialize(s serialize.Serializer)
type PanelManifest ¶ added in v0.3.7
type PanelManifest struct {
Sources map[string]ManifestSource `json:"sources,omitempty"`
}
func (PanelManifest) IsEmpty ¶ added in v0.3.7
func (p PanelManifest) IsEmpty() bool
func (PanelManifest) MarshalJSON ¶ added in v0.3.7
func (x PanelManifest) MarshalJSON() ([]byte, error)
func (PanelManifest) Serialize ¶ added in v0.3.7
func (x PanelManifest) Serialize(s serialize.Serializer)
type Project ¶ added in v0.2.6
type Project struct { IsDomain bool `json:"is_domain"` Description string `json:"description,omitempty"` Tags json.RawMessage `json:"tags,omitempty"` Enabled bool `json:"enabled"` ID string `json:"id"` ParentId string `json:"parent_id,omitempty"` DomainId string `json:"domain_id,omitempty"` Name string `json:"name"` ProjectStatus }
func (Project) MarshalJSON ¶ added in v0.2.6
func (Project) Serialize ¶ added in v0.2.6
func (x Project) Serialize(s serialize.Serializer)
type ProjectStatus ¶ added in v0.2.6
type ProjectStatus struct {
Links json.RawMessage `json:"links,omitempty"`
}
func (ProjectStatus) MarshalJSON ¶ added in v0.2.6
func (x ProjectStatus) MarshalJSON() ([]byte, error)
func (ProjectStatus) Serialize ¶ added in v0.2.6
func (x ProjectStatus) Serialize(s serialize.Serializer)
type Registration ¶ added in v0.3.5
type Registration struct { ID string `json:"id"` Description string `json:"description,omitemty"` DataProvided json.RawMessage `json:"dataProvided,omitempty"` Provider json.RawMessage `json:"provider,omitempty"` RegistrationStatus }
Registration representa un registro
func (Registration) MarshalJSON ¶ added in v0.3.5
func (x Registration) MarshalJSON() ([]byte, error)
func (Registration) Serialize ¶ added in v0.3.5
func (x Registration) Serialize(s serialize.Serializer)
type RegistrationStatus ¶ added in v0.3.5
type RegistrationStatus struct {
Status string `json:"status"`
}
func (RegistrationStatus) MarshalJSON ¶ added in v0.3.5
func (x RegistrationStatus) MarshalJSON() ([]byte, error)
func (RegistrationStatus) Serialize ¶ added in v0.3.5
func (x RegistrationStatus) Serialize(s serialize.Serializer)
type Rule ¶
type Rule struct { Name string `json:"name"` Description string `json:"description,omitempty"` Misc string `json:"misc,omitempty"` Text string `json:"text,omitempty"` VR string `json:"VR,omitempty"` Action json.RawMessage `json:"action,omitempty"` // TODO: estructurar de alguna forma? NoSignal json.RawMessage `json:"nosignal,omitempty"` // TODO: estructurar de alguna forma? RuleStatus }
func (Rule) ActionList ¶ added in v0.3.7
func (rule Rule) ActionList() []interface{}
ActionList converts the action field into list of actions
func (Rule) MarshalJSON ¶ added in v0.1.8
func (Rule) Serialize ¶ added in v0.1.5
func (x Rule) Serialize(s serialize.Serializer)
type RuleStatus ¶
type RuleStatus struct { Subservice string `json:"subservice,omitempty"` Service string `json:"service,omitempty"` ID string `json:"_id,omitempty"` }
RuleStatus agrupa atributos de estado que no se usan al crear una Rule
func (RuleStatus) MarshalJSON ¶ added in v0.1.8
func (x RuleStatus) MarshalJSON() ([]byte, error)
func (RuleStatus) Serialize ¶ added in v0.1.5
func (x RuleStatus) Serialize(s serialize.Serializer)
type Service ¶
type Service struct { Resource string `json:"resource"` APIKey string `json:"apikey"` EntityType string `json:"entity_type"` Description string `json:"description,omitempty"` Protocol string `json:"protocol"` Transport string `json:"transport,omitempty"` Timestamp bool `json:"timestamp,omitempty"` ExplicitAttrs json.RawMessage `json:"explicitAttrs,omitempty"` InternalAttributes []DeviceAttribute `json:"internal_attributes,omitempty"` Attributes []DeviceAttribute `json:"attributes"` Lazy []DeviceAttribute `json:"lazy,omitempty"` StaticAttributes []DeviceAttribute `json:"static_attributes,omitempty"` Commands []DeviceCommand `json:"commands,omitempty"` ExpressionLanguage string `json:"expressionLanguage,omitempty"` EntityNameExp string `json:"entityNameExp,omitempty"` GroupStatus }
Service describe la provisión de un grupo de dispositivos
func (Service) MarshalJSON ¶ added in v0.1.8
func (Service) Serialize ¶ added in v0.1.5
func (x Service) Serialize(s serialize.Serializer)
type ServiceMapping ¶
type ServiceMapping struct { OriginalService string `json:"originalService,omitempty"` NewService string `json:"newService,omitempty"` ServicePathMappings []ServicePathMapping `json:"servicePathMappings"` }
ServiceMapping es cada uno de los serviceMappings de cygnus
func (ServiceMapping) MarshalJSON ¶ added in v0.1.8
func (x ServiceMapping) MarshalJSON() ([]byte, error)
func (ServiceMapping) Serialize ¶ added in v0.1.5
func (x ServiceMapping) Serialize(s serialize.Serializer)
type ServicePathMapping ¶
type ServicePathMapping struct { OriginalServicePath string `json:"originalServicePath,omitempty"` NewServicePath string `json:"newServicePath,omitempty"` EntityMappings []EntityMapping `json:"entityMappings"` }
ServicePathMapping es cada uno de los servicePathMappings de un serviceMapping
func (ServicePathMapping) MarshalJSON ¶ added in v0.1.8
func (x ServicePathMapping) MarshalJSON() ([]byte, error)
func (ServicePathMapping) Serialize ¶ added in v0.1.5
func (x ServicePathMapping) Serialize(s serialize.Serializer)
type Subject ¶
type Subject struct { Condition SubjectCondition `json:"condition"` Entities []SubjectEntity `json:"entities" compact:"true"` }
Subject es el sujeto de la suscripcion
func (Subject) MarshalJSON ¶ added in v0.1.8
func (Subject) Serialize ¶ added in v0.1.5
func (x Subject) Serialize(s serialize.Serializer)
type SubjectCondition ¶
type SubjectCondition struct { Attrs []string `json:"attrs" sort:"true"` Expression SubjectExpression `json:"expression,omitempty"` AlterationTypes []string `json:"alterationTypes,omitempty"` }
SubjectCondition es la condicion del sujeto de la suscripcion
func (SubjectCondition) MarshalJSON ¶ added in v0.1.8
func (x SubjectCondition) MarshalJSON() ([]byte, error)
func (SubjectCondition) Serialize ¶ added in v0.1.5
func (x SubjectCondition) Serialize(s serialize.Serializer)
type SubjectEntity ¶
type SubjectEntity struct { ID string `json:"id,omitempty"` IdPattern string `json:"idPattern,omitempty"` Type string `json:"type"` }
SubjectEntity es la entidad sujeto de la suscripcion
func (SubjectEntity) MarshalJSON ¶ added in v0.1.8
func (x SubjectEntity) MarshalJSON() ([]byte, error)
func (SubjectEntity) Serialize ¶ added in v0.1.5
func (x SubjectEntity) Serialize(s serialize.Serializer)
type SubjectExpression ¶
type SubjectExpression struct {
Q string `json:"q,omitempty"`
}
SubjectExpression es la expresion en la condicion
func (SubjectExpression) IsEmpty ¶ added in v0.1.5
func (s SubjectExpression) IsEmpty() bool
func (SubjectExpression) MarshalJSON ¶ added in v0.1.8
func (x SubjectExpression) MarshalJSON() ([]byte, error)
func (SubjectExpression) Serialize ¶ added in v0.1.5
func (x SubjectExpression) Serialize(s serialize.Serializer)
type Subscription ¶ added in v0.3.7
type Subscription struct { Description string `json:"description"` Status string `json:"status,omitempty"` Expires string `json:"expires,omitempty"` Notification Notification `json:"notification"` Subject Subject `json:"subject"` SubscriptionStatus }
Subscription representa una suscripcion
func (Subscription) MarshalJSON ¶ added in v0.3.7
func (x Subscription) MarshalJSON() ([]byte, error)
func (Subscription) Serialize ¶ added in v0.3.7
func (x Subscription) Serialize(s serialize.Serializer)
func (Subscription) UpdateEndpoint ¶ added in v0.3.7
func (subs Subscription) UpdateEndpoint(notificationEndpoints map[string]string) (Subscription, error)
UpdateEndpoint updates the notification endpoint
type SubscriptionStatus ¶ added in v0.3.7
type SubscriptionStatus struct {
ID string `json:"id,omitempty"`
}
SubscriptionStatus agrupa los datos de estado de la suscripción
func (SubscriptionStatus) MarshalJSON ¶ added in v0.3.7
func (x SubscriptionStatus) MarshalJSON() ([]byte, error)
func (SubscriptionStatus) Serialize ¶ added in v0.3.7
func (x SubscriptionStatus) Serialize(s serialize.Serializer)
type Table ¶
type Table struct { Name string `json:"name"` Columns []TableColumn `json:"columns"` PrimaryKey []string `json:"primaryKey"` Indexes []TableIndex `json:"indexes"` LastData bool `json:"lastdata"` // True si queremos crear una vista lastdata adicional Singleton []string `json:"singleton,omitempty"` // Lista de campos únicos, si la entidad es un singleton. }
Table define algunos parámetros básicos de tablas a crear
func (Table) MarshalJSON ¶ added in v0.1.8
func (Table) Serialize ¶ added in v0.1.5
func (x Table) Serialize(s serialize.Serializer)
type TableColumn ¶
type TableColumn struct { Name string `json:"name"` Type string `json:"type"` NotNull bool `json:"notNull,omitempty"` Default string `json:"default,omitempty"` }
TableColumn describe una columna de una tabla
func (TableColumn) MarshalJSON ¶ added in v0.1.8
func (x TableColumn) MarshalJSON() ([]byte, error)
func (TableColumn) Serialize ¶ added in v0.1.5
func (x TableColumn) Serialize(s serialize.Serializer)
type TableIndex ¶
type TableIndex struct { Name string `json:"name"` Columns []string `json:"columns"` Geometry bool `json:"geometry,omitempty"` }
TableIndex describe un indice
func (TableIndex) MarshalJSON ¶ added in v0.1.8
func (x TableIndex) MarshalJSON() ([]byte, error)
func (TableIndex) Serialize ¶ added in v0.1.5
func (x TableIndex) Serialize(s serialize.Serializer)
type UrboPanel ¶ added in v0.2.9
type UrboPanel struct { Name string `json:"name"` Description string `json:"description,omitempty"` Slug string `json:"slug"` LowercaseSlug string `json:"lowercaseSlug,omitempty"` WidgetCount int `json:"widgetCount,omitempty"` IsShadow bool `json:"isShadow,omitempty"` Section string `json:"section,omitempty"` }
UrboPanel representa un panel de Urbo
func (UrboPanel) MarshalJSON ¶ added in v0.2.9
func (UrboPanel) Serialize ¶ added in v0.2.9
func (x UrboPanel) Serialize(s serialize.Serializer)
type UrboVerticalStatus ¶ added in v0.3.7
type UrboVerticalStatus struct { PanelsObjects []UrboPanel `json:"panelsObjects,omitempty"` ShadowPanelsObjects []UrboPanel `json:"shadowPanelsObjects,omitempty"` }
UrboVerticalStatus contains detailed vertical status
func (UrboVerticalStatus) MarshalJSON ¶ added in v0.3.7
func (x UrboVerticalStatus) MarshalJSON() ([]byte, error)
func (UrboVerticalStatus) Serialize ¶ added in v0.3.7
func (x UrboVerticalStatus) Serialize(s serialize.Serializer)
type Vertical ¶
type Vertical struct { Panels []string `json:"panels,omitempty" compact:"true"` ShadowPanels []string `json:"shadowPanels,omitempty" compact:"true"` Slug string `json:"slug"` Name string `json:"name"` Icon string `json:"icon,omitempty"` I18n json.RawMessage `json:"i18n,omitempty"` UrboVerticalStatus }
Vertical representa una vertical de Urbo
func (Vertical) MarshalJSON ¶ added in v0.1.8
func (Vertical) Serialize ¶ added in v0.1.5
func (x Vertical) Serialize(s serialize.Serializer)
type View ¶ added in v0.2.9
type View struct { Materialized bool `json:"materialized,omitempty"` Name string `json:"name"` From string `json:"from"` Group []string `json:"group"` Columns []ViewColumn `json:"columns"` }
MaterializedView define los parámetros de las vistas materializadas
func (View) MarshalJSON ¶ added in v0.2.9
func (View) Serialize ¶ added in v0.2.9
func (x View) Serialize(s serialize.Serializer)
type ViewColumn ¶ added in v0.2.9
ViewColumn define las columnas de la vista
func (ViewColumn) MarshalJSON ¶ added in v0.2.9
func (x ViewColumn) MarshalJSON() ([]byte, error)
func (ViewColumn) Serialize ¶ added in v0.2.9
func (x ViewColumn) Serialize(s serialize.Serializer)