Documentation ¶
Index ¶
- func HashToken(source string) (result string, err error)
- func LoadEmailService()
- func SyncNodeToConfig()
- type DatabaseSFTPAuthorization
- type EmailService
- type Node
- func (ns *Node) CallNode(node *models.Node, method string, path string, body io.ReadCloser, ...) (*http.Response, error)
- func (ns *Node) Create(node *models.Node) error
- func (ns *Node) Delete(id uint) error
- func (ns *Node) Get(id uint) (*models.Node, error)
- func (ns *Node) GetAll() ([]*models.Node, error)
- func (ns *Node) OpenSocket(node *models.Node, path string, writer http.ResponseWriter, ...) error
- func (ns *Node) Update(model *models.Node) error
- type OAuth2
- type Permission
- func (ps *Permission) GetForClient(id uint) ([]*models.Permissions, error)
- func (ps *Permission) GetForClientAndServer(id uint, serverId *string) (*models.Permissions, error)
- func (ps *Permission) GetForServer(serverId string) ([]*models.Permissions, error)
- func (ps *Permission) GetForUser(id uint) ([]*models.Permissions, error)
- func (ps *Permission) GetForUserAndServer(userId uint, serverId string) (*models.Permissions, error)
- func (ps *Permission) Remove(perms *models.Permissions) error
- func (ps *Permission) UpdatePermissions(perms *models.Permissions) error
- type Server
- func (ss *Server) Create(model *models.Server) error
- func (ss *Server) Delete(id string) error
- func (ss *Server) Get(id string) (*models.Server, error)
- func (ss *Server) Search(searchCriteria ServerSearch) (records []*models.Server, total int64, err error)
- func (ss *Server) Update(model *models.Server) error
- type ServerSearch
- type Session
- func (ss *Session) CreateForClient(client *models.Client) (string, error)
- func (ss *Session) CreateForUser(user *models.User) (string, error)
- func (ss *Session) Expire(token string) error
- func (ss *Session) Validate(token string) (*models.Session, error)
- func (ss *Session) ValidateNode(token string) (*models.Node, error)
- type Template
- func (t *Template) AddRepo(repo *models.TemplateRepo) error
- func (t *Template) Delete(name string) error
- func (t *Template) DeleteRepo(id uint) error
- func (t *Template) Get(repoId uint, name string) (*models.Template, error)
- func (t *Template) GetAllFromRepo(repoId uint) ([]*models.Template, error)
- func (*Template) GetLocalRepoId() uint
- func (t *Template) GetRepos() ([]*models.TemplateRepo, error)
- func (t *Template) Save(template *models.Template) error
- type TokenService
- type User
- func (us *User) ChangePassword(username string, newPass string) error
- func (us *User) Create(user *models.User) error
- func (us *User) Delete(model *models.User) (err error)
- func (us *User) DisableOtp(userId uint, token string) error
- func (us *User) Get(username string) (*models.User, error)
- func (us *User) GetByEmail(email string) (*models.User, error)
- func (us *User) GetById(id uint) (*models.User, error)
- func (us *User) GetOtpStatus(userId uint) (enabled bool, err error)
- func (us *User) IsSecurePassword(password string) bool
- func (us *User) IsValidCredentials(user *models.User, password string) bool
- func (us *User) Search(usernameFilter, emailFilter string, pageSize, page uint) ([]*models.User, int64, error)
- func (us *User) StartOtpEnroll(userId uint) (secret string, imgStr string, err error)
- func (us *User) Update(model *models.User) error
- func (us *User) ValidOtp(email string, token string) (user *models.User, err error)
- func (us *User) ValidateLogin(email string, password string) (user *models.User, otpNeeded bool, err error)
- func (us *User) ValidateOtpEnroll(userId uint, token string) error
- type UserSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadEmailService ¶
func LoadEmailService()
func SyncNodeToConfig ¶
func SyncNodeToConfig()
Types ¶
type DatabaseSFTPAuthorization ¶
type DatabaseSFTPAuthorization struct { }
func (*DatabaseSFTPAuthorization) Validate ¶
func (s *DatabaseSFTPAuthorization) Validate(username, password string) (perms *ssh.Permissions, err error)
type EmailService ¶
type EmailService interface {
SendEmail(to string, template string, data map[string]interface{}, async bool) error
}
func GetEmailService ¶
func GetEmailService() EmailService
type OAuth2 ¶
func (*OAuth2) GetForUser ¶
GetForUser Gets all clients for a user
type Permission ¶
func (*Permission) GetForClient ¶
func (ps *Permission) GetForClient(id uint) ([]*models.Permissions, error)
func (*Permission) GetForClientAndServer ¶
func (ps *Permission) GetForClientAndServer(id uint, serverId *string) (*models.Permissions, error)
func (*Permission) GetForServer ¶
func (ps *Permission) GetForServer(serverId string) ([]*models.Permissions, error)
func (*Permission) GetForUser ¶
func (ps *Permission) GetForUser(id uint) ([]*models.Permissions, error)
func (*Permission) GetForUserAndServer ¶
func (ps *Permission) GetForUserAndServer(userId uint, serverId string) (*models.Permissions, error)
func (*Permission) Remove ¶
func (ps *Permission) Remove(perms *models.Permissions) error
func (*Permission) UpdatePermissions ¶
func (ps *Permission) UpdatePermissions(perms *models.Permissions) error
type Server ¶
func (*Server) Delete ¶
Delete a server by ID, This is _not_ ran in a transaction automatically to allow for more flexibility Callers should set the DB to be a transaction if needed (Because Gorm V2 has removed `RollbackUnlessCommitted1)
type ServerSearch ¶
type Session ¶
func (*Session) CreateForClient ¶
type Template ¶
func (*Template) DeleteRepo ¶
func (*Template) GetAllFromRepo ¶
func (*Template) GetLocalRepoId ¶
type TokenService ¶
type TokenService interface { GetKeyFunc() jwt.Keyfunc GetTokenStore() jwkset.Storage GenerateRequest() (string, error) ValidateRequest(string) error }
func NewTokenService ¶
func NewTokenService() (TokenService, error)
type User ¶
func (*User) IsSecurePassword ¶
func (*User) IsValidCredentials ¶
func (*User) StartOtpEnroll ¶
func (*User) ValidateLogin ¶
type UserSettings ¶
func (*UserSettings) GetAllForUser ¶
func (uss *UserSettings) GetAllForUser(userId uint) (models.UserSettingsView, error)
func (*UserSettings) Update ¶
func (uss *UserSettings) Update(model *models.UserSetting) error
Click to show internal directories.
Click to hide internal directories.