:3 added bindings for bootloader lib
This commit is contained in:
		
							parent
							
								
									2b744a5813
								
							
						
					
					
						commit
						85dac18494
					
				
							
								
								
									
										23
									
								
								bindings.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								bindings.lua
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
--- @class Exports
 | 
			
		||||
--- @field log Logger
 | 
			
		||||
--- @field updater Updater
 | 
			
		||||
--- @field notifier Notifier
 | 
			
		||||
--- @field json JsonParser
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
--- @class Logger
 | 
			
		||||
--- @field error fun(...)
 | 
			
		||||
--- @field warn fun(...)
 | 
			
		||||
--- @field info fun(...)
 | 
			
		||||
--- @field debug fun(...)
 | 
			
		||||
 | 
			
		||||
--- @class Updater
 | 
			
		||||
--- @field addEntry fun(path: string, branch: string, url: string)
 | 
			
		||||
 | 
			
		||||
--- @class JsonParser
 | 
			
		||||
--- @field decode fun(s: string): table
 | 
			
		||||
--- @field encode fun(s: table): string
 | 
			
		||||
 | 
			
		||||
--- @class Notifier
 | 
			
		||||
--- @field notify fun(priority: "1"|"2"|"3"|"4"|"5", body: string)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -10,11 +10,7 @@ if not __VERSION then
 | 
			
		|||
    __VERSION = "DEV";
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
--- @class Exports
 | 
			
		||||
--- @field log Logger
 | 
			
		||||
--- @field updater Updater
 | 
			
		||||
--- @field notifier Notifier
 | 
			
		||||
--- @field json JsonParser
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
--- @param upd Updater
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -72,7 +72,6 @@ function updater:check(branch)
 | 
			
		|||
        log.error("Updater:check: Could not get body of request: " .. berr);
 | 
			
		||||
        return false;
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    local data = json.decode(body);
 | 
			
		||||
    if self.curr_commit_hash == "" then
 | 
			
		||||
        log.debug("No commit hash found, setting");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user