Documentation ¶
Index ¶
- type CachedDbRepository
- func (repo *CachedDbRepository) CountAll(ctx context.Context, criteria *openapi.SearchRequest) (int64, error)
- func (repo *CachedDbRepository) FacetCounts(ctx context.Context, criteria *openapi.SearchRequest, facetField string, ...) (*map[string]int64, error)
- func (repo *CachedDbRepository) FindByObjectID(ctx context.Context, objectID string) (*openapi.RouteMetadata, error)
- func (repo *CachedDbRepository) SearchHits(ctx context.Context, criteria *openapi.SearchRequest) (*[]openapi.RouteSummary, error)
- func (repo *CachedDbRepository) Store(ctx context.Context, route *openapi.RouteMetadata) error
- type DbRepository
- type MongoDbRepository
- func (repo *MongoDbRepository) CountAll(ctx context.Context, criteria *model.SearchRequest) (int64, error)
- func (repo *MongoDbRepository) FacetCounts(ctx context.Context, criteria *model.SearchRequest, facetField string, ...) (*map[string]int64, error)
- func (repo *MongoDbRepository) FindByObjectID(ctx context.Context, objectID string) (*model.RouteMetadata, error)
- func (repo *MongoDbRepository) SearchHits(ctx context.Context, criteria *model.SearchRequest) (*[]model.RouteSummary, error)
- func (repo *MongoDbRepository) Store(ctx context.Context, route *model.RouteMetadata) error
- type PostgresDbRepository
- func (repo *PostgresDbRepository) CountAll(ctx context.Context, criteria *model.SearchRequest) (int64, error)
- func (repo *PostgresDbRepository) FacetCounts(ctx context.Context, criteria *model.SearchRequest, facetField string, ...) (*map[string]int64, error)
- func (repo *PostgresDbRepository) FindByObjectID(ctx context.Context, objectID string) (*model.RouteMetadata, error)
- func (repo *PostgresDbRepository) SearchHits(ctx context.Context, criteria *model.SearchRequest) (*[]model.RouteSummary, error)
- func (repo *PostgresDbRepository) Store(ctx context.Context, route *model.RouteMetadata) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedDbRepository ¶
type CachedDbRepository struct {
// contains filtered or unexported fields
}
func NewCachedRepository ¶
func NewCachedRepository(prometheus *ginprom.Prometheus, wrapped DbRepository) *CachedDbRepository
func (*CachedDbRepository) CountAll ¶
func (repo *CachedDbRepository) CountAll(ctx context.Context, criteria *openapi.SearchRequest) (int64, error)
CountAll implements DbRepository.
func (*CachedDbRepository) FacetCounts ¶
func (repo *CachedDbRepository) FacetCounts(ctx context.Context, criteria *openapi.SearchRequest, facetField string, limit int32) (*map[string]int64, error)
FacetCounts implements DbRepository.
func (*CachedDbRepository) FindByObjectID ¶
func (repo *CachedDbRepository) FindByObjectID(ctx context.Context, objectID string) (*openapi.RouteMetadata, error)
FindByObjectID implements DbRepository.
func (*CachedDbRepository) SearchHits ¶
func (repo *CachedDbRepository) SearchHits(ctx context.Context, criteria *openapi.SearchRequest) (*[]openapi.RouteSummary, error)
SearchHits implements DbRepository.
func (*CachedDbRepository) Store ¶
func (repo *CachedDbRepository) Store(ctx context.Context, route *openapi.RouteMetadata) error
Store implements DbRepository.
type DbRepository ¶
type DbRepository interface { Store(ctx context.Context, route *model.RouteMetadata) error FindByObjectID(ctx context.Context, objectID string) (*model.RouteMetadata, error) CountAll(ctx context.Context, criteria *model.SearchRequest) (int64, error) SearchHits(ctx context.Context, criteria *model.SearchRequest) (*[]model.RouteSummary, error) FacetCounts(ctx context.Context, criteria *model.SearchRequest, facetField string, limit int32) (*map[string]int64, error) }
type MongoDbRepository ¶
type MongoDbRepository struct {
// contains filtered or unexported fields
}
func NewMongoRouteRepository ¶
func NewMongoRouteRepository(client *mongo.Client, dbName, collectionName string) *MongoDbRepository
func (*MongoDbRepository) CountAll ¶
func (repo *MongoDbRepository) CountAll(ctx context.Context, criteria *model.SearchRequest) (int64, error)
func (*MongoDbRepository) FacetCounts ¶
func (repo *MongoDbRepository) FacetCounts(ctx context.Context, criteria *model.SearchRequest, facetField string, limit int32) (*map[string]int64, error)
func (*MongoDbRepository) FindByObjectID ¶
func (repo *MongoDbRepository) FindByObjectID(ctx context.Context, objectID string) (*model.RouteMetadata, error)
func (*MongoDbRepository) SearchHits ¶
func (repo *MongoDbRepository) SearchHits(ctx context.Context, criteria *model.SearchRequest) (*[]model.RouteSummary, error)
func (*MongoDbRepository) Store ¶
func (repo *MongoDbRepository) Store(ctx context.Context, route *model.RouteMetadata) error
type PostgresDbRepository ¶
type PostgresDbRepository struct {
// contains filtered or unexported fields
}
func NewPostgresRouteRepository ¶
func NewPostgresRouteRepository(pool *pgxpool.Pool, schema string) *PostgresDbRepository
func (*PostgresDbRepository) CountAll ¶
func (repo *PostgresDbRepository) CountAll(ctx context.Context, criteria *model.SearchRequest) (int64, error)
func (*PostgresDbRepository) FacetCounts ¶
func (repo *PostgresDbRepository) FacetCounts(ctx context.Context, criteria *model.SearchRequest, facetField string, limit int32) (*map[string]int64, error)
func (*PostgresDbRepository) FindByObjectID ¶
func (repo *PostgresDbRepository) FindByObjectID(ctx context.Context, objectID string) (*model.RouteMetadata, error)
func (*PostgresDbRepository) SearchHits ¶
func (repo *PostgresDbRepository) SearchHits(ctx context.Context, criteria *model.SearchRequest) (*[]model.RouteSummary, error)
func (*PostgresDbRepository) Store ¶
func (repo *PostgresDbRepository) Store(ctx context.Context, route *model.RouteMetadata) error
Click to show internal directories.
Click to hide internal directories.