Documentation
¶
Index ¶
- Constants
- Variables
- func GetLatestVersion(filter map[string]interface{}, table string) (string, error)
- func HandleDownloadExtraFile(w http.ResponseWriter, r *http.Request)
- func HandleFileDownload(w http.ResponseWriter, r *http.Request)
- func HandleFileUpload(w http.ResponseWriter, r *http.Request)
- func HandleGetExtraFile(w http.ResponseWriter, r *http.Request)
- func HandleGetFileLinks(w http.ResponseWriter, r *http.Request)
- func HandleGetLibrary(w http.ResponseWriter, r *http.Request)
- func HandleGetLibraryVersion(w http.ResponseWriter, r *http.Request)
- func HandleIndex(w http.ResponseWriter, r *http.Request)
- func HandleListFiles(w http.ResponseWriter, r *http.Request)
- func HandleListLibraries(w http.ResponseWriter, r *http.Request)
- func HandleListLibraryVersions(w http.ResponseWriter, r *http.Request)
- func HandlePutFile(w http.ResponseWriter, r *http.Request)
- func HandlePutLink(w http.ResponseWriter, r *http.Request)
- func HandleUploadExtraFile(w http.ResponseWriter, r *http.Request)
- func NewRouter() *mux.Router
- func SendErrorResponse(w http.ResponseWriter, r *http.Request, err_resp error)
- func SendJSONResponse(w http.ResponseWriter, code int, resp string)
- func SendResponse(w http.ResponseWriter, r *http.Request, resp JsonAble)
- func SendTEXTResponse(w http.ResponseWriter, code int, resp string)
- type DepMan
- type ExtraFile
- type ExtraFiles
- type File
- type FileLink
- type FileLinks
- type Files
- type JsonAble
- type Route
- type Routes
- type SimpleEntries
- type SimpleEntry
Constants ¶
View Source
const RequestNS = 0
Variables ¶
View Source
var ( StoreDir string DefaultNS string )
View Source
var ErrNotFound = errors.New("Entry not found")
Functions ¶
func GetLatestVersion ¶
func HandleDownloadExtraFile ¶
func HandleDownloadExtraFile(w http.ResponseWriter, r *http.Request)
func HandleFileDownload ¶
func HandleFileDownload(w http.ResponseWriter, r *http.Request)
func HandleFileUpload ¶
func HandleFileUpload(w http.ResponseWriter, r *http.Request)
func HandleGetExtraFile ¶
func HandleGetExtraFile(w http.ResponseWriter, r *http.Request)
func HandleGetFileLinks ¶
func HandleGetFileLinks(w http.ResponseWriter, r *http.Request)
func HandleGetLibrary ¶
func HandleGetLibrary(w http.ResponseWriter, r *http.Request)
func HandleGetLibraryVersion ¶
func HandleGetLibraryVersion(w http.ResponseWriter, r *http.Request)
func HandleIndex ¶
func HandleIndex(w http.ResponseWriter, r *http.Request)
func HandleListFiles ¶
func HandleListFiles(w http.ResponseWriter, r *http.Request)
func HandleListLibraries ¶
func HandleListLibraries(w http.ResponseWriter, r *http.Request)
func HandleListLibraryVersions ¶
func HandleListLibraryVersions(w http.ResponseWriter, r *http.Request)
func HandlePutFile ¶
func HandlePutFile(w http.ResponseWriter, r *http.Request)
func HandlePutLink ¶
func HandlePutLink(w http.ResponseWriter, r *http.Request)
func HandleUploadExtraFile ¶
func HandleUploadExtraFile(w http.ResponseWriter, r *http.Request)
func SendErrorResponse ¶
func SendErrorResponse(w http.ResponseWriter, r *http.Request, err_resp error)
func SendJSONResponse ¶
func SendJSONResponse(w http.ResponseWriter, code int, resp string)
func SendResponse ¶
func SendResponse(w http.ResponseWriter, r *http.Request, resp JsonAble)
func SendTEXTResponse ¶
func SendTEXTResponse(w http.ResponseWriter, code int, resp string)
Types ¶
type ExtraFile ¶
type ExtraFile struct {
Id int `json:"extrafile_id"`
Version string `json:"version"`
NameSpace string `json:"ns"`
Name string `json:"name"`
Info string `json:"info"`
Created time.Time `json:"created"`
}
func GetExtraFileByFilter ¶
func NewExtraFileFromVars ¶
func (ExtraFile) ToJsonString ¶
type ExtraFiles ¶
type ExtraFiles []ExtraFile
func (ExtraFiles) ToJsonString ¶
func (f ExtraFiles) ToJsonString() (string, error)
func (ExtraFiles) ToString ¶
func (f ExtraFiles) ToString() string
type File ¶
type File struct {
Id int `json:"file_id"`
LibraryVersionId int `json:"library_version_id"`
Library string `json:"library"`
Version string `json:"version"`
NameSpace string `json:"ns"`
Name string `json:"name"`
Type string `json:"type"`
Platform string `json:"platform"`
Arch string `json:"arch"`
Info string `json:"info"`
Created time.Time `json:"created"`
Links FileLinks `json:"file_links"`
}
func NewFileFromVars ¶
func (File) ToJsonString ¶
type FileLink ¶
type FileLinks ¶
type FileLinks []FileLink
func GetFileLinksByFileId ¶
func (FileLinks) ToJsonString ¶
type Route ¶
type Route struct {
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
type SimpleEntries ¶
type SimpleEntries []SimpleEntry
func ListLibraries ¶
func ListLibraries() (SimpleEntries, error)
func ListVersions ¶
func ListVersions(library string) (SimpleEntries, error)
func (SimpleEntries) ToJsonString ¶
func (l SimpleEntries) ToJsonString() (string, error)
func (SimpleEntries) ToString ¶
func (l SimpleEntries) ToString() string
type SimpleEntry ¶
type SimpleEntry struct {
Name string `json:"name"`
}
func GetLibrary ¶
func GetLibrary(library string) (SimpleEntry, error)
func GetVersion ¶
func GetVersion(library string, version string) (SimpleEntry, error)
func (SimpleEntry) ToJsonString ¶
func (l SimpleEntry) ToJsonString() (string, error)
func (SimpleEntry) ToString ¶
func (l SimpleEntry) ToString() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.