utils

package
v0.0.0-...-79ce300 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HandlerTypeHTTP = "http"
	HandlerTypeGRPC = "grpc"

	MDCountryCode = "country_code"
	MDEnv         = "env"
	MDRequestID   = "request_id"
	MDRequestIP   = "request_ip"
	MDHostIP      = "host_ip"
	MDHandler     = "handler"
	MDUserAgent   = "user_agent"
	MDReferer     = "referer"
)

Variables

This section is empty.

Functions

func Ints32ToStrings

func Ints32ToStrings(ary []int32) []string

func Ints64ToStrings

func Ints64ToStrings(ary []int64) []string

func P2VInt

func P2VInt(i *int) int

func P2VInt64

func P2VInt64(i *int64) int64

func P2VString

func P2VString(s *string) string

func RequestMetadataFromHTTP

func RequestMetadataFromHTTP(ctx context.Context) meta

RequestMetadataFromHTTP get metadata from context

func StringsToInts32

func StringsToInts32(ary []string) ([]int32, error)

func StringsToInts64

func StringsToInts64(ary []string) ([]int64, error)

func WithRequestMetadataFromHTTP

func WithRequestMetadataFromHTTP(r *http.Request, env string) context.Context

WithRequestMetadataFromHTTP http request에 담긴 값을 context 객체에 넣는 역할을 한다.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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