model

package
v0.0.0-...-fc7dab2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigurator

func NewConfigurator(hubDb hubDb) *cfg

func NewDb

func NewDb(db pkg.Db) hubDb

Types

type HubConfig

type HubConfig struct {
	gorm.Model
	Port    int    `gorm:"default:12000"`
	Address string `gorm:"default:localhost"`
	Secret  string `gorm:"default:secret"`
}

type HubConfigurator

type HubConfigurator interface {
	service.ServiceConfigurator
	Secret() string
}

type HubJoinedNode

type HubJoinedNode struct {
	gorm.Model
	Status         uint
	EncKey         []byte
	E2E_EncEnabled uint
	ExternalId     internal.NodeId `gorm:"type:uint64"`
	Tags           []HubNodeTag    `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"`
}

type HubNodeTag

type HubNodeTag struct {
	gorm.Model
	Name            string
	HubJoinedNodeID uint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL