Documentation ¶
Overview ¶
Package command provides utilities for creating MDM Payloads.
Index ¶
- Constants
- func MakeNewCommandEndpoint(svc 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 CommandService
- type Endpoints
- type Event
- type Service
Constants ¶
View Source
const (
// CommandTopic is a PubSub topic that events are published to.
CommandTopic = "mdm.Command"
)
Variables ¶
This section is empty.
Functions ¶
func MakeNewCommandEndpoint ¶
MakeNewCommandEndpoint creates an endpoint which creates new MDM Commands.
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 CommandService ¶
type CommandService struct {
// contains filtered or unexported fields
}
func (*CommandService) NewCommand ¶
func (svc *CommandService) NewCommand(ctx context.Context, request *mdm.CommandRequest) (*mdm.CommandPayload, error)
type Endpoints ¶
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints
type Service ¶
type Service interface {
NewCommand(context.Context, *mdm.CommandRequest) (*mdm.CommandPayload, error)
}
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
commandproto
Package commandproto is a generated protocol buffer package.
|
Package commandproto is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.