Versions in this module Expand all Collapse all v0 v0.0.2 Mar 14, 2020 Changes in this version + func MakeGetBoxesHTTPHandler(ep endpoint.Endpoint, logger log.Logger, options ...kitHTTP.ServerOption) *kitHTTP.Server + func MakeMakeBoxHTTPHandler(ep endpoint.Endpoint, logger log.Logger, options ...kitHTTP.ServerOption) *kitHTTP.Server + func MakeStatusHTTPHandler(ep endpoint.Endpoint, logger log.Logger, options ...kitHTTP.ServerOption) *kitHTTP.Server + func NewClient(conn *grpc.ClientConn, logger log.Logger, options ...kitGRPC.ClientOption) *grpcClient + func NewPBFromBoolValue(msg *BoolValue) *pb.BoolValue + func NewPBFromBoxSpecification(msg *BoxSpecification) *pb.BoxSpecification + func NewPBFromBoxes(msg *Boxes) *pb.Boxes + func NewPBFromEmpty(msg *Empty) *pb.Empty + func NewPBFromStatusMessage(msg *StatusMessage) *pb.StatusMessage + func NewPBFromStringValue(msg *StringValue) *pb.StringValue + func RegisterHandlers(router *mux.Router, endpoints Endpoints, logger log.Logger, ...) + type BoolValue struct + Value bool + func NewBoolValueFromPB(msg *pb.BoolValue) *BoolValue + type BoxSpecification struct + Depth int32 + Height int32 + Name string + Width int32 + func NewBoxSpecificationFromPB(msg *pb.BoxSpecification) *BoxSpecification + type Boxes struct + Boxes []BoxSpecification + func NewBoxesFromPB(msg *pb.Boxes) *Boxes + type Empty struct + Page int32 + PerPage int32 + func NewEmptyFromPB(msg *pb.Empty) *Empty + type Endpoints struct + GetBoxesEndpoint endpoint.Endpoint + MakeBoxEndpoint endpoint.Endpoint + StatusEndpoint endpoint.Endpoint + func MakeEndpoints(svc Service, mwares []endpoint.Middleware) Endpoints + type GRPCServer struct + GetBoxesGRPCHandler kitGRPC.Handler + MakeBoxGRPCHandler kitGRPC.Handler + StatusGRPCHandler kitGRPC.Handler + func NewGRPCServer(endpoints Endpoints, logger log.Logger, options ...kitGRPC.ServerOption) (*GRPCServer, error) + func (s *GRPCServer) GetBoxes(ctx context.Context, req *pb.Empty) (*pb.Boxes, error) + func (s *GRPCServer) MakeBox(ctx context.Context, req *pb.BoxSpecification) (*pb.Empty, error) + func (s *GRPCServer) Status(ctx context.Context, req *pb.Empty) (*pb.StatusMessage, error) + type Repository interface + GetBoxes func(ctx context.Context, page int32, perPage int32) ([]BoxSpecification, error) + MakeBox func(ctx context.Context, name string, height int32, width int32, depth int32) (int32, int32, error) + Status func(ctx context.Context, page int32, perPage int32) (string, bool, error) + func NewRepository(logger log.Logger, db interface{}) Repository + type Service interface + GetBoxes func(ctx context.Context, page int32, perPage int32) ([]BoxSpecification, error) + Log func() log.Logger + MakeBox func(ctx context.Context, name string, height int32, width int32, depth int32) (int32, int32, error) + Status func(ctx context.Context, page int32, perPage int32) (string, bool, error) + func NewHTTPClient(serverAddr string, logger log.Logger, options ...kitHTTP.ClientOption) (Service, error) + func NewService(log log.Logger, repo Repository) Service + type StatusMessage struct + Ok bool + ServiceName string + func NewStatusMessageFromPB(msg *pb.StatusMessage) *StatusMessage + type StringValue struct + Timestamp timestamp.Timestamp + Value string + func NewStringValueFromPB(msg *pb.StringValue) *StringValue