Make vieter compiler with -skip-unused
ci/woodpecker/push/arch unknown status
Details
ci/woodpecker/push/docker unknown status
Details
ci/woodpecker/push/build_experimental Pipeline failed
Details
ci/woodpecker/push/lint Pipeline failed
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/arch unknown status
Details
ci/woodpecker/push/docker unknown status
Details
ci/woodpecker/push/build_experimental Pipeline failed
Details
ci/woodpecker/push/lint Pipeline failed
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
parent
92ca5b8024
commit
10377632d5
|
@ -5,8 +5,8 @@ data/
|
||||||
vieter
|
vieter
|
||||||
dvieter
|
dvieter
|
||||||
pvieter
|
pvieter
|
||||||
dvieterctl
|
suvieter
|
||||||
vieterctl
|
afvieter
|
||||||
vieter.c
|
vieter.c
|
||||||
|
|
||||||
# Ignore testing files
|
# Ignore testing files
|
||||||
|
|
|
@ -18,6 +18,8 @@ pipeline:
|
||||||
- make debug
|
- make debug
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
|
branch:
|
||||||
|
exclude: [main, dev]
|
||||||
|
|
||||||
prod:
|
prod:
|
||||||
image: 'chewingbever/vlang:latest'
|
image: 'chewingbever/vlang:latest'
|
||||||
|
|
|
@ -8,7 +8,7 @@ import response { new_data_response, new_response }
|
||||||
|
|
||||||
const repos_file = 'repos.json'
|
const repos_file = 'repos.json'
|
||||||
|
|
||||||
['/api/repos'; get]
|
['/api/repos'; get; markused]
|
||||||
fn (mut app App) get_repos() web.Result {
|
fn (mut app App) get_repos() web.Result {
|
||||||
if !app.is_authorized() {
|
if !app.is_authorized() {
|
||||||
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
||||||
|
@ -25,7 +25,7 @@ fn (mut app App) get_repos() web.Result {
|
||||||
return app.json(http.Status.ok, new_data_response(repos))
|
return app.json(http.Status.ok, new_data_response(repos))
|
||||||
}
|
}
|
||||||
|
|
||||||
['/api/repos/:id'; get]
|
['/api/repos/:id'; get; markused]
|
||||||
fn (mut app App) get_single_repo(id string) web.Result {
|
fn (mut app App) get_single_repo(id string) web.Result {
|
||||||
if !app.is_authorized() {
|
if !app.is_authorized() {
|
||||||
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
||||||
|
@ -48,7 +48,7 @@ fn (mut app App) get_single_repo(id string) web.Result {
|
||||||
return app.json(http.Status.ok, new_data_response(repo))
|
return app.json(http.Status.ok, new_data_response(repo))
|
||||||
}
|
}
|
||||||
|
|
||||||
['/api/repos'; post]
|
['/api/repos'; post; markused]
|
||||||
fn (mut app App) post_repo() web.Result {
|
fn (mut app App) post_repo() web.Result {
|
||||||
if !app.is_authorized() {
|
if !app.is_authorized() {
|
||||||
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
||||||
|
@ -86,7 +86,7 @@ fn (mut app App) post_repo() web.Result {
|
||||||
return app.json(http.Status.ok, new_response('Repo added successfully.'))
|
return app.json(http.Status.ok, new_response('Repo added successfully.'))
|
||||||
}
|
}
|
||||||
|
|
||||||
['/api/repos/:id'; delete]
|
['/api/repos/:id'; delete; markused]
|
||||||
fn (mut app App) delete_repo(id string) web.Result {
|
fn (mut app App) delete_repo(id string) web.Result {
|
||||||
if !app.is_authorized() {
|
if !app.is_authorized() {
|
||||||
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
||||||
|
@ -113,7 +113,7 @@ fn (mut app App) delete_repo(id string) web.Result {
|
||||||
return app.json(http.Status.ok, new_response('Repo removed successfully.'))
|
return app.json(http.Status.ok, new_response('Repo removed successfully.'))
|
||||||
}
|
}
|
||||||
|
|
||||||
['/api/repos/:id'; patch]
|
['/api/repos/:id'; patch; markused]
|
||||||
fn (mut app App) patch_repo(id string) web.Result {
|
fn (mut app App) patch_repo(id string) web.Result {
|
||||||
if !app.is_authorized() {
|
if !app.is_authorized() {
|
||||||
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
||||||
|
|
|
@ -11,12 +11,12 @@ import response { new_response }
|
||||||
|
|
||||||
// healthcheck just returns a string, but can be used to quickly check if the
|
// healthcheck just returns a string, but can be used to quickly check if the
|
||||||
// server is still responsive.
|
// server is still responsive.
|
||||||
['/health'; get]
|
['/health'; get; markused]
|
||||||
pub fn (mut app App) healthcheck() web.Result {
|
pub fn (mut app App) healthcheck() web.Result {
|
||||||
return app.json(http.Status.ok, new_response('Healthy.'))
|
return app.json(http.Status.ok, new_response('Healthy.'))
|
||||||
}
|
}
|
||||||
|
|
||||||
['/:repo/:arch/:filename'; get; head]
|
['/:repo/:arch/:filename'; get; head; markused]
|
||||||
fn (mut app App) get_repo_file(repo string, arch string, filename string) web.Result {
|
fn (mut app App) get_repo_file(repo string, arch string, filename string) web.Result {
|
||||||
mut full_path := ''
|
mut full_path := ''
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ fn (mut app App) get_repo_file(repo string, arch string, filename string) web.Re
|
||||||
return app.file(full_path)
|
return app.file(full_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
['/:repo/publish'; post]
|
['/:repo/publish'; post; markused]
|
||||||
fn (mut app App) put_package(repo string) web.Result {
|
fn (mut app App) put_package(repo string) web.Result {
|
||||||
if !app.is_authorized() {
|
if !app.is_authorized() {
|
||||||
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
|
||||||
|
|
Loading…
Reference in New Issue