common

package
v1.3.0-rc.0...-12c9840 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPageSize = 10
View Source
const LangKey = "lang"

Variables

This section is empty.

Functions

func BuildDurationFilterSql

func BuildDurationFilterSql(fieldName string, minDuration, maxDuration float64) string

func BuildLayerPathFilterSql

func BuildLayerPathFilterSql(path string, paramName string, fuzzy bool, layers ...TransactionLayerType) string

func BuildServerSideServiceIdFilterSql

func BuildServerSideServiceIdFilterSql(paramName string, layers ...TransactionLayerType) string

func FormatFloatWith2Digits

func FormatFloatWith2Digits(value float64) float64

func GetDataSourceNames

func GetDataSourceNames(layers ...TransactionLayerType) string

func GetLayerPathKeys

func GetLayerPathKeys(layers ...TransactionLayerType) []string

func GetServerSideServiceIdKeys

func GetServerSideServiceIdKeys(layers ...TransactionLayerType) []string

func GetSlowThreshold

func GetSlowThreshold(layer TransactionLayerType) float64

func GetSortSql

func GetSortSql(fieldSqlMap map[string]string, defaultOrder string, sorts ...*Sort) string

func NewStructValue

func NewStructValue(v map[string]interface{}) *structpb.Value

Types

type Sort

type Sort struct {
	FieldKey  string
	Ascending bool
}

type TransactionLayerType

type TransactionLayerType string
const (
	TransactionLayerHttp  TransactionLayerType = "http"
	TransactionLayerRpc   TransactionLayerType = "rpc"
	TransactionLayerCache TransactionLayerType = "cache"
	TransactionLayerDb    TransactionLayerType = "db"
	TransactionLayerMq    TransactionLayerType = "mq"
)

Jump to

Keyboard shortcuts

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