utils

package
v0.0.0-...-cd8b1d2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GetByID ...
	GetByID = "GetByID"
	// GetByIDs ...
	GetByIDs = "GetByIDs"
	// Count ...
	Count = "Count"
	// List ...
	List = "List"
	// Insert ...
	Insert = "Insert"
	// Update ...
	Update = "Update"
	// Delete ...
	Delete = "Delete"

	// ClaimsKey
	ClaimsKey  models.ContextKey = "claims"
	TraceIDKey models.ContextKey = "traceId"
)

* * Constant Define

Variables

This section is empty.

Functions

func CalculateOffsetForPage

func CalculateOffsetForPage(page, pageSize int64) int64

CalculateOffsetForPage map to struct for graphql

func ExtractClaimsFromContext

func ExtractClaimsFromContext(context context.Context) models.Claims

ExtractClaimsFromContext map to struct for graphql

func Parse

func Parse(data map[string]interface{}, result interface{}) error

Parse map to struct for graphql

Types

This section is empty.

Jump to

Keyboard shortcuts

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