Documentation
¶
Index ¶
- Constants
- 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
- type Client
- type Cursor
- type DB
- type DEPSyncService
- 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
- func (s *DEPSyncService) SyncNow(_ context.Context) error
- type Endpoints
- type Event
- type Option
- type Service
- type Syncer
- type Watcher
- type WatcherDB
Constants ¶
View Source
const (
SyncTopic = "mdm.DepSync"
)
Variables ¶
This section is empty.
Functions ¶
func MakeSyncNowEndpoint ¶
func MarshalEvent ¶
MarshalEvent serializes an event to a protocol buffer wire format.
func RegisterHTTPHandlers ¶
func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
func UnmarshalEvent ¶
UnmarshalEvent parses a protocol buffer representation of data into the Event.
Types ¶
type AutoAssigner ¶
type Client ¶
type Client interface { FetchDevices(...dep.DeviceRequestOption) (*dep.DeviceResponse, error) SyncDevices(string, ...dep.DeviceRequestOption) (*dep.DeviceResponse, error) AssignProfile(string, ...string) (*dep.ProfileResponse, error) }
type DB ¶
type DB interface { SaveAutoAssigner(a *AutoAssigner) error LoadAutoAssigners() ([]AutoAssigner, error) DeleteAutoAssigner(filter string) error }
type DEPSyncService ¶
type DEPSyncService struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(syncer Syncer, db DB) *DEPSyncService
func (DEPSyncService) ApplyAutoAssigner ¶
func (s DEPSyncService) ApplyAutoAssigner(ctx context.Context, aa *AutoAssigner) error
func (DEPSyncService) GetAutoAssigners ¶
func (s DEPSyncService) GetAutoAssigners(ctx context.Context) ([]AutoAssigner, error)
func (DEPSyncService) RemoveAutoAssigner ¶
func (s DEPSyncService) RemoveAutoAssigner(ctx context.Context, filter string) error
type Endpoints ¶
type Endpoints struct { SyncNowEndpoint endpoint.Endpoint ApplyAutoAssignerEndpoint endpoint.Endpoint GetAutoAssignersEndpoint endpoint.Endpoint RemoveAutoAssignerEndpoint endpoint.Endpoint }
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints
func (Endpoints) ApplyAutoAssigner ¶
func (e Endpoints) ApplyAutoAssigner(ctx context.Context, aa *AutoAssigner) error
func (Endpoints) GetAutoAssigners ¶
func (e Endpoints) GetAutoAssigners(ctx context.Context) ([]AutoAssigner, error)
func (Endpoints) RemoveAutoAssigner ¶
type Service ¶
type Service interface { SyncNow(context.Context) error ApplyAutoAssigner(context.Context, *AutoAssigner) error GetAutoAssigners(context.Context) ([]AutoAssigner, error) RemoveAutoAssigner(context.Context, string) error }
func NewHTTPClient ¶
func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.