entityinfodictionary

package
v0.0.0-...-9b5cd94 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	ListKeys(c *gin.Context)
	ListValues(c *gin.Context)
}

func NewApi

func NewApi(
	store Store,
	logger zerolog.Logger,
) API

type AggregationResult

type AggregationResult struct {
	Data       []Result `bson:"data" json:"data"`
	TotalCount int64    `bson:"total_count" json:"total_count"`
}

func (AggregationResult) GetData

func (r AggregationResult) GetData() interface{}

func (AggregationResult) GetTotal

func (r AggregationResult) GetTotal() int64

type ListKeysRequest

type ListKeysRequest struct {
	pagination.Query
	Search string `form:"search" json:"search"`
}

type ListValuesRequest

type ListValuesRequest struct {
	pagination.Query
	Key    string `form:"key" json:"key" binding:"required"`
	Search string `form:"search" json:"search"`
}

type Result

type Result struct {
	Value string `bson:"value" json:"value"`
}

type Store

type Store interface {
	FindKeys(ctx context.Context, r ListKeysRequest) (AggregationResult, error)
	FindValues(ctx context.Context, r ListValuesRequest) (AggregationResult, error)
}

func NewStore

func NewStore(db mongo.DbClient) Store

Jump to

Keyboard shortcuts

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