Documentation
¶
Index ¶
- Variables
- type Config
- type FxResult
- type SelectFilter
- type Service
- func (s *Service) Clean(ctx context.Context) error
- func (s *Service) Get(filter ...SelectFilter) (models.Device, error)
- func (s *Service) Insert(user models.User, device *models.Device) error
- func (s *Service) Select(filter ...SelectFilter) ([]models.Device, error)
- func (s *Service) UpdateLastSeen(deviceId string) error
- func (s *Service) UpdateToken(deviceId string, token string) error
- type ServiceParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = gorm.ErrRecordNotFound ErrInvalidFilter = errors.New("invalid filter") ErrMoreThanOne = errors.New("more than one record") )
Functions ¶
This section is empty.
Types ¶
type SelectFilter ¶
type SelectFilter func(*selectFilter)
func WithID ¶
func WithID(id string) SelectFilter
func WithToken ¶
func WithToken(token string) SelectFilter
func WithUserID ¶
func WithUserID(userID string) SelectFilter
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(params ServiceParams) *Service
func (*Service) UpdateLastSeen ¶
Click to show internal directories.
Click to hide internal directories.