repo

package
v0.0.0-...-cc45bd3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 (d Dial) ListFromProvide(ctx context.Context, provide *models.Provide) ([]*models.Dial, error)

func (Dial) ListFromRetrieval

func (d Dial) ListFromRetrieval(ctx context.Context, retrieval *models.Retrieval) ([]*models.Dial, error)

func (Dial) Save

func (d Dial) Save(ctx context.Context, exec boil.ContextExecutor, dial *models.Dial) (*models.Dial, error)

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

func NewDialRepo(dbc *db.Client) DialRepo

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) ArchiveHost

func (h *Host) ArchiveHost(ctx context.Context, host *models.Host) error

func (*Host) FindAllUnarchived

func (h *Host) FindAllUnarchived(ctx context.Context) (models.HostSlice, error)

func (*Host) FindByID

func (h *Host) FindByID(ctx context.Context, hostID int) (*models.Host, error)

func (*Host) FindByPeerID

func (h *Host) FindByPeerID(ctx context.Context, peerID peer.ID) (*models.Host, error)

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

func NewHostRepo(dbc *db.Client) HostRepo

type IPAddress

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

func (*IPAddress) UpsertIPAddress

func (ia *IPAddress) UpsertIPAddress(ctx context.Context, exec boil.ContextExecutor, address string, info *maxmind.AddrInfo, isPublic bool) (*models.IPAddress, error)

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 Peer

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

func (*Peer) Find

func (p *Peer) Find(ctx context.Context, pid peer.ID) (*models.Peer, error)

func (*Peer) UpsertPeer

func (p *Peer) UpsertPeer(ctx context.Context, exec boil.ContextExecutor, pid peer.ID, av string, protocols []string) (*models.Peer, error)

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

func NewPeerRepo(dbc *db.Client) PeerRepo

type PeerState

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

type PeerStateRepo

type PeerStateRepo interface{}

func NewPeerStateRepo

func NewPeerStateRepo(dbc *db.Client) PeerStateRepo

type Provide

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

func (Provide) Get

func (p Provide) Get(ctx context.Context, hostID string, provideID int) (*models.Provide, error)

func (Provide) GetByID

func (p Provide) GetByID(ctx context.Context, provideID int) (*models.Provide, error)

func (Provide) List

func (p Provide) List(ctx context.Context, hostID string) ([]*models.Provide, error)

func (Provide) Save

func (p Provide) Save(ctx context.Context, provide *models.Provide) (*models.Provide, error)

func (Provide) Update

func (p Provide) Update(ctx context.Context, provide *models.Provide) (*models.Provide, error)

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
}

func (Retrieval) Get

func (r Retrieval) Get(ctx context.Context, hostID string, retrievalID int) (*models.Retrieval, error)

func (Retrieval) List

func (r Retrieval) List(ctx context.Context, hostID string) ([]*models.Retrieval, error)

func (Retrieval) Update

func (r Retrieval) Update(ctx context.Context, retrieval *models.Retrieval) (*models.Retrieval, error)

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

Jump to

Keyboard shortcuts

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