Initial commit.
This commit is contained in:
8
internal/common/const.go
Normal file
8
internal/common/const.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package common
|
||||
|
||||
var (
|
||||
Branch string
|
||||
Build string
|
||||
CommitHash string
|
||||
Version string
|
||||
)
|
11
internal/common/context_keys.go
Normal file
11
internal/common/context_keys.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package common
|
||||
|
||||
// ContextKey is a type of context.Context keys.
|
||||
type ContextKey string
|
||||
|
||||
const (
|
||||
// ContextKeyApplication specifies that returned value is a name of application.
|
||||
ContextKeyApplication ContextKey = "applicationName"
|
||||
// ContextKeyMetric specifies that returned value is a name of metric of application.
|
||||
ContextKeyMetric ContextKey = "metricName"
|
||||
)
|
6
internal/common/http_handler.go
Normal file
6
internal/common/http_handler.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package common
|
||||
|
||||
import "context"
|
||||
|
||||
// HTTPHandlerFunc describes signature of HTTP requests handling function.
|
||||
type HTTPHandlerFunc func(context.Context) string
|
Reference in New Issue
Block a user