mainflux

package module
v0.0.0-...-23b421b Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

Mainflux

build go report card coverage license chat

banner

Mainflux is modern, scalable, secure open source and patent-free IoT cloud platform written in Go.

It accepts user and thing connections over various network protocols (i.e. HTTP, MQTT, WebSocket, CoAP), thus making a seamless bridge between them. It is used as the IoT middleware for building complex IoT solutions.

For more details, check out the official documentation.

Mainflux is member of the Linux Foundation and an active contributor to the EdgeX Foundry project. It has been made with ❤ by Mainflux Labs company, which maintains the project and offers professional services around it.

Features

  • Multi-protocol connectivity and bridging (HTTP, MQTT, WebSocket and CoAP)
  • Device management and provisioning (Zero Touch provisioning)
  • Mutual TLS Authentication (mTLS) using X.509 Certificates
  • Fine-grained access control
  • Message persistence (Cassandra, InfluxDB, MongoDB and PostgresSQL)
  • Platform logging and instrumentation support (Grafana, Prometheus and OpenTracing)
  • Event sourcing
  • Container-based deployment using Docker and Kubernetes
  • LoRaWAN network integration
  • SDK
  • CLI
  • Small memory footprint and fast execution
  • Domain-driven design architecture, high-quality code and test coverage

Install

Before proceeding, install the following prerequisites:

Once everything is installed, execute the following commands from project root:

docker-compose -f docker/docker-compose.yml up -d

This will bring up all Mainflux dockers and inter-connect them in the composition.

Usage

Best way to quickstart using Mainflux is via CLI:

make cli
./build/mainflux-cli version

Mainflux CLI can also be downloaded as a tarball from offical release page

If this works, head to official documentation to understand Mainflux provisioning and messaging.

Documentation

Official documentation is hosted at Mainflux Read The Docs page.

Documentation is auto-generated from Markdown files in ./docs directory. If you spot an error or need for corrections, please let us know - or even better: send us a PR.

Additional practical information, news and tutorials can be found on the Mainflux blog.

Authors

Main architect and BDFL of Mainflux project is @drasko.

Additionally, @nmarcetic and @janko-isidorovic assured overall architecture and design, while @manuio and @darkodraskovic helped with crafting initial implementation and continiusly work on the project evolutions.

Besides them, Mainflux is constantly improved and actively developed by @anovakovic01, @dusanb94, @srados, @gsaleh, @blokovi, @chombium, @mteodor and a large set of contributors.

Maintainers are listed in MAINTAINERS file.

Mainflux team would like to give special thanks to @mijicd for his monumental work on designing and implementing highly improved and optimized version of the platform, and @malidukica for his effort on implementing initial user interface.

Contributing

Thank you for your interest in Mainflux and wish to contribute!

  1. Take a look at our open issues.
  2. Checkout the contribution guide to learn more about our style and conventions.
  3. Make your changes compatible to our workflow.
We're Hiring

If you are interested in working professionally on Mainflux, please head to company's careers page or shoot us an e-mail at careers@mainflux.com.

Note that the best way to grab our attention is by sending PRs 😎.

Community

License

Apache-2.0

Documentation

Overview

Package mainflux acts as an umbrella package containing multiple different microservices and defines all shared domain concepts.

Index

Constants

View Source
const (
	// SenMLJSON represents SenML in JSON format content type.
	SenMLJSON = "application/senml+json"

	// SenMLCBOR represents SenML in CBOR format content type.
	SenMLCBOR = "application/senml+cbor"
)
View Source
const OutputSenML = "out.senml"

OutputSenML represents subject SenML messages will be published to.

Variables

View Source
var (
	ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInternal   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage   = fmt.Errorf("proto: integer overflow")
)

Functions

func Env

func Env(key, fallback string) string

Env reads specified environment variable. If no value has been found, fallback is returned.

func RegisterThingsServiceServer

func RegisterThingsServiceServer(s *grpc.Server, srv ThingsServiceServer)

func RegisterUsersServiceServer

func RegisterUsersServiceServer(s *grpc.Server, srv UsersServiceServer)

func Version

func Version(service string) http.HandlerFunc

Version exposes an HTTP handler for retrieving service version.

Types

type AccessByIDReq

