register

package
v0.0.0-...-12ab560 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Overview

Package register - provides methods for FileCoin Secondary Retrieval from Retrieval Register perspective.

Retrieval Register is a central node, holding information about Retrieval Gateways and Retrieval Providers.

Package register - provides methods for FileCoin Secondary Retrieval from Retrieval Register perspective.

Retrieval Register is a central node, holding information about Retrieval Gateways and Retrieval Providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayRegister

type GatewayRegister struct {
	NodeID              string `json:"nodeId"`
	Address             string `json:"address"`
	RootSigningKey      string `json:"rootSigningKey"`
	SigningKey          string `json:"signingKey"`
	RegionCode          string `json:"regionCode"`
	NetworkInfoGateway  string `json:"networkInfoGateway"`
	NetworkInfoProvider string `json:"networkInfoProvider"`
	NetworkInfoClient   string `json:"networkInfoClient"`
	NetworkInfoAdmin    string `json:"networkInfoAdmin"`
}

GatewayRegister stores information of a registered gateway

func (*GatewayRegister) GetAddress

func (r *GatewayRegister) GetAddress() string

GetAddress gets the address

func (*GatewayRegister) GetNetworkInfoAdmin

func (r *GatewayRegister) GetNetworkInfoAdmin() string

GetNetworkInfoAdmin gets the network admin ap

func (*GatewayRegister) GetNetworkInfoClient

func (r *GatewayRegister) GetNetworkInfoClient() string

GetNetworkInfoClient gets the network client ap

func (*GatewayRegister) GetNetworkInfoGateway

func (r *GatewayRegister) GetNetworkInfoGateway() string

GetNetworkInfoGateway gets the network gateway ap

func (*GatewayRegister) GetNetworkInfoProvider

func (r *GatewayRegister) GetNetworkInfoProvider() string

GetNetworkInfoProvider gets the network provider ap

func (*GatewayRegister) GetNodeID

func (r *GatewayRegister) GetNodeID() string

GetNodeID gets the node id

func (*GatewayRegister) GetRegionCode

func (r *GatewayRegister) GetRegionCode() string

GetRegionCode gets the region code

func (*GatewayRegister) GetRootSigningKey

func (r *GatewayRegister) GetRootSigningKey() (*fcrcrypto.KeyPair, error)

GetRootSigningKey gets the root signing key

func (*GatewayRegister) GetSigningKey

func (r *GatewayRegister) GetSigningKey() (*fcrcrypto.KeyPair, error)

GetSigningKey gets the signing key

func (*GatewayRegister) Serialize

func (r *GatewayRegister) Serialize() GatewayRegister

type GatewayRegistrar

type GatewayRegistrar interface {
	GetNodeID() string
	GetAddress() string
	GetRegionCode() string
	GetNetworkInfoGateway() string
	GetNetworkInfoProvider() string
	GetNetworkInfoClient() string
	GetNetworkInfoAdmin() string
	GetRootSigningKey() (*fcrcrypto.KeyPair, error)
	GetSigningKey() (*fcrcrypto.KeyPair, error)
	Serialize() GatewayRegister
}

func NewGatewayRegister

func NewGatewayRegister(
	nodeID string,
	address string,
	rootSigningKey string,
	signingKey string,
	regionCode string,
	networkInfoGateway string,
	networkInfoProvider string,
	networkInfoClient string,
	networkInfoAdmin string,
) GatewayRegistrar

type ProviderRegister

type ProviderRegister struct {
	NodeID             string `json:"nodeId"`
	Address            string `json:"address"`
	RootSigningKey     string `json:"rootSigningKey"`
	SigningKey         string `json:"signingKey"`
	RegionCode         string `json:"regionCode"`
	NetworkInfoGateway string `json:"networkInfoGateway"`
	NetworkInfoClient  string `json:"networkInfoClient"`
	NetworkInfoAdmin   string `json:"networkInfoAdmin"`
}

ProviderRegister stores information of a registered provider

func (*ProviderRegister) GetAddress

func (r *ProviderRegister) GetAddress() string

GetAddress gets the node id

func (*ProviderRegister) GetNetworkInfoAdmin

func (r *ProviderRegister) GetNetworkInfoAdmin() string

GetNetworkInfoAdmin gets the network admin ap

func (*ProviderRegister) GetNetworkInfoClient

func (r *ProviderRegister) GetNetworkInfoClient() string

GetNetworkInfoClient gets the network client ap

func (*ProviderRegister) GetNetworkInfoGateway

func (r *ProviderRegister) GetNetworkInfoGateway() string

GetNetworkInfoGateway gets the network gateway ap

func (*ProviderRegister) GetNodeID

func (r *ProviderRegister) GetNodeID() string

GetNodeID gets the node id

func (*ProviderRegister) GetRegionCode

func (r *ProviderRegister) GetRegionCode() string

GetRegionCode gets the region code

func (*ProviderRegister) GetRootSigningKey

func (r *ProviderRegister) GetRootSigningKey() (*fcrcrypto.KeyPair, error)

GetRootSigningKey gets the root signing key

func (*ProviderRegister) GetSigningKey

func (r *ProviderRegister) GetSigningKey() (*fcrcrypto.KeyPair, error)

GetSigningKey gets the signing key

func (*ProviderRegister) Serialize

func (r *ProviderRegister) Serialize() ProviderRegister

type ProviderRegistrar

type ProviderRegistrar interface {
	GetNodeID() string
	GetAddress() string
	GetRegionCode() string
	GetRootSigningKey() (*fcrcrypto.KeyPair, error)
	GetSigningKey() (*fcrcrypto.KeyPair, error)
	GetNetworkInfoGateway() string
	GetNetworkInfoClient() string
	GetNetworkInfoAdmin() string
	Serialize() ProviderRegister
}

ProviderRegistrar performs network operations for a registered node

func NewProviderRegister

func NewProviderRegister(
	nodeID string,
	address string,
	rootSigningKey string,
	signingKey string,
	regionCode string,
	networkInfoGateway string,
	networkInfoClient string,
	networkInfoAdmin string,
) ProviderRegistrar

Jump to

Keyboard shortcuts

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