grpcserver

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Overview

Package grpcserver provides ConnectRPC service handlers for the PeeringDB gRPC API. Each handler implements the generated service interface and queries the ent database layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CampusService

type CampusService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

CampusService implements the peeringdb.v1.CampusService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*CampusService) GetCampus

GetCampus returns a single campus by ID. Returns NOT_FOUND if the campus does not exist.

func (*CampusService) ListCampuses

ListCampuses returns a paginated list of campuses ordered by ID ascending. Supports page_size, page_token, and optional filter fields (name, country, city, status, org_id). Multiple filters combine with AND logic.

func (*CampusService) StreamCampuses added in v1.7.0

func (s *CampusService) StreamCampuses(ctx context.Context, req *pb.StreamCampusesRequest, stream *connect.ServerStream[pb.Campus]) error

StreamCampuses streams all matching campuses one message at a time using batched keyset pagination. Filters match the ListCampuses behavior.

type CarrierFacilityService

type CarrierFacilityService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

CarrierFacilityService implements the peeringdb.v1.CarrierFacilityService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*CarrierFacilityService) GetCarrierFacility

GetCarrierFacility returns a single carrier facility by ID. Returns NOT_FOUND if the carrier facility does not exist.

func (*CarrierFacilityService) ListCarrierFacilities

ListCarrierFacilities returns a paginated list of carrier facilities ordered by ID ascending. Supports page_size, page_token, and optional filter fields (carrier_id, fac_id, status). Multiple filters combine with AND logic.

func (*CarrierFacilityService) StreamCarrierFacilities added in v1.7.0

StreamCarrierFacilities streams all matching carrier facilities one message at a time using batched keyset pagination. Filters match the ListCarrierFacilities behavior.

type CarrierService

type CarrierService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

CarrierService implements the peeringdb.v1.CarrierService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*CarrierService) GetCarrier

GetCarrier returns a single carrier by ID. Returns NOT_FOUND if the carrier does not exist.

func (*CarrierService) ListCarriers

ListCarriers returns a paginated list of carriers ordered by ID ascending. Supports page_size, page_token, and optional filter fields (name, status, org_id). Multiple filters combine with AND logic.

func (*CarrierService) StreamCarriers added in v1.7.0

func (s *CarrierService) StreamCarriers(ctx context.Context, req *pb.StreamCarriersRequest, stream *connect.ServerStream[pb.Carrier]) error

StreamCarriers streams all matching carriers one message at a time using batched keyset pagination. Filters match the ListCarriers behavior.

type FacilityService

type FacilityService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

FacilityService implements the peeringdb.v1.FacilityService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*FacilityService) GetFacility

GetFacility returns a single facility by ID. Returns NOT_FOUND if the facility does not exist.

func (*FacilityService) ListFacilities

ListFacilities returns a paginated list of facilities ordered by ID ascending. Supports page_size, page_token, and optional filter fields (name, country, city, status, org_id). Multiple filters combine with AND logic.

func (*FacilityService) StreamFacilities added in v1.7.0

func (s *FacilityService) StreamFacilities(ctx context.Context, req *pb.StreamFacilitiesRequest, stream *connect.ServerStream[pb.Facility]) error

StreamFacilities streams all matching facilities one message at a time using batched keyset pagination. Filters match the ListFacilities behavior.

type InternetExchangeService

type InternetExchangeService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

InternetExchangeService implements the peeringdb.v1.InternetExchangeService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*InternetExchangeService) GetInternetExchange

GetInternetExchange returns a single internet exchange by ID. Returns NOT_FOUND if the internet exchange does not exist.

func (*InternetExchangeService) ListInternetExchanges

ListInternetExchanges returns a paginated list of internet exchanges ordered by ID ascending. Supports page_size, page_token, and optional filter fields (name, country, city, status, org_id). Multiple filters combine with AND logic.

func (*InternetExchangeService) StreamInternetExchanges added in v1.7.0

StreamInternetExchanges streams all matching internet exchanges one message at a time using batched keyset pagination. Filters match the ListInternetExchanges behavior.

type IxFacilityService

type IxFacilityService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

IxFacilityService implements the peeringdb.v1.IxFacilityService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*IxFacilityService) GetIxFacility

GetIxFacility returns a single IX facility by ID. Returns NOT_FOUND if the IX facility does not exist.

func (*IxFacilityService) ListIxFacilities

ListIxFacilities returns a paginated list of IX facilities ordered by ID ascending. Supports page_size, page_token, and optional filter fields (ix_id, fac_id, country, city, status). Multiple filters combine with AND logic.

func (*IxFacilityService) StreamIxFacilities added in v1.7.0

StreamIxFacilities streams all matching IX facilities one message at a time using batched keyset pagination. Filters match the ListIxFacilities behavior.

type IxLanService

type IxLanService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

IxLanService implements the peeringdb.v1.IxLanService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*IxLanService) GetIxLan

GetIxLan returns a single IX LAN by ID. Returns NOT_FOUND if the IX LAN does not exist.

func (*IxLanService) ListIxLans

ListIxLans returns a paginated list of IX LANs ordered by ID ascending. Supports page_size, page_token, and optional filter fields (ix_id, name, status). Multiple filters combine with AND logic.

func (*IxLanService) StreamIxLans added in v1.7.0

func (s *IxLanService) StreamIxLans(ctx context.Context, req *pb.StreamIxLansRequest, stream *connect.ServerStream[pb.IxLan]) error

