Documentation ¶
Index ¶
- type AgentRequest
- type AgentRequestUsecase
- type CreateTableRequest
- type CreateWorkspaceRequest
- type ErrorResponse
- type InitRequest
- type JobMonitorRepository
- type JobMonitorUsecase
- type JwtCustomClaims
- type JwtCustomRefreshClaims
- type LoginRequest
- type LoginResponse
- type LoginUsecase
- type NewUserInitUsecase
- type RefreshTokenRequest
- type RefreshTokenResponse
- type RefreshTokenUsecase
- type ResultRepository
- type ResultUsecase
- type Role
- type RoleRepository
- type SetAccountStatusRequest
- type SignupRequest
- type SignupUsecase
- type SuccessResponse
- type Template
- type TemplateRepository
- type TemplateUsecase
- type Token
- type TokenDeleteRequest
- type TokenRequest
- type Toolset
- type User
- type UserAdminUsecase
- type UserListItem
- type UserRepository
- type UserTokenRepository
- type UserTokenUsecase
- type UserUsecase
- type UserWorkspace
- type Workspace
- type WorkspaceRepository
- type WorkspaceUsecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRequest ¶
type AgentRequestUsecase ¶
type CreateTableRequest ¶
type CreateWorkspaceRequest ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type InitRequest ¶
type JobMonitorRepository ¶
type JobMonitorUsecase ¶
type JwtCustomClaims ¶
type JwtCustomRefreshClaims ¶
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
Status string `json:"status"`
}
type LoginUsecase ¶
type LoginUsecase interface { FindUser(email string) (*User, error) GetCurrentUser(id uint) (*User, error) CreateAccessToken(user *User, secret string, expiry int) (accessToken string, err error) CreateRefreshToken(user *User, secret string, expiry int) (refreshToken string, err error) GetRoleIDs(uid uint) ([]uint, error) }
type NewUserInitUsecase ¶
type NewUserInitUsecase interface { CreateRootAdmin(request *InitRequest) error GetUserCount() (int64, error) }
type RefreshTokenRequest ¶
type RefreshTokenRequest struct {
RefreshToken string `form:"refreshToken" binding:"required"`
}
type RefreshTokenResponse ¶
type RefreshTokenUsecase ¶
type RefreshTokenUsecase interface { FindUser(id string) (*User, error) CreateAccessToken(user *User, secret string, expiry int) (accessToken string, err error) CreateRefreshToken(user *User, secret string, expiry int) (refreshToken string, err error) ExtractClaimsFromToken(requestToken string, secret string) (*JwtCustomClaims, error) }
type ResultRepository ¶
type ResultUsecase ¶
type RoleRepository ¶
type SetAccountStatusRequest ¶
type SetAccountStatusRequest struct {
AccountStatus bool `json:"accountStatus"`
}
type SignupRequest ¶
type SignupUsecase ¶
type SuccessResponse ¶
type SuccessResponse struct {
Message string `json:"message"`
}
type TemplateRepository ¶
type TemplateUsecase ¶
type TokenDeleteRequest ¶
type TokenDeleteRequest struct {
Name string `json:"name"`
}
type TokenRequest ¶
type User ¶
type User struct { ID uint `json:"id"` UUID string `json:"uuid"` Email string `json:"email"` Password string `json:"password"` LastName string `json:"lastName"` FirstName string `json:"firstName"` AccountStatus bool `json:"accountStatus"` AccessLevel uint `json:"accessLevel"` QuantumlabToken string `json:"quantumlabToken"` Avatar string `json:"avatar"` Roles []Role `json:"roles" gorm:"many2many:user_roles;"` Workspaces []Workspace `json:"workspaces" gorm:"many2many:user_workspaces;"` }
type UserAdminUsecase ¶
type UserAdminUsecase interface { InviteUsers( emailList []string, host string, port int, from string, secret string, ) error GetRoleIDs(userID uint) ([]uint, error) GetUserList() ([]UserListItem, error) GetUserDetail(id uint) (*User, error) GetAllRoles() ([]Role, error) UpdateUser(user *User) error SetAccountStatus(id uint, accountStatus bool) error }
type UserListItem ¶
type UserListItem struct { ID uint `json:"id"` UUID string `json:"uuid"` Email string `json:"email"` LastName string `json:"lastName"` FirstName string `json:"firstName"` AccountStatus bool `json:"accountStatus"` Roles []Role `json:"roles" gorm:"many2many:user_roles;joinForeignKey:user_id"` AccessLevel uint `json:"accessLevel"` }
for the list item that contains less user information
type UserRepository ¶
type UserRepository interface { Create(user *User) error CreateBatch(users []User) error GetByEmail(email string) (*User, error) GetQuantumlabTokenByUUID(uuid string) (string, error) GetRoleIDs(uid uint) ([]uint, error) GetRegisteredEmails(emailList []string) ([]string, error) GetByID(id uint) (*User, error) GetAll() ([]UserListItem, error) Update(user *User) error UpdateSelf(user *User) error GetCount() (int64, error) SetAccountStatus(id uint, accountStatus bool) error }
type UserTokenRepository ¶
type UserTokenUsecase ¶
type UserUsecase ¶
type UserWorkspace ¶
type Workspace ¶
type Workspace struct { ID uint `json:"id"` UUID string `json:"uuid"` Name string `json:"name"` Type string `json:"type"` State string `json:"state"` Description string `json:"description"` Tags string `json:"tags"` Parameters string `json:"parameters"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` LastAccessed time.Time `json:"lastAccessed"` TemplateID uint `json:"templateId"` Template Template `json:"template"` Users []User `json:"users" gorm:"many2many:user_workspaces;"` }
type WorkspaceRepository ¶
type WorkspaceRepository interface { Create(workspace *Workspace, userID uint) error GetOwnerIDs(id uint) ([]uint, error) GetAllByUser(userID uint) ([]Workspace, error) GetByID(id uint) (*Workspace, error) Update(workspace *Workspace) error Delete(id uint) error GetWorkspaceToolset(id uint) ([]Toolset, error) }
type WorkspaceUsecase ¶
type WorkspaceUsecase interface { CreateWorkspace(workspace *Workspace, userID uint) error CheckWorkspaceAccess(workspaceID uint, userID uint) (bool, error) GetWorkspacesByUser(userID uint) ([]Workspace, error) GetWorkspace(id uint) (*Workspace, error) UpdateWorkspace(workspace *Workspace) error DeleteWorkspace(id uint) error GetWorkspaceToolset(id uint) ([]Toolset, error) }
Click to show internal directories.
Click to hide internal directories.