mainflux

package module
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 170

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 (sensor, actuator, application) 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, 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 (policies, ABAC/RBAC)
  • 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
  • OPC UA integration
  • Edge Agent and Export services for remote IoT gateway management and edge computing
  • SDK
  • CLI
  • Small memory footprint and fast execution
  • Domain-driven design architecture, high-quality code and test coverage

Prerequisites

The following are needed to run Mainflux:

Developing Mainflux will also require:

Install

Once the prerequisites are installed, execute the following commands from the project's root:

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

This will bring up the Mainflux docker services and interconnect them. This command can also be executed using the project's included Makefile:

make run

If you want to run services from specific release checkout code from github and make sure that MF_RELEASE_TAG in .env is being set to match the release version

git checkout tags/<release_number> -b <release_number>
# e.g. `git checkout tags/0.12.0 -b 0.12.0`

Check that .env file contains:

MF_RELEASE_TAG=<release_number>

docker-compose should be used for development and testing deployments. For production we suggest using Kubernetes.

Usage

The quickest way to start using Mainflux is via the CLI. The latest version can be downloaded from the official releases page.

It can also be built and used from the project's root directory:

make cli
./build/mainflux-cli version

Additional details on using the CLI can be found in the CLI documentation.

Documentation

Official documentation is hosted at Mainflux Read The Docs page. Documentation is auto-generated, checkout the instructions on official docs repository:

If you spot an error or a 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 continuously worked 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.

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

Contributing

Thank you for your interest in Mainflux and the desire to contribute!

  1. Take a look at our open issues. The good-first-issue label is specifically for issues that are great for getting started.
  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.

The best way to grab our attention is by sending PRs 😎.

Community

License

Apache-2.0

FOSSA Status

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAuth        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuth          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group")
)

Functions

func Env

func Env(key, fallback string) string

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

func LoadEnvFile added in v0.12.0

func LoadEnvFile(envfilepath string) error

LoadEnvFile loads environment variables defined in an .env formatted file.

func RegisterAuthServiceServer added in v0.12.0

func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)

func RegisterThingsServiceServer

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

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) MarshalToSizedBuffer

