Documentation ¶
Index ¶
- func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)
- type AuthResponse
- func (*AuthResponse) Descriptor() ([]byte, []int)
- func (m *AuthResponse) GetOk() bool
- func (*AuthResponse) ProtoMessage()
- func (m *AuthResponse) Reset()
- func (m *AuthResponse) String() string
- func (m *AuthResponse) XXX_DiscardUnknown()
- func (m *AuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthResponse) XXX_Merge(src proto.Message)
- func (m *AuthResponse) XXX_Size() int
- func (m *AuthResponse) XXX_Unmarshal(b []byte) error
- type AuthServiceClient
- type AuthServiceServer
- type CheckAclRequest
- func (*CheckAclRequest) Descriptor() ([]byte, []int)
- func (m *CheckAclRequest) GetAcc() int32
- func (m *CheckAclRequest) GetClientid() string
- func (m *CheckAclRequest) GetTopic() string
- func (m *CheckAclRequest) GetUsername() string
- func (*CheckAclRequest) ProtoMessage()
- func (m *CheckAclRequest) Reset()
- func (m *CheckAclRequest) String() string
- func (m *CheckAclRequest) XXX_DiscardUnknown()
- func (m *CheckAclRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CheckAclRequest) XXX_Merge(src proto.Message)
- func (m *CheckAclRequest) XXX_Size() int
- func (m *CheckAclRequest) XXX_Unmarshal(b []byte) error
- type GetSuperuserRequest
- func (*GetSuperuserRequest) Descriptor() ([]byte, []int)
- func (m *GetSuperuserRequest) GetUsername() string
- func (*GetSuperuserRequest) ProtoMessage()
- func (m *GetSuperuserRequest) Reset()
- func (m *GetSuperuserRequest) String() string
- func (m *GetSuperuserRequest) XXX_DiscardUnknown()
- func (m *GetSuperuserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetSuperuserRequest) XXX_Merge(src proto.Message)
- func (m *GetSuperuserRequest) XXX_Size() int
- func (m *GetSuperuserRequest) XXX_Unmarshal(b []byte) error
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)
- func (m *GetUserRequest) GetClientid() string
- func (m *GetUserRequest) GetPassword() string
- func (m *GetUserRequest) GetUsername() string
- func (*GetUserRequest) ProtoMessage()
- func (m *GetUserRequest) Reset()
- func (m *GetUserRequest) String() string
- func (m *GetUserRequest) XXX_DiscardUnknown()
- func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetUserRequest) XXX_Merge(src proto.Message)
- func (m *GetUserRequest) XXX_Size() int
- func (m *GetUserRequest) XXX_Unmarshal(b []byte) error
- type NameResponse
- func (*NameResponse) Descriptor() ([]byte, []int)
- func (m *NameResponse) GetName() string
- func (*NameResponse) ProtoMessage()
- func (m *NameResponse) Reset()
- func (m *NameResponse) String() string
- func (m *NameResponse) XXX_DiscardUnknown()
- func (m *NameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NameResponse) XXX_Merge(src proto.Message)
- func (m *NameResponse) XXX_Size() int
- func (m *NameResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedAuthServiceServer
- func (*UnimplementedAuthServiceServer) CheckAcl(ctx context.Context, req *CheckAclRequest) (*AuthResponse, error)
- func (*UnimplementedAuthServiceServer) GetName(ctx context.Context, req *empty.Empty) (*NameResponse, error)
- func (*UnimplementedAuthServiceServer) GetSuperuser(ctx context.Context, req *GetSuperuserRequest) (*AuthResponse, error)
- func (*UnimplementedAuthServiceServer) GetUser(ctx context.Context, req *GetUserRequest) (*AuthResponse, error)
- func (*UnimplementedAuthServiceServer) Halt(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)
Types ¶
type AuthResponse ¶
type AuthResponse struct { // If the user is authorized/authenticated. Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AuthResponse) Descriptor ¶
func (*AuthResponse) Descriptor() ([]byte, []int)
func (*AuthResponse) GetOk ¶
func (m *AuthResponse) GetOk() bool
func (*AuthResponse) ProtoMessage ¶
func (*AuthResponse) ProtoMessage()
func (*AuthResponse) Reset ¶
func (m *AuthResponse) Reset()
func (*AuthResponse) String ¶
func (m *AuthResponse) String() string
func (*AuthResponse) XXX_DiscardUnknown ¶
func (m *AuthResponse) XXX_DiscardUnknown()
func (*AuthResponse) XXX_Marshal ¶
func (m *AuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AuthResponse) XXX_Merge ¶
func (m *AuthResponse) XXX_Merge(src proto.Message)
func (*AuthResponse) XXX_Size ¶
func (m *AuthResponse) XXX_Size() int
func (*AuthResponse) XXX_Unmarshal ¶
func (m *AuthResponse) XXX_Unmarshal(b []byte) error
type AuthServiceClient ¶
type AuthServiceClient interface { // GetUser tries to authenticate a user. GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*AuthResponse, error) // GetSuperuser checks if a user is a superuser. GetSuperuser(ctx context.Context, in *GetSuperuserRequest, opts ...grpc.CallOption) (*AuthResponse, error) // CheckAcl checks user's authorization for the given topic. CheckAcl(ctx context.Context, in *CheckAclRequest, opts ...grpc.CallOption) (*AuthResponse, error) // GetName retrieves the name of the backend. GetName(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NameResponse, error) // Halt signals the backend to halt. Halt(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) }
AuthServiceClient is the client API for AuthService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { // GetUser tries to authenticate a user. GetUser(context.Context, *GetUserRequest) (*AuthResponse, error) // GetSuperuser checks if a user is a superuser. GetSuperuser(context.Context, *GetSuperuserRequest) (*AuthResponse, error) // CheckAcl checks user's authorization for the given topic. CheckAcl(context.Context, *CheckAclRequest) (*AuthResponse, error) // GetName retrieves the name of the backend. GetName(context.Context, *empty.Empty) (*NameResponse, error) // Halt signals the backend to halt. Halt(context.Context, *empty.Empty) (*empty.Empty, error) }
AuthServiceServer is the server API for AuthService service.
type CheckAclRequest ¶
type CheckAclRequest struct { // Username. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Topic to be checked for. Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` // The client connection's id. Clientid string `protobuf:"bytes,3,opt,name=clientid,proto3" json:"clientid,omitempty"` // Topic access. Acc int32 `protobuf:"varint,4,opt,name=acc,proto3" json:"acc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CheckAclRequest) Descriptor ¶
func (*CheckAclRequest) Descriptor() ([]byte, []int)
func (*CheckAclRequest) GetAcc ¶
func (m *CheckAclRequest) GetAcc() int32
func (*CheckAclRequest) GetClientid ¶
func (m *CheckAclRequest) GetClientid() string
func (*CheckAclRequest) GetTopic ¶
func (m *CheckAclRequest) GetTopic() string
func (*CheckAclRequest) GetUsername ¶
func (m *CheckAclRequest) GetUsername() string
func (*CheckAclRequest) ProtoMessage ¶
func (*CheckAclRequest) ProtoMessage()
func (*CheckAclRequest) Reset ¶
func (m *CheckAclRequest) Reset()
func (*CheckAclRequest) String ¶
func (m *CheckAclRequest) String() string
func (*CheckAclRequest) XXX_DiscardUnknown ¶
func (m *CheckAclRequest) XXX_DiscardUnknown()
func (*CheckAclRequest) XXX_Marshal ¶
func (m *CheckAclRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CheckAclRequest) XXX_Merge ¶
func (m *CheckAclRequest) XXX_Merge(src proto.Message)
func (*CheckAclRequest) XXX_Size ¶
func (m *CheckAclRequest) XXX_Size() int
func (*CheckAclRequest) XXX_Unmarshal ¶
func (m *CheckAclRequest) XXX_Unmarshal(b []byte) error
type GetSuperuserRequest ¶
type GetSuperuserRequest struct { // Username. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetSuperuserRequest) Descriptor ¶
func (*GetSuperuserRequest) Descriptor() ([]byte, []int)
func (*GetSuperuserRequest) GetUsername ¶
func (m *GetSuperuserRequest) GetUsername() string
func (*GetSuperuserRequest) ProtoMessage ¶
func (*GetSuperuserRequest) ProtoMessage()
func (*GetSuperuserRequest) Reset ¶
func (m *GetSuperuserRequest) Reset()
func (*GetSuperuserRequest) String ¶
func (m *GetSuperuserRequest) String() string
func (*GetSuperuserRequest) XXX_DiscardUnknown ¶
func (m *GetSuperuserRequest) XXX_DiscardUnknown()
func (*GetSuperuserRequest) XXX_Marshal ¶
func (m *GetSuperuserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetSuperuserRequest) XXX_Merge ¶
func (m *GetSuperuserRequest) XXX_Merge(src proto.Message)
func (*GetSuperuserRequest) XXX_Size ¶
func (m *GetSuperuserRequest) XXX_Size() int
func (*GetSuperuserRequest) XXX_Unmarshal ¶
func (m *GetSuperuserRequest) XXX_Unmarshal(b []byte) error
type GetUserRequest ¶
type GetUserRequest struct { // Username. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Plain text password. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // The client connection's id. Clientid string `protobuf:"bytes,3,opt,name=clientid,proto3" json:"clientid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserRequest) Descriptor ¶
func (*GetUserRequest) Descriptor() ([]byte, []int)
func (*GetUserRequest) GetClientid ¶
func (m *GetUserRequest) GetClientid() string
func (*GetUserRequest) GetPassword ¶
func (m *GetUserRequest) GetPassword() string
func (*GetUserRequest) GetUsername ¶
func (m *GetUserRequest) GetUsername() string
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) Reset ¶
func (m *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (m *GetUserRequest) String() string
func (*GetUserRequest) XXX_DiscardUnknown ¶
func (m *GetUserRequest) XXX_DiscardUnknown()
func (*GetUserRequest) XXX_Marshal ¶
func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserRequest) XXX_Merge ¶
func (m *GetUserRequest) XXX_Merge(src proto.Message)
func (*GetUserRequest) XXX_Size ¶
func (m *GetUserRequest) XXX_Size() int
func (*GetUserRequest) XXX_Unmarshal ¶
func (m *GetUserRequest) XXX_Unmarshal(b []byte) error
type NameResponse ¶
type NameResponse struct { // The name of the gRPC backend. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NameResponse) Descriptor ¶
func (*NameResponse) Descriptor() ([]byte, []int)
func (*NameResponse) GetName ¶
func (m *NameResponse) GetName() string
func (*NameResponse) ProtoMessage ¶
func (*NameResponse) ProtoMessage()
func (*NameResponse) Reset ¶
func (m *NameResponse) Reset()
func (*NameResponse) String ¶
func (m *NameResponse) String() string
func (*NameResponse) XXX_DiscardUnknown ¶
func (m *NameResponse) XXX_DiscardUnknown()
func (*NameResponse) XXX_Marshal ¶
func (m *NameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NameResponse) XXX_Merge ¶
func (m *NameResponse) XXX_Merge(src proto.Message)
func (*NameResponse) XXX_Size ¶
func (m *NameResponse) XXX_Size() int
func (*NameResponse) XXX_Unmarshal ¶
func (m *NameResponse) XXX_Unmarshal(b []byte) error
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServiceServer) CheckAcl ¶
func (*UnimplementedAuthServiceServer) CheckAcl(ctx context.Context, req *CheckAclRequest) (*AuthResponse, error)
func (*UnimplementedAuthServiceServer) GetName ¶
func (*UnimplementedAuthServiceServer) GetName(ctx context.Context, req *empty.Empty) (*NameResponse, error)
func (*UnimplementedAuthServiceServer) GetSuperuser ¶
func (*UnimplementedAuthServiceServer) GetSuperuser(ctx context.Context, req *GetSuperuserRequest) (*AuthResponse, error)
func (*UnimplementedAuthServiceServer) GetUser ¶
func (*UnimplementedAuthServiceServer) GetUser(ctx context.Context, req *GetUserRequest) (*AuthResponse, error)
Click to show internal directories.
Click to hide internal directories.