api: Separate the Net interface from Common
This commit is contained in:
+7
-48
@@ -4,15 +4,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/filecoin-project/go-jsonrpc/auth"
|
||||
metrics "github.com/libp2p/go-libp2p-core/metrics"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
protocol "github.com/libp2p/go-libp2p-core/protocol"
|
||||
|
||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||
)
|
||||
|
||||
// MODIFYING THE API INTERFACE
|
||||
@@ -27,55 +23,23 @@ import (
|
||||
// * Generate openrpc blobs
|
||||
|
||||
type Common interface {
|
||||
|
||||
// MethodGroup: Auth
|
||||
|
||||
AuthVerify(ctx context.Context, token string) ([]auth.Permission, error) //perm:read
|
||||
AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error) //perm:admin
|
||||
|
||||
// MethodGroup: Net
|
||||
// MethodGroup: Log
|
||||
|
||||
NetConnectedness(context.Context, peer.ID) (network.Connectedness, error) //perm:read
|
||||
NetPeers(context.Context) ([]peer.AddrInfo, error) //perm:read
|
||||
NetConnect(context.Context, peer.AddrInfo) error //perm:write
|
||||
NetAddrsListen(context.Context) (peer.AddrInfo, error) //perm:read
|
||||
NetDisconnect(context.Context, peer.ID) error //perm:write
|
||||
NetFindPeer(context.Context, peer.ID) (peer.AddrInfo, error) //perm:read
|
||||
NetPubsubScores(context.Context) ([]PubsubScore, error) //perm:read
|
||||
NetAutoNatStatus(context.Context) (NatInfo, error) //perm:read
|
||||
NetAgentVersion(ctx context.Context, p peer.ID) (string, error) //perm:read
|
||||
NetPeerInfo(context.Context, peer.ID) (*ExtendedPeerInfo, error) //perm:read
|
||||
|
||||
// NetBandwidthStats returns statistics about the nodes total bandwidth
|
||||
// usage and current rate across all peers and protocols.
|
||||
NetBandwidthStats(ctx context.Context) (metrics.Stats, error) //perm:read
|
||||
|
||||
// NetBandwidthStatsByPeer returns statistics about the nodes bandwidth
|
||||
// usage and current rate per peer
|
||||
NetBandwidthStatsByPeer(ctx context.Context) (map[string]metrics.Stats, error) //perm:read
|
||||
|
||||
// NetBandwidthStatsByProtocol returns statistics about the nodes bandwidth
|
||||
// usage and current rate per protocol
|
||||
NetBandwidthStatsByProtocol(ctx context.Context) (map[protocol.ID]metrics.Stats, error) //perm:read
|
||||
|
||||
// ConnectionGater API
|
||||
NetBlockAdd(ctx context.Context, acl NetBlockList) error //perm:admin
|
||||
NetBlockRemove(ctx context.Context, acl NetBlockList) error //perm:admin
|
||||
NetBlockList(ctx context.Context) (NetBlockList, error) //perm:read
|
||||
LogList(context.Context) ([]string, error) //perm:write
|
||||
LogSetLevel(context.Context, string, string) error //perm:write
|
||||
|
||||
// MethodGroup: Common
|
||||
|
||||
// Discover returns an OpenRPC document describing an RPC API.
|
||||
Discover(ctx context.Context) (apitypes.OpenRPCDocument, error) //perm:read
|
||||
|
||||
// ID returns peerID of libp2p node backing this API
|
||||
ID(context.Context) (peer.ID, error) //perm:read
|
||||
|
||||
// Version provides information about API provider
|
||||
Version(context.Context) (APIVersion, error) //perm:read
|
||||
|
||||
LogList(context.Context) ([]string, error) //perm:write
|
||||
LogSetLevel(context.Context, string, string) error //perm:write
|
||||
// Discover returns an OpenRPC document describing an RPC API.
|
||||
Discover(ctx context.Context) (apitypes.OpenRPCDocument, error) //perm:read
|
||||
|
||||
// trigger graceful shutdown
|
||||
Shutdown(context.Context) error //perm:admin
|
||||
@@ -105,8 +69,3 @@ type APIVersion struct {
|
||||
func (v APIVersion) String() string {
|
||||
return fmt.Sprintf("%s+api%s", v.Version, v.APIVersion.String())
|
||||
}
|
||||
|
||||
type NatInfo struct {
|
||||
Reachability network.Reachability
|
||||
PublicAddr string
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ const LookbackNoLimit = abi.ChainEpoch(-1)
|
||||
// FullNode API is a low-level interface to the Filecoin network full node
|
||||
type FullNode interface {
|
||||
Common
|
||||
Net
|
||||
|
||||
// MethodGroup: Chain
|
||||
// The Chain method group contains methods for interacting with the
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
metrics "github.com/libp2p/go-libp2p-core/metrics"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
"github.com/libp2p/go-libp2p-core/protocol"
|
||||
)
|
||||
|
||||
// MODIFYING THE API INTERFACE
|
||||
//
|
||||
// When adding / changing methods in this file:
|
||||
// * Do the change here
|
||||
// * Adjust implementation in `node/impl/`
|
||||
// * Run `make gen` - this will:
|
||||
// * Generate proxy structs
|
||||
// * Generate mocks
|
||||
// * Generate markdown docs
|
||||
// * Generate openrpc blobs
|
||||
|
||||
type Net interface {
|
||||
// MethodGroup: Net
|
||||
|
||||
NetConnectedness(context.Context, peer.ID) (network.Connectedness, error) //perm:read
|
||||
NetPeers(context.Context) ([]peer.AddrInfo, error) //perm:read
|
||||
NetConnect(context.Context, peer.AddrInfo) error //perm:write
|
||||
NetAddrsListen(context.Context) (peer.AddrInfo, error) //perm:read
|
||||
NetDisconnect(context.Context, peer.ID) error //perm:write
|
||||
NetFindPeer(context.Context, peer.ID) (peer.AddrInfo, error) //perm:read
|
||||
NetPubsubScores(context.Context) ([]PubsubScore, error) //perm:read
|
||||
NetAutoNatStatus(context.Context) (NatInfo, error) //perm:read
|
||||
NetAgentVersion(ctx context.Context, p peer.ID) (string, error) //perm:read
|
||||
NetPeerInfo(context.Context, peer.ID) (*ExtendedPeerInfo, error) //perm:read
|
||||
|
||||
// NetBandwidthStats returns statistics about the nodes total bandwidth
|
||||
// usage and current rate across all peers and protocols.
|
||||
NetBandwidthStats(ctx context.Context) (metrics.Stats, error) //perm:read
|
||||
|
||||
// NetBandwidthStatsByPeer returns statistics about the nodes bandwidth
|
||||
// usage and current rate per peer
|
||||
NetBandwidthStatsByPeer(ctx context.Context) (map[string]metrics.Stats, error) //perm:read
|
||||
|
||||
// NetBandwidthStatsByProtocol returns statistics about the nodes bandwidth
|
||||
// usage and current rate per protocol
|
||||
NetBandwidthStatsByProtocol(ctx context.Context) (map[protocol.ID]metrics.Stats, error) //perm:read
|
||||
|
||||
// ConnectionGater API
|
||||
NetBlockAdd(ctx context.Context, acl NetBlockList) error //perm:admin
|
||||
NetBlockRemove(ctx context.Context, acl NetBlockList) error //perm:admin
|
||||
NetBlockList(ctx context.Context) (NetBlockList, error) //perm:read
|
||||
|
||||
// MethodGroup: Common
|
||||
|
||||
// ID returns peerID of libp2p node backing this API
|
||||
ID(context.Context) (peer.ID, error) //perm:read
|
||||
}
|
||||
|
||||
type CommonNet interface {
|
||||
Common
|
||||
Net
|
||||
}
|
||||
|
||||
type NatInfo struct {
|
||||
Reachability network.Reachability
|
||||
PublicAddr string
|
||||
}
|
||||
@@ -41,6 +41,7 @@ import (
|
||||
// StorageMiner is a low-level interface to the Filecoin network storage miner node
|
||||
type StorageMiner interface {
|
||||
Common
|
||||
Net
|
||||
|
||||
ActorAddress(context.Context) (address.Address, error) //perm:read
|
||||
|
||||
|
||||
+12
-34
@@ -16,14 +16,10 @@ import (
|
||||
)
|
||||
|
||||
// NewCommonRPCV0 creates a new http jsonrpc client.
|
||||
func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header) (api.Common, jsonrpc.ClientCloser, error) {
|
||||
var res v0api.CommonStruct
|
||||
func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header) (api.CommonNet, jsonrpc.ClientCloser, error) {
|
||||
var res v0api.CommonNetStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.Internal,
|
||||
},
|
||||
requestHeader,
|
||||
)
|
||||
api.GetInternalStructs(&res), requestHeader)
|
||||
|
||||
return &res, closer, err
|
||||
}
|
||||
@@ -31,11 +27,9 @@ func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header)
|
||||
// NewFullNodeRPCV0 creates a new http jsonrpc client.
|
||||
func NewFullNodeRPCV0(ctx context.Context, addr string, requestHeader http.Header) (v0api.FullNode, jsonrpc.ClientCloser, error) {
|
||||
var res v0api.FullNodeStruct
|
||||
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.CommonStruct.Internal,
|
||||
&res.Internal,
|
||||
}, requestHeader)
|
||||
api.GetInternalStructs(&res), requestHeader)
|
||||
|
||||
return &res, closer, err
|
||||
}
|
||||
@@ -44,10 +38,7 @@ func NewFullNodeRPCV0(ctx context.Context, addr string, requestHeader http.Heade
|
||||
func NewFullNodeRPCV1(ctx context.Context, addr string, requestHeader http.Header) (api.FullNode, jsonrpc.ClientCloser, error) {
|
||||
var res v1api.FullNodeStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.CommonStruct.Internal,
|
||||
&res.Internal,
|
||||
}, requestHeader)
|
||||
api.GetInternalStructs(&res), requestHeader)
|
||||
|
||||
return &res, closer, err
|
||||
}
|
||||
@@ -78,15 +69,10 @@ func NewStorageMinerRPCV0(ctx context.Context, addr string, requestHeader http.H
|
||||
|
||||
var res v0api.StorageMinerStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.CommonStruct.Internal,
|
||||
&res.Internal,
|
||||
},
|
||||
requestHeader,
|
||||
api.GetInternalStructs(&res), requestHeader,
|
||||
append([]jsonrpc.Option{
|
||||
rpcenc.ReaderParamEncoder(pushUrl),
|
||||
}, opts...)...,
|
||||
)
|
||||
}, opts...)...)
|
||||
|
||||
return &res, closer, err
|
||||
}
|
||||
@@ -99,9 +85,7 @@ func NewWorkerRPCV0(ctx context.Context, addr string, requestHeader http.Header)
|
||||
|
||||
var res api.WorkerStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.Internal,
|
||||
},
|
||||
api.GetInternalStructs(&res),
|
||||
requestHeader,
|
||||
rpcenc.ReaderParamEncoder(pushUrl),
|
||||
jsonrpc.WithNoReconnect(),
|
||||
@@ -115,9 +99,7 @@ func NewWorkerRPCV0(ctx context.Context, addr string, requestHeader http.Header)
|
||||
func NewGatewayRPCV1(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (api.Gateway, jsonrpc.ClientCloser, error) {
|
||||
var res api.GatewayStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.Internal,
|
||||
},
|
||||
api.GetInternalStructs(&res),
|
||||
requestHeader,
|
||||
opts...,
|
||||
)
|
||||
@@ -129,9 +111,7 @@ func NewGatewayRPCV1(ctx context.Context, addr string, requestHeader http.Header
|
||||
func NewGatewayRPCV0(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (v0api.Gateway, jsonrpc.ClientCloser, error) {
|
||||
var res v0api.GatewayStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.Internal,
|
||||
},
|
||||
api.GetInternalStructs(&res),
|
||||
requestHeader,
|
||||
opts...,
|
||||
)
|
||||
@@ -142,9 +122,7 @@ func NewGatewayRPCV0(ctx context.Context, addr string, requestHeader http.Header
|
||||
func NewWalletRPCV0(ctx context.Context, addr string, requestHeader http.Header) (api.Wallet, jsonrpc.ClientCloser, error) {
|
||||
var res api.WalletStruct
|
||||
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.Internal,
|
||||
},
|
||||
api.GetInternalStructs(&res),
|
||||
requestHeader,
|
||||
)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ func main() {
|
||||
|
||||
doc := docgen_openrpc.NewLotusOpenRPCDocument(Comments, GroupDocs)
|
||||
|
||||
i, _, _, _ := docgen.GetAPIType(os.Args[2], os.Args[3])
|
||||
i, _, _ := docgen.GetAPIType(os.Args[2], os.Args[3])
|
||||
doc.RegisterReceiverName("Filecoin", i)
|
||||
|
||||
out, err := doc.Discover()
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -15,7 +16,7 @@ func main() {
|
||||
|
||||
groups := make(map[string]*docgen.MethodGroup)
|
||||
|
||||
_, t, permStruct, commonPermStruct := docgen.GetAPIType(os.Args[2], os.Args[3])
|
||||
_, t, permStruct := docgen.GetAPIType(os.Args[2], os.Args[3])
|
||||
|
||||
for i := 0; i < t.NumMethod(); i++ {
|
||||
m := t.Method(i)
|
||||
@@ -88,13 +89,17 @@ func main() {
|
||||
fmt.Printf("### %s\n", m.Name)
|
||||
fmt.Printf("%s\n\n", m.Comment)
|
||||
|
||||
meth, ok := permStruct.FieldByName(m.Name)
|
||||
if !ok {
|
||||
meth, ok = commonPermStruct.FieldByName(m.Name)
|
||||
if !ok {
|
||||
panic("no perms for method: " + m.Name)
|
||||
var meth reflect.StructField
|
||||
var ok bool
|
||||
for _, ps := range permStruct {
|
||||
meth, ok = ps.FieldByName(m.Name)
|
||||
if ok {
|
||||
break
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
panic("no perms for method: " + m.Name)
|
||||
}
|
||||
|
||||
perms := meth.Tag.Get("perm")
|
||||
|
||||
|
||||
+12
-9
@@ -266,25 +266,27 @@ func init() {
|
||||
addExample(map[string]interface{}{"abc": 123})
|
||||
}
|
||||
|
||||
func GetAPIType(name, pkg string) (i interface{}, t, permStruct, commonPermStruct reflect.Type) {
|
||||
func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
|
||||
|
||||
switch pkg {
|
||||
case "api": // latest
|
||||
switch name {
|
||||
case "FullNode":
|
||||
i = &api.FullNodeStruct{}
|
||||
t = reflect.TypeOf(new(struct{ api.FullNode })).Elem()
|
||||
permStruct = reflect.TypeOf(api.FullNodeStruct{}.Internal)
|
||||
commonPermStruct = reflect.TypeOf(api.CommonStruct{}.Internal)
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.FullNodeStruct{}.Internal))
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.CommonStruct{}.Internal))
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.NetStruct{}.Internal))
|
||||
case "StorageMiner":
|
||||
i = &api.StorageMinerStruct{}
|
||||
t = reflect.TypeOf(new(struct{ api.StorageMiner })).Elem()
|
||||
permStruct = reflect.TypeOf(api.StorageMinerStruct{}.Internal)
|
||||
commonPermStruct = reflect.TypeOf(api.CommonStruct{}.Internal)
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.StorageMinerStruct{}.Internal))
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.CommonStruct{}.Internal))
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.NetStruct{}.Internal))
|
||||
case "Worker":
|
||||
i = &api.WorkerStruct{}
|
||||
t = reflect.TypeOf(new(struct{ api.Worker })).Elem()
|
||||
permStruct = reflect.TypeOf(api.WorkerStruct{}.Internal)
|
||||
commonPermStruct = reflect.TypeOf(api.WorkerStruct{}.Internal)
|
||||
permStruct = append(permStruct, reflect.TypeOf(api.WorkerStruct{}.Internal))
|
||||
default:
|
||||
panic("unknown type")
|
||||
}
|
||||
@@ -293,8 +295,9 @@ func GetAPIType(name, pkg string) (i interface{}, t, permStruct, commonPermStruc
|
||||
case "FullNode":
|
||||
i = v0api.FullNodeStruct{}
|
||||
t = reflect.TypeOf(new(struct{ v0api.FullNode })).Elem()
|
||||
permStruct = reflect.TypeOf(v0api.FullNodeStruct{}.Internal)
|
||||
commonPermStruct = reflect.TypeOf(v0api.CommonStruct{}.Internal)
|
||||
permStruct = append(permStruct, reflect.TypeOf(v0api.FullNodeStruct{}.Internal))
|
||||
permStruct = append(permStruct, reflect.TypeOf(v0api.CommonStruct{}.Internal))
|
||||
permStruct = append(permStruct, reflect.TypeOf(v0api.NetStruct{}.Internal))
|
||||
default:
|
||||
panic("unknown type")
|
||||
}
|
||||
|
||||
+11
-6
@@ -16,28 +16,33 @@ const (
|
||||
var AllPermissions = []auth.Permission{PermRead, PermWrite, PermSign, PermAdmin}
|
||||
var DefaultPerms = []auth.Permission{PermRead}
|
||||
|
||||
func permissionedProxies(in, out interface{}) {
|
||||
outs := GetInternalStructs(out)
|
||||
for _, o := range outs {
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, in, o)
|
||||
}
|
||||
}
|
||||
|
||||
func PermissionedStorMinerAPI(a StorageMiner) StorageMiner {
|
||||
var out StorageMinerStruct
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, a, &out.Internal)
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, a, &out.CommonStruct.Internal)
|
||||
permissionedProxies(a, &out)
|
||||
return &out
|
||||
}
|
||||
|
||||
func PermissionedFullAPI(a FullNode) FullNode {
|
||||
var out FullNodeStruct
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, a, &out.Internal)
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, a, &out.CommonStruct.Internal)
|
||||
permissionedProxies(a, &out)
|
||||
return &out
|
||||
}
|
||||
|
||||
func PermissionedWorkerAPI(a Worker) Worker {
|
||||
var out WorkerStruct
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, a, &out.Internal)
|
||||
permissionedProxies(a, &out)
|
||||
return &out
|
||||
}
|
||||
|
||||
func PermissionedWalletAPI(a Wallet) Wallet {
|
||||
var out WalletStruct
|
||||
auth.PermissionedProxy(AllPermissions, DefaultPerms, a, &out.Internal)
|
||||
permissionedProxies(a, &out)
|
||||
return &out
|
||||
}
|
||||
|
||||
+203
-171
@@ -35,7 +35,7 @@ import (
|
||||
metrics "github.com/libp2p/go-libp2p-core/metrics"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
protocol "github.com/libp2p/go-libp2p-core/protocol"
|
||||
"github.com/libp2p/go-libp2p-core/protocol"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
@@ -60,44 +60,10 @@ type CommonStruct struct {
|
||||
|
||||
Discover func(p0 context.Context) (apitypes.OpenRPCDocument, error) `perm:"read"`
|
||||
|
||||
ID func(p0 context.Context) (peer.ID, error) `perm:"read"`
|
||||
|
||||
LogList func(p0 context.Context) ([]string, error) `perm:"write"`
|
||||
|
||||
LogSetLevel func(p0 context.Context, p1 string, p2 string) error `perm:"write"`
|
||||
|
||||
NetAddrsListen func(p0 context.Context) (peer.AddrInfo, error) `perm:"read"`
|
||||
|
||||
NetAgentVersion func(p0 context.Context, p1 peer.ID) (string, error) `perm:"read"`
|
||||
|
||||
NetAutoNatStatus func(p0 context.Context) (NatInfo, error) `perm:"read"`
|
||||
|
||||
NetBandwidthStats func(p0 context.Context) (metrics.Stats, error) `perm:"read"`
|
||||
|
||||
NetBandwidthStatsByPeer func(p0 context.Context) (map[string]metrics.Stats, error) `perm:"read"`
|
||||
|
||||
NetBandwidthStatsByProtocol func(p0 context.Context) (map[protocol.ID]metrics.Stats, error) `perm:"read"`
|
||||
|
||||
NetBlockAdd func(p0 context.Context, p1 NetBlockList) error `perm:"admin"`
|
||||
|
||||
NetBlockList func(p0 context.Context) (NetBlockList, error) `perm:"read"`
|
||||
|
||||
NetBlockRemove func(p0 context.Context, p1 NetBlockList) error `perm:"admin"`
|
||||
|
||||
NetConnect func(p0 context.Context, p1 peer.AddrInfo) error `perm:"write"`
|
||||
|
||||
NetConnectedness func(p0 context.Context, p1 peer.ID) (network.Connectedness, error) `perm:"read"`
|
||||
|
||||
NetDisconnect func(p0 context.Context, p1 peer.ID) error `perm:"write"`
|
||||
|
||||
NetFindPeer func(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) `perm:"read"`
|
||||
|
||||
NetPeerInfo func(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) `perm:"read"`
|
||||
|
||||
NetPeers func(p0 context.Context) ([]peer.AddrInfo, error) `perm:"read"`
|
||||
|
||||
NetPubsubScores func(p0 context.Context) ([]PubsubScore, error) `perm:"read"`
|
||||
|
||||
Session func(p0 context.Context) (uuid.UUID, error) `perm:"read"`
|
||||
|
||||
Shutdown func(p0 context.Context) error `perm:"admin"`
|
||||
@@ -109,9 +75,26 @@ type CommonStruct struct {
|
||||
type CommonStub struct {
|
||||
}
|
||||
|
||||
type CommonNetStruct struct {
|
||||
CommonStruct
|
||||
|
||||
NetStruct
|
||||
|
||||
Internal struct {
|
||||
}
|
||||
}
|
||||
|
||||
type CommonNetStub struct {
|
||||
CommonStub
|
||||
|
||||
NetStub
|
||||
}
|
||||
|
||||
type FullNodeStruct struct {
|
||||
CommonStruct
|
||||
|
||||
NetStruct
|
||||
|
||||
Internal struct {
|
||||
BeaconGetEntry func(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"`
|
||||
|
||||
@@ -473,6 +456,8 @@ type FullNodeStruct struct {
|
||||
|
||||
type FullNodeStub struct {
|
||||
CommonStub
|
||||
|
||||
NetStub
|
||||
}
|
||||
|
||||
type GatewayStruct struct {
|
||||
@@ -542,6 +527,47 @@ type GatewayStruct struct {
|
||||
type GatewayStub struct {
|
||||
}
|
||||
|
||||
type NetStruct struct {
|
||||
Internal struct {
|
||||
ID func(p0 context.Context) (peer.ID, error) `perm:"read"`
|
||||
|
||||
NetAddrsListen func(p0 context.Context) (peer.AddrInfo, error) `perm:"read"`
|
||||
|
||||
NetAgentVersion func(p0 context.Context, p1 peer.ID) (string, error) `perm:"read"`
|
||||
|
||||
NetAutoNatStatus func(p0 context.Context) (NatInfo, error) `perm:"read"`
|
||||
|
||||
NetBandwidthStats func(p0 context.Context) (metrics.Stats, error) `perm:"read"`
|
||||
|
||||
NetBandwidthStatsByPeer func(p0 context.Context) (map[string]metrics.Stats, error) `perm:"read"`
|
||||
|
||||
NetBandwidthStatsByProtocol func(p0 context.Context) (map[protocol.ID]metrics.Stats, error) `perm:"read"`
|
||||
|
||||
NetBlockAdd func(p0 context.Context, p1 NetBlockList) error `perm:"admin"`
|
||||
|
||||
NetBlockList func(p0 context.Context) (NetBlockList, error) `perm:"read"`
|
||||
|
||||
NetBlockRemove func(p0 context.Context, p1 NetBlockList) error `perm:"admin"`
|
||||
|
||||
NetConnect func(p0 context.Context, p1 peer.AddrInfo) error `perm:"write"`
|
||||
|
||||
NetConnectedness func(p0 context.Context, p1 peer.ID) (network.Connectedness, error) `perm:"read"`
|
||||
|
||||
NetDisconnect func(p0 context.Context, p1 peer.ID) error `perm:"write"`
|
||||
|
||||
NetFindPeer func(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) `perm:"read"`
|
||||
|
||||
NetPeerInfo func(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) `perm:"read"`
|
||||
|
||||
NetPeers func(p0 context.Context) ([]peer.AddrInfo, error) `perm:"read"`
|
||||
|
||||
NetPubsubScores func(p0 context.Context) ([]PubsubScore, error) `perm:"read"`
|
||||
}
|
||||
}
|
||||
|
||||
type NetStub struct {
|
||||
}
|
||||
|
||||
type SignableStruct struct {
|
||||
Internal struct {
|
||||
Sign func(p0 context.Context, p1 SignFunc) error ``
|
||||
@@ -554,6 +580,8 @@ type SignableStub struct {
|
||||
type StorageMinerStruct struct {
|
||||
CommonStruct
|
||||
|
||||
NetStruct
|
||||
|
||||
Internal struct {
|
||||
ActorAddress func(p0 context.Context) (address.Address, error) `perm:"read"`
|
||||
|
||||
@@ -747,6 +775,8 @@ type StorageMinerStruct struct {
|
||||
|
||||
type StorageMinerStub struct {
|
||||
CommonStub
|
||||
|
||||
NetStub
|
||||
}
|
||||
|
||||
type WalletStruct struct {
|
||||
@@ -871,14 +901,6 @@ func (s *CommonStub) Discover(p0 context.Context) (apitypes.OpenRPCDocument, err
|
||||
return *new(apitypes.OpenRPCDocument), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) ID(p0 context.Context) (peer.ID, error) {
|
||||
return s.Internal.ID(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) ID(p0 context.Context) (peer.ID, error) {
|
||||
return *new(peer.ID), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) LogList(p0 context.Context) ([]string, error) {
|
||||
return s.Internal.LogList(p0)
|
||||
}
|
||||
@@ -895,134 +917,6 @@ func (s *CommonStub) LogSetLevel(p0 context.Context, p1 string, p2 string) error
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetAddrsListen(p0 context.Context) (peer.AddrInfo, error) {
|
||||
return s.Internal.NetAddrsListen(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetAddrsListen(p0 context.Context) (peer.AddrInfo, error) {
|
||||
return *new(peer.AddrInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetAgentVersion(p0 context.Context, p1 peer.ID) (string, error) {
|
||||
return s.Internal.NetAgentVersion(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetAgentVersion(p0 context.Context, p1 peer.ID) (string, error) {
|
||||
return "", xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetAutoNatStatus(p0 context.Context) (NatInfo, error) {
|
||||
return s.Internal.NetAutoNatStatus(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetAutoNatStatus(p0 context.Context) (NatInfo, error) {
|
||||
return *new(NatInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetBandwidthStats(p0 context.Context) (metrics.Stats, error) {
|
||||
return s.Internal.NetBandwidthStats(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetBandwidthStats(p0 context.Context) (metrics.Stats, error) {
|
||||
return *new(metrics.Stats), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetBandwidthStatsByPeer(p0 context.Context) (map[string]metrics.Stats, error) {
|
||||
return s.Internal.NetBandwidthStatsByPeer(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetBandwidthStatsByPeer(p0 context.Context) (map[string]metrics.Stats, error) {
|
||||
return *new(map[string]metrics.Stats), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetBandwidthStatsByProtocol(p0 context.Context) (map[protocol.ID]metrics.Stats, error) {
|
||||
return s.Internal.NetBandwidthStatsByProtocol(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetBandwidthStatsByProtocol(p0 context.Context) (map[protocol.ID]metrics.Stats, error) {
|
||||
return *new(map[protocol.ID]metrics.Stats), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetBlockAdd(p0 context.Context, p1 NetBlockList) error {
|
||||
return s.Internal.NetBlockAdd(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetBlockAdd(p0 context.Context, p1 NetBlockList) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetBlockList(p0 context.Context) (NetBlockList, error) {
|
||||
return s.Internal.NetBlockList(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetBlockList(p0 context.Context) (NetBlockList, error) {
|
||||
return *new(NetBlockList), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetBlockRemove(p0 context.Context, p1 NetBlockList) error {
|
||||
return s.Internal.NetBlockRemove(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetBlockRemove(p0 context.Context, p1 NetBlockList) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetConnect(p0 context.Context, p1 peer.AddrInfo) error {
|
||||
return s.Internal.NetConnect(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetConnect(p0 context.Context, p1 peer.AddrInfo) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetConnectedness(p0 context.Context, p1 peer.ID) (network.Connectedness, error) {
|
||||
return s.Internal.NetConnectedness(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetConnectedness(p0 context.Context, p1 peer.ID) (network.Connectedness, error) {
|
||||
return *new(network.Connectedness), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetDisconnect(p0 context.Context, p1 peer.ID) error {
|
||||
return s.Internal.NetDisconnect(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetDisconnect(p0 context.Context, p1 peer.ID) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) {
|
||||
return s.Internal.NetFindPeer(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) {
|
||||
return *new(peer.AddrInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetPeerInfo(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) {
|
||||
return s.Internal.NetPeerInfo(p0, p1)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetPeerInfo(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) {
|
||||
return nil, xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetPeers(p0 context.Context) ([]peer.AddrInfo, error) {
|
||||
return s.Internal.NetPeers(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetPeers(p0 context.Context) ([]peer.AddrInfo, error) {
|
||||
return *new([]peer.AddrInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) NetPubsubScores(p0 context.Context) ([]PubsubScore, error) {
|
||||
return s.Internal.NetPubsubScores(p0)
|
||||
}
|
||||
|
||||
func (s *CommonStub) NetPubsubScores(p0 context.Context) ([]PubsubScore, error) {
|
||||
return *new([]PubsubScore), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *CommonStruct) Session(p0 context.Context) (uuid.UUID, error) {
|
||||
return s.Internal.Session(p0)
|
||||
}
|
||||
@@ -2711,6 +2605,142 @@ func (s *GatewayStub) WalletBalance(p0 context.Context, p1 address.Address) (typ
|
||||
return *new(types.BigInt), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) ID(p0 context.Context) (peer.ID, error) {
|
||||
return s.Internal.ID(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) ID(p0 context.Context) (peer.ID, error) {
|
||||
return *new(peer.ID), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetAddrsListen(p0 context.Context) (peer.AddrInfo, error) {
|
||||
return s.Internal.NetAddrsListen(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetAddrsListen(p0 context.Context) (peer.AddrInfo, error) {
|
||||
return *new(peer.AddrInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetAgentVersion(p0 context.Context, p1 peer.ID) (string, error) {
|
||||
return s.Internal.NetAgentVersion(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetAgentVersion(p0 context.Context, p1 peer.ID) (string, error) {
|
||||
return "", xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetAutoNatStatus(p0 context.Context) (NatInfo, error) {
|
||||
return s.Internal.NetAutoNatStatus(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetAutoNatStatus(p0 context.Context) (NatInfo, error) {
|
||||
return *new(NatInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetBandwidthStats(p0 context.Context) (metrics.Stats, error) {
|
||||
return s.Internal.NetBandwidthStats(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetBandwidthStats(p0 context.Context) (metrics.Stats, error) {
|
||||
return *new(metrics.Stats), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetBandwidthStatsByPeer(p0 context.Context) (map[string]metrics.Stats, error) {
|
||||
return s.Internal.NetBandwidthStatsByPeer(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetBandwidthStatsByPeer(p0 context.Context) (map[string]metrics.Stats, error) {
|
||||
return *new(map[string]metrics.Stats), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetBandwidthStatsByProtocol(p0 context.Context) (map[protocol.ID]metrics.Stats, error) {
|
||||
return s.Internal.NetBandwidthStatsByProtocol(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetBandwidthStatsByProtocol(p0 context.Context) (map[protocol.ID]metrics.Stats, error) {
|
||||
return *new(map[protocol.ID]metrics.Stats), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetBlockAdd(p0 context.Context, p1 NetBlockList) error {
|
||||
return s.Internal.NetBlockAdd(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetBlockAdd(p0 context.Context, p1 NetBlockList) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetBlockList(p0 context.Context) (NetBlockList, error) {
|
||||
return s.Internal.NetBlockList(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetBlockList(p0 context.Context) (NetBlockList, error) {
|
||||
return *new(NetBlockList), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetBlockRemove(p0 context.Context, p1 NetBlockList) error {
|
||||
return s.Internal.NetBlockRemove(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetBlockRemove(p0 context.Context, p1 NetBlockList) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetConnect(p0 context.Context, p1 peer.AddrInfo) error {
|
||||
return s.Internal.NetConnect(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetConnect(p0 context.Context, p1 peer.AddrInfo) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetConnectedness(p0 context.Context, p1 peer.ID) (network.Connectedness, error) {
|
||||
return s.Internal.NetConnectedness(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetConnectedness(p0 context.Context, p1 peer.ID) (network.Connectedness, error) {
|
||||
return *new(network.Connectedness), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetDisconnect(p0 context.Context, p1 peer.ID) error {
|
||||
return s.Internal.NetDisconnect(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetDisconnect(p0 context.Context, p1 peer.ID) error {
|
||||
return xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) {
|
||||
return s.Internal.NetFindPeer(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) {
|
||||
return *new(peer.AddrInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetPeerInfo(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) {
|
||||
return s.Internal.NetPeerInfo(p0, p1)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetPeerInfo(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) {
|
||||
return nil, xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetPeers(p0 context.Context) ([]peer.AddrInfo, error) {
|
||||
return s.Internal.NetPeers(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetPeers(p0 context.Context) ([]peer.AddrInfo, error) {
|
||||
return *new([]peer.AddrInfo), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *NetStruct) NetPubsubScores(p0 context.Context) ([]PubsubScore, error) {
|
||||
return s.Internal.NetPubsubScores(p0)
|
||||
}
|
||||
|
||||
func (s *NetStub) NetPubsubScores(p0 context.Context) ([]PubsubScore, error) {
|
||||
return *new([]PubsubScore), xerrors.New("method not supported")
|
||||
}
|
||||
|
||||
func (s *SignableStruct) Sign(p0 context.Context, p1 SignFunc) error {
|
||||
return s.Internal.Sign(p0, p1)
|
||||
}
|
||||
@@ -3713,8 +3743,10 @@ func (s *WorkerStub) WaitQuiet(p0 context.Context) error {
|
||||
|
||||
var _ ChainIO = new(ChainIOStruct)
|
||||
var _ Common = new(CommonStruct)
|
||||
var _ CommonNet = new(CommonNetStruct)
|
||||
var _ FullNode = new(FullNodeStruct)
|
||||
var _ Gateway = new(GatewayStruct)
|
||||
var _ Net = new(NetStruct)
|
||||
var _ Signable = new(SignableStruct)
|
||||
var _ StorageMiner = new(StorageMinerStruct)
|
||||
var _ Wallet = new(WalletStruct)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package api
|
||||
|
||||
import "reflect"
|
||||
|
||||
var _internalField = "Internal"
|
||||
|
||||
// GetInternalStructs extracts all pointers to 'Internal' sub-structs from the provided pointer to a proxy struct
|
||||
func GetInternalStructs(in interface{}) []interface{} {
|
||||
return getInternalStructs(reflect.ValueOf(in).Elem())
|
||||
}
|
||||
|
||||
func getInternalStructs(rv reflect.Value) []interface{} {
|
||||
var out []interface{}
|
||||
|
||||
internal := rv.FieldByName(_internalField)
|
||||
ii := internal.Addr().Interface()
|
||||
out = append(out, ii)
|
||||
|
||||
for i := 0; i < rv.NumField(); i++ {
|
||||
if rv.Type().Field(i).Name == _internalField {
|
||||
continue
|
||||
}
|
||||
|
||||
sub := getInternalStructs(rv.Field(i))
|
||||
|
||||
out = append(out, sub...)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
type StrA struct {
|
||||
StrB
|
||||
|
||||
Internal struct {
|
||||
A int
|
||||
}
|
||||
}
|
||||
|
||||
type StrB struct {
|
||||
Internal struct {
|
||||
B int
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetInternalStructs(t *testing.T) {
|
||||
var proxy StrA
|
||||
|
||||
sts := GetInternalStructs(&proxy)
|
||||
require.Len(t, sts, 2)
|
||||
|
||||
sa := sts[0].(*struct{ A int })
|
||||
sa.A = 3
|
||||
sb := sts[1].(*struct{ B int })
|
||||
sb.B = 4
|
||||
|
||||
require.Equal(t, 3, proxy.Internal.A)
|
||||
require.Equal(t, 4, proxy.StrB.Internal.B)
|
||||
}
|
||||
@@ -46,6 +46,7 @@ import (
|
||||
// FullNode API is a low-level interface to the Filecoin network full node
|
||||
type FullNode interface {
|
||||
Common
|
||||
Net
|
||||
|
||||
// MethodGroup: Chain
|
||||
// The Chain method group contains methods for interacting with the
|
||||
|
||||
@@ -5,8 +5,15 @@ import (
|
||||
)
|
||||
|
||||
type Common = api.Common
|
||||
type Net = api.Net
|
||||
type CommonNet = api.CommonNet
|
||||
|
||||
type CommonStruct = api.CommonStruct
|
||||
type CommonStub = api.CommonStub
|
||||
type NetStruct = api.NetStruct
|
||||
type NetStub = api.NetStub
|
||||
type CommonNetStruct = api.CommonNetStruct
|
||||
type CommonNetStub = api.CommonNetStub
|
||||
|
||||
type StorageMiner = api.StorageMiner
|
||||
type StorageMinerStruct = api.StorageMinerStruct
|
||||
|
||||
@@ -30,6 +30,8 @@ import (
|
||||
type FullNodeStruct struct {
|
||||
CommonStruct
|
||||
|
||||
NetStruct
|
||||
|
||||
Internal struct {
|
||||
BeaconGetEntry func(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"`
|
||||
|
||||
@@ -389,6 +391,8 @@ type FullNodeStruct struct {
|
||||
|
||||
type FullNodeStub struct {
|
||||
CommonStub
|
||||
|
||||
NetStub
|
||||
}
|
||||
|
||||
type GatewayStruct struct {
|
||||
|
||||
Reference in New Issue
Block a user