apihelpers

package
v0.0.0-...-df7b7b9 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTLSConfig

func LoadTLSConfig(paths CertificatePaths) (*tls.Config, error)

func ParseEscapedJSONQueryFromContext

func ParseEscapedJSONQueryFromContext(c *gin.Context, key string) (bson.M, error)

func ParseFilterQueryFromCtx

func ParseFilterQueryFromCtx(c *gin.Context) (bson.M, error)

func ParseSortQueryFromCtx

func ParseSortQueryFromCtx(c *gin.Context) (bson.M, error)

func WriteRoutesToFile

func WriteRoutesToFile(router *gin.Engine, filename string)

Types

type CertificatePaths

type CertificatePaths struct {
	ServerCertPath string `yaml:"server_cert_path"`
	ServerKeyPath  string `yaml:"server_key_path"`
	CACertPath     string `yaml:"ca_cert_path"`
}

type PagenatedQuery

type PagenatedQuery struct {
	Page   int64
	Limit  int64
	Sort   bson.M
	Filter bson.M
}

func ParsePaginatedQueryFromCtx

func ParsePaginatedQueryFromCtx(c *gin.Context) (*PagenatedQuery, error)

type ResponseExportQuery

type ResponseExportQuery struct {
	SurveyKey         string
	UseShortKeys      bool
	QuestionOptionSep string
	Format            string
	IncludeMeta       *surveyresponses.IncludeMeta
	PaginationInfos   *PagenatedQuery
}

func ParseResponseExportQueryFromCtx

func ParseResponseExportQueryFromCtx(c *gin.Context) (*ResponseExportQuery, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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