Documentation
¶
Index ¶
- Constants
- func NewMinioClient(conf MinioConf) (client *minio.Client, err error)
- func NewPostgreSQL(conf DBConf) (db *gorm.DB, err error)
- type Admin
- type Conf
- type DBConf
- type MinioConf
- type Record
- type Server
- func (s *Server) CreateAccount(w http.ResponseWriter, r *http.Request)
- func (s *Server) CreateModel(name, version, description, fileType string, userID int, ...) (modelID int, err error)
- func (s *Server) CreateTables(values ...interface{}) (err error)
- func (s *Server) CreateUser(username string, password string, role m.UserRole) (err error)
- func (s *Server) DeleteAccount(w http.ResponseWriter, r *http.Request)
- func (s *Server) DropTables(values ...interface{}) (err error)
- func (s *Server) FetchAccounts(w http.ResponseWriter, r *http.Request)
- func (s *Server) FetchRecord(w http.ResponseWriter, r *http.Request)
- func (s *Server) Free()
- func (s *Server) GetSession(r *http.Request) (sess m.Session, err error)
- func (s *Server) Login(w http.ResponseWriter, r *http.Request)
- func (s *Server) Logout(w http.ResponseWriter, r *http.Request)
- func (s *Server) MinioDownload(objName string, fp string) (err error)
- func (s *Server) MinioUpload(fp string, objName string, contentType string) (err error)
- func (s *Server) ResetTables(values ...interface{}) (err error)
- func (s *Server) StartOrDie() (err error)
- func (s *Server) UpdateAccount(w http.ResponseWriter, r *http.Request)
- type SortChunks
- type WebConf
Constants ¶
View Source
const (
MODEL_BUCKET = "models"
)
Variables ¶
This section is empty.
Functions ¶
func NewMinioClient ¶
Types ¶
type Conf ¶
type Server ¶
type Server struct { HTTPHandler http.Handler Frontend *packr.Box Conf Conf DB *gorm.DB Minio *minio.Client }
func (*Server) CreateAccount ¶
func (s *Server) CreateAccount(w http.ResponseWriter, r *http.Request)
func (*Server) CreateModel ¶
func (*Server) CreateTables ¶
CreateTables create all tables
func (*Server) CreateUser ¶
func (*Server) DeleteAccount ¶
func (s *Server) DeleteAccount(w http.ResponseWriter, r *http.Request)
func (*Server) DropTables ¶
DropTables drop all tables
func (*Server) FetchAccounts ¶
func (s *Server) FetchAccounts(w http.ResponseWriter, r *http.Request)
func (*Server) FetchRecord ¶
func (s *Server) FetchRecord(w http.ResponseWriter, r *http.Request)
func (*Server) GetSession ¶
func (*Server) MinioDownload ¶ added in v0.1.24
func (*Server) MinioUpload ¶
func (*Server) ResetTables ¶
ResetTables drop and create tables
func (*Server) StartOrDie ¶
func (*Server) UpdateAccount ¶
func (s *Server) UpdateAccount(w http.ResponseWriter, r *http.Request)
type SortChunks ¶
func (SortChunks) Len ¶
func (s SortChunks) Len() int
func (SortChunks) Less ¶
func (s SortChunks) Less(i, j int) bool
func (SortChunks) Swap ¶
func (s SortChunks) Swap(i, j int)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.