Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyReferencesSlice = errors.New("entity/aggregate-root: empty references slice")
)
Functions ¶
This section is empty.
Types ¶
type AggregateRoot ¶
type AggregateRoot struct {
References []KeyValueEntity `yaml:"-" json:"-"`
Root KeyValueEntity `yaml:"-" json:"-"`
// contains filtered or unexported fields
}
Aggretate root used to manage key/value entity relationships
func NewAggregateRoot ¶
func NewAggregateRoot(root KeyValueEntity, references []KeyValueEntity) (*AggregateRoot, error)
Create a new key/value aggregate root
func (*AggregateRoot) EntityIDs ¶
func (aggregate *AggregateRoot) EntityIDs() []uint64
Returns a list of the referenced entity ids
func (*AggregateRoot) Partition ¶
func (aggregate *AggregateRoot) Partition() string
Returns the aggregate root partition
type BIOS ¶
type Board ¶
type Chassis ¶
type KeyValueEntity ¶
type Organization ¶
type Organization struct {
ID uint64 `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
KeyValueEntity `yaml:"-" json:"-"`
}
func NewOrganization ¶
func NewOrganization(name string) *Organization
func (*Organization) EntityID ¶
func (organization *Organization) EntityID() uint64
func (*Organization) Partition ¶
func (organization *Organization) Partition() string
func (*Organization) SetEntityID ¶
func (organization *Organization) SetEntityID(id uint64)
type Product ¶
type Registration ¶
type Registration struct {
ID uint64 `gorm:"primaryKey" yaml:"id" json:"id"`
Email string `yaml:"email" json:"email"`
Password string `yaml:"password" json:"password"`
OrgID uint64 `yaml:"org_id" json:"org_id"`
OrgName string `yaml:"org_name" json:"org_name"`
KeyValueEntity
}
func NewRegistration ¶
func NewRegistration(email string) *Registration
func (*Registration) EntityID ¶
func (r *Registration) EntityID() uint64
func (*Registration) Partition ¶
func (r *Registration) Partition() string
func (*Registration) SetEntityID ¶
func (r *Registration) SetEntityID(id uint64)
type Role ¶
type Role struct {
ID uint64 `json:"id"`
Name string `json:"name"`
KeyValueEntity
}
func (*Role) SetEntityID ¶
type Service ¶
type Service struct {
ID uint64
Name string
KeyAttributes *keystore.KeyAttributes
}
func NewService ¶
func (*Service) SetEntityID ¶
type System ¶
type System struct {
BIOS BIOS `yaml:"bios" json:"bios"`
Board Board `yaml:"board" json:"board"`
Chassis Chassis `yaml:"chassis" json:"chassis"`
Mode string `yaml:"mode" json:"mode"`
Product Product `yaml:"product" json:"product"`
Runtime *SystemRuntime `yaml:"runtime" json:"runtime"`
Services int `yaml:"services" json:"services"`
}
type SystemRuntime ¶
type SystemRuntime struct {
Version string `yaml:"version" json:"version"`
Goroutines int `yaml:"goroutines" json:"goroutines"`
Cpus int `yaml:"cpus" json:"cpus"`
Cgo int64 `yaml:"cgo" json:"cgo"`
HeapSize uint64 `yaml:"heap-alloc" json:"heapAlloc"`
Alloc uint64 `yaml:"alloc" json:"alloc"`
Sys uint64 `yaml:"sys" json:"sys"`
Mallocs uint64 `yaml:"mallocs" json:"mallocs"`
Frees uint64 `yaml:"frees" json:"frees"`
NumGC uint32 `yaml:"gc" json:"gc"`
NumForcedGC uint32 `yaml:"num-forced-gc" json:"numForcedGC"`
}
func (SystemRuntime) Print ¶
func (sr SystemRuntime) Print()
type TimeSeriesIndexer ¶
type TimeSeriesIndexer interface {
KeyValueEntity
SetTimestamp(timestamp uint64)
Timestamp() uint64
}
Click to show internal directories.
Click to hide internal directories.