ЛР7 на 4: HTTPS, mTLS, OpenBao AppRole и ротация leaf.
Skeleton contracts / contracts (pull_request) Blocked by required conditions

Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
This commit is contained in:
2026-12-02 23:08:27 +03:00
parent 20afc2c790
commit 2f2047909f
182 changed files with 15169 additions and 90 deletions
+60
View File
@@ -0,0 +1,60 @@
package model
import (
"time"
"github.com/google/uuid"
)
type ContentType string
const (
ContentTypePNG ContentType = "image/png"
ContentTypeJPEG ContentType = "image/jpeg"
ContentTypeWebP ContentType = "image/webp"
)
type AttachmentStatus string
const (
AttachmentStatusQueued AttachmentStatus = "queued"
AttachmentStatusProcessing AttachmentStatus = "processing"
AttachmentStatusReady AttachmentStatus = "ready"
AttachmentStatusFailed AttachmentStatus = "failed"
)
const AttachmentContentOriginal = "original"
type AttachmentVariantName string
const (
AttachmentVariantNameThumbnail AttachmentVariantName = "thumbnail"
AttachmentVariantNameCrop AttachmentVariantName = "crop"
AttachmentVariantNameOptimized AttachmentVariantName = "optimized"
)
type AttachmentVariant struct {
Name AttachmentVariantName
ContentType ContentType
SizeBytes int
Width int
Height int
Sha256 string
}
type Attachment struct {
Variants []AttachmentVariant
ID uuid.UUID
ChatID uuid.UUID
OwnerID uuid.UUID
Filename string
ContentType ContentType
SizeBytes int
Sha256 string
Status AttachmentStatus
Width *int32
Height *int32
ErrorCode *string
CreatedAt time.Time
UpdatedAt time.Time
}
+19
View File
@@ -0,0 +1,19 @@
package model
import (
"time"
"github.com/google/uuid"
)
type AttachmentJob struct {
SchemaVersion int `json:"schema_version"`
JobID uuid.UUID `json:"job_id"`
Type string `json:"type"`
AttachmentID uuid.UUID `json:"attachment_id"`
PipelineVersion int `json:"pipeline_version"`
Attempt int `json:"attempt"`
CreatedAt time.Time `json:"created_at"`
Traceparent string `json:"traceparent,omitempty"`
Tracestate string `json:"tracestate,omitempty"`
}
+14
View File
@@ -0,0 +1,14 @@
package model
import (
"time"
"github.com/google/uuid"
)
type Chat struct {
ID uuid.UUID
Title string
MemberIDs []uuid.UUID
CreatedAt time.Time
}
+16
View File
@@ -0,0 +1,16 @@
package model
import (
"time"
"github.com/google/uuid"
)
type Message struct {
ID uuid.UUID
ChatID uuid.UUID
SenderID uuid.UUID
Text string
AttachmentIDs []uuid.UUID
CreatedAt time.Time
}
+9
View File
@@ -0,0 +1,9 @@
package model
import "time"
type Session struct {
Token string
ExpiresAt time.Time
User User
}
+14
View File
@@ -0,0 +1,14 @@
package model
import (
"time"
"github.com/google/uuid"
)
type User struct {
ID uuid.UUID
Username string
DisplayName string
CreatedAt time.Time
}