type AccessByIDReq struct {
	ThingID              string   `protobuf:"bytes,1,opt,name=thingID,proto3" json:"thingID,omitempty"`
	ChanID               string   `protobuf:"bytes,2,opt,name=chanID,proto3" json:"chanID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccessByIDReq) Descriptor

func (*AccessByIDReq) Descriptor() ([]byte, []int)

func (*AccessByIDReq) GetChanID

func (m *AccessByIDReq) GetChanID() string

func (*AccessByIDReq) GetThingID

func (m *AccessByIDReq) GetThingID() string

func (*AccessByIDReq) Marshal

func (m *AccessByIDReq) Marshal() (dAtA []byte, err error)

func (*AccessByIDReq) MarshalTo

func (m *AccessByIDReq) MarshalTo(dAtA []byte) (int, error)

func (*AccessByIDReq) ProtoMessage

func (*AccessByIDReq) ProtoMessage()

func (*AccessByIDReq) Reset

func (m *AccessByIDReq) Reset()

func (*AccessByIDReq) Size

func (m *AccessByIDReq) Size() (n int)

func (*AccessByIDReq) String

func (m *AccessByIDReq) String() string

func (*AccessByIDReq) Unmarshal

func (m *AccessByIDReq) Unmarshal(dAtA []byte) error

func (*AccessByIDReq) XXX_DiscardUnknown

func (m *AccessByIDReq) XXX_DiscardUnknown()

func (*AccessByIDReq) XXX_Marshal

func (m *AccessByIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessByIDReq) XXX_Merge

func (m *AccessByIDReq) XXX_Merge(src proto.Message)

func (*AccessByIDReq) XXX_Size

func (m *AccessByIDReq) XXX_Size() int

func (*AccessByIDReq) XXX_Unmarshal

func (m *AccessByIDReq) XXX_Unmarshal(b []byte) error

type AccessReq

type AccessReq struct {
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	ChanID               string   `protobuf:"bytes,2,opt,name=chanID,proto3" json:"chanID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccessReq) Descriptor

func (*AccessReq) Descriptor() ([]byte, []int)

func (*AccessReq) GetChanID

func (m *AccessReq) GetChanID() string

func (*AccessReq) GetToken

func (m *AccessReq) GetToken() string

func (*AccessReq) Marshal

func (m *AccessReq) Marshal() (dAtA []byte, err error)

func (*AccessReq) MarshalTo

func (m *AccessReq) MarshalTo(dAtA []byte) (int, error)

func (*AccessReq) ProtoMessage

func (*AccessReq) ProtoMessage()

func (*AccessReq) Reset

func (m *AccessReq) Reset()

func (*AccessReq) Size

func (m *AccessReq) Size() (n int)

func (*AccessReq) String

func (m *AccessReq) String() string

func (*AccessReq) Unmarshal

func (m *AccessReq) Unmarshal(dAtA []byte) error

func (*AccessReq) XXX_DiscardUnknown

func (m *AccessReq) XXX_DiscardUnknown()

func (*AccessReq) XXX_Marshal

func (m *AccessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessReq) XXX_Merge

func (m *AccessReq) XXX_Merge(src proto.Message)

func (*AccessReq) XXX_Size

func (m *AccessReq) XXX_Size() int

func (*AccessReq) XXX_Unmarshal

func (m *AccessReq) XXX_Unmarshal(b []byte) error

type Message

type Message struct {
	Channel   string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	Subtopic  string `protobuf:"bytes,2,opt,name=subtopic,proto3" json:"subtopic,omitempty"`
	Publisher string `protobuf:"bytes,3,opt,name=publisher,proto3" json:"publisher,omitempty"`
	Protocol  string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Name      string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Unit      string `protobuf:"bytes,6,opt,name=unit,proto3" json:"unit,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*Message_FloatValue
	//	*Message_StringValue
	//	*Message_BoolValue
	//	*Message_DataValue
	Value                isMessage_Value `protobuf_oneof:"value"`
	ValueSum             *SumValue       `protobuf:"bytes,11,opt,name=valueSum,proto3" json:"valueSum,omitempty"`
	Time                 float64         `protobuf:"fixed64,12,opt,name=time,proto3" json:"time,omitempty"`
	UpdateTime           float64         `protobuf:"fixed64,13,opt,name=updateTime,proto3" json:"updateTime,omitempty"`
	Link                 string          `protobuf:"bytes,14,opt,name=link,proto3" json:"link,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Message represents a resolved (normalized) raw message.

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) GetBoolValue

func (m *Message) GetBoolValue() bool

func (*Message) GetChannel

func (m *Message) GetChannel() string

func (*Message) GetDataValue

func (m *Message) GetDataValue() string

func (*Message) GetFloatValue

func (m *Message) GetFloatValue() float64
func (m *Message) GetLink() string

func (*Message) GetName

func (m *Message) GetName() string

func (*Message) GetProtocol

func (m *Message) GetProtocol() string

func (*Message) GetPublisher

func (m *Message) GetPublisher() string

func (*Message) GetStringValue

func (m *Message) GetStringValue() string

func (*Message) GetSubtopic

func (m *Message) GetSubtopic() string

func (*Message) GetTime

func (m *Message) GetTime() float64

func (*Message) GetUnit

func (m *Message) GetUnit() string

func (*Message) GetUpdateTime

func (m *Message) GetUpdateTime() float64

func (*Message) GetValue

func (m *Message) GetValue() isMessage_Value

func (*Message) GetValueSum

func (m *Message) GetValueSum() *SumValue

func (*Message) Marshal

func (m *Message) Marshal() (dAtA []byte, err error)

func (Message) MarshalJSON

func (m Message) MarshalJSON() ([]byte, error)

MarshalJSON method is used by `json` package to serialize Message.

func (*Message) MarshalTo

func (m *Message) MarshalTo(dAtA []byte) (int, error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) Size

func (m *Message) Size() (n int)

func (*Message) String

func (m *Message) String() string

func (*Message) Unmarshal

func (m *Message) Unmarshal(dAtA []byte) error

func (*Message) UnmarshalJSON

func (m *Message) UnmarshalJSON(data []byte) error

UnmarshalJSON method is used by `json` package to unmarshal data to Message.

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_OneofFuncs

func (*Message) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type MessagePublisher

type MessagePublisher interface {
	// Publishes message to the stream. A non-nil error is returned to indicate
	// operation failure.
	Publish(context.Context, string, RawMessage) error
}

MessagePublisher specifies a message publishing API.

type Message_BoolValue

type Message_BoolValue struct {
	BoolValue bool `protobuf:"varint,9,opt,name=boolValue,proto3,oneof"`
}

func (*Message_BoolValue) MarshalTo

func (m *Message_BoolValue) MarshalTo(dAtA []byte) (int, error)

func (*Message_BoolValue) Size

func (m *Message_BoolValue) Size() (n int)

type Message_DataValue

type Message_DataValue struct {
	DataValue string `protobuf:"bytes,10,opt,name=dataValue,proto3,oneof"`
}

func (*Message_DataValue) MarshalTo

func (m *Message_DataValue) MarshalTo(dAtA []byte) (int, error)

func (*Message_DataValue) Size

func (m *Message_DataValue) Size() (n int)

type Message_FloatValue

type Message_FloatValue struct {
	FloatValue float64 `protobuf:"fixed64,7,opt,name=floatValue,proto3,oneof"`
}

func (*Message_FloatValue) MarshalTo

func (m *Message_FloatValue) MarshalTo(dAtA []byte) (int, error)

func (*Message_FloatValue) Size

func (m *Message_FloatValue) Size() (n int)

type Message_StringValue

type Message_StringValue struct {
	StringValue string `protobuf:"bytes,8,opt,name=stringValue,proto3,oneof"`
}

func (*Message_StringValue) MarshalTo

func (m *Message_StringValue) MarshalTo(dAtA []byte) (int, error)

func (*Message_StringValue) Size

func (m *Message_StringValue) Size() (n int)

type RawMessage

type RawMessage struct {
	Channel              string   `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	Subtopic             string   `protobuf:"bytes,2,opt,name=subtopic,proto3" json:"subtopic,omitempty"`
	Publisher            string   `protobuf:"bytes,3,opt,name=publisher,proto3" json:"publisher,omitempty"`
	Protocol             string   `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
	ContentType          string   `protobuf:"bytes,5,opt,name=contentType,proto3" json:"contentType,omitempty"`
	Payload              []byte   `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RawMessage represents a message emitted by the Mainflux adapters layer.

func (*RawMessage) Descriptor

func (*RawMessage) Descriptor() ([]byte, []int)

func (*RawMessage) GetChannel

func (m *RawMessage) GetChannel() string

func (*RawMessage) GetContentType

func (m *RawMessage) GetContentType() string

func (*RawMessage) GetPayload

func (m *RawMessage) GetPayload() []byte

func (*RawMessage) GetProtocol

func (m *RawMessage) GetProtocol() string

func (*RawMessage) GetPublisher

func (m *RawMessage) GetPublisher() string

func (*RawMessage) GetSubtopic

func (m *RawMessage) GetSubtopic() string

func (*RawMessage) Marshal

func (m *RawMessage) Marshal() (dAtA []byte, err error)

func (*RawMessage) MarshalTo

func (m *RawMessage) MarshalTo(dAtA []byte) (int, error)

func (*RawMessage) ProtoMessage

func (*RawMessage) ProtoMessage()

func (*RawMessage) Reset

func (m *RawMessage) Reset()

func (*RawMessage) Size

func (m *RawMessage) Size() (n int)

func (*RawMessage) String

func (m *RawMessage) String() string

func (*RawMessage) Unmarshal

func (m *RawMessage) Unmarshal(dAtA []byte) error

func (*RawMessage) XXX_DiscardUnknown

func (m *RawMessage) XXX_DiscardUnknown()

func (*RawMessage) XXX_Marshal

func (m *RawMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RawMessage) XXX_Merge

func (m *RawMessage) XXX_Merge(src proto.Message)

func (*RawMessage) XXX_Size

func (m *RawMessage) XXX_Size() int

func (*RawMessage) XXX_Unmarshal

func (m *RawMessage) XXX_Unmarshal(b []byte) error

type Response

type Response interface {
	// Code returns HTTP response code.
	Code() int

	// Headers returns map of HTTP headers with their values.
	Headers() map[string]string

	// Empty indicates if HTTP response has content.
	Empty() bool
}

Response contains HTTP response specific methods.

type SumValue

type SumValue struct {
	Value                float64  `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SumValue is a simple wrapper around the double value.

func (*SumValue) Descriptor

func (*SumValue) Descriptor() ([]byte, []int)

func (*SumValue) GetValue

func (m *SumValue) GetValue() float64

func (*SumValue) Marshal

func (m *SumValue) Marshal() (dAtA []byte, err error)

func (*SumValue) MarshalTo

func (m *SumValue) MarshalTo(dAtA []byte) (int, error)

func (*SumValue) ProtoMessage

func (*SumValue) ProtoMessage()

func (*SumValue) Reset

func (m *SumValue) Reset()

func (*SumValue) Size

func (m *SumValue) Size() (n int)

func (*SumValue) String

func (m *SumValue) String() string

func (*SumValue) Unmarshal

func (m *SumValue) Unmarshal(dAtA []byte) error

func (*SumValue) XXX_DiscardUnknown

func (m *SumValue) XXX_DiscardUnknown()

func (*SumValue) XXX_Marshal

func (m *SumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SumValue) XXX_Merge

func (m *SumValue) XXX_Merge(src proto.Message)

func (*SumValue) XXX_Size

func (m *SumValue) XXX_Size() int

func (*SumValue) XXX_Unmarshal

func (m *SumValue) XXX_Unmarshal(b []byte) error

type ThingID

type ThingID struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ThingID) Descriptor

func (*ThingID) Descriptor() ([]byte, []int)

func (*ThingID) GetValue

func (m *ThingID) GetValue() string

func (*ThingID) Marshal

func (m *ThingID) Marshal() (dAtA []byte, err error)

func (*ThingID) MarshalTo

func (m *ThingID) MarshalTo(dAtA []byte) (int, error)

func (*ThingID) ProtoMessage

func (*ThingID) ProtoMessage()

func (*ThingID) Reset

func (m *ThingID) Reset()

func (*ThingID) Size

func (m *ThingID) Size() (n int)

func (*ThingID) String

func (m *ThingID) String() string

func (*ThingID) Unmarshal

func (m *ThingID) Unmarshal(dAtA []byte) error

func (*ThingID) XXX_DiscardUnknown

func (m *ThingID) XXX_DiscardUnknown()

func (*ThingID) XXX_Marshal

func (m *ThingID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ThingID) XXX_Merge

func (m *ThingID) XXX_Merge(src proto.Message)

func (*ThingID) XXX_Size

func (m *ThingID) XXX_Size() int

func (*ThingID) XXX_Unmarshal

func (m *ThingID) XXX_Unmarshal(b []byte) error

type ThingsServiceClient

type ThingsServiceClient interface {
	CanAccess(ctx context.Context, in *AccessReq, opts ...grpc.CallOption) (*ThingID, error)
	CanAccessByID(ctx context.Context, in *AccessByIDReq, opts ...grpc.CallOption) (*empty.Empty, error)
	Identify(ctx context.Context, in *Token, opts ...grpc.CallOption) (*ThingID, error)
}

ThingsServiceClient is the client API for ThingsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewThingsServiceClient

func NewThingsServiceClient(cc *grpc.ClientConn) ThingsServiceClient

type ThingsServiceServer

type ThingsServiceServer interface {
	CanAccess(context.Context, *AccessReq) (*ThingID, error)
	CanAccessByID(context.Context, *AccessByIDReq) (*empty.Empty, error)
	Identify(context.Context, *Token) (*ThingID, error)
}

ThingsServiceServer is the server API for ThingsService service.

type Token

type Token struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Token) Descriptor

