Changed go package path

This commit is contained in:
Torkel Ödegaard 2015-02-05 10:37:13 +01:00
parent 3ab7b5c3f7
commit 10820f31c2
50 changed files with 139 additions and 147 deletions

View File

@ -6,7 +6,7 @@ init_cmds = [
watch_all = true
watch_dirs = [
"$WORKDIR/pkg",
"$WORKDIR/grafana/src/views",
"$WORKDIR/src/views",
"$WORKDIR/conf",
]
watch_exts = [".go", ".ini"]

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "grafana"]
path = grafana
url = git@github.com:torkelo/grafana-private.git

View File

@ -2,7 +2,7 @@ app_mode = development
[server]
router_logging = false
static_root_path = grafana/src
static_root_path = src
[log]
level = Trace

View File

@ -5,9 +5,9 @@ import (
"runtime"
"strconv"
"github.com/torkelo/grafana-pro/pkg/cmd"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/cmd"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/setting"
"github.com/codegangsta/cli"
)

View File

@ -1,9 +1,9 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
func GetAccount(c *middleware.Context) {

View File

@ -1,9 +1,9 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
func AddAccountUser(c *middleware.Context, cmd m.AddAccountUserCommand) {

View File

@ -1,9 +1,9 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
func AdminSearchUsers(c *middleware.Context) {

View File

@ -3,9 +3,9 @@ package api
import (
"github.com/Unknwon/macaron"
"github.com/macaron-contrib/binding"
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
// Register adds http routes

View File

@ -1,10 +1,10 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/util"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/util"
)
func GetApiKeys(c *middleware.Context) {

View File

@ -5,12 +5,12 @@ import (
"os"
"path"
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/torkelo/grafana-pro/pkg/util"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
)
func isDasboardStarredByUser(c *middleware.Context, dashId int64) (bool, error) {

View File

@ -5,10 +5,10 @@ import (
"net/http/httputil"
"net/url"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/util"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/util"
)
func NewReverseProxy(ds *m.DataSource, proxyPath string) *httputil.ReverseProxy {

View File

@ -7,7 +7,7 @@ import (
. "github.com/smartystreets/goconvey/convey"
m "github.com/torkelo/grafana-pro/pkg/models"
m "github.com/grafana/grafana/pkg/models"
)
func TestAccountDataAccess(t *testing.T) {

View File

@ -1,10 +1,10 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
func GetDataSources(c *middleware.Context) {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"strings"
m "github.com/torkelo/grafana-pro/pkg/models"
m "github.com/grafana/grafana/pkg/models"
)
type LoginCommand struct {

View File

@ -3,10 +3,10 @@ package api
import (
"strconv"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
func getFrontendSettings(c *middleware.Context) (map[string]interface{}, error) {

View File

@ -1,9 +1,9 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/middleware"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/middleware"
"github.com/grafana/grafana/pkg/setting"
)
func setIndexViewData(c *middleware.Context) error {

View File

@ -3,13 +3,13 @@ package api
import (
"net/url"
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/torkelo/grafana-pro/pkg/util"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
)
const (

View File

@ -6,12 +6,12 @@ import (
"golang.org/x/oauth2"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/torkelo/grafana-pro/pkg/social"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/social"
)
func OAuthLogin(ctx *middleware.Context) {

View File

@ -1,8 +1,8 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/middleware"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/middleware"
"math/rand"
"strconv"
)

View File

@ -4,9 +4,9 @@ import (
"fmt"
"net/http"
"github.com/torkelo/grafana-pro/pkg/components/renderer"
"github.com/torkelo/grafana-pro/pkg/middleware"
"github.com/torkelo/grafana-pro/pkg/util"
"github.com/grafana/grafana/pkg/components/renderer"
"github.com/grafana/grafana/pkg/middleware"
"github.com/grafana/grafana/pkg/util"
)
func RenderToPng(c *middleware.Context) {

View File

@ -4,10 +4,10 @@ import (
"regexp"
"strings"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
// TODO: this needs to be cached or improved somehow

View File

@ -1,10 +1,10 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
// POST /api/user/signup

View File

@ -1,9 +1,9 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
func StarDashboard(c *middleware.Context) {

View File

@ -1,9 +1,9 @@
package api
import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
)
func GetUser(c *middleware.Context) {

View File

@ -7,11 +7,11 @@ import (
"strings"
"github.com/codegangsta/cli"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/log"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/services/sqlstore"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
)
var CmdImportJson = cli.Command{

View File

@ -13,13 +13,13 @@ import (
"github.com/codegangsta/cli"
"github.com/macaron-contrib/session"
"github.com/torkelo/grafana-pro/pkg/api"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/torkelo/grafana-pro/pkg/middleware"
"github.com/torkelo/grafana-pro/pkg/services/eventpublisher"
"github.com/torkelo/grafana-pro/pkg/services/sqlstore"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/torkelo/grafana-pro/pkg/social"
"github.com/grafana/grafana/pkg/api"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/middleware"
"github.com/grafana/grafana/pkg/services/eventpublisher"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/social"
)
var CmdWeb = cli.Command{

View File

@ -9,8 +9,8 @@ import (
"path/filepath"
"time"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/setting"
)
type RenderOpts struct {

View File

@ -6,8 +6,8 @@ import (
"github.com/Unknwon/macaron"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
type AuthOptions struct {

View File

@ -22,7 +22,7 @@ import (
"time"
"github.com/Unknwon/macaron"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/grafana/grafana/pkg/log"
)
var isWindows bool

View File

@ -8,10 +8,10 @@ import (
"github.com/Unknwon/macaron"
"github.com/macaron-contrib/session"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/log"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
type Context struct {

View File

@ -7,9 +7,9 @@ import (
"time"
"github.com/streadway/amqp"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/events"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/events"
"github.com/grafana/grafana/pkg/setting"
)
var (

View File

@ -3,9 +3,9 @@ package sqlstore
import (
"time"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/events"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/events"
m "github.com/grafana/grafana/pkg/models"
)
func init() {

View File

@ -5,8 +5,8 @@ import (
. "github.com/smartystreets/goconvey/convey"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
func TestAccountDataAccess(t *testing.T) {

View File

@ -6,8 +6,8 @@ import (
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/bus"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
)
func init() {

View File

@ -4,8 +4,8 @@ import (
"time"
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/bus"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
)
func init() {

View File

@ -4,8 +4,8 @@ import (
"bytes"
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/bus"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
)
func init() {

View File

@ -5,7 +5,7 @@ import (
. "github.com/smartystreets/goconvey/convey"
m "github.com/torkelo/grafana-pro/pkg/models"
m "github.com/grafana/grafana/pkg/models"
)
func insertTestDashboard(title string, accountId int64, tags ...interface{}) *m.Dashboard {

View File

@ -3,8 +3,8 @@ package sqlstore
import (
"time"
"github.com/torkelo/grafana-pro/pkg/bus"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
"github.com/go-xorm/xorm"
)

View File

@ -7,8 +7,8 @@ import (
. "github.com/smartystreets/goconvey/convey"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/services/sqlstore/sqlutil"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
)
func InitTestDB(t *testing.T) {

View File

@ -1,6 +1,6 @@
package sqlstore
import . "github.com/torkelo/grafana-pro/pkg/services/sqlstore/migrator"
import . "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
// --- Migration Guide line ---
// 1. Never change a migration that is committed and pushed to master

View File

@ -6,9 +6,9 @@ import (
"testing"
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/log"
. "github.com/torkelo/grafana-pro/pkg/services/sqlstore/migrator"
"github.com/torkelo/grafana-pro/pkg/services/sqlstore/sqlutil"
"github.com/grafana/grafana/pkg/log"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
. "github.com/smartystreets/goconvey/convey"
)

View File

@ -7,7 +7,7 @@ import (
"github.com/go-xorm/xorm"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/grafana/grafana/pkg/log"
)
type Migrator struct {

View File

@ -2,8 +2,8 @@ package sqlstore
import (
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
)
type dbTransactionFunc func(sess *xorm.Session) error

View File

@ -6,11 +6,11 @@ import (
"path"
"strings"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/log"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/services/sqlstore/migrator"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/log"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting"
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"

View File

@ -3,8 +3,8 @@ package sqlstore
import (
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/bus"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/grafana/grafana/pkg/bus"
m "github.com/grafana/grafana/pkg/models"
)
func init() {

View File

@ -4,7 +4,7 @@ import (
"testing"
. "github.com/smartystreets/goconvey/convey"
m "github.com/torkelo/grafana-pro/pkg/models"
m "github.com/grafana/grafana/pkg/models"
)
func TestUserStarsDataAccess(t *testing.T) {

View File

@ -6,11 +6,11 @@ import (
"github.com/go-xorm/xorm"
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/events"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/torkelo/grafana-pro/pkg/util"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/events"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
)
func init() {

View File

@ -15,7 +15,7 @@ import (
"github.com/macaron-contrib/session"
"gopkg.in/ini.v1"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/grafana/grafana/pkg/log"
)
type Scheme string

View File

@ -5,8 +5,8 @@ import (
"strconv"
"strings"
"github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"golang.org/x/oauth2"
)

View File

@ -1,5 +0,0 @@
# Security
- OAuth and email, unique?
- Form authentication token
- Password hash
- Account security for png rendering