Documentation ¶
Index ¶
- type AddProviders
- type AddProvidersRepo
- type CloserPeers
- type CloserPeersRepo
- type Connection
- type ConnectionRepo
- type Dial
- func (d Dial) ListFromProvide(ctx context.Context, provide *models.Provide) ([]*models.Dial, error)
- func (d Dial) ListFromRetrieval(ctx context.Context, retrieval *models.Retrieval) ([]*models.Dial, error)
- func (d Dial) Save(ctx context.Context, exec boil.ContextExecutor, dial *models.Dial) (*models.Dial, error)
- type DialRepo
- type FindNodesRPC
- type FindNodesRPCRepo
- type GetProviders
- type GetProvidersRepo
- type Host
- func (h *Host) ArchiveHost(ctx context.Context, host *models.Host) error
- func (h *Host) FindAllUnarchived(ctx context.Context) (models.HostSlice, error)
- func (h *Host) FindByID(ctx context.Context, hostID int) (*models.Host, error)
- func (h *Host) FindByPeerID(ctx context.Context, peerID peer.ID) (*models.Host, error)
- type HostRepo
- type IPAddress
- type IPAddressRepo
- type MultiAddress
- type MultiAddressRepo
- type Peer
- type PeerRepo
- type PeerState
- type PeerStateRepo
- type Provide
- func (p Provide) Get(ctx context.Context, hostID string, provideID int) (*models.Provide, error)
- func (p Provide) GetByID(ctx context.Context, provideID int) (*models.Provide, error)
- func (p Provide) List(ctx context.Context, hostID string) ([]*models.Provide, error)
- func (p Provide) Save(ctx context.Context, provide *models.Provide) (*models.Provide, error)
- func (p Provide) Update(ctx context.Context, provide *models.Provide) (*models.Provide, error)
- type ProvideRepo
- type Retrieval
- type RetrievalRepo
- type RoutingTable
- func (r *RoutingTable) Find(ctx context.Context, routingTableID int) (*models.RoutingTableSnapshot, error)
- func (r *RoutingTable) FindAll(ctx context.Context, hostID string) ([]*models.RoutingTableSnapshot, error)
- func (r *RoutingTable) FindByIDAndHostID(ctx context.Context, routingTableID int, hostID string) (*models.RoutingTableSnapshot, error)
- func (r *RoutingTable) SaveRoutingTableEntry(ctx context.Context, exec boil.ContextExecutor, rte *models.RoutingTableEntry) (*models.RoutingTableEntry, error)
- func (r *RoutingTable) SaveSnapshot(ctx context.Context, exec boil.ContextExecutor, peerID int, bucketSize int, ...) (*models.RoutingTableSnapshot, error)
- type RoutingTableRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddProviders ¶
type AddProviders struct {
// contains filtered or unexported fields
}
func (AddProviders) List ¶
func (ap AddProviders) List(ctx context.Context, provide *models.Provide) ([]*models.AddProviderRPC, error)
type AddProvidersRepo ¶
type AddProvidersRepo interface {
List(ctx context.Context, provide *models.Provide) ([]*models.AddProviderRPC, error)
}
func NewAddProvidersRepo ¶
func NewAddProvidersRepo(dbc *db.Client) AddProvidersRepo
type CloserPeers ¶
type CloserPeers struct {
// contains filtered or unexported fields
}
type CloserPeersRepo ¶
type CloserPeersRepo interface{}
func NewCloserPeersRepo ¶
func NewCloserPeersRepo(dbc *db.Client) CloserPeersRepo
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (Connection) ListFromProvide ¶
func (c Connection) ListFromProvide(ctx context.Context, provide *models.Provide) ([]*models.Connection, error)
func (Connection) ListFromRetrieval ¶
func (c Connection) ListFromRetrieval(ctx context.Context, retrieval *models.Retrieval) ([]*models.Connection, error)
type ConnectionRepo ¶
type ConnectionRepo interface { ListFromProvide(ctx context.Context, provide *models.Provide) ([]*models.Connection, error) ListFromRetrieval(ctx context.Context, retrieval *models.Retrieval) ([]*models.Connection, error) }
func NewConnectionRepo ¶
func NewConnectionRepo(dbc *db.Client) ConnectionRepo
type Dial ¶
type Dial struct {
// contains filtered or unexported fields
}
func (Dial) ListFromProvide ¶
func (Dial) ListFromRetrieval ¶
type DialRepo ¶
type DialRepo interface { ListFromProvide(ctx context.Context, provide *models.Provide) ([]*models.Dial, error) ListFromRetrieval(ctx context.Context, retrieval *models.Retrieval) ([]*models.Dial, error) Save(ctx context.Context, exec boil.ContextExecutor, dial *models.Dial) (*models.Dial, error) }
func NewDialRepo ¶
type FindNodesRPC ¶
type FindNodesRPC struct {
// contains filtered or unexported fields
}
func (FindNodesRPC) List ¶
func (fn FindNodesRPC) List(ctx context.Context, provide *models.Provide) ([]*models.FindNodesRPC, error)
type FindNodesRPCRepo ¶
type FindNodesRPCRepo interface {
List(ctx context.Context, provide *models.Provide) ([]*models.FindNodesRPC, error)
}
func NewFindNodesRPCRepo ¶
func NewFindNodesRPCRepo(dbc *db.Client) FindNodesRPCRepo
type GetProviders ¶
type GetProviders struct {
// contains filtered or unexported fields
}
func (GetProviders) List ¶
func (gp GetProviders) List(ctx context.Context, retrieval *models.Retrieval) ([]*models.GetProvidersRPC, error)
type GetProvidersRepo ¶
type GetProvidersRepo interface {
List(ctx context.Context, retrieval *models.Retrieval) ([]*models.GetProvidersRPC, error)
}
func NewGetProvidersRepo ¶
func NewGetProvidersRepo(dbc *db.Client) GetProvidersRepo
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
func (*Host) FindAllUnarchived ¶
type HostRepo ¶
type HostRepo interface { FindByID(ctx context.Context, hostID int) (*models.Host, error) FindByPeerID(ctx context.Context, peerID peer.ID) (*models.Host, error) FindAllUnarchived(ctx context.Context) (models.HostSlice, error) ArchiveHost(ctx context.Context, host *models.Host) error }
func NewHostRepo ¶
type IPAddressRepo ¶
type IPAddressRepo interface {
UpsertIPAddress(ctx context.Context, exec boil.ContextExecutor, address string, info *maxmind.AddrInfo, isPublic bool) (*models.IPAddress, error)
}
func NewIPAddressRepo ¶
func NewIPAddressRepo(dbc *db.Client) IPAddressRepo
type MultiAddress ¶
type MultiAddress struct {
// contains filtered or unexported fields
}
func (*MultiAddress) UpsertMultiAddress ¶
func (c *MultiAddress) UpsertMultiAddress(ctx context.Context, exec boil.ContextExecutor, maddr *models.MultiAddress, ipAddresses []*models.IPAddress, isPublic bool) (*models.MultiAddress, error)
type MultiAddressRepo ¶
type MultiAddressRepo interface {
UpsertMultiAddress(ctx context.Context, exec boil.ContextExecutor, maddr *models.MultiAddress, addrs []*models.IPAddress, isPublic bool) (*models.MultiAddress, error)
}
func NewMultiAddressRepo ¶
func NewMultiAddressRepo(dbc *db.Client) MultiAddressRepo
type PeerRepo ¶
type PeerRepo interface { Find(context.Context, peer.ID) (*models.Peer, error) UpsertPeer(ctx context.Context, exec boil.ContextExecutor, pid peer.ID, av string, protocols []string) (*models.Peer, error) }
func NewPeerRepo ¶
type PeerStateRepo ¶
type PeerStateRepo interface{}
func NewPeerStateRepo ¶
func NewPeerStateRepo(dbc *db.Client) PeerStateRepo
type Provide ¶
type Provide struct {
// contains filtered or unexported fields
}
type ProvideRepo ¶
type ProvideRepo interface { Save(ctx context.Context, provide *models.Provide) (*models.Provide, error) Update(ctx context.Context, provide *models.Provide) (*models.Provide, error) List(ctx context.Context, hostID string) ([]*models.Provide, error) Get(ctx context.Context, hostID string, provideID int) (*models.Provide, error) GetByID(ctx context.Context, provideID int) (*models.Provide, error) }
func NewProvideRepo ¶
func NewProvideRepo(dbc *db.Client) ProvideRepo
type Retrieval ¶
type Retrieval struct {
// contains filtered or unexported fields
}
type RetrievalRepo ¶
type RetrievalRepo interface { Update(ctx context.Context, retrieval *models.Retrieval) (*models.Retrieval, error) List(ctx context.Context, hostID string) ([]*models.Retrieval, error) Get(ctx context.Context, hostID string, retrievalID int) (*models.Retrieval, error) }
func NewRetrievalRepo ¶
func NewRetrievalRepo(dbc *db.Client) RetrievalRepo
type RoutingTable ¶
type RoutingTable struct {
// contains filtered or unexported fields
}
func (*RoutingTable) Find ¶
func (r *RoutingTable) Find(ctx context.Context, routingTableID int) (*models.RoutingTableSnapshot, error)
func (*RoutingTable) FindAll ¶
func (r *RoutingTable) FindAll(ctx context.Context, hostID string) ([]*models.RoutingTableSnapshot, error)
func (*RoutingTable) FindByIDAndHostID ¶
func (r *RoutingTable) FindByIDAndHostID(ctx context.Context, routingTableID int, hostID string) (*models.RoutingTableSnapshot, error)
func (*RoutingTable) SaveRoutingTableEntry ¶
func (r *RoutingTable) SaveRoutingTableEntry(ctx context.Context, exec boil.ContextExecutor, rte *models.RoutingTableEntry) (*models.RoutingTableEntry, error)
func (*RoutingTable) SaveSnapshot ¶
func (r *RoutingTable) SaveSnapshot(ctx context.Context, exec boil.ContextExecutor, peerID int, bucketSize int, entryCount int) (*models.RoutingTableSnapshot, error)
type RoutingTableRepo ¶
type RoutingTableRepo interface { Find(ctx context.Context, routingTableID int) (*models.RoutingTableSnapshot, error) FindAll(ctx context.Context, hostID string) ([]*models.RoutingTableSnapshot, error) FindByIDAndHostID(ctx context.Context, id int, hostID string) (*models.RoutingTableSnapshot, error) SaveSnapshot(context.Context, boil.ContextExecutor, int, int, int) (*models.RoutingTableSnapshot, error) SaveRoutingTableEntry(context.Context, boil.ContextExecutor, *models.RoutingTableEntry) (*models.RoutingTableEntry, error) }
func NewRoutingTableRepo ¶
func NewRoutingTableRepo(dbc *db.Client) RoutingTableRepo
Click to show internal directories.
Click to hide internal directories.