StreamIxLans streams all matching IX LANs one message at a time using batched keyset pagination. Filters match the ListIxLans behavior.

type IxPrefixService

type IxPrefixService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

IxPrefixService implements the peeringdb.v1.IxPrefixService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*IxPrefixService) GetIxPrefix

GetIxPrefix returns a single IX prefix by ID. Returns NOT_FOUND if the IX prefix does not exist.

func (*IxPrefixService) ListIxPrefixes

ListIxPrefixes returns a paginated list of IX prefixes ordered by ID ascending. Supports page_size, page_token, and optional filter fields (ixlan_id, protocol, status). Multiple filters combine with AND logic.

func (*IxPrefixService) StreamIxPrefixes added in v1.7.0

func (s *IxPrefixService) StreamIxPrefixes(ctx context.Context, req *pb.StreamIxPrefixesRequest, stream *connect.ServerStream[pb.IxPrefix]) error

StreamIxPrefixes streams all matching IX prefixes one message at a time using batched keyset pagination. Filters match the ListIxPrefixes behavior.

type NetworkFacilityService

type NetworkFacilityService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

NetworkFacilityService implements the peeringdb.v1.NetworkFacilityService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*NetworkFacilityService) GetNetworkFacility

GetNetworkFacility returns a single network facility by ID. Returns NOT_FOUND if the network facility does not exist.

func (*NetworkFacilityService) ListNetworkFacilities

ListNetworkFacilities returns a paginated list of network facilities ordered by ID ascending. Supports page_size, page_token, and optional filter fields (net_id, fac_id, country, city, status). Multiple filters combine with AND logic.

func (*NetworkFacilityService) StreamNetworkFacilities added in v1.7.0

StreamNetworkFacilities streams all matching network facilities one message at a time using batched keyset pagination. Filters match the ListNetworkFacilities behavior.

type NetworkIxLanService

type NetworkIxLanService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

NetworkIxLanService implements the peeringdb.v1.NetworkIxLanService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*NetworkIxLanService) GetNetworkIxLan

GetNetworkIxLan returns a single network IX LAN by ID. Returns NOT_FOUND if the network IX LAN does not exist.

func (*NetworkIxLanService) ListNetworkIxLans

ListNetworkIxLans returns a paginated list of network IX LANs ordered by ID ascending. Supports page_size, page_token, and optional filter fields (net_id, ixlan_id, asn, name, status). Multiple filters combine with AND logic.

func (*NetworkIxLanService) StreamNetworkIxLans added in v1.7.0

StreamNetworkIxLans streams all matching network IX LANs one message at a time using batched keyset pagination. Filters match the ListNetworkIxLans behavior.

type NetworkService

type NetworkService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

NetworkService implements the peeringdb.v1.NetworkService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*NetworkService) GetNetwork

GetNetwork returns a single network by ID. Returns NOT_FOUND if the network does not exist.

func (*NetworkService) ListNetworks

ListNetworks returns a paginated list of networks ordered by ID ascending. Supports page_size, page_token, and optional filter fields (asn, name, status, org_id). Multiple filters combine with AND logic. Name uses case-insensitive substring matching; other fields use exact match.

func (*NetworkService) StreamNetworks added in v1.7.0

func (s *NetworkService) StreamNetworks(ctx context.Context, req *pb.StreamNetworksRequest, stream *connect.ServerStream[pb.Network]) error

StreamNetworks streams all matching networks one message at a time using batched keyset pagination. Filters match the ListNetworks behavior.

type OrganizationService

type OrganizationService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

OrganizationService implements the peeringdb.v1.OrganizationService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*OrganizationService) GetOrganization

GetOrganization returns a single organization by ID. Returns NOT_FOUND if the organization does not exist.

func (*OrganizationService) ListOrganizations

ListOrganizations returns a paginated list of organizations ordered by ID ascending. Supports page_size, page_token, and optional filter fields (name, country, city, status). Multiple filters combine with AND logic.

func (*OrganizationService) StreamOrganizations added in v1.7.0

StreamOrganizations streams all matching organizations one message at a time using batched keyset pagination. Filters match the ListOrganizations behavior.

type PocService

type PocService struct {
	Client        *ent.Client
	StreamTimeout time.Duration
}

PocService implements the peeringdb.v1.PocService ConnectRPC handler interface. It queries the ent database layer and converts results to protobuf messages.

func (*PocService) GetPoc

func (s *PocService) GetPoc(ctx context.Context, req *pb.GetPocRequest) (*pb.GetPocResponse, error)

GetPoc returns a single point of contact by ID. Returns NOT_FOUND if the POC does not exist.

func (*PocService) ListPocs

func (s *PocService) ListPocs(ctx context.Context, req *pb.ListPocsRequest) (*pb.ListPocsResponse, error)

ListPocs returns a paginated list of points of contact ordered by ID ascending. Supports page_size, page_token, and optional filter fields (net_id, role, name, status). Multiple filters combine with AND logic.

func (*PocService) StreamPocs added in v1.7.0

func (s *PocService) StreamPocs(ctx context.Context, req *pb.StreamPocsRequest, stream *connect.ServerStream[pb.Poc]) error

StreamPocs streams all matching points of contact one message at a time using batched keyset pagination. Filters match the ListPocs behavior.

Jump to

Keyboard shortcuts

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