Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flight ¶
type Flight struct { common.Timestamp ID string `gorm:"primaryKey;column:id;size:64"` UserID string `gorm:"column:userid;size:64"` StartID uint `gorm:"column:startid"` LandingID uint `gorm:"column:landingid"` Start start.Start `gorm:"foreignkey:StartID;references:id"` Landing location.Location `gorm:"foreignkey:LandingID;references:id"` FlyingDevice string `gorm:"column:flyingdevice;size:64"` Privacy PrivacyLevel `gorm:"column:privacylevel"` Description string `gorm:"column:description"` Duration int `gorm:"column:duration"` MaxHeight int `gorm:"column:maxHeight"` MinHeight int `gorm:"column:minHeight"` Distance int `gorm:"column:distance"` }
Flight describes one flight
type FlightService ¶
type FlightService struct {
// contains filtered or unexported fields
}
FlightService defines the flightservice
func (*FlightService) FlightById ¶
func (f *FlightService) FlightById(id string) (*Flight, error)
func (*FlightService) FlightByLocation ¶
func (f *FlightService) FlightByLocation(id int) (*Flight, error)
func (*FlightService) Update ¶
func (f *FlightService) Update(flight *Flight) error
type MariadbRepo ¶
type MariadbRepo struct {
// contains filtered or unexported fields
}
MariadbRepo struct holding
func NewRepository ¶
func NewRepository(context *gorm.DB) (*MariadbRepo, error)
NewRepository creates a new repository
func (*MariadbRepo) FlightById ¶
func (m *MariadbRepo) FlightById(id string) (*Flight, error)
func (*MariadbRepo) FlightByLocation ¶
func (m *MariadbRepo) FlightByLocation(id int) (*Flight, error)
func (*MariadbRepo) Update ¶
func (m *MariadbRepo) Update(flight *Flight) error
type PrivacyLevel ¶
type PrivacyLevel int
PrivacyLevel describes the shared status of an entity
const ( // ProtectedLevel describes a level where a user can be seen by anyone who has a flightlog login ProtectedLevel PrivacyLevel = 1 // PrivateLevel describes a level where a user needs to grant access to those who wants access PrivateLevel PrivacyLevel = 2 // PublicLevel describes a user that anyone can watch with or without login PublicLevel PrivacyLevel = 0 )
type Repository ¶
Repository describes the repository interface
type Service ¶
Service describes the service interface
func NewService ¶
func NewService(serviceUrl string, servicePort string, repository Repository, config common.ServiceConfig, locationService location.Service) (Service, error)
NewService - creates a new service
Click to show internal directories.
Click to hide internal directories.