Documentation
¶
Index ¶
Constants ¶
View Source
const (
HashCost = 14
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("object not found") ErrAlreadyExists = errors.New("object already exists") ErrCastingObject = errors.New("error casting object") ErrInvalidPeerID = errors.New("invalid peer id") ErrInvalidPublicKey = errors.New("invalid public key") ErrInvalidRegisterKey = errors.New("invalid register key") ErrInvalidEndpoint = errors.New("invalid endpoint") )
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct { ID uint32 `gorm:"primaryKey,autoIncrement"` PublicKey string `gorm:"uniqueIndex,not null"` IP string `gorm:"uniqueIndex,not null"` Endpoint string Connected bool `gorm:"index"` CreatedAt time.Time UpdatedAt time.Time }
func (*Peer) Proto ¶
func (p *Peer) Proto() *controllerv1.Peer
func (*Peer) ProtoConfig ¶
func (p *Peer) ProtoConfig() *controllerv1.PeerConfig
Click to show internal directories.
Click to hide internal directories.