Documentation ¶
Index ¶
- func Generate(claims jwt.Claims) (string, error)
- func GenerateOAuthForClient(client *models.Client) (string, error)
- func GenerateOAuthForNode(nodeId uint) (string, error)
- func GenerateSession(id uint) (string, error)
- func GetPublicKey() *ecdsa.PublicKey
- func LoadEmailService()
- func ParseAllowedTags(source string, allowed []string) []string
- func ParseToken(token string) (*pufferpanel.Token, error)
- func SendEmailViaDebug(to, subject, body string, async bool) error
- func SendEmailViaMailgun(to, subject, body string, async bool) error
- func SendEmailViaMailjet(to, subject, body string, async bool) error
- func SendEmailViaSMTP(to, subject, body string, async bool) error
- func SyncNodeToConfig()
- func ValidateTokenLoaded()
- 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
- func (o *OAuth2) Delete(client *models.Client) error
- func (o *OAuth2) Get(clientId string) (*models.Client, error)
- func (o *OAuth2) GetForUser(userId uint) ([]*models.Client, error)
- func (o *OAuth2) GetForUserAndServer(userId uint, serverId string) ([]*models.Client, error)
- func (o *OAuth2) Update(client *models.Client) error
- type Permission
- func (ps *Permission) GenerateOAuthForUser(userId uint, serverId *string) (string, error)
- 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) (err 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 Template
- func (t *Template) Delete(name string) error
- func (t *Template) Get(name string) (*models.Template, error)
- func (t *Template) GetAll() (*models.Templates, error)
- func (t *Template) GetImportableTemplates() ([]string, error)
- func (t *Template) ImportFromRepo(templateName string) error
- func (t *Template) ImportTemplate(name string, template, readme io.Reader) error
- func (t *Template) Save(template *models.Template) error
- 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) IsValidCredentials(user *models.User, password string) bool
- func (us *User) Login(email string, password string) (user *models.User, sessionToken string, otpNeeded bool, err error)
- func (us *User) LoginOtp(email string, token string) (user *models.User, sessionToken string, err error)
- func (us *User) Search(usernameFilter, emailFilter string, pageSize, page uint) (*models.Users, int64, error)
- func (us *User) StartOtpEnroll(userId uint) (secret string, img string, err error)
- func (us *User) Update(model *models.User) error
- func (us *User) ValidateOtpEnroll(userId uint, token string) error
- type UserSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOAuthForNode ¶
func GenerateSession ¶
func GetPublicKey ¶
func LoadEmailService ¶
func LoadEmailService()
func ParseAllowedTags ¶
func ParseToken ¶
func SendEmailViaDebug ¶ added in v2.1.1
func SendEmailViaMailgun ¶
func SendEmailViaMailjet ¶ added in v2.2.0
func SendEmailViaSMTP ¶ added in v2.1.1
func SyncNodeToConfig ¶ added in v2.6.0
func SyncNodeToConfig()
func ValidateTokenLoaded ¶
func ValidateTokenLoaded()
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) GetForUserAndServer ¶ added in v2.4.0
type Permission ¶
func (*Permission) GenerateOAuthForUser ¶
func (ps *Permission) GenerateOAuthForUser(userId uint, serverId *string) (string, error)
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 Template ¶
func (*Template) GetImportableTemplates ¶ added in v2.6.0
func (*Template) ImportFromRepo ¶
func (*Template) ImportTemplate ¶
type User ¶
func (*User) DisableOtp ¶ added in v2.3.0
func (*User) GetOtpStatus ¶ added in v2.3.0
func (*User) IsValidCredentials ¶
func (*User) StartOtpEnroll ¶ added in v2.3.0
type UserSettings ¶ added in v2.3.0
func (*UserSettings) GetAllForUser ¶ added in v2.3.0
func (uss *UserSettings) GetAllForUser(userId uint) (models.UserSettingsView, error)
func (*UserSettings) Update ¶ added in v2.3.0
func (uss *UserSettings) Update(model *models.UserSetting) error
Click to show internal directories.
Click to hide internal directories.