api

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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

func (m *LoginReply) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*LoginReq) GetDsbsid

func (m *LoginReq) GetDsbsid() string

func (*LoginReq) GetMngsid

func (m *LoginReq) GetMngsid() string

func (*LoginReq) Marshal

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

func (*LoginReq) MarshalTo

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

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) Reset

func (m *LoginReq) Reset()

func (*LoginReq) Size

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

func (*LoginReq) String

func (m *LoginReq) String() string

func (*LoginReq) Unmarshal

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

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

func (m *PermissionReply) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *PermissionReq) MarshalTo(dAtA []byte) (int, 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.

Jump to

Keyboard shortcuts

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