Archived
1

Dependency management via dep package.

This commit is contained in:
Vladimir Hodakov 2017-10-26 18:17:58 +04:00
parent c676fb780d
commit e97b3caf07
28 changed files with 121 additions and 42 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
config.yml
vendor/*

45
Gopkg.lock generated Normal file
View File

@ -0,0 +1,45 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/go-sql-driver/mysql"
packages = ["."]
revision = "a0583e0143b1624142adab07e0e97fe106d99561"
version = "v1.3"
[[projects]]
name = "github.com/go-telegram-bot-api/telegram-bot-api"
packages = ["."]
revision = "0a57807db79efce7f6719fbb2c0e0f83fda79aec"
version = "v4.6"
[[projects]]
branch = "master"
name = "github.com/jmoiron/sqlx"
packages = [".","reflectx"]
revision = "3379e5993990b1f927fc8db926485e6f6becf2d2"
[[projects]]
name = "github.com/pressly/goose"
packages = ["."]
revision = "056a4d47dcc4d67fa3947a4f13945a5c690e568b"
version = "v2.1.0"
[[projects]]
name = "github.com/technoweenie/multipartstreamer"
packages = ["."]
revision = "a90a01d73ae432e2611d178c18367fbaa13e0154"
version = "v1.0.1"
[[projects]]
branch = "v2"
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "5020a2712e7a565f5f7ed84b6ea5fe7a369303903dc3dfeb0de03777806f585e"
solver-name = "gps-cdcl"
solver-version = 1

32
Gopkg.toml Normal file
View File

@ -0,0 +1,32 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
required = ["github.com/go-sql-driver/mysql", "github.com/jmoiron/sqlx", "github.com/pressly/goose"]
[[constraint]]
name = "github.com/go-telegram-bot-api/telegram-bot-api"
version = "4.6.0"
[[constraint]]
branch = "v2"
name = "gopkg.in/yaml.v2"

View File

@ -1,3 +1,4 @@
# i2_bot: бот лиги Инстинкт игры @PokememBroBot
Для запуска нужен правильный ``config.json`` и выполнить ``./dependencies.sh``.
Для запуска нужен правильный ``config.json``.
Управление зависимостями осуществляет [dep](https://github.com/golang/dep).

View File

@ -9,12 +9,12 @@ import (
// 3rd-party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"./lib/appcontext"
"./lib/getters"
"./lib/migrations"
"./lib/parsers"
"./lib/router"
"./lib/talkers"
"lab.pztrn.name/fat0troll/i2_bot/lib/appcontext"
"lab.pztrn.name/fat0troll/i2_bot/lib/getters"
"lab.pztrn.name/fat0troll/i2_bot/lib/migrations"
"lab.pztrn.name/fat0troll/i2_bot/lib/parsers"
"lab.pztrn.name/fat0troll/i2_bot/lib/router"
"lab.pztrn.name/fat0troll/i2_bot/lib/talkers"
)
var (

View File

@ -8,14 +8,14 @@ import (
"github.com/go-telegram-bot-api/telegram-bot-api"
"github.com/jmoiron/sqlx"
// local
"../config"
"../connections"
"lab.pztrn.name/fat0troll/i2_bot/lib/config"
"lab.pztrn.name/fat0troll/i2_bot/lib/connections"
// interfaces
"../getters/gettersinterface"
"../migrations/migrationsinterface"
"../parsers/parsersinterface"
"../router/routerinterface"
"../talkers/talkersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/getters/gettersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/migrations/migrationsinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/parsers/parsersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/router/routerinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/talkers/talkersinterface"
)
// Context is an application context struct

View File

@ -8,10 +8,10 @@ import (
"log"
// 3rd-party
_ "github.com/go-sql-driver/mysql"
"github.com/go-telegram-bot-api/telegram-bot-api"
"github.com/jmoiron/sqlx"
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../config"
"lab.pztrn.name/fat0troll/i2_bot/lib/config"
)
// BotInit initializes connection to Telegram

View File

@ -8,7 +8,7 @@ import (
"log"
"time"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// CreateBroadcastMessage creates broadcast message item in database

View File

@ -10,7 +10,7 @@ import (
// 3rd-party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// GetChatByID returns dbmapping.Chat instance with given ID.

View File

@ -7,8 +7,8 @@ import (
// stdlib
"log"
// local
"../appcontext"
"../getters/gettersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/appcontext"
"lab.pztrn.name/fat0troll/i2_bot/lib/getters/gettersinterface"
)
var (

View File

@ -7,7 +7,7 @@ import (
// 3rd-party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// GettersInterface implements Getters for importing via appcontext.

View File

@ -8,7 +8,7 @@ import (
"log"
"time"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// GetPlayerByID returns dbmapping.Player instance with given ID.

View File

@ -8,7 +8,7 @@ import (
"log"
"strconv"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// Internal functions

View File

@ -7,7 +7,7 @@ import (
// stdlib
"log"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// GetProfile returns last saved profile of player

View File

@ -5,8 +5,8 @@ package migrations
import (
// local
"../appcontext"
"../migrations/migrationsinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/appcontext"
"lab.pztrn.name/fat0troll/i2_bot/lib/migrations/migrationsinterface"
)
var (

View File

@ -5,8 +5,8 @@ package parsers
import (
// local
"../appcontext"
"../parsers/parsersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/appcontext"
"lab.pztrn.name/fat0troll/i2_bot/lib/parsers/parsersinterface"
)
var (

View File

@ -7,7 +7,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// ParsersInterface implements Parsers for importing via appcontext.

View File

@ -11,7 +11,7 @@ import (
"strings"
"time"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// Internal functions

View File

@ -13,7 +13,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// Internal functions

View File

@ -7,7 +7,7 @@ import (
// stdlib
"log"
// local
"../appcontext"
"lab.pztrn.name/fat0troll/i2_bot/lib/appcontext"
)
var (

View File

@ -10,7 +10,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// AdminBroadcastMessageCompose saves message for future broadcast

View File

@ -7,8 +7,8 @@ import (
// stdlib
"log"
// local
"../appcontext"
"../talkers/talkersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/appcontext"
"lab.pztrn.name/fat0troll/i2_bot/lib/talkers/talkersinterface"
)
var (

View File

@ -7,7 +7,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// HelloMessageUnauthorized tell new user what to do.

View File

@ -7,8 +7,8 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../config"
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/config"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// HelpMessage gives user all available commands

View File

@ -10,7 +10,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// Internal functions

View File

@ -10,7 +10,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// ProfileMessage shows current player's profile

View File

@ -10,7 +10,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// BestPokememesList shows list for catching based on player league and grade

View File

@ -7,7 +7,7 @@ import (
// 3rd party
"github.com/go-telegram-bot-api/telegram-bot-api"
// local
"../../dbmapping"
"lab.pztrn.name/fat0troll/i2_bot/lib/dbmapping"
)
// TalkersInterface implements Talkers for importing via appcontex