Initial commit.

This commit is contained in:
2020-11-28 23:34:20 +05:00
commit cdf9997cfe
20 changed files with 475 additions and 0 deletions

8
internal/common/const.go Normal file
View File

@@ -0,0 +1,8 @@
package common
var (
Branch string
Build string
CommitHash string
Version string
)

View 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"
)

View File

@@ -0,0 +1,6 @@
package common
import "context"
// HTTPHandlerFunc describes signature of HTTP requests handling function.
type HTTPHandlerFunc func(context.Context) string