Prepare verified laboratory 4 implementation and evidence

This commit is contained in:
rey
2026-11-17 17:31:17 +03:00
parent ec540a1a72
commit 4fc1f40099
172 changed files with 15646 additions and 38 deletions
+18
View File
@@ -0,0 +1,18 @@
package port
import (
"context"
"github.com/google/uuid"
"time"
)
type Passwords interface {
Hash(string) (string, error)
Verify(string, string) bool
}
type Sessions interface {
Credentials(context.Context, string) (uuid.UUID, string, error)
CreateSession(context.Context, string, uuid.UUID, time.Time) error
AuthenticateSession(context.Context, string) (uuid.UUID, error)
RevokeSession(context.Context, string) error
}
+20
View File
@@ -0,0 +1,20 @@
package port
import (
"context"
"io"
"time"
)
type Object struct {
Key, ETag string
Size int64
Modified time.Time
}
type Objects interface {
Put(context.Context, string, io.Reader, int64, string) error
Get(context.Context, string) (io.ReadCloser, error)
Stat(context.Context, string) (Object, error)
Remove(context.Context, string) error
List(context.Context, string) ([]Object, bool, error)
}