Documentation
¶
Overview ¶
Package models contains generated Reform records and helpers.
Common order of helpers:
- unexported validators (checkXXX);
- FindAllXXX;
- FindXXXByID;
- other finder (e.g. FindNodesForAgent);
- CreateXXX;
- ChangeXXX;
- RemoveXXX.
Index ¶
- Constants
- Variables
- func OpenDB(name, username, password string, logf reform.Printf) (*sql.DB, error)
- func PMMAgentsForChangedNode(q *reform.Querier, nodeID string) ([]string, error)
- func PMMAgentsForChangedService(q *reform.Querier, serviceID string) ([]string, error)
- func RemoveNode(q *reform.Querier, id string, mode RemoveMode) error
- func RemoveService(q *reform.Querier, id string, mode RemoveMode) error
- type AddDBMSServiceParams
- type AddExporterAgentParams
- type Agent
- func AgentAddExporter(q *reform.Querier, agentType AgentType, params *AddExporterAgentParams) (*Agent, error)
- func AgentAddNodeExporter(q *reform.Querier, pmmAgentID string, customLabels map[string]string) (*Agent, error)
- func AgentAddPmmAgent(q *reform.Querier, runsOnNodeID string, customLabels map[string]string) (*Agent, error)
- func AgentFindAll(q *reform.Querier) ([]*Agent, error)
- func AgentFindByID(q *reform.Querier, id string) (*Agent, error)
- func AgentsForNode(q *reform.Querier, nodeID string) ([]*Agent, error)
- func AgentsForService(q *reform.Querier, serviceID string) ([]*Agent, error)
- func AgentsRunningByPMMAgent(q *reform.Querier, pmmAgentID string) ([]*Agent, error)
- func ChangeAgent(q *reform.Querier, agentID string, params *ChangeCommonAgentParams) (*Agent, error)
- func RemoveAgent(q *reform.Querier, id string, mode RemoveMode) (*Agent, error)
- func (s *Agent) AfterFind() error
- func (s *Agent) BeforeInsert() error
- func (s *Agent) BeforeUpdate() error
- func (s *Agent) GetCustomLabels() (map[string]string, error)
- func (s *Agent) HasPK() bool
- func (s *Agent) PKPointer() interface{}
- func (s *Agent) PKValue() interface{}
- func (s *Agent) Pointers() []interface{}
- func (s *Agent) SetCustomLabels(m map[string]string) error
- func (s *Agent) SetPK(pk interface{})
- func (s Agent) String() string
- func (s *Agent) Table() reform.Table
- func (s *Agent) UnifiedLabels() (map[string]string, error)
- func (s *Agent) Values() []interface{}
- func (s *Agent) View() reform.View
- type AgentNode
- type AgentService
- func (s *AgentService) AfterFind() error
- func (s *AgentService) BeforeInsert() error
- func (s *AgentService) BeforeUpdate() error
- func (s *AgentService) Pointers() []interface{}
- func (s AgentService) String() string
- func (s *AgentService) Values() []interface{}
- func (s *AgentService) View() reform.View
- type AgentType
- type ChangeCommonAgentParams
- type CreateNodeParams
- type Node
- func CreateNode(q *reform.Querier, nodeType NodeType, params *CreateNodeParams) (*Node, error)
- func FindAllNodes(q *reform.Querier) ([]*Node, error)
- func FindNodeByID(q *reform.Querier, id string) (*Node, error)
- func FindNodeByName(q *reform.Querier, name string) (*Node, error)
- func FindNodesForAgentID(q *reform.Querier, agentID string) ([]*Node, error)
- func (s *Node) AfterFind() error
- func (s *Node) BeforeInsert() error
- func (s *Node) BeforeUpdate() error
- func (s *Node) GetCustomLabels() (map[string]string, error)
- func (s *Node) HasPK() bool
- func (s *Node) PKPointer() interface{}
- func (s *Node) PKValue() interface{}
- func (s *Node) Pointers() []interface{}
- func (s *Node) SetCustomLabels(m map[string]string) error
- func (s *Node) SetPK(pk interface{})
- func (s Node) String() string
- func (s *Node) Table() reform.Table
- func (s *Node) UnifiedLabels() (map[string]string, error)
- func (s *Node) Values() []interface{}
- func (s *Node) View() reform.View
- type NodeType
- type RemoveMode
- type Service
- func AddNewService(q *reform.Querier, serviceType ServiceType, params *AddDBMSServiceParams) (*Service, error)
- func FindAllServices(q *reform.Querier) ([]*Service, error)
- func FindServiceByID(q *reform.Querier, id string) (*Service, error)
- func FindServiceByName(q *reform.Querier, name string) (*Service, error)
- func ServicesForAgent(q *reform.Querier, agentID string) ([]*Service, error)
- func ServicesForNode(q *reform.Querier, nodeID string) ([]*Service, error)
- func (s *Service) AfterFind() error
- func (s *Service) BeforeInsert() error
- func (s *Service) BeforeUpdate() error
- func (s *Service) GetCustomLabels() (map[string]string, error)
- func (s *Service) HasPK() bool
- func (s *Service) PKPointer() interface{}
- func (s *Service) PKValue() interface{}
- func (s *Service) Pointers() []interface{}
- func (s *Service) SetCustomLabels(m map[string]string) error
- func (s *Service) SetPK(pk interface{})
- func (s Service) String() string
- func (s *Service) Table() reform.Table
- func (s *Service) UnifiedLabels() (map[string]string, error)
- func (s *Service) Values() []interface{}
- func (s *Service) View() reform.View
- type ServiceType
- type TelemetryRow
- func (t *TelemetryRow) AfterFind() error
- func (t *TelemetryRow) BeforeInsert() error
- func (t *TelemetryRow) BeforeUpdate() error
- func (s *TelemetryRow) HasPK() bool
- func (s *TelemetryRow) PKPointer() interface{}
- func (s *TelemetryRow) PKValue() interface{}
- func (s *TelemetryRow) Pointers() []interface{}
- func (s *TelemetryRow) SetPK(pk interface{})
- func (s TelemetryRow) String() string
- func (s *TelemetryRow) Table() reform.Table
- func (s *TelemetryRow) Values() []interface{}
- func (s *TelemetryRow) View() reform.View
Constants ¶
const PMMServerNodeID string = "pmm-server"
PMMServerNodeID is a special Node ID representing PMM Server Node.
Variables ¶
var AgentNodeView = &agentNodeViewType{ s: parse.StructInfo{Type: "AgentNode", SQLSchema: "", SQLName: "agent_nodes", Fields: []parse.FieldInfo{{Name: "AgentID", Type: "string", Column: "agent_id"}, {Name: "NodeID", Type: "string", Column: "node_id"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}}, PKFieldIndex: -1}, z: new(AgentNode).Values(), }
AgentNodeView represents agent_nodes view or table in SQL database.
var AgentServiceView = &agentServiceViewType{ s: parse.StructInfo{Type: "AgentService", SQLSchema: "", SQLName: "agent_services", Fields: []parse.FieldInfo{{Name: "AgentID", Type: "string", Column: "agent_id"}, {Name: "ServiceID", Type: "string", Column: "service_id"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}}, PKFieldIndex: -1}, z: new(AgentService).Values(), }
AgentServiceView represents agent_services view or table in SQL database.
var AgentTable = &agentTableType{ s: parse.StructInfo{Type: "Agent", SQLSchema: "", SQLName: "agents", Fields: []parse.FieldInfo{{Name: "AgentID", Type: "string", Column: "agent_id"}, {Name: "AgentType", Type: "AgentType", Column: "agent_type"}, {Name: "RunsOnNodeID", Type: "*string", Column: "runs_on_node_id"}, {Name: "PMMAgentID", Type: "*string", Column: "pmm_agent_id"}, {Name: "CustomLabels", Type: "[]uint8", Column: "custom_labels"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}, {Name: "Disabled", Type: "bool", Column: "disabled"}, {Name: "Status", Type: "string", Column: "status"}, {Name: "ListenPort", Type: "*uint16", Column: "listen_port"}, {Name: "Version", Type: "*string", Column: "version"}, {Name: "Username", Type: "*string", Column: "username"}, {Name: "Password", Type: "*string", Column: "password"}, {Name: "MetricsURL", Type: "*string", Column: "metrics_url"}}, PKFieldIndex: 0}, z: new(Agent).Values(), }
AgentTable represents agents view or table in SQL database.
var NodeTable = &nodeTableType{ s: parse.StructInfo{Type: "Node", SQLSchema: "", SQLName: "nodes", Fields: []parse.FieldInfo{{Name: "NodeID", Type: "string", Column: "node_id"}, {Name: "NodeType", Type: "NodeType", Column: "node_type"}, {Name: "NodeName", Type: "string", Column: "node_name"}, {Name: "MachineID", Type: "*string", Column: "machine_id"}, {Name: "Distro", Type: "string", Column: "distro"}, {Name: "NodeModel", Type: "string", Column: "node_model"}, {Name: "AZ", Type: "string", Column: "az"}, {Name: "CustomLabels", Type: "[]uint8", Column: "custom_labels"}, {Name: "Address", Type: "string", Column: "address"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}, {Name: "ContainerID", Type: "*string", Column: "container_id"}, {Name: "ContainerName", Type: "*string", Column: "container_name"}, {Name: "Region", Type: "*string", Column: "region"}}, PKFieldIndex: 0}, z: new(Node).Values(), }
NodeTable represents nodes view or table in SQL database.
var Now = func() time.Time { return time.Now().Truncate(time.Microsecond).UTC() }
Now returns current time with database precision.
var ServiceTable = &serviceTableType{ s: parse.StructInfo{Type: "Service", SQLSchema: "", SQLName: "services", Fields: []parse.FieldInfo{{Name: "ServiceID", Type: "string", Column: "service_id"}, {Name: "ServiceType", Type: "ServiceType", Column: "service_type"}, {Name: "ServiceName", Type: "string", Column: "service_name"}, {Name: "NodeID", Type: "string", Column: "node_id"}, {Name: "Environment", Type: "string", Column: "environment"}, {Name: "Cluster", Type: "string", Column: "cluster"}, {Name: "ReplicationSet", Type: "string", Column: "replication_set"}, {Name: "CustomLabels", Type: "[]uint8", Column: "custom_labels"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}, {Name: "Address", Type: "*string", Column: "address"}, {Name: "Port", Type: "*uint16", Column: "port"}}, PKFieldIndex: 0}, z: new(Service).Values(), }
ServiceTable represents services view or table in SQL database.
var TelemetryRowTable = &telemetryRowTableType{ s: parse.StructInfo{Type: "TelemetryRow", SQLSchema: "", SQLName: "telemetry", Fields: []parse.FieldInfo{{Name: "UUID", Type: "string", Column: "uuid"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}}, PKFieldIndex: 0}, z: new(TelemetryRow).Values(), }
TelemetryRowTable represents telemetry view or table in SQL database.
Functions ¶
func PMMAgentsForChangedNode ¶
PMMAgentsForChangedNode returns pmm-agents IDs that are affected by the change of the Node with given ID. It may return (nil, nil) if no such pmm-agents are found. It returns wrapped reform.ErrNoRows if Service with given ID is not found.
func PMMAgentsForChangedService ¶
PMMAgentsForChangedService returns pmm-agents IDs that are affected by the change of the Service with given ID. It may return (nil, nil) if no such pmm-agents are found. It returns wrapped reform.ErrNoRows if Service with given ID is not found.
func RemoveNode ¶
func RemoveNode(q *reform.Querier, id string, mode RemoveMode) error
RemoveNode removes single Node.
func RemoveService ¶
func RemoveService(q *reform.Querier, id string, mode RemoveMode) error
RemoveService removes single Service.
Types ¶
type AddDBMSServiceParams ¶
type AddDBMSServiceParams struct {
ServiceName string
NodeID string
Environment string
Cluster string
ReplicationSet string
CustomLabels map[string]string
Address *string
Port *uint16
}
AddDBMSServiceParams contains parameters for adding DBMS (MySQL, PostgreSQL, MongoDB) Services.
type AddExporterAgentParams ¶
type AddExporterAgentParams struct {
PMMAgentID string
ServiceID string
Username string
Password string
CustomLabels map[string]string
}
AddExporterAgentParams params for add common exporter.
type Agent ¶
type Agent struct {
AgentID string `reform:"agent_id,pk"`
AgentType AgentType `reform:"agent_type"`
RunsOnNodeID *string `reform:"runs_on_node_id"`
PMMAgentID *string `reform:"pmm_agent_id"`
CustomLabels []byte `reform:"custom_labels"`
CreatedAt time.Time `reform:"created_at"`
UpdatedAt time.Time `reform:"updated_at"`
Disabled bool `reform:"disabled"`
Status string `reform:"status"`
ListenPort *uint16 `reform:"listen_port"`
Version *string `reform:"version"`
Username *string `reform:"username"`
Password *string `reform:"password"`
MetricsURL *string `reform:"metrics_url"`
}
Agent represents Agent as stored in database.
func AgentAddExporter ¶
func AgentAddExporter(q *reform.Querier, agentType AgentType, params *AddExporterAgentParams) (*Agent, error)
AgentAddExporter adds exporter with given type.
func AgentAddNodeExporter ¶
func AgentAddNodeExporter(q *reform.Querier, pmmAgentID string, customLabels map[string]string) (*Agent, error)
AgentAddNodeExporter creates NodeExporter agent.
func AgentAddPmmAgent ¶
func AgentAddPmmAgent(q *reform.Querier, runsOnNodeID string, customLabels map[string]string) (*Agent, error)
AgentAddPmmAgent creates PMMAgent.
func AgentFindAll ¶
AgentFindAll finds all agents.
func AgentFindByID ¶
AgentFindByID finds agent by ID.
func AgentsForNode ¶
AgentsForNode returns all Agents providing insights for given Node.
func AgentsForService ¶
AgentsForService returns all Agents providing insights for given Service.
func AgentsRunningByPMMAgent ¶
AgentsRunningByPMMAgent returns all Agents running by PMMAgent.
func ChangeAgent ¶
func ChangeAgent(q *reform.Querier, agentID string, params *ChangeCommonAgentParams) (*Agent, error)
ChangeAgent changes common parameters for given Agent.
func RemoveAgent ¶
RemoveAgent removes Agent by ID.
func (*Agent) BeforeInsert ¶
BeforeInsert implements reform.BeforeInserter interface.
func (*Agent) BeforeUpdate ¶
BeforeUpdate implements reform.BeforeUpdater interface.
func (*Agent) GetCustomLabels ¶
GetCustomLabels decodes custom labels.
func (*Agent) PKPointer ¶
func (s *Agent) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Agent) PKValue ¶
func (s *Agent) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Agent) Pointers ¶
func (s *Agent) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Agent) SetCustomLabels ¶
SetCustomLabels encodes custom labels.
func (*Agent) UnifiedLabels ¶
UnifiedLabels returns combined standard and custom labels with empty labels removed.
type AgentNode ¶
type AgentNode struct {
AgentID string `reform:"agent_id"`
NodeID string `reform:"node_id"`
CreatedAt time.Time `reform:"created_at"`
}
AgentNode implements many-to-many relationship between Agents and Nodes.
func (*AgentNode) BeforeInsert ¶
BeforeInsert implements reform.BeforeInserter interface.
func (*AgentNode) BeforeUpdate ¶
BeforeUpdate implements reform.BeforeUpdater interface.
func (*AgentNode) Pointers ¶
func (s *AgentNode) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
type AgentService ¶
type AgentService struct {
AgentID string `reform:"agent_id"`
ServiceID string `reform:"service_id"`
CreatedAt time.Time `reform:"created_at"`
}
AgentService implements many-to-many relationship between Agents and Services.
func (*AgentService) AfterFind ¶
func (s *AgentService) AfterFind() error
AfterFind implements reform.AfterFinder interface.
func (*AgentService) BeforeInsert ¶
func (s *AgentService) BeforeInsert() error
BeforeInsert implements reform.BeforeInserter interface.
func (*AgentService) BeforeUpdate ¶
func (s *AgentService) BeforeUpdate() error
BeforeUpdate implements reform.BeforeUpdater interface.
func (*AgentService) Pointers ¶
func (s *AgentService) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (AgentService) String ¶
func (s AgentService) String() string
String returns a string representation of this struct or record.
func (*AgentService) Values ¶
func (s *AgentService) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*AgentService) View ¶
func (s *AgentService) View() reform.View
View returns View object for that struct.
type AgentType ¶
type AgentType string
AgentType represents Agent type as stored in database.
const ( PMMAgentType AgentType = "pmm-agent" NodeExporterType AgentType = "node_exporter" MySQLdExporterType AgentType = "mysqld_exporter" MongoDBExporterType AgentType = "mongodb_exporter" PostgresExporterType AgentType = "postgres_exporter" QANMySQLPerfSchemaAgentType AgentType = "qan-mysql-perfschema-agent" QANMySQLSlowlogAgentType AgentType = "qan-mysql-slowlog-agent" QANMongoDBProfilerAgentType AgentType = "qan-mongodb-profiler-agent" )
Agent types (in the same order as in agents.proto).
type ChangeCommonAgentParams ¶
type ChangeCommonAgentParams struct {
Disabled *bool // true - disable, false - enable, nil - do not change
CustomLabels map[string]string
RemoveCustomLabels bool
}
ChangeCommonAgentParams contains parameters that can be changed for all Agents.
type CreateNodeParams ¶
type CreateNodeParams struct {
NodeName string
MachineID *string
Distro string
NodeModel string
AZ string
ContainerID *string
ContainerName *string
CustomLabels map[string]string
Address string
Region *string
}
CreateNodeParams contains parameters for creating Nodes.
type Node ¶
type Node struct {
NodeID string `reform:"node_id,pk"`
NodeType NodeType `reform:"node_type"`
NodeName string `reform:"node_name"`
MachineID *string `reform:"machine_id"` // nil means "unknown"; non-nil value must be unique for Generic nodes
Distro string `reform:"distro"`
NodeModel string `reform:"node_model"`
AZ string `reform:"az"`
CustomLabels []byte `reform:"custom_labels"`
Address string `reform:"address"`
CreatedAt time.Time `reform:"created_at"`
UpdatedAt time.Time `reform:"updated_at"`
ContainerID *string `reform:"container_id"` // nil means "unknown"; non-nil value must be unique
ContainerName *string `reform:"container_name"`
Region *string `reform:"region"` // nil means "not Remote"; non-nil value must be unique in combination with instance/address
}
Node represents Node as stored in database.
func CreateNode ¶
CreateNode creates a Node.
func FindAllNodes ¶
FindAllNodes returns all Nodes.
func FindNodeByID ¶
FindNodeByID finds a Node by ID.
func FindNodeByName ¶
FindNodeByName finds a Node by name.
func FindNodesForAgentID ¶
FindNodesForAgentID returns all Nodes for which Agent with given ID provides insights.
func (*Node) BeforeInsert ¶
BeforeInsert implements reform.BeforeInserter interface.
func (*Node) BeforeUpdate ¶
BeforeUpdate implements reform.BeforeUpdater interface.
func (*Node) GetCustomLabels ¶
GetCustomLabels decodes custom labels.
func (*Node) PKPointer ¶
func (s *Node) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Node) PKValue ¶
func (s *Node) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Node) Pointers ¶
func (s *Node) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Node) SetCustomLabels ¶
SetCustomLabels encodes custom labels.
func (*Node) UnifiedLabels ¶
UnifiedLabels returns combined standard and custom labels with empty labels removed.
type RemoveMode ¶
type RemoveMode int
RemoveMode defines how Remove functions deal with dependend objects.
const ( // RemoveRestrict returns error if there dependend objects. RemoveRestrict RemoveMode = iota // RemoveCascade removes dependend objects recursively. RemoveCascade )
type Service ¶
type Service struct {
ServiceID string `reform:"service_id,pk"`
ServiceType ServiceType `reform:"service_type"`
ServiceName string `reform:"service_name"`
NodeID string `reform:"node_id"`
Environment string `reform:"environment"`
Cluster string `reform:"cluster"`
ReplicationSet string `reform:"replication_set"`
CustomLabels []byte `reform:"custom_labels"`
CreatedAt time.Time `reform:"created_at"`
UpdatedAt time.Time `reform:"updated_at"`
Address *string `reform:"address"`
Port *uint16 `reform:"port"`
}
Service represents Service as stored in database.
func AddNewService ¶
func AddNewService(q *reform.Querier, serviceType ServiceType, params *AddDBMSServiceParams) (*Service, error)
AddNewService adds new service to storage.
func FindAllServices ¶
FindAllServices returns all Services.
func FindServiceByID ¶
FindServiceByID finds Service by ID.
func FindServiceByName ¶
FindServiceByName finds Service by Name.
func ServicesForAgent ¶
ServicesForAgent returns all Services for which Agent with given ID provides insights.
func ServicesForNode ¶
ServicesForNode returns all Services for Node with given ID.
func (*Service) BeforeInsert ¶
BeforeInsert implements reform.BeforeInserter interface.
func (*Service) BeforeUpdate ¶
BeforeUpdate implements reform.BeforeUpdater interface.
func (*Service) GetCustomLabels ¶
GetCustomLabels decodes custom labels.
func (*Service) PKPointer ¶
func (s *Service) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Service) PKValue ¶
func (s *Service) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Service) Pointers ¶
func (s *Service) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Service) SetCustomLabels ¶
SetCustomLabels encodes custom labels.
func (*Service) UnifiedLabels ¶
UnifiedLabels returns combined standard and custom labels with empty labels removed.
type ServiceType ¶
type ServiceType string
ServiceType represents Service type as stored in database.
const ( MySQLServiceType ServiceType = "mysql" MongoDBServiceType ServiceType = "mongodb" PostgreSQLServiceType ServiceType = "postgresql" )
Service types (in the same order as in services.proto).
type TelemetryRow ¶
type TelemetryRow struct {
UUID string `reform:"uuid,pk"`
CreatedAt time.Time `reform:"created_at"`
}
TelemetryRow stores telemetry information.
func (*TelemetryRow) AfterFind ¶
func (t *TelemetryRow) AfterFind() error
AfterFind implements reform.AfterFinder interface.
func (*TelemetryRow) BeforeInsert ¶
func (t *TelemetryRow) BeforeInsert() error
BeforeInsert implements reform.BeforeInserter interface.
func (*TelemetryRow) BeforeUpdate ¶
func (t *TelemetryRow) BeforeUpdate() error
BeforeUpdate implements reform.BeforeUpdater interface.
func (*TelemetryRow) HasPK ¶
func (s *TelemetryRow) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*TelemetryRow) PKPointer ¶
func (s *TelemetryRow) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*TelemetryRow) PKValue ¶
func (s *TelemetryRow) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*TelemetryRow) Pointers ¶
func (s *TelemetryRow) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*TelemetryRow) SetPK ¶
func (s *TelemetryRow) SetPK(pk interface{})
SetPK sets record primary key.
func (TelemetryRow) String ¶
func (s TelemetryRow) String() string
String returns a string representation of this struct or record.
func (*TelemetryRow) Table ¶
func (s *TelemetryRow) Table() reform.Table
Table returns Table object for that record.
func (*TelemetryRow) Values ¶
func (s *TelemetryRow) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*TelemetryRow) View ¶
func (s *TelemetryRow) View() reform.View
View returns View object for that struct.
Source Files
¶
- agent_helpers.go
- agent_model.go
- agent_model_reform.go
- agent_node_model.go
- agent_node_model_reform.go
- agent_service_model.go
- agent_service_model_reform.go
- database.go
- models.go
- node_helpers.go
- node_model.go
- node_model_reform.go
- service_helpers.go
- service_model.go
- service_model_reform.go
- telemetry.go
- telemetry_reform.go