Documentation ¶
Index ¶
- Constants
- Variables
- func DELETE(r *httprouter.Router, path string, handler Handler)
- func GET(r *httprouter.Router, path string, handler Handler)
- func HandleAuthUser(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleCreateModel(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleDeleteModel(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleFile(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleFileById(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleFileUpload(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleFileVersions(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleIndex(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleLatestFilesByUsernameAndSlug(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleLatestPublicModels(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleLogin(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleLogout(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleModelByUsernameAndSlug(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleModelsByUsername(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleRegister(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleTopPublicModels(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleUpdateModelReadme(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleUpdateStripe(c *Context, w http.ResponseWriter, req *http.Request)
- func HandleUserByUsername(c *Context, w http.ResponseWriter, req *http.Request)
- func JsonErr(msg string) map[string]string
- func Main()
- func OPTIONS(r *httprouter.Router, path string, handler Handler)
- func PATCH(r *httprouter.Router, path string, handler Handler)
- func POST(r *httprouter.Router, path string, handler Handler)
- func PUT(r *httprouter.Router, path string, handler Handler)
- type Context
- type CreateModelForm
- type Handler
- type LoginForm
- type PaymentForm
- type RegisterForm
- type UpdateModelReadmeForm
Constants ¶
View Source
const MaxFileSize = 500 * 1024 * 1024 // 500MB max
Variables ¶
View Source
var SlugReg = regexp.MustCompile("^[a-zA-Z0-9_]*$")
Functions ¶
func HandleAuthUser ¶
func HandleAuthUser(c *Context, w http.ResponseWriter, req *http.Request)
func HandleCreateModel ¶
func HandleCreateModel(c *Context, w http.ResponseWriter, req *http.Request)
func HandleDeleteModel ¶
func HandleDeleteModel(c *Context, w http.ResponseWriter, req *http.Request)
func HandleFile ¶
func HandleFile(c *Context, w http.ResponseWriter, req *http.Request)
func HandleFileById ¶
func HandleFileById(c *Context, w http.ResponseWriter, req *http.Request)
func HandleFileUpload ¶
func HandleFileUpload(c *Context, w http.ResponseWriter, req *http.Request)
func HandleFileVersions ¶
func HandleFileVersions(c *Context, w http.ResponseWriter, req *http.Request)
func HandleIndex ¶
func HandleIndex(c *Context, w http.ResponseWriter, req *http.Request)
func HandleLatestFilesByUsernameAndSlug ¶
func HandleLatestFilesByUsernameAndSlug(c *Context, w http.ResponseWriter, req *http.Request)
func HandleLatestPublicModels ¶
func HandleLatestPublicModels(c *Context, w http.ResponseWriter, req *http.Request)
func HandleLogin ¶
func HandleLogin(c *Context, w http.ResponseWriter, req *http.Request)
func HandleLogout ¶
func HandleLogout(c *Context, w http.ResponseWriter, req *http.Request)
func HandleModelByUsernameAndSlug ¶
func HandleModelByUsernameAndSlug(c *Context, w http.ResponseWriter, req *http.Request)
func HandleModelsByUsername ¶
func HandleModelsByUsername(c *Context, w http.ResponseWriter, req *http.Request)
func HandleRegister ¶
func HandleRegister(c *Context, w http.ResponseWriter, req *http.Request)
func HandleTopPublicModels ¶
func HandleTopPublicModels(c *Context, w http.ResponseWriter, req *http.Request)
func HandleUpdateModelReadme ¶
func HandleUpdateModelReadme(c *Context, w http.ResponseWriter, req *http.Request)
func HandleUpdateStripe ¶
func HandleUpdateStripe(c *Context, w http.ResponseWriter, req *http.Request)
func HandleUserByUsername ¶
func HandleUserByUsername(c *Context, w http.ResponseWriter, req *http.Request)
Types ¶
type Context ¶
type Context struct { Render *render.Render Params httprouter.Params AuthToken *models.AuthToken User *models.User Api *models.ApiCollection Blob blobstorage.BlobStorage }
type CreateModelForm ¶
type PaymentForm ¶
type PaymentForm struct {
StripeToken string `json:"stripe_token"`
}
type RegisterForm ¶
type UpdateModelReadmeForm ¶
type UpdateModelReadmeForm struct {
Readme string `json:"readme"`
}
Source Files ¶
- context.go
- handle_auth_user.go
- handle_create_model.go
- handle_delete_model.go
- handle_file.go
- handle_file_by_id.go
- handle_file_upload.go
- handle_file_versions.go
- handle_index.go
- handle_latest_files_by_username_and_slug.go
- handle_latest_public_models.go
- handle_login.go
- handle_logout.go
- handle_model_by_username_and_slug.go
- handle_models_by_username.go
- handle_register.go
- handle_top_public_models.go
- handle_update_model_readme.go
- handle_update_stripe.go
- handle_user_by_username.go
- main.go
Click to show internal directories.
Click to hide internal directories.