func (*Token) Descriptor() ([]byte, []int)

func (*Token) GetValue

func (m *Token) GetValue() string

func (*Token) Marshal

func (m *Token) Marshal() (dAtA []byte, err error)

func (*Token) MarshalTo

func (m *Token) MarshalTo(dAtA []byte) (int, error)

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) Size

func (m *Token) Size() (n int)

func (*Token) String

func (m *Token) String() string

func (*Token) Unmarshal

func (m *Token) Unmarshal(dAtA []byte) error

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Token) XXX_Merge

func (m *Token) XXX_Merge(src proto.Message)

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

func (m *Token) XXX_Unmarshal(b []byte) error

type UserID

type UserID struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserID) Descriptor

func (*UserID) Descriptor() ([]byte, []int)

func (*UserID) GetValue

func (m *UserID) GetValue() string

func (*UserID) Marshal

func (m *UserID) Marshal() (dAtA []byte, err error)

func (*UserID) MarshalTo

func (m *UserID) MarshalTo(dAtA []byte) (int, error)

func (*UserID) ProtoMessage

func (*UserID) ProtoMessage()

func (*UserID) Reset

func (m *UserID) Reset()

func (*UserID) Size

func (m *UserID) Size() (n int)

func (*UserID) String

func (m *UserID) String() string

