Package AWS :

- Config Model : add a config model with a golib RouerStatus Config Model to use a AWS connection for API with a request status health check
  - Config Interface : add function GetAccessKey to retrieve the accesskey value currently used into the current connection
  - function Walk (Object, version, ...) : fix bug with pointer of string not initialized

Package Config :
  - interface Component : add status router pointer into the Init function to allow used a global router status for all component status registration as router status component

Package Status :
  - move Status Config as an sub package of Package Status

Package Errors :
  - add CamelCase const

Package Logger :
  - fix following bump dependencies

Global :
  - bump dependencies
  - change init of errors files : change function never call vy panic to prevent an error code collision
This commit is contained in:
Nicolas JUHEL
2022-09-13 10:18:04 +02:00
parent 55aa0c3637
commit 573af6ce3a
100 changed files with 887 additions and 765 deletions

View File

@@ -40,8 +40,11 @@ type Message func(code CodeError) (message string)
type CodeError uint16
const UNK_ERROR CodeError = 0
const UnknownError CodeError = 0
const UNK_MESSAGE = "unknown error"
const UnknownMessage = "unknown error"
const NUL_MESSAGE = ""
const NullMessage = ""
func (c CodeError) GetUint16() uint16 {
return uint16(c)
@@ -56,8 +59,8 @@ func (c CodeError) GetString() string {
}
func (c CodeError) GetMessage() string {
if c == UNK_ERROR {
return UNK_MESSAGE
if c == UnknownError {
return UnknownMessage
}
if f, ok := idMsgFct[findCodeErrorInMapMessage(c)]; ok {
@@ -66,7 +69,7 @@ func (c CodeError) GetMessage() string {
}
}
return UNK_MESSAGE
return UnknownMessage
}
func (c CodeError) Error(p Error) Error {
@@ -125,7 +128,7 @@ func RegisterIdFctMessage(minCode CodeError, fct Message) {
func ExistInMapMessage(code CodeError) bool {
if f, ok := idMsgFct[findCodeErrorInMapMessage(code)]; ok {
if m := f(code); m != NUL_MESSAGE {
if m := f(code); m != NullMessage {
return true
}
}