Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentsController ¶
type DocumentsController interface { UploadDocument(ctx context.Context, meta models.Metadata, file io.Reader) error GetFilesInfo( ctx context.Context, userID uuid.UUID, filesListRequest models.FilesListRequest, ) ([]models.Metadata, error) GetFileInfo(ctx context.Context, id, userID uuid.UUID) (models.Metadata, error) GetFile(Ctx context.Context, meta models.Metadata) (io.ReadSeekCloser, error) DeleteFile(ctx context.Context, id, userID uuid.UUID) error }
type Settings ¶
type Settings struct { JWTResolver *jwtresolver.JWTResolver UserCtrl UserController DocumentsCtrl DocumentsController MaxUploadFileSize int64 }
type UserController ¶
type UserController interface { // Returns jwt token with user ID or error if user creation failed. // Must be called with valid credentials with non-empty login, password and token. Register(ctx context.Context, credentials models.Credentials) (string, error) // Login returns jwt token with user ID or error if login failed. // Must be called with valid credentials with non-empty login and password. Login(ctx context.Context, credentials models.Credentials) (string, error) }
UserController used to register and login users.
Click to show internal directories.
Click to hide internal directories.