Versions in this module Expand all Collapse all v1 v1.3.1 Jul 11, 2018 v1.3.0 Jun 10, 2018 Changes in this version + const AutoAssignBucket + const ConfigBucket + const SyncTopic + func LoadConfig(db *bolt.DB) (*config, error) + func MakeApplyAutoAssignerEndpoint(s Service) endpoint.Endpoint + func MakeGetAutoAssignersEndpoint(s Service) endpoint.Endpoint + func MakeRemoveAutoAssignerEndpoint(s Service) endpoint.Endpoint + func MakeSyncNowEndpoint(s Service) endpoint.Endpoint + func MarshalEvent(e *Event) ([]byte, error) + func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption) + func UnmarshalEvent(data []byte, e *Event) error + type AutoAssigner struct + Filter string + ProfileUUID string + type DEPSyncService struct + func NewService(syncer Syncer) *DEPSyncService + func (s *DEPSyncService) SyncNow(_ context.Context) error + func (s DEPSyncService) ApplyAutoAssigner(ctx context.Context, aa *AutoAssigner) error + func (s DEPSyncService) GetAutoAssigners(ctx context.Context) ([]*AutoAssigner, error) + func (s DEPSyncService) RemoveAutoAssigner(ctx context.Context, filter string) error + type Endpoints struct + ApplyAutoAssignerEndpoint endpoint.Endpoint + GetAutoAssignersEndpoint endpoint.Endpoint + RemoveAutoAssignerEndpoint endpoint.Endpoint + SyncNowEndpoint endpoint.Endpoint + func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints + func (e Endpoints) ApplyAutoAssigner(ctx context.Context, aa *AutoAssigner) error + func (e Endpoints) GetAutoAssigners(ctx context.Context) ([]*AutoAssigner, error) + func (e Endpoints) RemoveAutoAssigner(ctx context.Context, filter string) error + func (e Endpoints) SyncNow(ctx context.Context) error + type Event struct + Devices []dep.Device + ID string + Time time.Time + func NewEvent(devices []dep.Device) *Event + type Option func(*watcher) + func WithClient(client dep.Client) Option + func WithLogger(logger log.Logger) Option + type Service interface + ApplyAutoAssigner func(context.Context, *AutoAssigner) error + GetAutoAssigners func(context.Context) ([]*AutoAssigner, error) + RemoveAutoAssigner func(context.Context, string) error + SyncNow func(context.Context) error + func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error) + type Syncer interface + GetConfig func() *config + SyncNow func() + func New(pub pubsub.PublishSubscriber, db *bolt.DB, logger log.Logger, opts ...Option) (Syncer, error)