You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/02/23 17:26:39 UTC
[incubator-trafficcontrol] branch master updated (824f865 ->
38408d4)
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git.
from 824f865 extra flag needed for go build in rpm
new 44b1a78 moved into systeminfo package
new 38408d4 rebase cleanup
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
traffic_ops/traffic_ops_golang/routes.go | 3 ++-
traffic_ops/traffic_ops_golang/{ => systeminfo}/system_info.go | 4 ++--
traffic_ops/traffic_ops_golang/{ => systeminfo}/system_info_test.go | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
rename traffic_ops/traffic_ops_golang/{ => systeminfo}/system_info.go (97%)
rename traffic_ops/traffic_ops_golang/{ => systeminfo}/system_info_test.go (99%)
--
To stop receiving notification emails like this one, please contact
dangogh@apache.org.
[incubator-trafficcontrol] 01/02: moved into systeminfo package
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit 44b1a78af1ef9086e63a48cac6315e1f5d37da0c
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Wed Feb 21 09:04:45 2018 -0700
moved into systeminfo package
---
traffic_ops/traffic_ops_golang/routes.go | 7 ++++++-
traffic_ops/traffic_ops_golang/{ => systeminfo}/system_info.go | 4 ++--
.../traffic_ops_golang/{ => systeminfo}/system_info_test.go | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/traffic_ops/traffic_ops_golang/routes.go b/traffic_ops/traffic_ops_golang/routes.go
index a61c015..4389dbf 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -37,6 +37,7 @@ import (
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/division"
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/region"
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/status"
+ "github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/systeminfo"
"github.com/basho/riak-go-client"
)
@@ -138,8 +139,12 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
{1.2, http.MethodGet, `deliveryservices-wip/hostname/{hostName}/sslkeys$`, getDeliveryServiceSSLKeysByHostNameHandler(d.DB, d.Config), auth.PrivLevelAdmin, Authenticated, nil},
{1.2, http.MethodPost, `deliveryservices-wip/hostname/{hostName}/sslkeys/add$`, addDeliveryServiceSSLKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, Authenticated, nil},
+ //Statuses
+ {1.2, http.MethodGet, `statuses/?(\.json)?$`, statusesHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
+ {1.2, http.MethodGet, `statuses/{id}$`, statusesHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
+
//System
- {1.2, http.MethodGet, `system/info/?(\.json)?$`, systemInfoHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
+ {1.2, http.MethodGet, `system/info/?(\.json)?$`, systeminfo.Handler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
//Phys_Locations
{1.2, http.MethodGet, `phys_locations/?(\.json)?$`, physLocationsHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
diff --git a/traffic_ops/traffic_ops_golang/system_info.go b/traffic_ops/traffic_ops_golang/systeminfo/system_info.go
similarity index 97%
rename from traffic_ops/traffic_ops_golang/system_info.go
rename to traffic_ops/traffic_ops_golang/systeminfo/system_info.go
index 62e845b..1554a56 100644
--- a/traffic_ops/traffic_ops_golang/system_info.go
+++ b/traffic_ops/traffic_ops_golang/systeminfo/system_info.go
@@ -1,4 +1,4 @@
-package main
+package systeminfo
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -30,7 +30,7 @@ import (
"github.com/jmoiron/sqlx"
)
-func systemInfoHandler(db *sqlx.DB) http.HandlerFunc {
+func Handler(db *sqlx.DB) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
handleErrs := tc.GetHandleErrorsFunc(w, r)
diff --git a/traffic_ops/traffic_ops_golang/system_info_test.go b/traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go
similarity index 99%
rename from traffic_ops/traffic_ops_golang/system_info_test.go
rename to traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go
index b0b449e..902ea40 100644
--- a/traffic_ops/traffic_ops_golang/system_info_test.go
+++ b/traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go
@@ -1,4 +1,4 @@
-package main
+package systeminfo
/*
* Licensed to the Apache Software Foundation (ASF) under one
--
To stop receiving notification emails like this one, please contact
dangogh@apache.org.
[incubator-trafficcontrol] 02/02: rebase cleanup
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit 38408d4fce4de7d8024d0f5b306bc8404d2e72c6
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Thu Feb 22 14:49:33 2018 -0700
rebase cleanup
---
traffic_ops/traffic_ops_golang/routes.go | 4 ----
1 file changed, 4 deletions(-)
diff --git a/traffic_ops/traffic_ops_golang/routes.go b/traffic_ops/traffic_ops_golang/routes.go
index 4389dbf..317d71d 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -139,10 +139,6 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
{1.2, http.MethodGet, `deliveryservices-wip/hostname/{hostName}/sslkeys$`, getDeliveryServiceSSLKeysByHostNameHandler(d.DB, d.Config), auth.PrivLevelAdmin, Authenticated, nil},
{1.2, http.MethodPost, `deliveryservices-wip/hostname/{hostName}/sslkeys/add$`, addDeliveryServiceSSLKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, Authenticated, nil},
- //Statuses
- {1.2, http.MethodGet, `statuses/?(\.json)?$`, statusesHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
- {1.2, http.MethodGet, `statuses/{id}$`, statusesHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
-
//System
{1.2, http.MethodGet, `system/info/?(\.json)?$`, systeminfo.Handler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
--
To stop receiving notification emails like this one, please contact
dangogh@apache.org.