utils

package
v0.0.0-...-c9f28b2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertUserIdKey

func ConvertUserIdKey(id string) string

func CorsConfig

func CorsConfig() *cors.Cors

func CreateId

func CreateId() (string, error)

Create uniq id.

func CreateKey

func CreateKey(kind string, keys ...string) *datastore.Key

func GetQuery

func GetQuery(r *http.Request, key string) (string, error)

Get http query.

Arguments

  • r - request.
  • key - query key.

Returns

query string

func NowTime

func NowTime() *time.Time

func PostGetJson

func PostGetJson(w http.ResponseWriter, r *http.Request, obj interface{})

func ToJson

func ToJson(body interface{}) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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