go-common/app/service/live/banned_service/api/liverpc/v1/AdminSilent.liverpc.go
2019-04-22 18:49:16 +08:00

69 lines
1.9 KiB
Go

// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/AdminSilent.proto
/*
Package v1 is a generated liverpc stub package.
This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
It is generated from these files:
v1/AdminSilent.proto
v1/Shield.proto
v1/ShieldMng.proto
v1/Silent.proto
v1/SilentMng.proto
v1/SiteBlockMng.proto
*/
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// Imports only used by utility functions:
// =====================
// AdminSilent Interface
// =====================
type AdminSilent interface {
// * 查询运营规则
// 拿着规则直接用就好了,有就肯定是当前生效的配置
GetShieldRule(context.Context, *AdminSilentGetShieldRuleReq) (*AdminSilentGetShieldRuleResp, error)
}
// ===========================
// AdminSilent Live Rpc Client
// ===========================
type adminSilentRpcClient struct {
client *liverpc.Client
}
// NewAdminSilentRpcClient creates a Rpc client that implements the AdminSilent interface.
// It communicates using Rpc and can be configured with a custom HTTPClient.
func NewAdminSilentRpcClient(client *liverpc.Client) AdminSilent {
return &adminSilentRpcClient{
client: client,
}
}
func (c *adminSilentRpcClient) GetShieldRule(ctx context.Context, in *AdminSilentGetShieldRuleReq) (*AdminSilentGetShieldRuleResp, error) {
out := new(AdminSilentGetShieldRuleResp)
err := doRpcRequest(ctx, c.client, 1, "AdminSilent.get_shield_rule", in, out)
if err != nil {
return nil, err
}
return out, nil
}
// =====
// Utils
// =====
func doRpcRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message) (err error) {
err = client.Call(ctx, version, method, in, out)
return
}