2024-01-22 17:22:41: merge [master:56d3e06e49d7a75f142424293788a4f3b6245430];

This commit is contained in:
txix committed 2024-01-22 17:22:41 +03:00
1 parent 7014f56cbb
commit 2b91caece0
60 files changed
+3558

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
package domain
type AdminAuthenticateResponse struct {
Authenticated bool
ErrorReason string
AdminId int
}
+8
View File
@@ -0,0 +1,8 @@
package domain
type AuthData struct {
SystemId int
DomainId int
ServiceId int
ApplicationId int
}
+9
View File
@@ -0,0 +1,9 @@
package domain
import (
"github.com/pkg/errors"
)
var (
ErrAuthenticationCacheMiss = errors.New("authentication not found in cache")
)
+29
View File
@@ -0,0 +1,29 @@
package domain
type AuthenticateRequest struct {
Token string
}
type AuthenticateResponse struct {
Authenticated bool
ErrorReason string
AuthData *AuthData
}
type AuthorizeRequest struct {
ApplicationId int
Endpoint string
}
type AuthorizeResponse struct {
Authorized bool
}
type AdminAuthorizeRequest struct {
AdminId int
Permission string
}
type AdminAuthorizeResponse struct {
Authorized bool
}
+11
View File
@@ -0,0 +1,11 @@
package domain
import (
"time"
)
type RateLimitResult struct {
Allow bool
Remaining int
RetryAfter time.Duration
}