fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! added first event

This commit is contained in:
Iraq Jaber
2025-08-08 10:18:22 +01:00
parent 53811a1fd8
commit aa281e1e2b
7 changed files with 163 additions and 159 deletions

View File

@@ -1,7 +1,29 @@
package domain
import "errors"
var (
ErrNoAdminSpecified = errors.New("at least one admin must be specified")
import (
"errors"
"fmt"
)
var ErrNoAdminSpecified = errors.New("at least one admin must be specified")
type wrongIDPTypeError struct {
expected IDPType
got string
}
func NewWrongTypeError(expected IDPType, got string) error {
return &wrongIDPTypeError{
expected: expected,
got: got,
}
}
func (e *wrongIDPTypeError) Error() string {
return fmt.Sprintf("wrong idp type returned, expecgted: %v, got: %v", e.expected, e.got)
}
func (e *wrongIDPTypeError) Is(target error) bool {
_, ok := target.(*wrongIDPTypeError)
return ok
}