func (m *AccessByIDReq) MarshalToSizedBuffer(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 AccessByKeyReq

type AccessByKeyReq 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 (*AccessByKeyReq) Descriptor

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

func (*AccessByKeyReq) GetChanID

func (m *AccessByKeyReq) GetChanID() string

func (*AccessByKeyReq) GetToken

func (m *AccessByKeyReq) GetToken() string

func (*AccessByKeyReq) Marshal

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

func (*AccessByKeyReq) MarshalTo

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

func (*AccessByKeyReq) MarshalToSizedBuffer

func (m *AccessByKeyReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessByKeyReq) ProtoMessage

func (*AccessByKeyReq) ProtoMessage()

func (*AccessByKeyReq) Reset

func (m *AccessByKeyReq) Reset()

func (*AccessByKeyReq) Size

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

func (*AccessByKeyReq) String

func (m *AccessByKeyReq) String() string

func (*AccessByKeyReq) Unmarshal

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

func (*AccessByKeyReq) XXX_DiscardUnknown

func (m *AccessByKeyReq) XXX_DiscardUnknown()

func (*AccessByKeyReq) XXX_Marshal

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

func (*AccessByKeyReq) XXX_Merge

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

func (*AccessByKeyReq) XXX_Size

func (m *AccessByKeyReq) XXX_Size() int

func (*AccessByKeyReq) XXX_Unmarshal

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

type Assignment added in v0.12.0

type Assignment struct {
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	GroupID              string   `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID,omitempty"`
	MemberID             string   `protobuf:"bytes,3,opt,name=memberID,proto3" json:"memberID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Assignment) Descriptor added in v0.12.0

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

func (*Assignment) GetGroupID added in v0.12.0

func (m *Assignment) GetGroupID() string

func (*Assignment) GetMemberID added in v0.12.0

func (m *Assignment) GetMemberID() string

func (*Assignment) GetToken added in v0.12.0

func (m *Assignment) GetToken() string

func (*Assignment) Marshal added in v0.12.0

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

func (*Assignment) MarshalTo added in v0.12.0

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

func (*Assignment) MarshalToSizedBuffer added in v0.12.0

func (m *Assignment) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Assignment) ProtoMessage added in v0.12.0

func (*Assignment) ProtoMessage()

func (*Assignment) Reset added in v0.12.0

func (m *Assignment) Reset()

func (*Assignment) Size added in v0.12.0

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

func (*Assignment) String added in v0.12.0

func (m *Assignment) String() string

func (*Assignment) Unmarshal added in v0.12.0

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

func (*Assignment) XXX_DiscardUnknown added in v0.12.0

func (m *Assignment) XXX_DiscardUnknown()

func (*Assignment) XXX_Marshal added in v0.12.0

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

func (*Assignment) XXX_Merge added in v0.12.0

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

func (*Assignment) XXX_Size added in v0.12.0

func (m *Assignment) XXX_Size() int

func (*Assignment) XXX_Unmarshal added in v0.12.0

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

type AuthServiceClient added in v0.12.0

type AuthServiceClient interface {
	Issue(ctx context.Context, in *IssueReq, opts ...grpc.CallOption) (*Token, error)
	Identify(ctx context.Context, in *Token, opts ...grpc.CallOption) (*UserIdentity, error)
	Authorize(ctx context.Context, in *AuthorizeReq, opts ...grpc.CallOption) (*AuthorizeRes, error)
	Assign(ctx context.Context, in *Assignment, opts ...grpc.CallOption) (*empty.Empty, error)
	Members(ctx context.Context, in *MembersReq, opts ...grpc.CallOption) (*MembersRes, error)
}

AuthServiceClient is the client API for AuthService service.

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

func NewAuthServiceClient added in v0.12.0

func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient

type AuthServiceServer added in v0.12.0

type AuthServiceServer interface {
	Issue(context.Context, *IssueReq) (*Token, error)
	Identify(context.Context, *Token) (*UserIdentity, error)
	Authorize(context.Context, *AuthorizeReq) (*AuthorizeRes, error)
	Assign(context.Context, *Assignment) (*empty.Empty, error)
	Members(context.Context, *MembersReq) (*MembersRes, error)
}

AuthServiceServer is the server API for AuthService service.

type AuthorizeReq added in v0.12.0

type AuthorizeReq struct {
	Sub                  string   `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"`
	Obj                  string   `protobuf:"bytes,2,opt,name=obj,proto3" json:"obj,omitempty"`
	Act                  string   `protobuf:"bytes,3,opt,name=act,proto3" json:"act,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthorizeReq) Descriptor added in v0.12.0

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

func (*AuthorizeReq) GetAct added in v0.12.0

func (m *AuthorizeReq) GetAct() string

func (*AuthorizeReq) GetObj added in v0.12.0

func (m *AuthorizeReq) GetObj() string

func (*AuthorizeReq) GetSub added in v0.12.0

func (m *AuthorizeReq) GetSub() string

func (*AuthorizeReq) Marshal added in v0.12.0

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

func (*AuthorizeReq) MarshalTo added in v0.12.0

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

func (*AuthorizeReq) MarshalToSizedBuffer added in v0.12.0

func (m *AuthorizeReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AuthorizeReq) ProtoMessage added in v0.12.0

func (*AuthorizeReq) ProtoMessage()

func (*AuthorizeReq) Reset added in v0.12.0

func (m *AuthorizeReq) Reset()

func (*AuthorizeReq) Size added in v0.12.0

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

func (*AuthorizeReq) String added in v0.12.0

func (m *AuthorizeReq) String() string

func (*AuthorizeReq) Unmarshal added in v0.12.0

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

func (*AuthorizeReq) XXX_DiscardUnknown added in v0.12.0

func (m *AuthorizeReq) XXX_DiscardUnknown()

func (*AuthorizeReq) XXX_Marshal added in v0.12.0

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

func (*AuthorizeReq) XXX_Merge added in v0.12.0

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

func (*AuthorizeReq) XXX_Size added in v0.12.0

func (m *AuthorizeReq) XXX_Size() int

func (*AuthorizeReq) XXX_Unmarshal added in v0.12.0

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

type AuthorizeRes added in v0.12.0

type AuthorizeRes struct {
	Authorized           bool     `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthorizeRes) Descriptor added in v0.12.0

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

func (*AuthorizeRes) GetAuthorized added in v0.12.0

func (m *AuthorizeRes) GetAuthorized() bool

func (*AuthorizeRes) Marshal added in v0.12.0

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

func (*AuthorizeRes) MarshalTo added in v0.12.0

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

func (*AuthorizeRes) MarshalToSizedBuffer added in v0.12.0

func (m *AuthorizeRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AuthorizeRes) ProtoMessage added in v0.12.0

func (*AuthorizeRes) ProtoMessage()

func (*AuthorizeRes) Reset added in v0.12.0

func (m *AuthorizeRes) Reset()

func (*AuthorizeRes) Size added in v0.12.0

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

func (*AuthorizeRes) String added in v0.12.0

func (m *AuthorizeRes) String() string

func (*AuthorizeRes) Unmarshal added in v0.12.0

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

func (*AuthorizeRes) XXX_DiscardUnknown added in v0.12.0

func (m *AuthorizeRes) XXX_DiscardUnknown()

func (*AuthorizeRes) XXX_Marshal added in v0.12.0

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

func (*AuthorizeRes) XXX_Merge added in v0.12.0

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

func (*AuthorizeRes) XXX_Size added in v0.12.0

func (m *AuthorizeRes) XXX_Size() int

func (*AuthorizeRes) XXX_Unmarshal added in v0.12.0

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

type ChannelID added in v0.12.0

type ChannelID 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 (*ChannelID) Descriptor added in v0.12.0

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

func (*ChannelID) GetValue added in v0.12.0

func (m *ChannelID) GetValue() string

func (*ChannelID) Marshal added in v0.12.0

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

func (*ChannelID) MarshalTo added in v0.12.0

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

func (*ChannelID) MarshalToSizedBuffer added in v0.12.0

func (m *ChannelID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChannelID) ProtoMessage added in v0.12.0

func (*ChannelID) ProtoMessage()

func (*ChannelID) Reset added in v0.12.0

func (m *ChannelID) Reset()

func (*ChannelID) Size added in v0.12.0

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

func (*ChannelID) String added in v0.12.0

func (m *ChannelID) String() string

func (*ChannelID) Unmarshal added in v0.12.0

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

func (*ChannelID) XXX_DiscardUnknown added in v0.12.0

func (m *ChannelID) XXX_DiscardUnknown()

func (*ChannelID) XXX_Marshal added in v0.12.0

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

func (*ChannelID) XXX_Merge added in v0.12.0

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

func (*ChannelID) XXX_Size added in v0.12.0

func (m *ChannelID) XXX_Size() int

func (*ChannelID) XXX_Unmarshal added in v0.12.0

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

type ChannelOwnerReq added in v0.12.0

type ChannelOwnerReq struct {
	Owner                string   `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,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 (*ChannelOwnerReq) Descriptor added in v0.12.0

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

func (*ChannelOwnerReq) GetChanID added in v0.12.0

func (m *ChannelOwnerReq) GetChanID() string

func (*ChannelOwnerReq) GetOwner added in v0.12.0

func (m *ChannelOwnerReq) GetOwner() string

func (*ChannelOwnerReq) Marshal added in v0.12.0

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

func (*ChannelOwnerReq) MarshalTo added in v0.12.0

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

func (*ChannelOwnerReq) MarshalToSizedBuffer added in v0.12.0

func (m *ChannelOwnerReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChannelOwnerReq) ProtoMessage added in v0.12.0

func (*ChannelOwnerReq) ProtoMessage()

func (*ChannelOwnerReq) Reset added in v0.12.0

func (m *ChannelOwnerReq) Reset()

func (*ChannelOwnerReq) Size added in v0.12.0

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

func (*ChannelOwnerReq) String added in v0.12.0

func (m *ChannelOwnerReq) String() string

func (*ChannelOwnerReq) Unmarshal added in v0.12.0

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

func (*ChannelOwnerReq) XXX_DiscardUnknown added in v0.12.0

func (m *ChannelOwnerReq) XXX_DiscardUnknown()

func (*ChannelOwnerReq) XXX_Marshal added in v0.12.0

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

func (*ChannelOwnerReq) XXX_Merge added in v0.12.0

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

func (*ChannelOwnerReq) XXX_Size added in v0.12.0

func (m *ChannelOwnerReq) XXX_Size() int

func (*ChannelOwnerReq) XXX_Unmarshal added in v0.12.0

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

type IDProvider added in v0.12.0

type IDProvider interface {
	// ID generates the unique identifier.
	ID() (string, error)
}

IDProvider specifies an API for generating unique identifiers.

type IssueReq

type IssueReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email                string   `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Type                 uint32   `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*IssueReq) Descriptor

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

func (*IssueReq) GetEmail added in v0.12.0

func (m *IssueReq) GetEmail() string

func (*IssueReq) GetId added in v0.12.0

func (m *IssueReq) GetId() string

func (*IssueReq) GetType

func (m *IssueReq) GetType() uint32

func (*IssueReq) Marshal

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

func (*IssueReq) MarshalTo

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

func (*IssueReq) MarshalToSizedBuffer

func (m *IssueReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IssueReq) ProtoMessage

func (*IssueReq) ProtoMessage()

func (*IssueReq) Reset

func (m *IssueReq) Reset()

func (*IssueReq) Size

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

func (*IssueReq) String

func (m *IssueReq) String() string

func (*IssueReq) Unmarshal

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

func (*IssueReq) XXX_DiscardUnknown

func (m *IssueReq) XXX_DiscardUnknown()

func (*IssueReq) XXX_Marshal

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

func (*IssueReq) XXX_Merge

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

func (*IssueReq) XXX_Size

func (m *IssueReq) XXX_Size() int

func (*IssueReq) XXX_Unmarshal

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

type MembersReq added in v0.12.0

type MembersReq struct {
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	GroupID              string   `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID,omitempty"`
	Offset               uint64   `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit                uint64   `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	Type                 string   `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MembersReq) Descriptor added in v0.12.0

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

func (*MembersReq) GetGroupID added in v0.12.0

func (m *MembersReq) GetGroupID() string

func (*MembersReq) GetLimit added in v0.12.0

func (m *MembersReq) GetLimit() uint64

func (*MembersReq) GetOffset added in v0.12.0

func (m *MembersReq) GetOffset() uint64

func (*MembersReq) GetToken added in v0.12.0

func (m *MembersReq) GetToken() string

func (*MembersReq) GetType added in v0.12.0

func (m *MembersReq) GetType() string

func (*MembersReq) Marshal added in v0.12.0

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

func (*MembersReq) MarshalTo added in v0.12.0

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

func (*MembersReq) MarshalToSizedBuffer added in v0.12.0

func (m *MembersReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MembersReq) ProtoMessage added in v0.12.0

func (*MembersReq) ProtoMessage()

func (*MembersReq) Reset added in v0.12.0

func (m *MembersReq) Reset()

func (*MembersReq) Size added in v0.12.0

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

func (*MembersReq) String added in v0.12.0

func (m *MembersReq) String() string

func (*MembersReq) Unmarshal added in v0.12.0

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

func (*MembersReq) XXX_DiscardUnknown added in v0.12.0

func (m *MembersReq) XXX_DiscardUnknown()

func (*MembersReq) XXX_Marshal added in v0.12.0

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

func (*MembersReq) XXX_Merge added in v0.12.0

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

func (*MembersReq) XXX_Size added in v0.12.0

func (m *MembersReq) XXX_Size() int

func (*MembersReq) XXX_Unmarshal added in v0.12.0

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

type MembersRes added in v0.12.0

type MembersRes struct {
	Total                uint64   `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Offset               uint64   `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit                uint64   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Type                 string   `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	Members              []string `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MembersRes) Descriptor added in v0.12.0

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

func (*MembersRes) GetLimit added in v0.12.0

func (m *MembersRes) GetLimit() uint64

func (*MembersRes) GetMembers added in v0.12.0

func (m *MembersRes) GetMembers() []string

func (*MembersRes) GetOffset added in v0.12.0

func (m *MembersRes) GetOffset() uint64

func (*MembersRes) GetTotal added in v0.12.0

func (m *MembersRes) GetTotal() uint64

func (*MembersRes) GetType added in v0.12.0

func (m *MembersRes) GetType() string

func (*MembersRes) Marshal added in v0.12.0

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

func (*MembersRes) MarshalTo added in v0.12.0

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

func (*MembersRes) MarshalToSizedBuffer added in v0.12.0

func (m *MembersRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MembersRes) ProtoMessage added in v0.12.0

func (*MembersRes) ProtoMessage()

func (*MembersRes) Reset added in v0.12.0

func (m *MembersRes) Reset()

func (*MembersRes) Size added in v0.12.0

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

func (*MembersRes) String added in v0.12.0

func (m *MembersRes) String() string

func (*MembersRes) Unmarshal added in v0.12.0

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

func (*MembersRes) XXX_DiscardUnknown added in v0.12.0

func (m *MembersRes) XXX_DiscardUnknown()

func (*MembersRes) XXX_Marshal added in v0.12.0

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

func (*MembersRes) XXX_Merge added in v0.12.0

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

func (*MembersRes) XXX_Size added in v0.12.0

func (m *MembersRes) XXX_Size() int

func (*MembersRes) XXX_Unmarshal added in v0.12.0

func (m *MembersRes) 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 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) MarshalToSizedBuffer

func (m *ThingID) MarshalToSizedBuffer(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 {
	CanAccessByKey(ctx context.Context, in *AccessByKeyReq, opts ...grpc.CallOption) (*ThingID, error)
	IsChannelOwner(ctx context.Context, in *ChannelOwnerReq, opts ...grpc.CallOption) (*empty.Empty, 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 {
	CanAccessByKey(context.Context, *AccessByKeyReq) (*ThingID, error)
	IsChannelOwner(context.Context, *ChannelOwnerReq) (*empty.Empty, 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:"-"`
}

If a token is not carrying any information itself, the type field can be used to determine how to validate the token. Also, different tokens can be encoded in different ways.

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) MarshalToSizedBuffer

