47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
|
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
|
||
|
// source: v1/Silent.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
|
||
|
|
||
|
// ================
|
||
|
// Silent Interface
|
||
|
// ================
|
||
|
|
||
|
type Silent interface {
|
||
|
// * 获取禁言
|
||
|
//
|
||
|
GetRoomSilent(context.Context, *SilentGetRoomSilentReq) (*SilentGetRoomSilentResp, error)
|
||
|
}
|
||
|
|
||
|
// ======================
|
||
|
// Silent Live Rpc Client
|
||
|
// ======================
|
||
|
|
||
|
type silentRpcClient struct {
|
||
|
client *liverpc.Client
|
||
|
}
|
||
|
|
||
|
// NewSilentRpcClient creates a Rpc client that implements the Silent interface.
|
||
|
// It communicates using Rpc and can be configured with a custom HTTPClient.
|
||
|
func NewSilentRpcClient(client *liverpc.Client) Silent {
|
||
|
return &silentRpcClient{
|
||
|
client: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (c *silentRpcClient) GetRoomSilent(ctx context.Context, in *SilentGetRoomSilentReq) (*SilentGetRoomSilentResp, error) {
|
||
|
out := new(SilentGetRoomSilentResp)
|
||
|
err := doRpcRequest(ctx, c.client, 1, "Silent.get_room_silent", in, out)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|