Реализация на 4

This commit is contained in:
Grbisba
2026-11-05 14:24:40 +03:00
parent 20f2f00a60
commit 8d44c74535
85 changed files with 3601 additions and 1109 deletions
+13 -3
View File
@@ -10,7 +10,8 @@ import (
)
const (
DevUserScopes = "devUser.Scopes"
BasicAuthScopes = "basicAuth.Scopes"
BearerAuthScopes = "bearerAuth.Scopes"
)
// Defines values for ErrorErrorCode.
@@ -58,8 +59,9 @@ type CreateMessage struct {
// CreateUser defines model for CreateUser.
type CreateUser struct {
DisplayName string `json:"display_name"`
Username string `json:"username"`
DisplayName string `json:"display_name"`
Password *string `json:"password,omitempty"`
Username string `json:"username"`
}
// Error defines model for Error.
@@ -97,6 +99,14 @@ type MessagePage struct {
NextCursor *string `json:"next_cursor"`
}
// Session defines model for Session.
type Session struct {
ExpiresAt time.Time `json:"expires_at"`
Token string `json:"token"`
TokenType string `json:"token_type"`
User User `json:"user"`
}
// User defines model for User.
type User struct {
CreatedAt time.Time `json:"created_at"`