Documentation ¶
Index ¶
- Constants
- 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
- 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
Constants ¶
View Source
const ( SyncTopic = "mdm.DepSync" ConfigBucket = "mdm.DEPConfig" AutoAssignBucket = "mdm.DEPAutoAssign" )
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
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 DEPSyncService ¶
type DEPSyncService struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(syncer Syncer) *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 ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
depsyncproto
Package depsyncproto is a generated protocol buffer package.
|
Package depsyncproto is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.