Versions in this module Expand all Collapse all v2 v2.0.0 Dec 16, 2020 Changes in this version + var ErrAlertNotFound = errors.New("Alert not found") + var ErrClusterNotFound = errors.New("Cluster not found") + var ErrEventEnqueue = errors.New("Failed to enqueue event") + var ErrHostNotFound = errors.New("Host not found") + var ErrLicenseNotFound = errors.New("License not found") + var ErrNotInClusterHostNotFound = errors.New("Not in cluster host not found") + var ErrOracleDatabaseAgreementInvalidPartID = errors.New("Invalid PartID in request") + var ErrOracleDatabaseAgreementNotFound = errors.New("Agreement not found") + var ErrOracleDatabaseAssociatedPartNotFound = errors.New("Associated Part not found") + var ErrPatchingFunctionNotFound = errors.New("Patching Function not found") + var MAX_TIME time.Time = time.Now().AddDate(1000, 0, 0) + var MIN_TIME time.Time = time.Unix(0, 0) + func AssertFuncAreTheSame(t *testing.T, funcExpected interface{}, funcActual interface{}) + func Btc(t time.Time) func() time.Time + func Contains(a []string, x string) bool + func CustomLoggingHandler(router http.Handler, log *logrus.Logger) http.Handler + func DownloadFile(filepath string, url string) (err error) + func FileExists(filename string) bool + func FindNamedMatches(regex *regexp.Regexp, str string) map[string]string + func FromJSON(str []byte) interface + func Intptr(v int64) *int64 + func IsVersionLessThan(a, b string) bool + func LoadFixtureHostData(t *testing.T, filename string) model.HostDataBE + func LoadFixtureHostDataMap(t *testing.T, filename string) model.RawObject + func LoadFixtureMongoHostDataMap(t *testing.T, filename string) model.RawObject + func LoadFixtureMongoHostDataMapAsHostData(t *testing.T, filename string) model.HostDataBE + func LogErr(log *logrus.Logger, err error) + func NewAPIUrl(baseURL string, username string, password string, path string, ...) *url.URL + func NewAPIUrlNoParams(baseURL string, username string, password string, path string) *url.URL + func NewLogger(componentName string) *logrus.Logger + func NewObjectIDForTests() func() primitive.ObjectID + func P(s string) time.Time + func PDT(s string) primitive.DateTime + func Remove(slice []string, i int) []string + func SliceToSliceOfInterface(slice interface{}) []interface + func Str2oid(str string) primitive.ObjectID + func ToIdentedJSON(v interface{}) string + func ToJSON(v interface{}) string + func ToJSONMongoCursor(cur *mongo.Cursor) string + func ToMongoJSON(v interface{}) string + func WriteAndLogError(log *logrus.Logger, w http.ResponseWriter, statusCode int, err error) + func WriteExtJSONResponse(log *logrus.Logger, w http.ResponseWriter, statusCode int, resp interface{}) + func WriteJSONResponse(w http.ResponseWriter, statusCode int, resp interface{}) + func WriteNoContentResponse(w http.ResponseWriter) + func WriteXLSMResponse(w http.ResponseWriter, resp *excelize.File) + func WriteXLSXResponse(w http.ResponseWriter, resp *excelize.File) + type AdvancedError struct + Class string + Err error + Line int + Source string + func NewAdvancedError(err error, class string) AdvancedError + func NewAdvancedErrorPtr(err error, class string) *AdvancedError + func (ae *AdvancedError) Error() string + func (ae *AdvancedError) ErrorClass() string + func (ae *AdvancedError) LineNumber() int + func (ae *AdvancedError) SourceFilename() string + type AdvancedErrorInterface interface + ErrorClass func() string + LineNumber func() int + SourceFilename func() string + var AerrAlertNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrAlertNotFound, "DB ERROR") + var AerrClusterNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrClusterNotFound, "DB ERROR") + var AerrHostNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrHostNotFound, "DB ERROR") + var AerrLicenseNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrLicenseNotFound, "DB ERROR") + var AerrNotInClusterHostNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrNotInClusterHostNotFound, "DB ERROR") + var AerrOracleDatabaseAgreementInvalidPartID AdvancedErrorInterface = NewAdvancedErrorPtr(ErrOracleDatabaseAgreementInvalidPartID, "CLIENT ERROR") + var AerrOracleDatabaseAgreementNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrOracleDatabaseAgreementNotFound, "DB ERROR") + var AerrOracleDatabaseAssociatedPartNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrOracleDatabaseAssociatedPartNotFound, "DB ERROR") + var AerrPatchingFunctionNotFound AdvancedErrorInterface = NewAdvancedErrorPtr(ErrPatchingFunctionNotFound, "DB ERROR") + func ParsePrivateKey(raw []byte) (interface{}, interface{}, AdvancedErrorInterface) + func ParsePublicKey(raw []byte) (interface{}, AdvancedErrorInterface) + func PatchHostdata(pf model.PatchingFunction, hostdata model.HostDataBE) (model.HostDataBE, AdvancedErrorInterface) + func Str2bool(in string, defaultValue bool) (bool, AdvancedErrorInterface) + func Str2float64(in string, defaultValue float64) (float64, AdvancedErrorInterface) + func Str2int(in string, defaultValue int) (int, AdvancedErrorInterface) + func Str2time(in string, defaultValue time.Time) (time.Time, AdvancedErrorInterface) + type ErrorResponseFE struct + Error string + ErrorDescription string + LineNumber int + SourceFilename string