move files into pkg

This commit is contained in:
c9s 2020-10-11 16:46:15 +08:00
parent 5a3c043b43
commit 3d5507a053
71 changed files with 63 additions and 63 deletions

View File

@ -11,12 +11,12 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/c9s/bbgo/accounting"
"github.com/c9s/bbgo/bbgo"
"github.com/c9s/bbgo/exchange/binance"
"github.com/c9s/bbgo/exchange/max"
"github.com/c9s/bbgo/service"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/accounting"
"github.com/c9s/bbgo/pkg/bbgo"
"github.com/c9s/bbgo/pkg/exchange/binance"
"github.com/c9s/bbgo/pkg/exchange/max"
"github.com/c9s/bbgo/pkg/service"
"github.com/c9s/bbgo/pkg/types"
)
func init() {

View File

@ -13,11 +13,11 @@ import (
"github.com/spf13/viper"
"github.com/c9s/bbgo/cmd/cmdutil"
"github.com/c9s/bbgo/exchange/max"
maxapi "github.com/c9s/bbgo/exchange/max/maxapi"
"github.com/c9s/bbgo/fixedpoint"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/exchange/max"
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
func init() {

View File

@ -4,7 +4,7 @@ import (
"log"
"os"
maxapi "github.com/c9s/bbgo/exchange/max/maxapi"
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
)
func main() {

View File

@ -6,7 +6,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
type ProfitAndLossCalculator struct {

View File

@ -7,8 +7,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/slack-go/slack"
"github.com/c9s/bbgo/slack/slackstyle"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/slack/slackstyle"
"github.com/c9s/bbgo/pkg/types"
)
type ProfitAndLossReport struct {

View File

@ -4,9 +4,9 @@ import (
"context"
"sync"
"github.com/c9s/bbgo/exchange/binance"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/exchange/binance"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
log "github.com/sirupsen/logrus"
)

View File

@ -3,8 +3,8 @@ package bbgo
import (
"sync"
"github.com/c9s/bbgo/accounting"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/accounting"
"github.com/c9s/bbgo/pkg/types"
)
type Context struct {

View File

@ -4,7 +4,7 @@ import (
"math"
"time"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
type MovingAverageIndicator struct {

View File

@ -3,7 +3,7 @@ package bbgo
import (
"testing"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
func TestCalculateMovingAverage(t *testing.T) {

View File

@ -6,9 +6,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/c9s/bbgo/accounting"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/accounting"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
type BackTestStream struct {

View File

@ -3,7 +3,7 @@
package bbgo
import (
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
func (store *MarketDataStore) OnUpdate(cb KLineCallback) {

View File

@ -7,8 +7,8 @@ import (
"github.com/pkg/errors"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
var (

View File

@ -1,8 +1,8 @@
package bbgo
import (
"github.com/c9s/bbgo/accounting"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/accounting"
"github.com/c9s/bbgo/pkg/types"
)
type Notifier interface {

View File

@ -8,7 +8,7 @@ import (
"strings"
"sync"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
func zero(a float64) bool {

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
func TestStockManager(t *testing.T) {

View File

@ -1,7 +1,7 @@
package bbgo
import (
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
type Interval string

View File

@ -10,11 +10,11 @@ import (
"github.com/jmoiron/sqlx"
log "github.com/sirupsen/logrus"
"github.com/c9s/bbgo/accounting"
"github.com/c9s/bbgo/bbgo/config"
"github.com/c9s/bbgo/exchange/binance"
"github.com/c9s/bbgo/service"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/accounting"
"github.com/c9s/bbgo/pkg/bbgo/config"
"github.com/c9s/bbgo/pkg/exchange/binance"
"github.com/c9s/bbgo/pkg/service"
"github.com/c9s/bbgo/pkg/types"
)
// MarketStrategy represents the single Exchange strategy

View File

@ -10,8 +10,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
var log = logrus.WithFields(logrus.Fields{

View File

@ -9,9 +9,9 @@ import (
"github.com/adshao/go-binance"
"github.com/valyala/fastjson"
"github.com/c9s/bbgo/fixedpoint"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
/*

View File

@ -7,12 +7,12 @@ import (
"sync"
"time"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/util"
"github.com/adshao/go-binance"
"github.com/gorilla/websocket"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
type StreamRequest struct {

View File

@ -10,9 +10,9 @@ import (
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
maxapi "github.com/c9s/bbgo/exchange/max/maxapi"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
type Exchange struct {

View File

@ -11,7 +11,7 @@ import (
"github.com/pkg/errors"
"github.com/valyala/fastjson"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
type PublicService struct {

View File

@ -7,8 +7,8 @@ import (
"github.com/pkg/errors"
"github.com/valyala/fastjson"
"github.com/c9s/bbgo/fixedpoint"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
)
var ErrIncorrectBookEntryElementLength = errors.New("incorrect book entry element length")

View File

@ -4,8 +4,8 @@ import (
"github.com/pkg/errors"
"github.com/valyala/fastjson"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
type BaseEvent struct {

View File

@ -5,8 +5,8 @@ import (
log "github.com/sirupsen/logrus"
max "github.com/c9s/bbgo/exchange/max/maxapi"
"github.com/c9s/bbgo/types"
max "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
"github.com/c9s/bbgo/pkg/types"
)
var logger = log.WithField("exchange", "max")

View File

@ -8,9 +8,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/slack-go/slack"
"github.com/c9s/bbgo/accounting"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/accounting"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
type SlackAttachmentCreator interface {

View File

@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/c9s/bbgo/types"
"github.com/c9s/bbgo/pkg/types"
)
type TradeSync struct {

View File

@ -7,7 +7,7 @@ import (
"github.com/slack-go/slack"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/util"
)
type KLineOrWindow interface {

View File

@ -5,8 +5,8 @@ import (
"sort"
"sync"
"github.com/c9s/bbgo/fixedpoint"
"github.com/c9s/bbgo/sigchan"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/sigchan"
)
type PriceVolume struct {

View File

@ -6,7 +6,7 @@ import (
"github.com/slack-go/slack"
"github.com/c9s/bbgo/util"
"github.com/c9s/bbgo/pkg/util"
)
type Trade struct {