Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPermitServer(s *grpc.Server, srv PermitServer)
- type LoginReply
- func (*LoginReply) Descriptor() ([]byte, []int)
- func (m *LoginReply) GetSid() string
- func (m *LoginReply) GetUsername() string
- func (m *LoginReply) Marshal() (dAtA []byte, err error)
- func (m *LoginReply) MarshalTo(dAtA []byte) (int, error)
- func (*LoginReply) ProtoMessage()
- func (m *LoginReply) Reset()
- func (m *LoginReply) Size() (n int)
- func (m *LoginReply) String() string
- func (m *LoginReply) Unmarshal(dAtA []byte) error
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)
- func (m *LoginReq) GetDsbsid() string
- func (m *LoginReq) GetMngsid() string
- func (m *LoginReq) Marshal() (dAtA []byte, err error)
- func (m *LoginReq) MarshalTo(dAtA []byte) (int, error)
- func (*LoginReq) ProtoMessage()
- func (m *LoginReq) Reset()
- func (m *LoginReq) Size() (n int)
- func (m *LoginReq) String() string
- func (m *LoginReq) Unmarshal(dAtA []byte) error
- type PermissionReply
- func (*PermissionReply) Descriptor() ([]byte, []int)
- func (m *PermissionReply) GetPerms() []string
- func (m *PermissionReply) GetUid() int64
- func (m *PermissionReply) Marshal() (dAtA []byte, err error)
- func (m *PermissionReply) MarshalTo(dAtA []byte) (int, error)
- func (*PermissionReply) ProtoMessage()
- func (m *PermissionReply) Reset()
- func (m *PermissionReply) Size() (n int)
- func (m *PermissionReply) String() string
- func (m *PermissionReply) Unmarshal(dAtA []byte) error
- type PermissionReq
- func (*PermissionReq) Descriptor() ([]byte, []int)
- func (m *PermissionReq) GetUsername() string
- func (m *PermissionReq) Marshal() (dAtA []byte, err error)
- func (m *PermissionReq) MarshalTo(dAtA []byte) (int, error)
- func (*PermissionReq) ProtoMessage()
- func (m *PermissionReq) Reset()
- func (m *PermissionReq) Size() (n int)
- func (m *PermissionReq) String() string
- func (m *PermissionReq) Unmarshal(dAtA []byte) error
- type PermitClient
- type PermitServer
Constants ¶
View Source
const AppID = "main.admin.manager"
AppID discovery id.
Variables ¶
View Source
var ( ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterPermitServer ¶
func RegisterPermitServer(s *grpc.Server, srv PermitServer)
Types ¶
type LoginReply ¶
type LoginReply struct { Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` }
func (*LoginReply) Descriptor ¶
func (*LoginReply) Descriptor() ([]byte, []int)
func (*LoginReply) GetSid ¶
func (m *LoginReply) GetSid() string
func (*LoginReply) GetUsername ¶
func (m *LoginReply) GetUsername() string
func (*LoginReply) Marshal ¶
func (m *LoginReply) Marshal() (dAtA []byte, err error)
func (*LoginReply) ProtoMessage ¶
func (*LoginReply) ProtoMessage()
func (*LoginReply) Reset ¶
func (m *LoginReply) Reset()
func (*LoginReply) Size ¶
func (m *LoginReply) Size() (n int)
func (*LoginReply) String ¶
func (m *LoginReply) String() string
func (*LoginReply) Unmarshal ¶
func (m *LoginReply) Unmarshal(dAtA []byte) error
type LoginReq ¶
type LoginReq struct { Mngsid string `protobuf:"bytes,1,opt,name=mngsid,proto3" json:"mngsid,omitempty"` Dsbsid string `protobuf:"bytes,2,opt,name=dsbsid,proto3" json:"dsbsid,omitempty"` }
func (*LoginReq) Descriptor ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
type PermissionReply ¶
type PermissionReply struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Perms []string `protobuf:"bytes,2,rep,name=perms" json:"perms,omitempty"` }
func (*PermissionReply) Descriptor ¶
func (*PermissionReply) Descriptor() ([]byte, []int)
func (*PermissionReply) GetPerms ¶
func (m *PermissionReply) GetPerms() []string
func (*PermissionReply) GetUid ¶
func (m *PermissionReply) GetUid() int64
func (*PermissionReply) Marshal ¶
func (m *PermissionReply) Marshal() (dAtA []byte, err error)
func (*PermissionReply) ProtoMessage ¶
func (*PermissionReply) ProtoMessage()
func (*PermissionReply) Reset ¶
func (m *PermissionReply) Reset()
func (*PermissionReply) Size ¶
func (m *PermissionReply) Size() (n int)
func (*PermissionReply) String ¶
func (m *PermissionReply) String() string
func (*PermissionReply) Unmarshal ¶
func (m *PermissionReply) Unmarshal(dAtA []byte) error
type PermissionReq ¶
type PermissionReq struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
}
func (*PermissionReq) Descriptor ¶
func (*PermissionReq) Descriptor() ([]byte, []int)
func (*PermissionReq) GetUsername ¶
func (m *PermissionReq) GetUsername() string
func (*PermissionReq) Marshal ¶
func (m *PermissionReq) Marshal() (dAtA []byte, err error)
func (*PermissionReq) ProtoMessage ¶
func (*PermissionReq) ProtoMessage()
func (*PermissionReq) Reset ¶
func (m *PermissionReq) Reset()
func (*PermissionReq) Size ¶
func (m *PermissionReq) Size() (n int)
func (*PermissionReq) String ¶
func (m *PermissionReq) String() string
func (*PermissionReq) Unmarshal ¶
func (m *PermissionReq) Unmarshal(dAtA []byte) error
type PermitClient ¶
type PermitClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginReply, error) Permissions(ctx context.Context, in *PermissionReq, opts ...grpc.CallOption) (*PermissionReply, error) }
PermitClient is the client API for Permit service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClient ¶
func NewClient(cfg *warden.ClientConfig, opts ...grpc.DialOption) (PermitClient, error)
NewClient .
func NewPermitClient ¶
func NewPermitClient(cc *grpc.ClientConn) PermitClient
type PermitServer ¶
type PermitServer interface { Login(context.Context, *LoginReq) (*LoginReply, error) Permissions(context.Context, *PermissionReq) (*PermissionReply, error) }
PermitServer is the server API for Permit service.
Click to show internal directories.
Click to hide internal directories.