types

package
v0.0.0-...-8bb18f9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	ID             uint32 `json:"id"         gorm:"primaryKey,autoIncrement"`
	MachineID      string `json:"machine_id" gorm:"unique,not null"`
	NoisePublicKey string `json:"-"          gorm:"uniqueIndex,not null"`
	IP             string `json:"ip"         gorm:"uniqueIndex"`
	Prefix         string `json:"prefix"     gorm:"not null"`
	Hostname       string `json:"hostname"`

	LoggedIn  bool   `json:"logged_in"`
	Connected bool   `json:"connected"`
	User      string `json:"user"`
	Disabled  bool   `json:"disabled"`

	LastLogin time.Time
	LastAuth  time.Time
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*Peer) Copy

func (p *Peer) Copy() *Peer

func (*Peer) IsAuthExpired

func (p *Peer) IsAuthExpired() bool

func (*Peer) IsConnected

func (p *Peer) IsConnected() bool

func (*Peer) IsDisabled

func (p *Peer) IsDisabled() bool

func (*Peer) IsLoggedIn

func (p *Peer) IsLoggedIn() bool

func (*Peer) Proto

func (p *Peer) Proto() *ctrlv1.Peer

func (*Peer) ProtoConfig

func (p *Peer) ProtoConfig() *ctrlv1.PeerConfig

func (*Peer) ProtoDetails

func (p *Peer) ProtoDetails() *ctrlv1.PeerDetails

func (*Peer) UpdateAuth

func (p *Peer) UpdateAuth()

Jump to

Keyboard shortcuts

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