mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00

* MF-1443 - add policies Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * fix users create Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * MF-1454 - Add Policies for sharing a Thing (#1463) * MF-1454 - Add policies for sharing a Thing Signed-off-by: Burak Sekili <buraksekili@gmail.com> * Add a test case for sharing thing and update mock of AddPolicy Signed-off-by: Burak Sekili <buraksekili@gmail.com> * Update ShareThing parameter naming Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * MF-1454 - Policy Removal (#1466) * Add DeletePolicy gRPC endpoint in auth package Signed-off-by: Burak Sekili <buraksekili@gmail.com> * Update default admin creation Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * NOISSUE - Add policy addition endpoint (#1479) * NOISSUE - Add policy addition endpoint Signed-off-by: Burak Sekili <buraksekili@gmail.com> * Update name of the method Signed-off-by: Burak Sekili <buraksekili@gmail.com> remove build tag Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * NOISSUE - Add tests for AddPolicies (#1480) * NOISSUE - Add tests for adding policy and update authz check Signed-off-by: Burak Sekili <buraksekili@gmail.com> * Add more tests and update request body validation Signed-off-by: Burak Sekili <buraksekili@gmail.com> * Update test case structure and utilize mock prefix for test ids Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * MF-1454 - Add initial policies for Group access control (#1467) Signed-off-by: Burak Sekili <buraksekili@gmail.com> Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Resolve PR comments Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> Co-authored-by: Author: Burak Sekili <buraksekili@gmail.com>
4791 lines
115 KiB
Go
4791 lines
115 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: auth.proto
|
|
|
|
package mainflux
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
empty "github.com/golang/protobuf/ptypes/empty"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
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 (m *AccessByKeyReq) Reset() { *m = AccessByKeyReq{} }
|
|
func (m *AccessByKeyReq) String() string { return proto.CompactTextString(m) }
|
|
func (*AccessByKeyReq) ProtoMessage() {}
|
|
func (*AccessByKeyReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{0}
|
|
}
|
|
func (m *AccessByKeyReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AccessByKeyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AccessByKeyReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AccessByKeyReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AccessByKeyReq.Merge(m, src)
|
|
}
|
|
func (m *AccessByKeyReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AccessByKeyReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AccessByKeyReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AccessByKeyReq proto.InternalMessageInfo
|
|
|
|
func (m *AccessByKeyReq) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AccessByKeyReq) GetChanID() string {
|
|
if m != nil {
|
|
return m.ChanID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *ChannelOwnerReq) Reset() { *m = ChannelOwnerReq{} }
|
|
func (m *ChannelOwnerReq) String() string { return proto.CompactTextString(m) }
|
|
func (*ChannelOwnerReq) ProtoMessage() {}
|
|
func (*ChannelOwnerReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{1}
|
|
}
|
|
func (m *ChannelOwnerReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ChannelOwnerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ChannelOwnerReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ChannelOwnerReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChannelOwnerReq.Merge(m, src)
|
|
}
|
|
func (m *ChannelOwnerReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ChannelOwnerReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChannelOwnerReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChannelOwnerReq proto.InternalMessageInfo
|
|
|
|
func (m *ChannelOwnerReq) GetOwner() string {
|
|
if m != nil {
|
|
return m.Owner
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ChannelOwnerReq) GetChanID() string {
|
|
if m != nil {
|
|
return m.ChanID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *ThingID) Reset() { *m = ThingID{} }
|
|
func (m *ThingID) String() string { return proto.CompactTextString(m) }
|
|
func (*ThingID) ProtoMessage() {}
|
|
func (*ThingID) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{2}
|
|
}
|
|
func (m *ThingID) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ThingID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ThingID.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ThingID) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ThingID.Merge(m, src)
|
|
}
|
|
func (m *ThingID) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ThingID) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ThingID.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ThingID proto.InternalMessageInfo
|
|
|
|
func (m *ThingID) GetValue() string {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *ChannelID) Reset() { *m = ChannelID{} }
|
|
func (m *ChannelID) String() string { return proto.CompactTextString(m) }
|
|
func (*ChannelID) ProtoMessage() {}
|
|
func (*ChannelID) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{3}
|
|
}
|
|
func (m *ChannelID) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ChannelID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ChannelID.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ChannelID) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChannelID.Merge(m, src)
|
|
}
|
|
func (m *ChannelID) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ChannelID) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChannelID.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChannelID proto.InternalMessageInfo
|
|
|
|
func (m *ChannelID) GetValue() string {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *AccessByIDReq) Reset() { *m = AccessByIDReq{} }
|
|
func (m *AccessByIDReq) String() string { return proto.CompactTextString(m) }
|
|
func (*AccessByIDReq) ProtoMessage() {}
|
|
func (*AccessByIDReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{4}
|
|
}
|
|
func (m *AccessByIDReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AccessByIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AccessByIDReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AccessByIDReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AccessByIDReq.Merge(m, src)
|
|
}
|
|
func (m *AccessByIDReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AccessByIDReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AccessByIDReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AccessByIDReq proto.InternalMessageInfo
|
|
|
|
func (m *AccessByIDReq) GetThingID() string {
|
|
if m != nil {
|
|
return m.ThingID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AccessByIDReq) GetChanID() string {
|
|
if m != nil {
|
|
return m.ChanID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 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.
|
|
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 (m *Token) Reset() { *m = Token{} }
|
|
func (m *Token) String() string { return proto.CompactTextString(m) }
|
|
func (*Token) ProtoMessage() {}
|
|
func (*Token) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{5}
|
|
}
|
|
func (m *Token) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Token.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Token) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Token.Merge(m, src)
|
|
}
|
|
func (m *Token) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Token) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Token.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Token proto.InternalMessageInfo
|
|
|
|
func (m *Token) GetValue() string {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *UserIdentity) Reset() { *m = UserIdentity{} }
|
|
func (m *UserIdentity) String() string { return proto.CompactTextString(m) }
|
|
func (*UserIdentity) ProtoMessage() {}
|
|
func (*UserIdentity) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{6}
|
|
}
|
|
func (m *UserIdentity) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *UserIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_UserIdentity.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *UserIdentity) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_UserIdentity.Merge(m, src)
|
|
}
|
|
func (m *UserIdentity) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *UserIdentity) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_UserIdentity.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_UserIdentity proto.InternalMessageInfo
|
|
|
|
func (m *UserIdentity) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *UserIdentity) GetEmail() string {
|
|
if m != nil {
|
|
return m.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *IssueReq) Reset() { *m = IssueReq{} }
|
|
func (m *IssueReq) String() string { return proto.CompactTextString(m) }
|
|
func (*IssueReq) ProtoMessage() {}
|
|
func (*IssueReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{7}
|
|
}
|
|
func (m *IssueReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *IssueReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_IssueReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *IssueReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_IssueReq.Merge(m, src)
|
|
}
|
|
func (m *IssueReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *IssueReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_IssueReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_IssueReq proto.InternalMessageInfo
|
|
|
|
func (m *IssueReq) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *IssueReq) GetEmail() string {
|
|
if m != nil {
|
|
return m.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *IssueReq) GetType() uint32 {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return 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 (m *AuthorizeReq) Reset() { *m = AuthorizeReq{} }
|
|
func (m *AuthorizeReq) String() string { return proto.CompactTextString(m) }
|
|
func (*AuthorizeReq) ProtoMessage() {}
|
|
func (*AuthorizeReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{8}
|
|
}
|
|
func (m *AuthorizeReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AuthorizeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AuthorizeReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AuthorizeReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AuthorizeReq.Merge(m, src)
|
|
}
|
|
func (m *AuthorizeReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AuthorizeReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AuthorizeReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AuthorizeReq proto.InternalMessageInfo
|
|
|
|
func (m *AuthorizeReq) GetSub() string {
|
|
if m != nil {
|
|
return m.Sub
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AuthorizeReq) GetObj() string {
|
|
if m != nil {
|
|
return m.Obj
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AuthorizeReq) GetAct() string {
|
|
if m != nil {
|
|
return m.Act
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *AuthorizeRes) Reset() { *m = AuthorizeRes{} }
|
|
func (m *AuthorizeRes) String() string { return proto.CompactTextString(m) }
|
|
func (*AuthorizeRes) ProtoMessage() {}
|
|
func (*AuthorizeRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{9}
|
|
}
|
|
func (m *AuthorizeRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AuthorizeRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AuthorizeRes.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AuthorizeRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AuthorizeRes.Merge(m, src)
|
|
}
|
|
func (m *AuthorizeRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AuthorizeRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AuthorizeRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AuthorizeRes proto.InternalMessageInfo
|
|
|
|
func (m *AuthorizeRes) GetAuthorized() bool {
|
|
if m != nil {
|
|
return m.Authorized
|
|
}
|
|
return false
|
|
}
|
|
|
|
type AddPolicyReq 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 (m *AddPolicyReq) Reset() { *m = AddPolicyReq{} }
|
|
func (m *AddPolicyReq) String() string { return proto.CompactTextString(m) }
|
|
func (*AddPolicyReq) ProtoMessage() {}
|
|
func (*AddPolicyReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{10}
|
|
}
|
|
func (m *AddPolicyReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AddPolicyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AddPolicyReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AddPolicyReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AddPolicyReq.Merge(m, src)
|
|
}
|
|
func (m *AddPolicyReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AddPolicyReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AddPolicyReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AddPolicyReq proto.InternalMessageInfo
|
|
|
|
func (m *AddPolicyReq) GetSub() string {
|
|
if m != nil {
|
|
return m.Sub
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AddPolicyReq) GetObj() string {
|
|
if m != nil {
|
|
return m.Obj
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AddPolicyReq) GetAct() string {
|
|
if m != nil {
|
|
return m.Act
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AddPolicyRes 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 (m *AddPolicyRes) Reset() { *m = AddPolicyRes{} }
|
|
func (m *AddPolicyRes) String() string { return proto.CompactTextString(m) }
|
|
func (*AddPolicyRes) ProtoMessage() {}
|
|
func (*AddPolicyRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{11}
|
|
}
|
|
func (m *AddPolicyRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AddPolicyRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AddPolicyRes.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AddPolicyRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AddPolicyRes.Merge(m, src)
|
|
}
|
|
func (m *AddPolicyRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AddPolicyRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AddPolicyRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AddPolicyRes proto.InternalMessageInfo
|
|
|
|
func (m *AddPolicyRes) GetAuthorized() bool {
|
|
if m != nil {
|
|
return m.Authorized
|
|
}
|
|
return false
|
|
}
|
|
|
|
type DeletePolicyReq 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 (m *DeletePolicyReq) Reset() { *m = DeletePolicyReq{} }
|
|
func (m *DeletePolicyReq) String() string { return proto.CompactTextString(m) }
|
|
func (*DeletePolicyReq) ProtoMessage() {}
|
|
func (*DeletePolicyReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{12}
|
|
}
|
|
func (m *DeletePolicyReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeletePolicyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeletePolicyReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DeletePolicyReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeletePolicyReq.Merge(m, src)
|
|
}
|
|
func (m *DeletePolicyReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeletePolicyReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeletePolicyReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeletePolicyReq proto.InternalMessageInfo
|
|
|
|
func (m *DeletePolicyReq) GetSub() string {
|
|
if m != nil {
|
|
return m.Sub
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DeletePolicyReq) GetObj() string {
|
|
if m != nil {
|
|
return m.Obj
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DeletePolicyReq) GetAct() string {
|
|
if m != nil {
|
|
return m.Act
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeletePolicyRes struct {
|
|
Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DeletePolicyRes) Reset() { *m = DeletePolicyRes{} }
|
|
func (m *DeletePolicyRes) String() string { return proto.CompactTextString(m) }
|
|
func (*DeletePolicyRes) ProtoMessage() {}
|
|
func (*DeletePolicyRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{13}
|
|
}
|
|
func (m *DeletePolicyRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeletePolicyRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeletePolicyRes.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DeletePolicyRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeletePolicyRes.Merge(m, src)
|
|
}
|
|
func (m *DeletePolicyRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeletePolicyRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeletePolicyRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeletePolicyRes proto.InternalMessageInfo
|
|
|
|
func (m *DeletePolicyRes) GetDeleted() bool {
|
|
if m != nil {
|
|
return m.Deleted
|
|
}
|
|
return false
|
|
}
|
|
|
|
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 (m *Assignment) Reset() { *m = Assignment{} }
|
|
func (m *Assignment) String() string { return proto.CompactTextString(m) }
|
|
func (*Assignment) ProtoMessage() {}
|
|
func (*Assignment) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{14}
|
|
}
|
|
func (m *Assignment) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Assignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Assignment.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Assignment) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Assignment.Merge(m, src)
|
|
}
|
|
func (m *Assignment) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Assignment) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Assignment.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Assignment proto.InternalMessageInfo
|
|
|
|
func (m *Assignment) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Assignment) GetGroupID() string {
|
|
if m != nil {
|
|
return m.GroupID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Assignment) GetMemberID() string {
|
|
if m != nil {
|
|
return m.MemberID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *MembersReq) Reset() { *m = MembersReq{} }
|
|
func (m *MembersReq) String() string { return proto.CompactTextString(m) }
|
|
func (*MembersReq) ProtoMessage() {}
|
|
func (*MembersReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{15}
|
|
}
|
|
func (m *MembersReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MembersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MembersReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MembersReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MembersReq.Merge(m, src)
|
|
}
|
|
func (m *MembersReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MembersReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MembersReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MembersReq proto.InternalMessageInfo
|
|
|
|
func (m *MembersReq) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *MembersReq) GetGroupID() string {
|
|
if m != nil {
|
|
return m.GroupID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *MembersReq) GetOffset() uint64 {
|
|
if m != nil {
|
|
return m.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *MembersReq) GetLimit() uint64 {
|
|
if m != nil {
|
|
return m.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *MembersReq) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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 (m *MembersRes) Reset() { *m = MembersRes{} }
|
|
func (m *MembersRes) String() string { return proto.CompactTextString(m) }
|
|
func (*MembersRes) ProtoMessage() {}
|
|
func (*MembersRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_8bbd6f3875b0e874, []int{16}
|
|
}
|
|
func (m *MembersRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MembersRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MembersRes.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MembersRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MembersRes.Merge(m, src)
|
|
}
|
|
func (m *MembersRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MembersRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MembersRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MembersRes proto.InternalMessageInfo
|
|
|
|
func (m *MembersRes) GetTotal() uint64 {
|
|
if m != nil {
|
|
return m.Total
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *MembersRes) GetOffset() uint64 {
|
|
if m != nil {
|
|
return m.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *MembersRes) GetLimit() uint64 {
|
|
if m != nil {
|
|
return m.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *MembersRes) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *MembersRes) GetMembers() []string {
|
|
if m != nil {
|
|
return m.Members
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*AccessByKeyReq)(nil), "mainflux.AccessByKeyReq")
|
|
proto.RegisterType((*ChannelOwnerReq)(nil), "mainflux.ChannelOwnerReq")
|
|
proto.RegisterType((*ThingID)(nil), "mainflux.ThingID")
|
|
proto.RegisterType((*ChannelID)(nil), "mainflux.ChannelID")
|
|
proto.RegisterType((*AccessByIDReq)(nil), "mainflux.AccessByIDReq")
|
|
proto.RegisterType((*Token)(nil), "mainflux.Token")
|
|
proto.RegisterType((*UserIdentity)(nil), "mainflux.UserIdentity")
|
|
proto.RegisterType((*IssueReq)(nil), "mainflux.IssueReq")
|
|
proto.RegisterType((*AuthorizeReq)(nil), "mainflux.AuthorizeReq")
|
|
proto.RegisterType((*AuthorizeRes)(nil), "mainflux.AuthorizeRes")
|
|
proto.RegisterType((*AddPolicyReq)(nil), "mainflux.AddPolicyReq")
|
|
proto.RegisterType((*AddPolicyRes)(nil), "mainflux.AddPolicyRes")
|
|
proto.RegisterType((*DeletePolicyReq)(nil), "mainflux.DeletePolicyReq")
|
|
proto.RegisterType((*DeletePolicyRes)(nil), "mainflux.DeletePolicyRes")
|
|
proto.RegisterType((*Assignment)(nil), "mainflux.Assignment")
|
|
proto.RegisterType((*MembersReq)(nil), "mainflux.MembersReq")
|
|
proto.RegisterType((*MembersRes)(nil), "mainflux.MembersRes")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }
|
|
|
|
var fileDescriptor_8bbd6f3875b0e874 = []byte{
|
|
// 697 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcb, 0x6e, 0xd3, 0x40,
|
|
0x14, 0xcd, 0xfb, 0x71, 0x69, 0xd2, 0x32, 0xaa, 0x82, 0x31, 0x22, 0x14, 0xaf, 0x2a, 0x21, 0xb9,
|
|
0xa8, 0x80, 0x60, 0x03, 0x55, 0x5a, 0x17, 0x64, 0x21, 0x04, 0x32, 0x45, 0x62, 0xeb, 0x24, 0x93,
|
|
0xc4, 0xe0, 0x47, 0xf0, 0x8c, 0x0b, 0x66, 0xc1, 0x1f, 0xb0, 0xe7, 0x27, 0xf8, 0x0f, 0x96, 0x7c,
|
|
0x02, 0x2a, 0x3f, 0x82, 0xe6, 0xe1, 0x78, 0x1a, 0xec, 0x82, 0xd4, 0xdd, 0x9c, 0x9b, 0x7b, 0xcf,
|
|
0xb9, 0x13, 0xcf, 0x39, 0x00, 0x6e, 0x42, 0x17, 0xe6, 0x32, 0x8e, 0x68, 0x84, 0x3a, 0x81, 0xeb,
|
|
0x85, 0x33, 0x3f, 0xf9, 0xa4, 0xdf, 0x98, 0x47, 0xd1, 0xdc, 0xc7, 0x7b, 0xbc, 0x3e, 0x4e, 0x66,
|
|
0x7b, 0x38, 0x58, 0xd2, 0x54, 0xb4, 0x19, 0x4f, 0xa0, 0x3f, 0x9a, 0x4c, 0x30, 0x21, 0x87, 0xe9,
|
|
0x73, 0x9c, 0x3a, 0xf8, 0x03, 0xda, 0x86, 0x26, 0x8d, 0xde, 0xe3, 0x50, 0xab, 0xee, 0x54, 0x77,
|
|
0xbb, 0x8e, 0x00, 0x68, 0x00, 0xad, 0xc9, 0xc2, 0x0d, 0x6d, 0x4b, 0xab, 0xf1, 0xb2, 0x44, 0xc6,
|
|
0x01, 0x6c, 0x1e, 0x2d, 0xdc, 0x30, 0xc4, 0xfe, 0xcb, 0x8f, 0x21, 0x8e, 0x25, 0x41, 0xc4, 0xce,
|
|
0x19, 0x01, 0x07, 0xa5, 0x04, 0xb7, 0xa0, 0x7d, 0xb2, 0xf0, 0xc2, 0xb9, 0x6d, 0xb1, 0xc1, 0x53,
|
|
0xd7, 0x4f, 0x70, 0x36, 0xc8, 0x81, 0x71, 0x1b, 0xba, 0x52, 0xa1, 0xb4, 0x65, 0x04, 0xbd, 0xec,
|
|
0x12, 0xb6, 0xc5, 0x56, 0xd0, 0xa0, 0x4d, 0x05, 0xa9, 0x6c, 0xcc, 0x60, 0xe9, 0x1a, 0x37, 0xa1,
|
|
0x79, 0xc2, 0x2f, 0x5a, 0xac, 0x70, 0x1f, 0x36, 0xde, 0x10, 0x1c, 0xdb, 0x53, 0x1c, 0x52, 0x8f,
|
|
0xa6, 0xa8, 0x0f, 0x35, 0x6f, 0x2a, 0x5b, 0x6a, 0xde, 0x94, 0x4d, 0xe1, 0xc0, 0xf5, 0x7c, 0xc9,
|
|
0x2a, 0x80, 0x61, 0x41, 0xc7, 0x26, 0x24, 0xc1, 0x6c, 0xa5, 0xff, 0x9a, 0x40, 0x08, 0x1a, 0x34,
|
|
0x5d, 0x62, 0xad, 0xbe, 0x53, 0xdd, 0xed, 0x39, 0xfc, 0x6c, 0x58, 0xb0, 0x31, 0x4a, 0xe8, 0x22,
|
|
0x8a, 0xbd, 0xcf, 0x9c, 0x69, 0x0b, 0xea, 0x24, 0x19, 0x4b, 0x2a, 0x76, 0x64, 0x95, 0x68, 0xfc,
|
|
0x4e, 0x32, 0xb1, 0x23, 0xab, 0xb8, 0x13, 0xca, 0x69, 0xba, 0x0e, 0x3b, 0x1a, 0xe6, 0x39, 0x16,
|
|
0x82, 0x86, 0xe2, 0xb5, 0x70, 0x2c, 0xf6, 0xea, 0x38, 0x4a, 0x85, 0xab, 0x4e, 0xa7, 0xaf, 0x22,
|
|
0xdf, 0x9b, 0xa4, 0x97, 0x53, 0xcd, 0x59, 0xfe, 0xad, 0xfa, 0x0c, 0x36, 0x2d, 0xec, 0x63, 0x8a,
|
|
0x2f, 0x2b, 0x7c, 0x67, 0x9d, 0x88, 0xb0, 0x47, 0x31, 0xe5, 0xa5, 0x4c, 0x38, 0x83, 0xc6, 0x5b,
|
|
0x80, 0x11, 0x21, 0xde, 0x3c, 0x0c, 0x70, 0x48, 0x4b, 0x0c, 0xa0, 0x41, 0x7b, 0x1e, 0x47, 0xc9,
|
|
0x72, 0xf5, 0x72, 0x32, 0x88, 0x74, 0xe8, 0x04, 0x38, 0x18, 0xe3, 0xd8, 0xb6, 0xe4, 0x06, 0x2b,
|
|
0x6c, 0x7c, 0x01, 0x78, 0xc1, 0xcf, 0xa4, 0xdc, 0x5a, 0xe5, 0xcc, 0x03, 0x68, 0x45, 0xb3, 0x19,
|
|
0xc1, 0xe2, 0x66, 0x0d, 0x47, 0x22, 0xc6, 0xe3, 0x7b, 0x81, 0x47, 0xb5, 0x06, 0x2f, 0x0b, 0xb0,
|
|
0x7a, 0x3b, 0x4d, 0x4e, 0x22, 0xde, 0x8e, 0xaa, 0x4f, 0x84, 0x3e, 0x75, 0x7d, 0xae, 0xdf, 0x70,
|
|
0x04, 0x50, 0x54, 0x6a, 0xc5, 0x2a, 0xf5, 0x22, 0x95, 0x46, 0xae, 0xc2, 0x6e, 0x20, 0x6e, 0x4c,
|
|
0xb4, 0xe6, 0x4e, 0x9d, 0xdd, 0x40, 0xc2, 0xfd, 0xaf, 0x35, 0xe8, 0x71, 0x7b, 0x93, 0xd7, 0x38,
|
|
0x3e, 0xf5, 0x26, 0x18, 0x1d, 0x40, 0xff, 0xc8, 0x0d, 0x95, 0xcc, 0x41, 0x9a, 0x99, 0x45, 0x95,
|
|
0x79, 0x3e, 0x8a, 0xf4, 0xab, 0xf9, 0x2f, 0x32, 0x23, 0x8c, 0x0a, 0x3a, 0x86, 0xbe, 0x4d, 0xd4,
|
|
0xcc, 0x41, 0xd7, 0xf3, 0xb6, 0xb5, 0x2c, 0xd2, 0x07, 0xa6, 0x08, 0x3f, 0x33, 0x0b, 0x3f, 0xf3,
|
|
0x98, 0x85, 0x9f, 0x51, 0x41, 0x87, 0xd0, 0x53, 0xf6, 0xb0, 0x2d, 0x74, 0xed, 0xef, 0x35, 0x78,
|
|
0x98, 0x5c, 0xc0, 0x71, 0x17, 0x3a, 0x22, 0x11, 0x66, 0x29, 0xda, 0x54, 0x76, 0x65, 0x9f, 0xb5,
|
|
0x70, 0xf9, 0xfd, 0xef, 0x75, 0xb8, 0xc2, 0x6c, 0x98, 0xfd, 0x1b, 0x26, 0x34, 0x79, 0x42, 0x20,
|
|
0x94, 0x77, 0x67, 0x91, 0xa1, 0xaf, 0x53, 0x1a, 0x15, 0xf4, 0xe0, 0x22, 0xc5, 0x41, 0x5e, 0x50,
|
|
0xc3, 0xca, 0xa8, 0xa0, 0xc7, 0xd0, 0x5d, 0x99, 0x1f, 0x29, 0x6d, 0x6a, 0xae, 0xe8, 0xc5, 0x75,
|
|
0x22, 0xc7, 0x33, 0x17, 0x9f, 0x1b, 0x57, 0x02, 0x42, 0x2f, 0xae, 0xb3, 0xf1, 0xa7, 0xb0, 0xa1,
|
|
0x7a, 0x51, 0xfd, 0x5e, 0x6b, 0x66, 0xd7, 0x4b, 0x7f, 0x62, 0x3c, 0x8f, 0xa0, 0x25, 0x6c, 0x8a,
|
|
0xb6, 0x15, 0xad, 0x95, 0x71, 0x2f, 0xf8, 0x50, 0x0f, 0xa1, 0x2d, 0x6d, 0xa0, 0x8e, 0xe6, 0xce,
|
|
0xd4, 0x8b, 0xaa, 0xc4, 0xa8, 0x1c, 0x6e, 0xfd, 0x38, 0x1b, 0x56, 0x7f, 0x9e, 0x0d, 0xab, 0xbf,
|
|
0xce, 0x86, 0xd5, 0x6f, 0xbf, 0x87, 0x95, 0x71, 0x8b, 0x93, 0xdf, 0xfb, 0x13, 0x00, 0x00, 0xff,
|
|
0xff, 0x34, 0x04, 0x0d, 0xfa, 0x6c, 0x07, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// 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.
|
|
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)
|
|
}
|
|
|
|
type thingsServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewThingsServiceClient(cc *grpc.ClientConn) ThingsServiceClient {
|
|
return &thingsServiceClient{cc}
|
|
}
|
|
|
|
func (c *thingsServiceClient) CanAccessByKey(ctx context.Context, in *AccessByKeyReq, opts ...grpc.CallOption) (*ThingID, error) {
|
|
out := new(ThingID)
|
|
err := c.cc.Invoke(ctx, "/mainflux.ThingsService/CanAccessByKey", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *thingsServiceClient) IsChannelOwner(ctx context.Context, in *ChannelOwnerReq, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
out := new(empty.Empty)
|
|
err := c.cc.Invoke(ctx, "/mainflux.ThingsService/IsChannelOwner", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *thingsServiceClient) CanAccessByID(ctx context.Context, in *AccessByIDReq, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
out := new(empty.Empty)
|
|
err := c.cc.Invoke(ctx, "/mainflux.ThingsService/CanAccessByID", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *thingsServiceClient) Identify(ctx context.Context, in *Token, opts ...grpc.CallOption) (*ThingID, error) {
|
|
out := new(ThingID)
|
|
err := c.cc.Invoke(ctx, "/mainflux.ThingsService/Identify", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ThingsServiceServer is the server API for ThingsService service.
|
|
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)
|
|
}
|
|
|
|
// UnimplementedThingsServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedThingsServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedThingsServiceServer) CanAccessByKey(ctx context.Context, req *AccessByKeyReq) (*ThingID, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CanAccessByKey not implemented")
|
|
}
|
|
func (*UnimplementedThingsServiceServer) IsChannelOwner(ctx context.Context, req *ChannelOwnerReq) (*empty.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IsChannelOwner not implemented")
|
|
}
|
|
func (*UnimplementedThingsServiceServer) CanAccessByID(ctx context.Context, req *AccessByIDReq) (*empty.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CanAccessByID not implemented")
|
|
}
|
|
func (*UnimplementedThingsServiceServer) Identify(ctx context.Context, req *Token) (*ThingID, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Identify not implemented")
|
|
}
|
|
|
|
func RegisterThingsServiceServer(s *grpc.Server, srv ThingsServiceServer) {
|
|
s.RegisterService(&_ThingsService_serviceDesc, srv)
|
|
}
|
|
|
|
func _ThingsService_CanAccessByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AccessByKeyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ThingsServiceServer).CanAccessByKey(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.ThingsService/CanAccessByKey",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ThingsServiceServer).CanAccessByKey(ctx, req.(*AccessByKeyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ThingsService_IsChannelOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ChannelOwnerReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ThingsServiceServer).IsChannelOwner(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.ThingsService/IsChannelOwner",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ThingsServiceServer).IsChannelOwner(ctx, req.(*ChannelOwnerReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ThingsService_CanAccessByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AccessByIDReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ThingsServiceServer).CanAccessByID(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.ThingsService/CanAccessByID",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ThingsServiceServer).CanAccessByID(ctx, req.(*AccessByIDReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ThingsService_Identify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Token)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ThingsServiceServer).Identify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.ThingsService/Identify",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ThingsServiceServer).Identify(ctx, req.(*Token))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _ThingsService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "mainflux.ThingsService",
|
|
HandlerType: (*ThingsServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CanAccessByKey",
|
|
Handler: _ThingsService_CanAccessByKey_Handler,
|
|
},
|
|
{
|
|
MethodName: "IsChannelOwner",
|
|
Handler: _ThingsService_IsChannelOwner_Handler,
|
|
},
|
|
{
|
|
MethodName: "CanAccessByID",
|
|
Handler: _ThingsService_CanAccessByID_Handler,
|
|
},
|
|
{
|
|
MethodName: "Identify",
|
|
Handler: _ThingsService_Identify_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "auth.proto",
|
|
}
|
|
|
|
// 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.
|
|
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)
|
|
AddPolicy(ctx context.Context, in *AddPolicyReq, opts ...grpc.CallOption) (*AddPolicyRes, error)
|
|
DeletePolicy(ctx context.Context, in *DeletePolicyReq, opts ...grpc.CallOption) (*DeletePolicyRes, error)
|
|
Assign(ctx context.Context, in *Assignment, opts ...grpc.CallOption) (*empty.Empty, error)
|
|
Members(ctx context.Context, in *MembersReq, opts ...grpc.CallOption) (*MembersRes, error)
|
|
}
|
|
|
|
type authServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient {
|
|
return &authServiceClient{cc}
|
|
}
|
|
|
|
func (c *authServiceClient) Issue(ctx context.Context, in *IssueReq, opts ...grpc.CallOption) (*Token, error) {
|
|
out := new(Token)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/Issue", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) Identify(ctx context.Context, in *Token, opts ...grpc.CallOption) (*UserIdentity, error) {
|
|
out := new(UserIdentity)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/Identify", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) Authorize(ctx context.Context, in *AuthorizeReq, opts ...grpc.CallOption) (*AuthorizeRes, error) {
|
|
out := new(AuthorizeRes)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/Authorize", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) AddPolicy(ctx context.Context, in *AddPolicyReq, opts ...grpc.CallOption) (*AddPolicyRes, error) {
|
|
out := new(AddPolicyRes)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/AddPolicy", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) DeletePolicy(ctx context.Context, in *DeletePolicyReq, opts ...grpc.CallOption) (*DeletePolicyRes, error) {
|
|
out := new(DeletePolicyRes)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/DeletePolicy", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) Assign(ctx context.Context, in *Assignment, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
out := new(empty.Empty)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/Assign", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authServiceClient) Members(ctx context.Context, in *MembersReq, opts ...grpc.CallOption) (*MembersRes, error) {
|
|
out := new(MembersRes)
|
|
err := c.cc.Invoke(ctx, "/mainflux.AuthService/Members", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AuthServiceServer is the server API for AuthService service.
|
|
type AuthServiceServer interface {
|
|
Issue(context.Context, *IssueReq) (*Token, error)
|
|
Identify(context.Context, *Token) (*UserIdentity, error)
|
|
Authorize(context.Context, *AuthorizeReq) (*AuthorizeRes, error)
|
|
AddPolicy(context.Context, *AddPolicyReq) (*AddPolicyRes, error)
|
|
DeletePolicy(context.Context, *DeletePolicyReq) (*DeletePolicyRes, error)
|
|
Assign(context.Context, *Assignment) (*empty.Empty, error)
|
|
Members(context.Context, *MembersReq) (*MembersRes, error)
|
|
}
|
|
|
|
// UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedAuthServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedAuthServiceServer) Issue(ctx context.Context, req *IssueReq) (*Token, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Issue not implemented")
|
|
}
|
|
func (*UnimplementedAuthServiceServer) Identify(ctx context.Context, req *Token) (*UserIdentity, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Identify not implemented")
|
|
}
|
|
func (*UnimplementedAuthServiceServer) Authorize(ctx context.Context, req *AuthorizeReq) (*AuthorizeRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented")
|
|
}
|
|
func (*UnimplementedAuthServiceServer) AddPolicy(ctx context.Context, req *AddPolicyReq) (*AddPolicyRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddPolicy not implemented")
|
|
}
|
|
func (*UnimplementedAuthServiceServer) DeletePolicy(ctx context.Context, req *DeletePolicyReq) (*DeletePolicyRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePolicy not implemented")
|
|
}
|
|
func (*UnimplementedAuthServiceServer) Assign(ctx context.Context, req *Assignment) (*empty.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Assign not implemented")
|
|
}
|
|
func (*UnimplementedAuthServiceServer) Members(ctx context.Context, req *MembersReq) (*MembersRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Members not implemented")
|
|
}
|
|
|
|
func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) {
|
|
s.RegisterService(&_AuthService_serviceDesc, srv)
|
|
}
|
|
|
|
func _AuthService_Issue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IssueReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Issue(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/Issue",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Issue(ctx, req.(*IssueReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_Identify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Token)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Identify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/Identify",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Identify(ctx, req.(*Token))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AuthorizeReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Authorize(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/Authorize",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Authorize(ctx, req.(*AuthorizeReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_AddPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AddPolicyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).AddPolicy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/AddPolicy",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).AddPolicy(ctx, req.(*AddPolicyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeletePolicyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).DeletePolicy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/DeletePolicy",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).DeletePolicy(ctx, req.(*DeletePolicyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_Assign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Assignment)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Assign(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/Assign",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Assign(ctx, req.(*Assignment))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AuthService_Members_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MembersReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServiceServer).Members(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/mainflux.AuthService/Members",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServiceServer).Members(ctx, req.(*MembersReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _AuthService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "mainflux.AuthService",
|
|
HandlerType: (*AuthServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Issue",
|
|
Handler: _AuthService_Issue_Handler,
|
|
},
|
|
{
|
|
MethodName: "Identify",
|
|
Handler: _AuthService_Identify_Handler,
|
|
},
|
|
{
|
|
MethodName: "Authorize",
|
|
Handler: _AuthService_Authorize_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddPolicy",
|
|
Handler: _AuthService_AddPolicy_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePolicy",
|
|
Handler: _AuthService_DeletePolicy_Handler,
|
|
},
|
|
{
|
|
MethodName: "Assign",
|
|
Handler: _AuthService_Assign_Handler,
|
|
},
|
|
{
|
|
MethodName: "Members",
|
|
Handler: _AuthService_Members_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "auth.proto",
|
|
}
|
|
|
|
func (m *AccessByKeyReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AccessByKeyReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AccessByKeyReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.ChanID) > 0 {
|
|
i -= len(m.ChanID)
|
|
copy(dAtA[i:], m.ChanID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.ChanID)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ChannelOwnerReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ChannelOwnerReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ChannelOwnerReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.ChanID) > 0 {
|
|
i -= len(m.ChanID)
|
|
copy(dAtA[i:], m.ChanID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.ChanID)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Owner) > 0 {
|
|
i -= len(m.Owner)
|
|
copy(dAtA[i:], m.Owner)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Owner)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ThingID) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ThingID) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ThingID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ChannelID) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ChannelID) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ChannelID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AccessByIDReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AccessByIDReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AccessByIDReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.ChanID) > 0 {
|
|
i -= len(m.ChanID)
|
|
copy(dAtA[i:], m.ChanID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.ChanID)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.ThingID) > 0 {
|
|
i -= len(m.ThingID)
|
|
copy(dAtA[i:], m.ThingID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.ThingID)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Token) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Token) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *UserIdentity) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *UserIdentity) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *UserIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Email) > 0 {
|
|
i -= len(m.Email)
|
|
copy(dAtA[i:], m.Email)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Email)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *IssueReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *IssueReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *IssueReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Type != 0 {
|
|
i = encodeVarintAuth(dAtA, i, uint64(m.Type))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.Email) > 0 {
|
|
i -= len(m.Email)
|
|
copy(dAtA[i:], m.Email)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Email)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AuthorizeReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AuthorizeReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AuthorizeReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Act) > 0 {
|
|
i -= len(m.Act)
|
|
copy(dAtA[i:], m.Act)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Act)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Obj) > 0 {
|
|
i -= len(m.Obj)
|
|
copy(dAtA[i:], m.Obj)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Obj)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Sub) > 0 {
|
|
i -= len(m.Sub)
|
|
copy(dAtA[i:], m.Sub)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Sub)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AuthorizeRes) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AuthorizeRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AuthorizeRes) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Authorized {
|
|
i--
|
|
if m.Authorized {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AddPolicyReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AddPolicyReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AddPolicyReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Act) > 0 {
|
|
i -= len(m.Act)
|
|
copy(dAtA[i:], m.Act)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Act)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Obj) > 0 {
|
|
i -= len(m.Obj)
|
|
copy(dAtA[i:], m.Obj)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Obj)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Sub) > 0 {
|
|
i -= len(m.Sub)
|
|
copy(dAtA[i:], m.Sub)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Sub)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AddPolicyRes) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AddPolicyRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AddPolicyRes) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Authorized {
|
|
i--
|
|
if m.Authorized {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeletePolicyReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DeletePolicyReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeletePolicyReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Act) > 0 {
|
|
i -= len(m.Act)
|
|
copy(dAtA[i:], m.Act)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Act)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Obj) > 0 {
|
|
i -= len(m.Obj)
|
|
copy(dAtA[i:], m.Obj)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Obj)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Sub) > 0 {
|
|
i -= len(m.Sub)
|
|
copy(dAtA[i:], m.Sub)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Sub)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeletePolicyRes) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DeletePolicyRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeletePolicyRes) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Deleted {
|
|
i--
|
|
if m.Deleted {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Assignment) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Assignment) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Assignment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.MemberID) > 0 {
|
|
i -= len(m.MemberID)
|
|
copy(dAtA[i:], m.MemberID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.MemberID)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.GroupID) > 0 {
|
|
i -= len(m.GroupID)
|
|
copy(dAtA[i:], m.GroupID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.GroupID)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MembersReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MembersReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MembersReq) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Type) > 0 {
|
|
i -= len(m.Type)
|
|
copy(dAtA[i:], m.Type)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Type)))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if m.Limit != 0 {
|
|
i = encodeVarintAuth(dAtA, i, uint64(m.Limit))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if m.Offset != 0 {
|
|
i = encodeVarintAuth(dAtA, i, uint64(m.Offset))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.GroupID) > 0 {
|
|
i -= len(m.GroupID)
|
|
copy(dAtA[i:], m.GroupID)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.GroupID)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MembersRes) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MembersRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MembersRes) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Members) > 0 {
|
|
for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Members[iNdEx])
|
|
copy(dAtA[i:], m.Members[iNdEx])
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Members[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
}
|
|
if len(m.Type) > 0 {
|
|
i -= len(m.Type)
|
|
copy(dAtA[i:], m.Type)
|
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Type)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Limit != 0 {
|
|
i = encodeVarintAuth(dAtA, i, uint64(m.Limit))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.Offset != 0 {
|
|
i = encodeVarintAuth(dAtA, i, uint64(m.Offset))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Total != 0 {
|
|
i = encodeVarintAuth(dAtA, i, uint64(m.Total))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovAuth(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *AccessByKeyReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.ChanID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ChannelOwnerReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Owner)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.ChanID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ThingID) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ChannelID) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AccessByIDReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ThingID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.ChanID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Token) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UserIdentity) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Email)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *IssueReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Email)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.Type != 0 {
|
|
n += 1 + sovAuth(uint64(m.Type))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AuthorizeReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Sub)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Obj)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Act)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AuthorizeRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Authorized {
|
|
n += 2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AddPolicyReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Sub)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Obj)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Act)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AddPolicyRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Authorized {
|
|
n += 2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeletePolicyReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Sub)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Obj)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.Act)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeletePolicyRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Deleted {
|
|
n += 2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Assignment) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.GroupID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.MemberID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MembersReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
l = len(m.GroupID)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.Offset != 0 {
|
|
n += 1 + sovAuth(uint64(m.Offset))
|
|
}
|
|
if m.Limit != 0 {
|
|
n += 1 + sovAuth(uint64(m.Limit))
|
|
}
|
|
l = len(m.Type)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MembersRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Total != 0 {
|
|
n += 1 + sovAuth(uint64(m.Total))
|
|
}
|
|
if m.Offset != 0 {
|
|
n += 1 + sovAuth(uint64(m.Offset))
|
|
}
|
|
if m.Limit != 0 {
|
|
n += 1 + sovAuth(uint64(m.Limit))
|
|
}
|
|
l = len(m.Type)
|
|
if l > 0 {
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
if len(m.Members) > 0 {
|
|
for _, s := range m.Members {
|
|
l = len(s)
|
|
n += 1 + l + sovAuth(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovAuth(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozAuth(x uint64) (n int) {
|
|
return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *AccessByKeyReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AccessByKeyReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AccessByKeyReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ChanID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ChanID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ChannelOwnerReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ChannelOwnerReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ChannelOwnerReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Owner = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ChanID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ChanID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ThingID) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ThingID: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ThingID: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ChannelID) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ChannelID: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ChannelID: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AccessByIDReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AccessByIDReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AccessByIDReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ThingID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ThingID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ChanID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ChanID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Token) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Token: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UserIdentity) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: UserIdentity: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UserIdentity: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Email = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *IssueReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: IssueReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: IssueReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Email = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
m.Type = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Type |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AuthorizeReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AuthorizeReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AuthorizeReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Sub = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Obj", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Obj = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Act", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Act = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AuthorizeRes) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AuthorizeRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AuthorizeRes: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Authorized", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Authorized = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AddPolicyReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AddPolicyReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AddPolicyReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Sub = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Obj", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Obj = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Act", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Act = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AddPolicyRes) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AddPolicyRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AddPolicyRes: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Authorized", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Authorized = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DeletePolicyReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: DeletePolicyReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeletePolicyReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Sub = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Obj", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Obj = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Act", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Act = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DeletePolicyRes) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: DeletePolicyRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeletePolicyRes: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Deleted = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Assignment) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Assignment: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Assignment: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.GroupID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MemberID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.MemberID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MembersReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MembersReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MembersReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.GroupID = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
|
}
|
|
m.Offset = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Offset |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
|
|
}
|
|
m.Limit = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Limit |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Type = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MembersRes) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MembersRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MembersRes: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
|
|
}
|
|
m.Total = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Total |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
|
}
|
|
m.Offset = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Offset |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
|
|
}
|
|
m.Limit = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Limit |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Type = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Members = append(m.Members, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAuth(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthAuth
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipAuth(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAuth
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthAuth
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupAuth
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthAuth
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group")
|
|
)
|