1234567891011121314151617181920212223242526272829303132333435363738 |
- package aroz // import "imuslab.com/arozos/demo/aroz"
- TYPES
- type ArozHandler struct {
- Port string
- // Has unexported fields.
- }
- func HandleFlagParse(info ServiceInfo) *ArozHandler
- This function will request the required flag from the startup paramters and
- parse it to the need of the arozos.
- func (a *ArozHandler) GetUserInfoFromRequest(w http.ResponseWriter, r *http.Request) (string, string)
- Get the username and resources access token from the request, return
- username, token
- func (a *ArozHandler) RequestGatewayInterface(token string, script string) (*http.Response, error)
- type ServiceInfo struct {
- Name string //Name of this module. e.g. "Audio"
- Desc string //Description for this module
- Group string //Group of the module, e.g. "system" / "media" etc
- IconPath string //Module icon image path e.g. "Audio/img/function_icon.png"
- Version string //Version of the module. Format: [0-9]*.[0-9][0-9].[0-9]
- StartDir string //Default starting dir, e.g. "Audio/index.html"
- SupportFW bool //Support floatWindow. If yes, floatWindow dir will be loaded
- LaunchFWDir string //This link will be launched instead of 'StartDir' if fw mode
- SupportEmb bool //Support embedded mode
- LaunchEmb string //This link will be launched instead of StartDir / Fw if a file is opened with this module
- InitFWSize []int //Floatwindow init size. [0] => Width, [1] => Height
- InitEmbSize []int //Embedded mode init size. [0] => Width, [1] => Height
- SupportedExt []string //Supported File Extensions. e.g. ".mp3", ".flac", ".wav"
- }
- Information required for registering this subservice to arozos
|