Documentation ¶
Index ¶
Constants ¶
View Source
const ( //DS is the location of the application ds file DS = "core" + string(os.PathSeparator) + "app.ds" )
Variables ¶
View Source
var ( // ErrNoWebInstall is when web based applicadtion installs are not allowed ErrNoWebInstall = errors.New("Web based application installs are not allowed on this instance. " + "See the AllowWebAppInstall Setting for more information.") //ErrAppNotFound is when the app.json file can't be found in the app zip file ErrAppNotFound = errors.New("Invalid application file path. Application file not found.") //ErrAppInvalid is when the application zip file can't be read or extracted ErrAppInvalid = errors.New("Application file is an invalid format and cannot be installed.") //ErrInvalidID is when the application ID is invalid ErrInvalidID = errors.New("Invalid App ID") )
Functions ¶
func PostAvailable ¶
PostAvailable uses an HTTP client to retrieve a zip from from an external url and puts it in the available folder for installation
Types ¶
type App ¶
type App struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Author string `json:"author,omitempty"` Root string `json:"root,omitempty"` Icon string `json:"icon,omitempty"` Version string `json:"version,omitempty"` File string `json:"file,omitempty"` }
App is the structure of an Application Install
type Resource ¶
type Resource struct {
Filepath string
}
Resource is a resource definition for a file in an application zip file, used for setting permissions by satisfying the permitter interface
func (*Resource) Permission ¶
func (a *Resource) Permission() (*permission.Permission, error)
Permission is here to satisfy the permitter interface, but I'm cheating as it's only used setting permissions on not retrieving them. Seems I have a leaky abstraction TODO: reconsider this
Click to show internal directories.
Click to hide internal directories.