Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connection ¶
Types ¶
type Contact ¶
type Contact struct { gorm.Model Name string EMail string `gorm:"not null;unique"` PasswordDigest string Admin bool }
func AuthContactWithPassword ¶
func AuthContactWithToken ¶
func FindContactByEmail ¶ added in v0.1.2
func (*Contact) GenerateToken ¶
func (*Contact) Mirrors ¶ added in v0.1.3
func (c *Contact) Mirrors() *MirrorCollection
type Mirror ¶
type Mirror struct { gorm.Model ContactID int32 IPv4 string IPv6 string Domain string LocalDestination string Name string Traffic int64 Bandwidth int64 Storage int64 ClientToken string ServiceEndpointID int32 ServiceID int32 }
func FindMirrorById ¶ added in v0.1.3
func MirrorFromProto ¶
func (*Mirror) BeforeCreate ¶ added in v0.1.3
func (m *Mirror) BeforeCreate()
func (*Mirror) FetchServices ¶
func (m *Mirror) FetchServices() *ServiceCollection
func (*Mirror) ServiceEndpoint ¶ added in v0.1.3
type MirrorCollection ¶
type MirrorCollection struct {
Mirrors []*Mirror
}
func MirrorList ¶
func MirrorList(limit int, offset int) *MirrorCollection
func (*MirrorCollection) ToProto ¶
func (mc *MirrorCollection) ToProto() []*pb.Mirror
type ServiceCollection ¶
func ServiceList ¶ added in v0.2.0
func ServiceList(limit int, offset int) *ServiceCollection
func (*ServiceCollection) ToProto ¶
func (sc *ServiceCollection) ToProto() []*pb.Service
func (*ServiceCollection) ToServices ¶
func (sc *ServiceCollection) ToServices() []*Service
Click to show internal directories.
Click to hide internal directories.