Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
21
pkg/dbc/models/errors.go
Normal file
21
pkg/dbc/models/errors.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func IncorrectSignalsLength(msgid int, expected int, received int) error {
|
||||
return errors.Errorf("msg id %d incorrect number of signals in message expected %d received %d", msgid, expected, received)
|
||||
}
|
||||
|
||||
func IncorrectSignalError(expected string, received string) error {
|
||||
return errors.Errorf("wrong signal in message expected %s received %s", expected, received)
|
||||
}
|
||||
|
||||
func IncorrectSignalValue(expected interface{}, received interface{}) error {
|
||||
return errors.Errorf("wrong value in message expected one of %v received %v", expected, received)
|
||||
}
|
||||
|
||||
func ErrInvalidDBC(version string) error {
|
||||
return errors.Errorf("could not find %s within collection", version)
|
||||
}
|
||||
Reference in New Issue
Block a user