Documentation
¶
Overview ¶
El paquete fiware define los modelos de datos básicos de warpcom-fiware 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 ¶
- func SummaryOf[V any](items map[string]V, summary func(k string, v V) string) []string
- type AssignmentID
- type Attribute
- type AttributeMapping
- type DeploymentManifest
- type Device
- type DeviceAttribute
- type DeviceCommand
- type DeviceGroup
- type DeviceStatus
- type Domain
- type DomainStatus
- type Entity
- type EntityMapping
- type EntityType
- type Environment
- type Group
- 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 Role
- type RoleAssignment
- type RoleAssignmentStatus
- type RoleStatus
- type Rule
- type RuleStatus
- type ServiceMapping
- type ServicePathMapping
- type ServiceStatus
- type Subject
- type SubjectCondition
- type SubjectEntity
- type SubjectExpression
- type Subscription
- type SubscriptionStatus
- type Table
- type TableColumn
- type TableIndex
- type UrboPanel
- type UrboVerticalStatus
- type User
- type UserStatus
- type Vertical
- type View
- type ViewColumn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssignmentID ¶
type AssignmentID struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Domain json.RawMessage `json:"domain,omitempty"`
Project json.RawMessage `json:"project,omitempty"`
}
func (AssignmentID) MarshalJSON ¶
func (x AssignmentID) MarshalJSON() ([]byte, error)
func (AssignmentID) Serialize ¶
func (x AssignmentID) Serialize(s serialize.Serializer)
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,omitzero"`
// Indica si este atributo forma parte de la simulación
Simulated bool `json:"simulated,omitzero"`
// 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 ¶
func (Attribute) Serialize ¶
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 ¶
func (x AttributeMapping) MarshalJSON() ([]byte, error)
func (AttributeMapping) Serialize ¶
func (x AttributeMapping) Serialize(s serialize.Serializer)
type DeploymentManifest ¶
type DeploymentManifest struct {
Sources map[string]ManifestSource `json:"sources,omitempty"`
}
func (DeploymentManifest) IsZero ¶
func (d DeploymentManifest) IsZero() bool
func (DeploymentManifest) MarshalJSON ¶
func (x DeploymentManifest) MarshalJSON() ([]byte, error)
func (DeploymentManifest) Serialize ¶
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 ¶
func (Device) Serialize ¶
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"`
SkipValue *bool `json:"skipValue,omitempty"`
EntityName string `json:"entity_name,omitempty"`
EntityType string `json:"entity_type,omitempty"`
}
DeviceAttribute describe un atributo de dispositivo
func (DeviceAttribute) MarshalJSON ¶
func (x DeviceAttribute) MarshalJSON() ([]byte, error)
func (DeviceAttribute) Serialize ¶
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"`
Expression string `json:"expression,omitempty"`
MQTT json.RawMessage `json:"mqtt,omitempty"`
}
DeviceCommand describe un comando de dispositivo
func (DeviceCommand) MarshalJSON ¶
func (x DeviceCommand) MarshalJSON() ([]byte, error)
func (DeviceCommand) Serialize ¶
func (x DeviceCommand) Serialize(s serialize.Serializer)
type DeviceGroup ¶
type DeviceGroup struct {
Resource string `json:"resource"`
APIKey string `json:"apikey"`
Token string `json:"token,omitempty"` // fully legacy
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"`
PayloadType string `json:"PayloadType,omitempty"`
AutoProvision bool `json:"autoprovision,omitzero"`
ServiceStatus
}
DeviceGroup describe la provisión de un grupo de dispositivos
func (DeviceGroup) MarshalJSON ¶
func (x DeviceGroup) MarshalJSON() ([]byte, error)
func (DeviceGroup) Serialize ¶
func (x DeviceGroup) 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 ¶
func (x DeviceStatus) MarshalJSON() ([]byte, error)
func (DeviceStatus) Serialize ¶
func (x DeviceStatus) Serialize(s serialize.Serializer)
type Domain ¶
type Domain struct {
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
Name string `json:"name"`
DomainStatus
}
func (Domain) MarshalJSON ¶
func (Domain) Serialize ¶
func (x Domain) Serialize(s serialize.Serializer)
type DomainStatus ¶
type DomainStatus struct {
Links json.RawMessage `json:"links,omitempty"`
ID string `json:"id"`
}
func (DomainStatus) MarshalJSON ¶
func (x DomainStatus) MarshalJSON() ([]byte, error)
func (DomainStatus) Serialize ¶
func (x DomainStatus) 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 ¶
func (Entity) Serialize ¶
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 ¶
func (x EntityMapping) MarshalJSON() ([]byte, error)
func (EntityMapping) Serialize ¶
func (x EntityMapping) Serialize(s serialize.Serializer)
type EntityType ¶
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 ¶
func (x EntityType) MarshalJSON() ([]byte, error)
func (EntityType) Serialize ¶
func (x EntityType) Serialize(s serialize.Serializer)
type Environment ¶
Environment settings
func (Environment) MarshalJSON ¶
func (x Environment) MarshalJSON() ([]byte, error)
func (Environment) Serialize ¶
func (x Environment) Serialize(s serialize.Serializer)
type Group ¶
type Group struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
DomainID string `json:"domain_id"`
GroupStatus
}
func (Group) MarshalJSON ¶
func (Group) Serialize ¶
func (x Group) Serialize(s serialize.Serializer)
type GroupStatus ¶
type GroupStatus struct {
Links json.RawMessage `json:"links,omitempty"`
ID string `json:"id,omitempty"`
Domain string `json:"domain,omitempty"`
Users []string `json:"users,omitempty"`
UserNames []string `json:"userNames,omitempty"`
}
func (GroupStatus) MarshalJSON ¶
func (x GroupStatus) MarshalJSON() ([]byte, error)
func (GroupStatus) Serialize ¶
func (x GroupStatus) Serialize(s serialize.Serializer)
type LongtermKind ¶
type LongtermKind string
const ( LongtermNone LongtermKind = "" LongtermCounter LongtermKind = "counter" LongtermGauge LongtermKind = "gauge" LongtermEnum LongtermKind = "enum" LongtermModal LongtermKind = "modal" LongtermDimension LongtermKind = "dimension" )
type Manifest ¶
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,omitzero"`
Deployment DeploymentManifest `json:"deployment,omitzero"`
ManifestPanels PanelManifest `json:"panels,omitzero"`
Subscriptions map[string]Subscription `json:"subscriptions,omitempty"`
Rules map[string]Rule `json:"rules,omitempty"`
Verticals map[string]Vertical `json:"verticals,omitempty"`
DeviceGroups []DeviceGroup `json:"deviceGroups,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"`
Domains []Domain `json:"domains,omitempty"`
Panels map[string]UrboPanel `json:"urboPanels,omitempty"`
Tables []Table `json:"tables,omitempty"`
Views []View `json:"views,omitempty"`
Users []User `json:"users,omitempty"`
Groups []Group `json:"groups,omitempty"`
Roles []Role `json:"roles,omitempty"`
Assignments []RoleAssignment `json:"assignments,omitempty"`
}
Manifest representa un manifiesto de vertical
func (*Manifest) ClearStatus ¶
func (m *Manifest) ClearStatus()
func (Manifest) MarshalJSON ¶
func (Manifest) Serialize ¶
func (x Manifest) Serialize(s serialize.Serializer)
type ManifestSource ¶
type ManifestSource struct {
Path string `json:"path,omitempty"`
Files []string `json:"files,omitempty"`
}
func (ManifestSource) MarshalJSON ¶
func (x ManifestSource) MarshalJSON() ([]byte, error)
func (ManifestSource) Serialize ¶
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,omitempty"`
HTTP NotificationHTTP `json:"http,omitzero"`
HTTPCustom NotificationCustom `json:"httpCustom,omitzero"`
MQTT NotificationMQTT `json:"mqtt,omitzero"`
MQTTCustom NotificationMQTTCustom `json:"mqttCustom,omitzero"`
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 ¶
func (x Notification) MarshalJSON() ([]byte, error)
func (Notification) Serialize ¶
func (x Notification) Serialize(s serialize.Serializer)
type NotificationCustom ¶
type NotificationCustom struct {
URL string `json:"url"`
Timeout int `json:"timeout,omitzero"`
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) IsZero ¶
func (n NotificationCustom) IsZero() bool
func (NotificationCustom) MarshalJSON ¶
func (x NotificationCustom) MarshalJSON() ([]byte, error)
func (NotificationCustom) Serialize ¶
func (x NotificationCustom) Serialize(s serialize.Serializer)
type NotificationHTTP ¶
NotificationHTTP son los datos de una notificacion
func (NotificationHTTP) IsZero ¶
func (n NotificationHTTP) IsZero() bool
func (NotificationHTTP) MarshalJSON ¶
func (x NotificationHTTP) MarshalJSON() ([]byte, error)
func (NotificationHTTP) Serialize ¶
func (x NotificationHTTP) Serialize(s serialize.Serializer)
type NotificationMQTT ¶
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) IsZero ¶
func (n NotificationMQTT) IsZero() bool
func (NotificationMQTT) MarshalJSON ¶
func (x NotificationMQTT) MarshalJSON() ([]byte, error)
func (NotificationMQTT) Serialize ¶
func (x NotificationMQTT) Serialize(s serialize.Serializer)
type NotificationMQTTCustom ¶
type NotificationMQTTCustom struct {
URL string `json:"url"`
Topic string `json:"topic"`
QoS int `json:"qos,omitzero"`
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) IsZero ¶
func (n NotificationMQTTCustom) IsZero() bool
func (NotificationMQTTCustom) MarshalJSON ¶
func (x NotificationMQTTCustom) MarshalJSON() ([]byte, error)
func (NotificationMQTTCustom) Serialize ¶
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,omitzero"`
FailsCounter int `json:"failsCounter,omitzero"`
TimesSent int `json:"timesSent,omitzero"`
}
NotificationStatus agrupa los datos de estado de la suscripción
func (NotificationStatus) MarshalJSON ¶
func (x NotificationStatus) MarshalJSON() ([]byte, error)
func (NotificationStatus) Serialize ¶
func (x NotificationStatus) Serialize(s serialize.Serializer)
type PanelManifest ¶
type PanelManifest struct {
Sources map[string]ManifestSource `json:"sources,omitempty"`
}
func (PanelManifest) IsZero ¶
func (p PanelManifest) IsZero() bool
func (PanelManifest) MarshalJSON ¶
func (x PanelManifest) MarshalJSON() ([]byte, error)
func (PanelManifest) Serialize ¶
func (x PanelManifest) Serialize(s serialize.Serializer)
type Project ¶
type Project struct {
IsDomain bool `json:"is_domain"`
Description string `json:"description,omitempty"`
Tags json.RawMessage `json:"tags,omitempty"`
Options json.RawMessage `json:"options,omitempty"`
Enabled bool `json:"enabled"`
Name string `json:"name"`
ParentId string `json:"parent_id,omitempty"`
DomainId string `json:"domain_id,omitempty"`
ProjectStatus
}
func (Project) MarshalJSON ¶
func (Project) Serialize ¶
func (x Project) Serialize(s serialize.Serializer)
type ProjectStatus ¶
type ProjectStatus struct {
Links json.RawMessage `json:"links,omitempty"`
ID string `json:"id,omitempty"`
Parent string `json:"parent,omitempty"`
Domain string `json:"domain,omitempty"`
}
func (ProjectStatus) MarshalJSON ¶
func (x ProjectStatus) MarshalJSON() ([]byte, error)
func (ProjectStatus) Serialize ¶
func (x ProjectStatus) Serialize(s serialize.Serializer)
type Registration ¶
type Registration struct {
ID string `json:"id"`
Description string `json:"description,omitempty"`
DataProvided json.RawMessage `json:"dataProvided,omitempty"`
Provider json.RawMessage `json:"provider,omitempty"`
RegistrationStatus
}
Registration representa un registro
func (Registration) MarshalJSON ¶
func (x Registration) MarshalJSON() ([]byte, error)
func (Registration) Serialize ¶
func (x Registration) Serialize(s serialize.Serializer)
type RegistrationStatus ¶
type RegistrationStatus struct {
Status string `json:"status"`
}
func (RegistrationStatus) MarshalJSON ¶
func (x RegistrationStatus) MarshalJSON() ([]byte, error)
func (RegistrationStatus) Serialize ¶
func (x RegistrationStatus) Serialize(s serialize.Serializer)
type Role ¶
type Role struct {
Description string `json:"description,omitempty"`
Name string `json:"name"`
DomainID string `json:"domain_id"`
Options json.RawMessage `json:"options,omitempty"`
RoleStatus
}
func (Role) MarshalJSON ¶
func (Role) Serialize ¶
func (x Role) Serialize(s serialize.Serializer)
type RoleAssignment ¶
type RoleAssignment struct {
Scope json.RawMessage `json:"scope,omitempty"`
Role AssignmentID `json:"role,omitzero"`
User AssignmentID `json:"user,omitzero"`
Group AssignmentID `json:"group,omitzero"`
RoleAssignmentStatus
}
func (RoleAssignment) MarshalJSON ¶
func (x RoleAssignment) MarshalJSON() ([]byte, error)
func (*RoleAssignment) ParseScope ¶
func (r *RoleAssignment) ParseScope() error
func (RoleAssignment) Serialize ¶
func (x RoleAssignment) Serialize(s serialize.Serializer)
type RoleAssignmentStatus ¶
type RoleAssignmentStatus struct {
Links json.RawMessage `json:"links,omitempty"`
Inherited string `json:"inherited"`
ProjectID string `json:"project_id,omitempty"`
DomainID string `json:"domain_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
}
func (RoleAssignmentStatus) MarshalJSON ¶
func (x RoleAssignmentStatus) MarshalJSON() ([]byte, error)
func (RoleAssignmentStatus) Serialize ¶
func (x RoleAssignmentStatus) Serialize(s serialize.Serializer)
type RoleStatus ¶
type RoleStatus struct {
Links json.RawMessage `json:"links,omitempty"`
ID string `json:"id"`
Domain string `json:"domain"`
}
func (RoleStatus) MarshalJSON ¶
func (x RoleStatus) MarshalJSON() ([]byte, error)
func (RoleStatus) Serialize ¶
func (x RoleStatus) 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 ¶
func (rule Rule) ActionList() []interface{}
ActionList converts the action field into list of actions
func (Rule) MarshalJSON ¶
func (Rule) Serialize ¶
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 ¶
func (x RuleStatus) MarshalJSON() ([]byte, error)
func (RuleStatus) Serialize ¶
func (x RuleStatus) 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 ¶
func (x ServiceMapping) MarshalJSON() ([]byte, error)
func (ServiceMapping) Serialize ¶
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 ¶
func (x ServicePathMapping) MarshalJSON() ([]byte, error)
func (ServicePathMapping) Serialize ¶
func (x ServicePathMapping) Serialize(s serialize.Serializer)
type ServiceStatus ¶
type ServiceStatus struct {
ID string `json:"_id,omitempty"`
V int `json:"__v,omitzero"`
IOTAgent string `json:"iotagent,omitempty"`
ServicePath string `json:"service_path,omitempty"`
Service string `json:"service,omitempty"`
CBHost string `json:"cbHost,omitempty"`
}
ServiceStatus agrupa atributos de estado que no se usan al crear un Service
func (ServiceStatus) MarshalJSON ¶
func (x ServiceStatus) MarshalJSON() ([]byte, error)
func (ServiceStatus) Serialize ¶
func (x ServiceStatus) 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 ¶
func (Subject) Serialize ¶
func (x Subject) Serialize(s serialize.Serializer)
type SubjectCondition ¶
type SubjectCondition struct {
Attrs []string `json:"attrs" sort:"true"`
Expression SubjectExpression `json:"expression,omitzero"`
AlterationTypes []string `json:"alterationTypes,omitempty"`
NotifyOnMetadataChange *bool `json:"notifyOnMetadataChange,omitempty"`
}
SubjectCondition es la condicion del sujeto de la suscripcion
func (SubjectCondition) MarshalJSON ¶
func (x SubjectCondition) MarshalJSON() ([]byte, error)
func (SubjectCondition) Serialize ¶
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 ¶
func (x SubjectEntity) MarshalJSON() ([]byte, error)
func (SubjectEntity) Serialize ¶
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) IsZero ¶
func (s SubjectExpression) IsZero() bool
func (SubjectExpression) MarshalJSON ¶
func (x SubjectExpression) MarshalJSON() ([]byte, error)
func (SubjectExpression) Serialize ¶
func (x SubjectExpression) Serialize(s serialize.Serializer)
type Subscription ¶
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"`
Throttling int `json:"throttling,omitzero"`
SubscriptionStatus
}
Subscription representa una suscripcion
func (Subscription) MarshalJSON ¶
func (x Subscription) MarshalJSON() ([]byte, error)
func (Subscription) Serialize ¶
func (x Subscription) Serialize(s serialize.Serializer)
func (Subscription) UpdateEndpoint ¶
func (subs Subscription) UpdateEndpoint(notificationEndpoints map[string]string) (Subscription, error)
UpdateEndpoint updates the notification endpoint
type SubscriptionStatus ¶
type SubscriptionStatus struct {
ID string `json:"id,omitempty"`
Documentation string `json:"documentation,omitempty"`
}
SubscriptionStatus agrupa los datos de estado de la suscripción
func (SubscriptionStatus) MarshalJSON ¶
func (x SubscriptionStatus) MarshalJSON() ([]byte, error)
func (SubscriptionStatus) Serialize ¶
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 ¶
func (Table) Serialize ¶
func (x Table) Serialize(s serialize.Serializer)
type TableColumn ¶
type TableColumn struct {
Name string `json:"name"`
Type string `json:"type"`
NotNull bool `json:"notNull,omitzero"`
Default string `json:"default,omitempty"`
}
TableColumn describe una columna de una tabla
func (TableColumn) MarshalJSON ¶
func (x TableColumn) MarshalJSON() ([]byte, error)
func (TableColumn) Serialize ¶
func (x TableColumn) Serialize(s serialize.Serializer)
type TableIndex ¶
type TableIndex struct {
Name string `json:"name"`
Columns []string `json:"columns"`
Geometry bool `json:"geometry,omitzero"`
}
TableIndex describe un indice
func (TableIndex) MarshalJSON ¶
func (x TableIndex) MarshalJSON() ([]byte, error)
func (TableIndex) Serialize ¶
func (x TableIndex) Serialize(s serialize.Serializer)
type UrboPanel ¶
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,omitzero"`
IsShadow *bool `json:"isShadow,omitempty"`
Section string `json:"section,omitempty"`
}
UrboPanel representa un panel de Urbo
func (UrboPanel) MarshalJSON ¶
func (UrboPanel) Serialize ¶
func (x UrboPanel) Serialize(s serialize.Serializer)
type UrboVerticalStatus ¶
type UrboVerticalStatus struct {
PanelsObjects []UrboPanel `json:"panelsObjects,omitempty"`
ShadowPanelsObjects []UrboPanel `json:"shadowPanelsObjects,omitempty"`
}
UrboVerticalStatus contains detailed vertical status
func (UrboVerticalStatus) MarshalJSON ¶
func (x UrboVerticalStatus) MarshalJSON() ([]byte, error)
func (UrboVerticalStatus) Serialize ¶
func (x UrboVerticalStatus) Serialize(s serialize.Serializer)
type User ¶
type User struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
Email string `json:"email,omitempty"`
Options map[string]json.RawMessage `json:"options,omitempty"`
DomainID string `json:"domain_id"`
UserStatus
}
func (User) MarshalJSON ¶
func (User) Serialize ¶
func (x User) Serialize(s serialize.Serializer)
type UserStatus ¶
type UserStatus struct {
Links json.RawMessage `json:"links,omitempty"`
ID string `json:"id,omitempty"`
Domain string `json:"domain,omitempty"`
Expires json.RawMessage `json:"password_expires_at,omitempty"`
}
func (UserStatus) MarshalJSON ¶
func (x UserStatus) MarshalJSON() ([]byte, error)
func (UserStatus) Serialize ¶
func (x UserStatus) 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 ¶
func (Vertical) Serialize ¶
func (x Vertical) Serialize(s serialize.Serializer)
type View ¶
type View struct {
Materialized bool `json:"materialized,omitzero"`
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 ¶
func (View) Serialize ¶
func (x View) Serialize(s serialize.Serializer)
type ViewColumn ¶
ViewColumn define las columnas de la vista
func (ViewColumn) MarshalJSON ¶
func (x ViewColumn) MarshalJSON() ([]byte, error)
func (ViewColumn) Serialize ¶
func (x ViewColumn) Serialize(s serialize.Serializer)