func (m *Token) MarshalToSizedBuffer(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 UnimplementedAuthServiceServer added in v0.12.0

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServiceServer) Assign added in v0.12.0

func (*UnimplementedAuthServiceServer) Authorize added in v0.12.0

func (*UnimplementedAuthServiceServer) Identify added in v0.12.0

func (*UnimplementedAuthServiceServer) Issue added in v0.12.0

func (*UnimplementedAuthServiceServer) Members added in v0.12.0

type UnimplementedThingsServiceServer

type UnimplementedThingsServiceServer struct {
}

UnimplementedThingsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedThingsServiceServer) CanAccessByID

func (*UnimplementedThingsServiceServer) CanAccessByKey

func (*UnimplementedThingsServiceServer) Identify

func (*UnimplementedThingsServiceServer) IsChannelOwner added in v0.12.0

type UserIdentity added in v0.12.0

type UserIdentity struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email                string   `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserIdentity) Descriptor added in v0.12.0

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

func (*UserIdentity) GetEmail added in v0.12.0

func (m *UserIdentity) GetEmail() string

func (*UserIdentity) GetId added in v0.12.0

func (m *UserIdentity) GetId() string

func (*UserIdentity) Marshal added in v0.12.0

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

func (*UserIdentity) MarshalTo added in v0.12.0

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

func (*UserIdentity) MarshalToSizedBuffer added in v0.12.0

func (m *UserIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserIdentity) ProtoMessage added in v0.12.0

func (*UserIdentity) ProtoMessage()

func (*UserIdentity) Reset added in v0.12.0

func (m *UserIdentity) Reset()

func (*UserIdentity) Size added in v0.12.0

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

func (*UserIdentity) String added in v0.12.0

func (m *UserIdentity) String() string

func (*UserIdentity) Unmarshal added in v0.12.0

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

func (*UserIdentity) XXX_DiscardUnknown added in v0.12.0

func (m *UserIdentity) XXX_DiscardUnknown()

func (*UserIdentity) XXX_Marshal added in v0.12.0

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

func (*UserIdentity) XXX_Merge added in v0.12.0

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

func (*UserIdentity) XXX_Size added in v0.12.0

func (m *UserIdentity) XXX_Size() int

func (*UserIdentity) XXX_Unmarshal added in v0.12.0

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

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
api
Package api contains implementation of Auth service HTTP API.
Package api contains implementation of Auth service HTTP API.
api/grpc
Package grpc contains implementation of Auth service gRPC API.
Package grpc contains implementation of Auth service gRPC API.
jwt
postgres
Package postgres contains Key repository implementations using PostgreSQL as the underlying database.
Package postgres contains Key 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 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.
Package certs contains the domain concept definitions needed to support Mainflux certs service functionality.
Package certs contains the domain concept definitions needed to support Mainflux certs service functionality.
api
Package api contains implementation of certs service HTTP API.
Package api contains implementation of certs service HTTP API.
pki
Package pki wraps vault client
Package pki wraps vault client
postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Package postgres contains repository implementations using PostgreSQL as the underlying database.
cmd
certs
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: Apache-2.0
cli
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.
Package consumers contain the domain concept definitions needed to support Mainflux consumer services functionality.
Package consumers contain the domain concept definitions needed to support Mainflux consumer services functionality.
notifiers
Package notifiers contain the domain concept definitions needed to support Mainflux notifications functionality.
Package notifiers contain the domain concept definitions needed to support Mainflux notifications functionality.
notifiers/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.
notifiers/postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Package postgres contains repository implementations using PostgreSQL as the underlying database.
notifiers/smtp
Package smtp contains the domain concept definitions needed to support Mainflux SMTP notifications.
Package smtp contains the domain concept definitions needed to support Mainflux SMTP notifications.
notifiers/tracing
Package tracing contains middlewares that will add spans to existing traces.
Package tracing contains middlewares that will add spans to existing traces.
writers
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.
writers/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.
writers/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.
writers/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.
writers/postgres
Package postgres contains repository implementations using Postgres as the underlying database.
Package postgres contains repository implementations using Postgres as the underlying database.
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.
internal
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
redis
Package redis contains cache implementations using Redis as the underlying database.
Package redis contains cache implementations using Redis as the underlying database.
api
db
pkg
Package pkg contains library packages used by Mainflux services and external services that integrate with Mainflux.
Package pkg contains library packages used by Mainflux services and external services that integrate with Mainflux.
messaging/nats
Package nats hold the implementation of the Publisher and PubSub interfaces for the NATS messaging system, the internal messaging broker of the Mainflux IoT platform.
Package nats hold the implementation of the Publisher and PubSub interfaces for the NATS messaging system, the internal messaging broker of the Mainflux IoT platform.
transformers
Package transformers contains the domain concept definitions needed to support Mainflux transformer services functionality.
Package transformers contains the domain concept definitions needed to support Mainflux transformer services functionality.
ulid
Package ulid provides a ULID identity provider.
Package ulid provides a ULID identity provider.
uuid
Package uuid provides a UUID identity provider.
Package uuid provides a UUID identity provider.
Package provision contains domain concept definitions needed to support Provision service feature, i.e.
Package provision contains domain concept definitions needed to support Provision service feature, i.e.
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.
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.
tools
Package twins contains the domain concept definitions needed to support Mainflux twins service functionality.
Package twins contains the domain concept definitions needed to support Mainflux twins 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/http
Package http contains implementation of kit service HTTP API.
Package http contains implementation of kit service HTTP API.
mongodb
Package mongodb contains repository implementations using MongoDB as the underlying database.
Package mongodb contains repository implementations using MongoDB 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.
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.
bcrypt
Package bcrypt provides a hasher implementation utilizing bcrypt.
Package bcrypt provides a hasher implementation utilizing bcrypt.
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.

Jump to

Keyboard shortcuts

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