refactor: moved response module to web.response
							parent
							
								
									cc5df95a1a
								
							
						
					
					
						commit
						e23635a1d3
					
				
							
								
								
									
										11
									
								
								README.md
								
								
								
								
							
							
						
						
									
										11
									
								
								README.md
								
								
								
								
							| 
						 | 
				
			
			@ -48,15 +48,8 @@ update`.
 | 
			
		|||
 | 
			
		||||
### Compiler
 | 
			
		||||
 | 
			
		||||
Vieter compiles with the standard Vlang compiler. However, I do maintain a
 | 
			
		||||
[mirror](https://git.rustybever.be/vieter-v/v). This is to ensure my CI does
 | 
			
		||||
not break without reason, as I control when & how frequently the mirror is
 | 
			
		||||
updated to reflect the official repository.
 | 
			
		||||
 | 
			
		||||
If you encounter issues using the latest V compiler, try using my mirror
 | 
			
		||||
instead. `make v` will clone the repository & build the mirror. Afterwards,
 | 
			
		||||
prepending any make command with `V_PATH=v/v` tells make to use the locally
 | 
			
		||||
compiled mirror instead.
 | 
			
		||||
I used to maintain a mirror that tracked the latest master, but nowadays, I
 | 
			
		||||
solely target V 0.3 as a compiler.
 | 
			
		||||
 | 
			
		||||
## Contributing
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ module client
 | 
			
		|||
 | 
			
		||||
import net.http { Method }
 | 
			
		||||
import net.urllib
 | 
			
		||||
import response { Response }
 | 
			
		||||
import web.response { Response }
 | 
			
		||||
import json
 | 
			
		||||
 | 
			
		||||
pub struct Client {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ module client
 | 
			
		|||
 | 
			
		||||
import models { BuildLog, BuildLogFilter }
 | 
			
		||||
import net.http { Method }
 | 
			
		||||
import response { Response }
 | 
			
		||||
import web.response { Response }
 | 
			
		||||
import time
 | 
			
		||||
 | 
			
		||||
// get_build_logs returns all build logs.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ module client
 | 
			
		|||
 | 
			
		||||
import models { Target, TargetFilter }
 | 
			
		||||
import net.http { Method }
 | 
			
		||||
import response { Response }
 | 
			
		||||
import web.response { Response }
 | 
			
		||||
 | 
			
		||||
// get_targets returns a list of targets, given a filter object.
 | 
			
		||||
pub fn (c &Client) get_targets(filter TargetFilter) ?[]Target {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@ module server
 | 
			
		|||
import web
 | 
			
		||||
import net.http
 | 
			
		||||
import net.urllib
 | 
			
		||||
import response { new_data_response, new_response }
 | 
			
		||||
import web.response { new_data_response, new_response }
 | 
			
		||||
import db
 | 
			
		||||
import time
 | 
			
		||||
import os
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ module server
 | 
			
		|||
 | 
			
		||||
import web
 | 
			
		||||
import net.http
 | 
			
		||||
import response { new_data_response, new_response }
 | 
			
		||||
import web.response { new_data_response, new_response }
 | 
			
		||||
import db
 | 
			
		||||
import models { Target, TargetArch, TargetFilter }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@ import time
 | 
			
		|||
import rand
 | 
			
		||||
import util
 | 
			
		||||
import net.http
 | 
			
		||||
import response { new_response }
 | 
			
		||||
import web.response { new_response }
 | 
			
		||||
 | 
			
		||||
// healthcheck just returns a string, but can be used to quickly check if the
 | 
			
		||||
// server is still responsive.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ module server
 | 
			
		|||
 | 
			
		||||
import web
 | 
			
		||||
import net.http
 | 
			
		||||
import response { new_response }
 | 
			
		||||
import web.response { new_response }
 | 
			
		||||
 | 
			
		||||
// delete_package tries to remove the given package.
 | 
			
		||||
['/:repo/:arch/:pkg'; delete]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue