go-common/app/service/live/live_riskcontrol/api/grpc/v1/api.pb.go
2019-04-22 18:49:16 +08:00

305 lines
12 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: riskcontrol.proto
package v1
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
math "math"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type GetForbiddenReply_ForbiddenRes int32
const (
GetForbiddenReply_PASS GetForbiddenReply_ForbiddenRes = 0
GetForbiddenReply_FORBIDDEN GetForbiddenReply_ForbiddenRes = 1
GetForbiddenReply_DOUBT GetForbiddenReply_ForbiddenRes = 2
)
var GetForbiddenReply_ForbiddenRes_name = map[int32]string{
0: "PASS",
1: "FORBIDDEN",
2: "DOUBT",
}
var GetForbiddenReply_ForbiddenRes_value = map[string]int32{
"PASS": 0,
"FORBIDDEN": 1,
"DOUBT": 2,
}
func (x GetForbiddenReply_ForbiddenRes) String() string {
return proto.EnumName(GetForbiddenReply_ForbiddenRes_name, int32(x))
}
func (GetForbiddenReply_ForbiddenRes) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_02186d23d36e97ba, []int{1, 0}
}
// GetForbiddenReq
type GetForbiddenReq struct {
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
Header map[string]string `protobuf:"bytes,5,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetForbiddenReq) Reset() { *m = GetForbiddenReq{} }
func (m *GetForbiddenReq) String() string { return proto.CompactTextString(m) }
func (*GetForbiddenReq) ProtoMessage() {}
func (*GetForbiddenReq) Descriptor() ([]byte, []int) {
return fileDescriptor_02186d23d36e97ba, []int{0}
}
func (m *GetForbiddenReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetForbiddenReq.Unmarshal(m, b)
}
func (m *GetForbiddenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetForbiddenReq.Marshal(b, m, deterministic)
}
func (m *GetForbiddenReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetForbiddenReq.Merge(m, src)
}
func (m *GetForbiddenReq) XXX_Size() int {
return xxx_messageInfo_GetForbiddenReq.Size(m)
}
func (m *GetForbiddenReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetForbiddenReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetForbiddenReq proto.InternalMessageInfo
func (m *GetForbiddenReq) GetUid() int64 {
if m != nil {
return m.Uid
}
return 0
}
func (m *GetForbiddenReq) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func (m *GetForbiddenReq) GetIp() string {
if m != nil {
return m.Ip
}
return ""
}
func (m *GetForbiddenReq) GetMethod() string {
if m != nil {
return m.Method
}
return ""
}
func (m *GetForbiddenReq) GetHeader() map[string]string {
if m != nil {
return m.Header
}
return nil
}
func (m *GetForbiddenReq) GetBody() string {
if m != nil {
return m.Body
}
return ""
}
// GetForbiddenReply
type GetForbiddenReply struct {
IsForbidden GetForbiddenReply_ForbiddenRes `protobuf:"varint,1,opt,name=is_forbidden,json=isForbidden,proto3,enum=live.riskcontrol.v1.GetForbiddenReply_ForbiddenRes" json:"is_forbidden,omitempty"`
IsCache bool `protobuf:"varint,2,opt,name=is_cache,json=isCache,proto3" json:"is_cache,omitempty"`
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetForbiddenReply) Reset() { *m = GetForbiddenReply{} }
func (m *GetForbiddenReply) String() string { return proto.CompactTextString(m) }
func (*GetForbiddenReply) ProtoMessage() {}
func (*GetForbiddenReply) Descriptor() ([]byte, []int) {
return fileDescriptor_02186d23d36e97ba, []int{1}
}
func (m *GetForbiddenReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetForbiddenReply.Unmarshal(m, b)
}
func (m *GetForbiddenReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetForbiddenReply.Marshal(b, m, deterministic)
}
func (m *GetForbiddenReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetForbiddenReply.Merge(m, src)
}
func (m *GetForbiddenReply) XXX_Size() int {
return xxx_messageInfo_GetForbiddenReply.Size(m)
}
func (m *GetForbiddenReply) XXX_DiscardUnknown() {
xxx_messageInfo_GetForbiddenReply.DiscardUnknown(m)
}
var xxx_messageInfo_GetForbiddenReply proto.InternalMessageInfo
func (m *GetForbiddenReply) GetIsForbidden() GetForbiddenReply_ForbiddenRes {
if m != nil {
return m.IsForbidden
}
return GetForbiddenReply_PASS
}
func (m *GetForbiddenReply) GetIsCache() bool {
if m != nil {
return m.IsCache
}
return false
}
func (m *GetForbiddenReply) GetReason() string {
if m != nil {
return m.Reason
}
return ""
}
func init() {
proto.RegisterEnum("live.riskcontrol.v1.GetForbiddenReply_ForbiddenRes", GetForbiddenReply_ForbiddenRes_name, GetForbiddenReply_ForbiddenRes_value)
proto.RegisterType((*GetForbiddenReq)(nil), "live.riskcontrol.v1.GetForbiddenReq")
proto.RegisterMapType((map[string]string)(nil), "live.riskcontrol.v1.GetForbiddenReq.HeaderEntry")
proto.RegisterType((*GetForbiddenReply)(nil), "live.riskcontrol.v1.GetForbiddenReply")
}
func init() { proto.RegisterFile("riskcontrol.proto", fileDescriptor_02186d23d36e97ba) }
var fileDescriptor_02186d23d36e97ba = []byte{
// 482 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
0x10, 0xc6, 0xb1, 0x9d, 0x9a, 0x64, 0x12, 0xc0, 0x5d, 0x38, 0x58, 0x91, 0xc0, 0xee, 0xaa, 0x40,
0x2e, 0xb8, 0x24, 0xe5, 0x50, 0x22, 0x71, 0xc0, 0xa4, 0x85, 0x5e, 0x28, 0x72, 0xe1, 0x82, 0x90,
0x2a, 0x3b, 0xde, 0xc4, 0xab, 0x38, 0x59, 0x77, 0xfd, 0x47, 0xf2, 0x83, 0x72, 0xf5, 0x03, 0xe4,
0x98, 0x07, 0x40, 0x28, 0xbb, 0xa1, 0x72, 0x50, 0x2a, 0xe5, 0xe4, 0x99, 0xcf, 0xf3, 0x9b, 0x99,
0xfd, 0xd6, 0x86, 0x43, 0x4e, 0xd3, 0xd9, 0x98, 0x2d, 0x32, 0xce, 0x62, 0x27, 0xe1, 0x2c, 0x63,
0xe8, 0x69, 0x4c, 0x0b, 0xe2, 0xd4, 0xf5, 0xa2, 0xdf, 0x7d, 0x33, 0xa5, 0x59, 0x94, 0x07, 0xce,
0x98, 0xcd, 0x4f, 0xa6, 0x6c, 0xca, 0x4e, 0x44, 0x6d, 0x90, 0x4f, 0x44, 0x26, 0x12, 0x11, 0xc9,
0x1e, 0xf8, 0xb7, 0x06, 0x4f, 0x3e, 0x93, 0xec, 0x82, 0xf1, 0x80, 0x86, 0x21, 0x59, 0x78, 0xe4,
0x16, 0xbd, 0x03, 0x2d, 0xa7, 0xa1, 0xa9, 0xd8, 0x4a, 0x4f, 0x73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 0xd1, 0xea, 0xf1, 0xe0, 0x74, 0x0f, 0x07, 0x92, 0xb8, 0x74, 0x6a, 0x69, 0xea,
0x1a, 0xcb, 0xca, 0xda, 0x6a, 0xe6, 0xb5, 0x69, 0x7a, 0x57, 0x81, 0x5e, 0x43, 0x93, 0xa6, 0x37,
0x63, 0x7f, 0x1c, 0xc9, 0xe5, 0x9a, 0x6e, 0x67, 0x59, 0x59, 0x77, 0x9a, 0xf7, 0x90, 0xa6, 0x9f,
0xd6, 0x01, 0xc2, 0xa0, 0x73, 0xe2, 0xa7, 0x6c, 0xb1, 0xf9, 0x08, 0x60, 0x59, 0x59, 0x1b, 0xc5,
0xdb, 0x3c, 0xf1, 0x00, 0x3a, 0xf5, 0xd9, 0xa8, 0x09, 0x8d, 0x6f, 0x1f, 0xaf, 0xaf, 0x8d, 0x07,
0xe8, 0x11, 0xb4, 0x2e, 0xae, 0x3c, 0xf7, 0x72, 0x34, 0x3a, 0xff, 0x6a, 0x28, 0xa8, 0x05, 0x07,
0xa3, 0xab, 0x1f, 0xee, 0x77, 0x43, 0x1d, 0xcc, 0xa0, 0x7d, 0x59, 0xdb, 0xe7, 0x17, 0x74, 0xea,
0x07, 0x42, 0xc7, 0xfb, 0xdc, 0x7a, 0xf7, 0xd5, 0x7e, 0xce, 0xb8, 0x8d, 0x9f, 0x6a, 0xd1, 0x0f,
0x74, 0xf1, 0x4b, 0x9d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x48, 0xbc, 0x65, 0xab, 0x03,
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
// IsForbiddenClient is the client API for IsForbidden service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type IsForbiddenClient interface {
GetForbidden(ctx context.Context, in *GetForbiddenReq, opts ...grpc.CallOption) (*GetForbiddenReply, error)
}
type isForbiddenClient struct {
cc *grpc.ClientConn
}
func NewIsForbiddenClient(cc *grpc.ClientConn) IsForbiddenClient {
return &isForbiddenClient{cc}
}
func (c *isForbiddenClient) GetForbidden(ctx context.Context, in *GetForbiddenReq, opts ...grpc.CallOption) (*GetForbiddenReply, error) {
out := new(GetForbiddenReply)
err := c.cc.Invoke(ctx, "/live.riskcontrol.v1.IsForbidden/GetForbidden", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IsForbiddenServer is the server API for IsForbidden service.
type IsForbiddenServer interface {
GetForbidden(context.Context, *GetForbiddenReq) (*GetForbiddenReply, error)
}
func RegisterIsForbiddenServer(s *grpc.Server, srv IsForbiddenServer) {
s.RegisterService(&_IsForbidden_serviceDesc, srv)
}
func _IsForbidden_GetForbidden_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetForbiddenReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IsForbiddenServer).GetForbidden(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.riskcontrol.v1.IsForbidden/GetForbidden",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IsForbiddenServer).GetForbidden(ctx, req.(*GetForbiddenReq))
}
return interceptor(ctx, in, info, handler)
}
var _IsForbidden_serviceDesc = grpc.ServiceDesc{
ServiceName: "live.riskcontrol.v1.IsForbidden",
HandlerType: (*IsForbiddenServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetForbidden",
Handler: _IsForbidden_GetForbidden_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "riskcontrol.proto",
}