dep

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 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 DEPClient added in v1.5.0

type DEPClient interface {
	DefineProfile(*dep.Profile) (*dep.ProfileResponse, error)
	AssignProfile(string, ...string) (*dep.ProfileResponse, error)
	FetchProfile(string) (*dep.Profile, error)
	Account() (*dep.Account, error)
	DeviceDetails(...string) (*dep.DeviceDetailsResponse, error)
}

type DEPService

type DEPService struct {
	// contains filtered or unexported fields
}

func New

func New(client DEPClient, 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)

Directories

Path Synopsis
internal/depsyncproto
Package depsyncproto is a generated protocol buffer package.
Package depsyncproto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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