Documentation ¶
Index ¶
- Constants
- Variables
- func AddEndpointNameMetrics(str string, ctx context.Context) context.Context
- func ConvertStringToTimeDate(input string) (time.Time, error)
- func DateTimeToString(date time.Time) string
- func DateToString(date time.Time) string
- func DateToStringPtr(date time.Time) *string
- func GenerateHttpClientWithInstrumentation(serviceName string) *http.Client
- func GetHostname() string
- func GetTimestamp() string
- func Invoke(invoke interface{})
- func InvokeIf(invoke interface{}, acceptedmodes ...string)
- func NowString() string
- func NowTime() time.Time
- func Provides(methods ...interface{})
- func ProvidesAndSupplyIf(provide interface{}, supply interface{}, acceptedmodes ...string)
- func ProvidesIf(provide interface{}, acceptedmodes ...string)
- func ReadConfig(projectConfigFile, ConfigFileEnvVar string, appconfig any) error
- func Start()
- func StringToDatePtr(date string) *time.Time
- func StringToDateTime(date string) time.Time
- func StringToDateTimePtr(date string) *time.Time
- func Supply(ifaces ...interface{})
- func SupplyIf(iface interface{}, acceptedmodes ...string)
- type ApplicationError
- func BusinessErrorWithCodeAndMessage(code, message string) *ApplicationError
- func BusinessErrorWithError(err error) *ApplicationError
- func NotFoundError() *ApplicationError
- func StringToDate(date string) (time.Time, *ApplicationError)
- func TechnicalErrorWithCodeAndMessage(code, message string) *ApplicationError
- func TechnicalErrorWithError(err error) *ApplicationError
- type Config
- type ServerMetrics
- type Tracer
Constants ¶
View Source
const ( DateFormat = "2006-01-02" DateTimeFormat = "2006-01-02 15:04:05" DateTimeZoneFormat = "2006-01-02T15:04:05.999Z07:00" )
Variables ¶
View Source
var AppName string
View Source
var BuildDate string
View Source
var BuildVersion string
View Source
var Mode = os.Getenv("MODE")
View Source
var SHA string
Functions ¶
func AddEndpointNameMetrics ¶
func DateTimeToString ¶
func DateToString ¶
func DateToStringPtr ¶
func GetHostname ¶
func GetHostname() string
func GetTimestamp ¶
func GetTimestamp() string
func ProvidesAndSupplyIf ¶
func ProvidesAndSupplyIf(provide interface{}, supply interface{}, acceptedmodes ...string)
func ProvidesIf ¶
func ProvidesIf(provide interface{}, acceptedmodes ...string)
func ReadConfig ¶
func StringToDatePtr ¶
func StringToDateTime ¶
func StringToDateTimePtr ¶
Types ¶
type ApplicationError ¶
type ApplicationError struct { StatusCode int `json:"-" bson:"statusCode"` Ambit string `json:"ambit"` Code string `json:"code"` Message string `json:"message"` }
func BusinessErrorWithCodeAndMessage ¶
func BusinessErrorWithCodeAndMessage(code, message string) *ApplicationError
func BusinessErrorWithError ¶
func BusinessErrorWithError(err error) *ApplicationError
func NotFoundError ¶
func NotFoundError() *ApplicationError
func StringToDate ¶
func StringToDate(date string) (time.Time, *ApplicationError)
func TechnicalErrorWithCodeAndMessage ¶
func TechnicalErrorWithCodeAndMessage(code, message string) *ApplicationError
func TechnicalErrorWithError ¶
func TechnicalErrorWithError(err error) *ApplicationError
func (*ApplicationError) Error ¶
func (m *ApplicationError) Error() string
func (*ApplicationError) GetStatus ¶
func (m *ApplicationError) GetStatus() int
func (*ApplicationError) IsBusinessError ¶
func (m *ApplicationError) IsBusinessError() bool
func (*ApplicationError) IsTechnicalError ¶
func (m *ApplicationError) IsTechnicalError() bool
type ServerMetrics ¶
type ServerMetrics struct { }
func NewServerMetrics ¶
func NewServerMetrics(lc fx.Lifecycle) *ServerMetrics
Click to show internal directories.
Click to hide internal directories.