adminapi

package
v0.0.0-...-561f640 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package adminapi - remote API for FileCoin Secondary Retrieval - Gateway Admin library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	// contains filtered or unexported fields
}

func (*Admin) RequestForceRefresh

func (a *Admin) RequestForceRefresh(
	gatewayRegistrar register.GatewayRegistrar,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion) error

RequestForceRefresh forces a given gateway to refresh its internal register

func (*Admin) RequestGetReputation

func (a *Admin) RequestGetReputation(
	gatewayRegistrar register.GatewayRegistrar,
	clientID *nodeid.NodeID,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion,
) (int64, error)

RequestGetReputation gets the reputation for a given client id

func (*Admin) RequestInitialiseKey

func (a *Admin) RequestInitialiseKey(
	gatewayRegistrar register.GatewayRegistrar,
	gatewayPrivKey *fcrcrypto.KeyPair,
	gatewayPrivKeyVer *fcrcrypto.KeyVersion,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion) error

RequestInitialiseKey initialise a given gateway

func (*Admin) RequestInitialiseKeyV2

func (a *Admin) RequestInitialiseKeyV2(
	gatewayRegistrar register.GatewayRegistrar,
	gatewayPrivKey *fcrcrypto.KeyPair,
	gatewayPrivKeyVer *fcrcrypto.KeyVersion,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion,
	lotusWalletPrivateKey string,
	lotusAP string,
	lotusAuthToken string,
) error

RequestInitialiseKeyV2 initialise a given gateway

func (*Admin) RequestListDHTOffer

func (a *Admin) RequestListDHTOffer(
	gatewayRegistrar register.GatewayRegistrar,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion) error

RequestListDHTOffer asks a given gateway to list dht offer

func (*Admin) RequestSetReputation

func (a *Admin) RequestSetReputation(
	gatewayRegistrar register.GatewayRegistrar,
	clientID *nodeid.NodeID,
	reputation int64,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion,
) (bool, error)

RequestSetReputation sets the reputation for a given client id

func (*Admin) SetGroupCIDOfferSupportedForProviders

func (a *Admin) SetGroupCIDOfferSupportedForProviders(
	gatewayRegistrar register.GatewayRegistrar,
	providerIDs []nodeid.NodeID,
	signingPrivkey *fcrcrypto.KeyPair,
	signingPrivKeyVer *fcrcrypto.KeyVersion,
) error

type AdminApi

type AdminApi interface {
	RequestForceRefresh(
		gatewayRegistrar register.GatewayRegistrar,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
	) error

	RequestGetReputation(
		gatewayRegistrar register.GatewayRegistrar,
		clientID *nodeid.NodeID,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
	) (int64, error)

	RequestInitialiseKey(
		gatewayRegistrar register.GatewayRegistrar,
		gatewayPrivKey *fcrcrypto.KeyPair,
		gatewayPrivKeyVer *fcrcrypto.KeyVersion,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
	) error

	RequestInitialiseKeyV2(
		gatewayRegistrar register.GatewayRegistrar,
		gatewayPrivKey *fcrcrypto.KeyPair,
		gatewayPrivKeyVer *fcrcrypto.KeyVersion,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
		lotusWalletPrivateKey string,
		lotusAP string,
		lotusAuthToken string,
	) error

	RequestListDHTOffer(
		gatewayRegistrar register.GatewayRegistrar,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
	) error

	SetGroupCIDOfferSupportedForProviders(
		gatewayRegistrar register.GatewayRegistrar,
		providerIDs []nodeid.NodeID,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
	) error

	RequestSetReputation(
		gatewayRegistrar register.GatewayRegistrar,
		clientID *nodeid.NodeID,
		reputation int64,
		signingPrivkey *fcrcrypto.KeyPair,
		signingPrivKeyVer *fcrcrypto.KeyVersion,
	) (bool, error)
}

func NewAdminApi

func NewAdminApi() AdminApi

func NewAdminApiWithDep

func NewAdminApiWithDep(httpCommunicator request.HttpCommunications) AdminApi

Jump to

Keyboard shortcuts

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