dep

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDefineProfileEndpoint

func MakeDefineProfileEndpoint(svc Service) endpoint.Endpoint

func MakeFetchProfileEndpoint

func MakeFetchProfileEndpoint(svc Service) endpoint.Endpoint

func MakeGetAccountInfoEndpoint

func MakeGetAccountInfoEndpoint(svc Service) endpoint.Endpoint

func MakeGetDeviceDetailsEndpoint

func MakeGetDeviceDetailsEndpoint(svc Service) endpoint.Endpoint

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 (svc *DEPService) FetchProfile(ctx context.Context, uuid string) (*dep.Profile, error)

func (*DEPService) GetAccountInfo

func (svc *DEPService) GetAccountInfo(ctx context.Context) (*dep.Account, error)

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 (e Endpoints) DefineProfile(ctx context.Context, p *dep.Profile) (*dep.ProfileResponse, error)

func (Endpoints) FetchProfile

func (e Endpoints) FetchProfile(ctx context.Context, uuid string) (*dep.Profile, error)

func (Endpoints) GetAccountInfo

func (e Endpoints) GetAccountInfo(ctx context.Context) (*dep.Account, error)

func (Endpoints) GetDeviceDetails

func (e Endpoints) GetDeviceDetails(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL