Documentation ¶
Index ¶
- func NewContextWithAuthenticatedUser(ctx context.Context, user *User) context.Context
- type ArchiveService
- type AuthenticationController
- type Config
- type GRPCConfig
- type HTTPConfig
- type PersonalAccessToken
- type PersonalAccessTokenRepository
- type Server
- type ServerListeners
- type Session
- type SessionBasedAuthentication
- type SessionRepository
- type User
- type UserRepository
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArchiveService ¶
type ArchiveService struct {
// contains filtered or unexported fields
}
func (*ArchiveService) CreateArchive ¶
type AuthenticationController ¶
type AuthenticationController struct {
UserRepository *UserRepository
}
func (*AuthenticationController) RegisterRoutes ¶
func (c *AuthenticationController) RegisterRoutes(r chi.Router)
type Config ¶
type Config struct { DataPath string GRPC GRPCConfig HTTP HTTPConfig }
func (Config) Listen ¶
func (c Config) Listen() (ServerListeners, error)
type GRPCConfig ¶
type HTTPConfig ¶
type PersonalAccessToken ¶
type PersonalAccessTokenRepository ¶
type PersonalAccessTokenRepository struct {
// contains filtered or unexported fields
}
func (*PersonalAccessTokenRepository) CreatePersonalAccessToken ¶
func (r *PersonalAccessTokenRepository) CreatePersonalAccessToken(token PersonalAccessToken) (PersonalAccessToken, error)
func (*PersonalAccessTokenRepository) FindPersonalAccessTokensByLastEight ¶
func (r *PersonalAccessTokenRepository) FindPersonalAccessTokensByLastEight( tokenLastEight string, ) ([]PersonalAccessToken, error)
type Server ¶
type Server struct { UserRepository *UserRepository ArchiveService *ArchiveService PersonalAccessTokenRepository *PersonalAccessTokenRepository UserService *UserService ArchiveApplicationService *archiveApplicationService ArchivePermissionApplicationService *archivePermissionApplicationService PersonalAccessTokenApplicationService *personalAccessTokenApplicationService SessionBasedAuthentication *SessionBasedAuthentication Config Config HTTP struct { Listeners []net.Listener } }
Server is an application server
func CreateServer ¶
type ServerListeners ¶
type SessionBasedAuthentication ¶
type SessionBasedAuthentication struct { UserService *UserService UserRepository *UserRepository SessionRepository *SessionRepository }
func (*SessionBasedAuthentication) Middleware ¶
func (a *SessionBasedAuthentication) Middleware() func(http.Handler) http.Handler
func (*SessionBasedAuthentication) RegisterRoutes ¶
func (a *SessionBasedAuthentication) RegisterRoutes(r chi.Router)
type SessionRepository ¶
type SessionRepository struct {
// contains filtered or unexported fields
}
func (*SessionRepository) Delete ¶
func (r *SessionRepository) Delete(id int64) error
func (*SessionRepository) GetSessionByToken ¶
func (r *SessionRepository) GetSessionByToken(token string) (*Session, error)
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func (*UserRepository) CreateUser ¶
func (r *UserRepository) CreateUser(user User) (User, error)
func (*UserRepository) GetUserByUserID ¶
func (r *UserRepository) GetUserByUserID(id int64) (*User, error)
func (*UserRepository) GetUserByUserName ¶
func (r *UserRepository) GetUserByUserName(username string) (*User, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) CreateUser ¶
func (s *UserService) CreateUser(emailAddress string, password string) (User, error)
func (*UserService) VerifyLogin ¶
Source Files ¶
- api_auth_grpc.go
- api_auth_session.go
- archive_application_service.go
- archive_content_storage.go
- archive_permission_application_service.go
- archive_service.go
- auth.go
- config.go
- db.go
- db_archive_permission_repository.go
- db_archive_repository.go
- db_errors.go
- owned_archive_accessor.go
- personal_access_token_application_service.go
- personal_access_token_repository.go
- readonly_archive_accessor.go
- router.go
- server.go
- server_run.go
- session_repository.go
- user_repository.go
- user_service.go
Click to show internal directories.
Click to hide internal directories.