func (*UserID) Unmarshal

func (m *UserID) Unmarshal(dAtA []byte) error

func (*UserID) XXX_DiscardUnknown

func (m *UserID) XXX_DiscardUnknown()

func (*UserID) XXX_Marshal

func (m *UserID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserID) XXX_Merge

func (m *UserID) XXX_Merge(src proto.Message)

func (*UserID) XXX_Size

func (m *UserID) XXX_Size() int

func (*UserID) XXX_Unmarshal

func (m *UserID) XXX_Unmarshal(b []byte) error

type UsersServiceClient

type UsersServiceClient interface {
	Identify(ctx context.Context, in *Token, opts ...grpc.CallOption) (*UserID, error)
}

UsersServiceClient is the client API for UsersService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUsersServiceClient

func NewUsersServiceClient(cc *grpc.ClientConn) UsersServiceClient

type UsersServiceServer

type UsersServiceServer interface {
	Identify(context.Context, *Token) (*UserID, error)
}

UsersServiceServer is the server API for UsersService service.

type VersionInfo

type VersionInfo struct {
	// Service contains service name.
	Service string `json:"service"`

	// Version contains service current version value.
	Version string `json:"version"`
}

VersionInfo contains version endpoint response.

Directories

Path Synopsis
Package bootstrap contains the domain concept definitions needed to support Mainflux bootstrap service functionality.
Package bootstrap contains the domain concept definitions needed to support Mainflux bootstrap service functionality.
api
Package api contains implementation of bootstrap service HTTP API.
Package api contains implementation of bootstrap service HTTP API.
postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Package postgres contains repository implementations using PostgreSQL as the underlying database.
redis/consumer
Package consumer contains events consumer for events published by Things service.
Package consumer contains events consumer for events published by Things service.
redis/producer
Package producer contains the domain events needed to support event sourcing of Bootstrap service actions.
Package producer contains the domain events needed to support event sourcing of Bootstrap service actions.
cmd
cli
ws
Package coap contains the domain concept definitions needed to support Mainflux coap adapter service functionality.
Package coap contains the domain concept definitions needed to support Mainflux coap adapter service functionality.
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
nats
Package nats contains NATS message publisher implementation.
Package nats contains NATS message publisher implementation.
Package http contains the domain concept definitions needed to support Mainflux http adapter service functionality.
Package http contains the domain concept definitions needed to support Mainflux http adapter service functionality.
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
nats
Package nats contains NATS message publisher implementation.
Package nats contains NATS message publisher implementation.
Package logger contains logger API definition, wrapper that can be used around any other logger.
Package logger contains logger API definition, wrapper that can be used around any other logger.
api
nats
Package nats contains NATS message publisher implementation.
Package nats contains NATS message publisher implementation.
Package normalizer contains the domain concept definitions needed to support Mainflux normalizer service functionality.
Package normalizer contains the domain concept definitions needed to support Mainflux normalizer service functionality.
api
api
cassandra
Package cassandra contains Cassandra specific reader implementation.
Package cassandra contains Cassandra specific reader implementation.
influxdb
Package influxdb contains the domain concept definitions needed to support Mainflux InfluxDB reader service functionality.
Package influxdb contains the domain concept definitions needed to support Mainflux InfluxDB reader service functionality.
mongodb
Package mongodb contains the domain concept definitions needed to support Mainflux MondoDB reader service functionality.
Package mongodb contains the domain concept definitions needed to support Mainflux MondoDB reader service functionality.
postgres
Package postgres contains repository implementations using Postgres as the underlying database.
Package postgres contains repository implementations using Postgres as the underlying database.
sdk
go
Package things contains the domain concept definitions needed to support Mainflux things service functionality.
Package things contains the domain concept definitions needed to support Mainflux things service functionality.
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
api/auth/grpc
Package grpc contains implementation of things service gRPC API.
Package grpc contains implementation of things service gRPC API.
api/auth/http
Package http contains implementation of things auth service HTTP API.
Package http contains implementation of things auth service HTTP API.
api/things/http
Package http contains implementation of things service HTTP API.
Package http contains implementation of things service HTTP API.
postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Package postgres contains repository implementations using PostgreSQL as the underlying database.
redis
Package redis contains cache implementations using Redis as the underlying database.
Package redis contains cache implementations using Redis as the underlying database.
tracing
Package tracing contains middlewares that will add spans to existing traces.
Package tracing contains middlewares that will add spans to existing traces.
users
Package users contains implementation for users service in single user scenario.
Package users contains implementation for users service in single user scenario.
uuid
Package uuid provides a UUID identity provider.
Package uuid provides a UUID identity provider.
tools
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
api/grpc
Package grpc contains implementation of users service gRPC API.
Package grpc contains implementation of users service gRPC API.
api/http
Package http contains implementation of users service HTTP API.
Package http contains implementation of users service HTTP API.
bcrypt
Package bcrypt provides a hasher implementation utilising bcrypt.
Package bcrypt provides a hasher implementation utilising bcrypt.
jwt
Package jwt provides a JWT identity provider.
Package jwt provides a JWT identity provider.
postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Package postgres contains repository implementations using PostgreSQL as the underlying database.
tracing
Package tracing contains middlewares that will add spans to existing traces.
Package tracing contains middlewares that will add spans to existing traces.
Package writers contain the domain concept definitions needed to support Mainflux writer services functionality.
Package writers contain the domain concept definitions needed to support Mainflux writer services functionality.
api
cassandra
Package cassandra contains the domain concept definitions needed to support Mainflux Cassandra writer service.
Package cassandra contains the domain concept definitions needed to support Mainflux Cassandra writer service.
influxdb
Package influxdb contains the domain concept definitions needed to support Mainflux InfluxDB writer service functionality.
Package influxdb contains the domain concept definitions needed to support Mainflux InfluxDB writer service functionality.
mongodb
Package mongodb contains the domain concept definitions needed to support Mainflux MondoDB writer service functionality.
Package mongodb contains the domain concept definitions needed to support Mainflux MondoDB writer service functionality.
postgres
Package postgres contains repository implementations using Postgres as the underlying database.
Package postgres contains repository implementations using Postgres as the underlying database.
ws
Package ws contains the domain concept definitions needed to support Mainflux ws adapter service functionality.
Package ws contains the domain concept definitions needed to support Mainflux ws adapter service functionality.
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
nats
Package nats contains NATS message publisher implementation.
Package nats contains NATS message publisher implementation.

Jump to

Keyboard shortcuts

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