Documentation ¶
Index ¶
- func MakeDefineProfileEndpoint(svc Service) endpoint.Endpoint
- func MakeFetchProfileEndpoint(svc Service) endpoint.Endpoint
- func MakeGetAccountInfoEndpoint(svc Service) endpoint.Endpoint
- func MakeGetDeviceDetailsEndpoint(svc Service) endpoint.Endpoint
- func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
- type DEPService
- func (svc *DEPService) DefineProfile(ctx context.Context, p *dep.Profile) (*dep.ProfileResponse, error)
- func (svc *DEPService) FetchProfile(ctx context.Context, uuid string) (*dep.Profile, error)
- func (svc *DEPService) GetAccountInfo(ctx context.Context) (*dep.Account, error)
- func (svc *DEPService) GetDeviceDetails(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)
- func (svc *DEPService) Run() error
- type Endpoints
- func (e Endpoints) DefineProfile(ctx context.Context, p *dep.Profile) (*dep.ProfileResponse, error)
- func (e Endpoints) FetchProfile(ctx context.Context, uuid string) (*dep.Profile, error)
- func (e Endpoints) GetAccountInfo(ctx context.Context) (*dep.Account, error)
- func (e Endpoints) GetDeviceDetails(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHTTPHandlers ¶
func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
Types ¶
type DEPService ¶
type DEPService struct {
// contains filtered or unexported fields
}
func New ¶
func New(client dep.Client, subscriber pubsub.Subscriber) *DEPService
func (*DEPService) DefineProfile ¶
func (svc *DEPService) DefineProfile(ctx context.Context, p *dep.Profile) (*dep.ProfileResponse, error)
func (*DEPService) FetchProfile ¶
func (*DEPService) GetAccountInfo ¶
func (*DEPService) GetDeviceDetails ¶
func (svc *DEPService) GetDeviceDetails(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)
func (*DEPService) Run ¶
func (svc *DEPService) Run() error
type Endpoints ¶
type Endpoints struct { DefineProfileEndpoint endpoint.Endpoint FetchProfileEndpoint endpoint.Endpoint GetAccountInfoEndpoint endpoint.Endpoint GetDeviceDetailsEndpoint endpoint.Endpoint }
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints
func (Endpoints) DefineProfile ¶
func (Endpoints) FetchProfile ¶
func (Endpoints) GetAccountInfo ¶
func (Endpoints) GetDeviceDetails ¶
type Service ¶
type Service interface { DefineProfile(ctx context.Context, p *dep.Profile) (*dep.ProfileResponse, error) GetAccountInfo(ctx context.Context) (*dep.Account, error) GetDeviceDetails(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error) FetchProfile(ctx context.Context, uuid string) (*dep.Profile, error) }
func NewHTTPClient ¶
func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error)
Click to show internal directories.
Click to hide internal directories.