Documentation ¶
Index ¶
- Variables
- func AddAdmin(name, fullname, mail string) error
- func AddClusterToUser(email string, clusterName string) error
- func AddUsers(mail, cluster, name, fullname string) error
- func AdminExists(email string) bool
- func ClusterExists(name string) bool
- func CountDirectories(path string) int
- func CreateCluster(name, token string) error
- func DeleteCluster(name string) error
- func DeleteDir(root string, name string) error
- func DirectoryExists(path string) bool
- func GenerateToken(length int) (string, error)
- func GetGroupFromMail(rootDir string, mail string) (string, error)
- func GetSubdirs(path string) ([]string, error)
- func InitConfig() error
- func InitDB()
- func RemoveClusterFromUser(mail, clusterName string) error
- func UpdateCluster(name, api string) error
- func UploadFile(path string, r *http.Request) error
- func UserExists(email string) bool
- func UserInCluster(email, clusterName string) (bool, error)
- type Admin
- type Cluster
- type ClusterResponse
- type ClusterUser
- type Response
- type User
- type UserCluster
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Config config
View Source
var DB *gorm.DB
View Source
var GoogleOauthConfig *oauth2.Config
Functions ¶
func AddClusterToUser ¶
func AdminExists ¶
func ClusterExists ¶
func CountDirectories ¶
func CreateCluster ¶
func DeleteCluster ¶
func DirectoryExists ¶
func GenerateToken ¶
func GetSubdirs ¶
func InitConfig ¶
func InitConfig() error
func RemoveClusterFromUser ¶
func UpdateCluster ¶
func UserExists ¶
func UserInCluster ¶
Types ¶
type Admin ¶
func GetAdminByEmail ¶
type Cluster ¶
type Cluster struct { gorm.Model Name string `gorm:";not null"` Status bool Token string API string }
func GetAllClusters ¶
func GetClusterByName ¶
func GetClustersByUser ¶
type ClusterResponse ¶
type ClusterUser ¶
type ClusterUser struct { gorm.Model Name string `gorm:"not null"` FullName string `gorm:"not null"` Email string `gorm:"unique;not null"` Clusters []Cluster `gorm:"many2many:user_clusters;"` }
func GetAllUsers ¶
func GetAllUsers() ([]ClusterUser, error)
func GetUserByEmail ¶
func GetUserByEmail(email string) (ClusterUser, error)
func GetUsersByCluster ¶
func GetUsersByCluster(clusterName string) ([]ClusterUser, error)
type UserResponse ¶
type UserResponse struct { Status string `json:"status"` Message string `json:"message"` ClusterUsers []ClusterUser `json:"clusterusers"` }
Click to show internal directories.
Click to hide internal directories.