Documentation ¶
Index ¶
- func CheckMongoActive(t *testing.T)
- func CreateSdk() *v2_gots_sdk.ApiSdk
- func GetBaseTestAsset(elem ...string) string
- func GetDatabase() *gorm.DB
- func GetDb() *gorm.DB
- func GetMongoDatabase(t *testing.T) *mongo.Database
- func GetTokopediaApiClient() (*api.TokopediaApi, func())
- func NewMongoDatabase(ctx context.Context, dburi string, dbname string) *mongo.Database
- func RunWebSdk(t *testing.T, handler RunHandler)
- type ConfigTest
- type FilterTextHandler
- type FilterTextModifier
- type GrabBasicHandler
- type GrabBasicModifier
- type GrabTokopediaHandler
- type GrabTokopediaModifier
- type MarkupConfigHandler
- type MarkupConfigModifier
- type RunHandler
- type Scenario
- func (scen *Scenario) CreateFile(data []byte, fname string) func()
- func (scen *Scenario) Path(data ...string) string
- func (scen *Scenario) WithBase(handler func(dirbase string, scen *Scenario))
- func (scen *Scenario) WithBaseConfig(handler func(base *legacy_source.BaseConfig))
- func (scen *Scenario) WithCopySqliteDatabase(handler func(db *gorm.DB))
- func (scen *Scenario) WithFilterText(modifier FilterTextModifier, handler FilterTextHandler)
- func (scen *Scenario) WithGrabBasic(modifier GrabBasicModifier, handler GrabBasicHandler)
- func (scen *Scenario) WithGrabTokopedia(modifier GrabTokopediaModifier, handler GrabTokopediaHandler)
- func (scen *Scenario) WithMarkupConfig(modifier MarkupConfigModifier, handler MarkupConfigHandler)
- func (scen *Scenario) WithMongoDatabase(cfg *config.UploadBaseConfig, handler func(mongodb *mongo.Database))
- func (scen *Scenario) WithSqliteDatabase(handler func(db *gorm.DB))
- func (scen *Scenario) WithUploadConfig(cfgmodifier func(cfg *config.UploadBaseConfig) error, ...)
- type SendRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMongoActive ¶
func CreateSdk ¶ added in v1.0.1
func CreateSdk() *v2_gots_sdk.ApiSdk
func GetBaseTestAsset ¶
func GetDatabase ¶ added in v1.1.5
func GetTokopediaApiClient ¶
func GetTokopediaApiClient() (*api.TokopediaApi, func())
func NewMongoDatabase ¶ added in v1.0.2
func RunWebSdk ¶ added in v1.0.1
func RunWebSdk(t *testing.T, handler RunHandler)
Types ¶
type ConfigTest ¶
type ConfigTest struct {
MongoUri string `json:"mongo_uri"`
}
var CfgTest *ConfigTest
func CheckConfig ¶
func CheckConfig(t *testing.T) *ConfigTest
func (*ConfigTest) GetHostPort ¶
func (cfg *ConfigTest) GetHostPort() (string, string)
type FilterTextHandler ¶ added in v1.1.10
type FilterTextHandler func(cfg *legacy_source.FilterText)
type FilterTextModifier ¶ added in v1.1.10
type FilterTextModifier func(cfg *legacy_source.FilterText) error
type GrabBasicHandler ¶ added in v1.1.10
type GrabBasicModifier ¶ added in v1.1.10
type GrabTokopediaHandler ¶ added in v1.1.10
type GrabTokopediaHandler func(cfg *legacy.GrabTokopedia)
type GrabTokopediaModifier ¶ added in v1.1.10
type GrabTokopediaModifier func(cfg *legacy.GrabTokopedia) error
type MarkupConfigHandler ¶ added in v1.1.10
type MarkupConfigHandler func(cfg *legacy.LegacyMarkupConfig)
type MarkupConfigModifier ¶ added in v1.1.10
type MarkupConfigModifier func(cfg *legacy.LegacyMarkupConfig) error
type RunHandler ¶ added in v1.0.1
type RunHandler func(sdk *v2_gots_sdk.ApiSdk, sendApi SendRequest) error
type Scenario ¶ added in v1.0.2
type Scenario struct { Base string // contains filtered or unexported fields }
func NewScenario ¶ added in v1.0.2
func (*Scenario) CreateFile ¶ added in v1.1.10
func (*Scenario) WithBaseConfig ¶ added in v1.1.10
func (scen *Scenario) WithBaseConfig(handler func(base *legacy_source.BaseConfig))
func (*Scenario) WithCopySqliteDatabase ¶ added in v1.0.2
func (*Scenario) WithFilterText ¶ added in v1.1.10
func (scen *Scenario) WithFilterText(modifier FilterTextModifier, handler FilterTextHandler)
func (*Scenario) WithGrabBasic ¶ added in v1.1.10
func (scen *Scenario) WithGrabBasic(modifier GrabBasicModifier, handler GrabBasicHandler)
func (*Scenario) WithGrabTokopedia ¶ added in v1.1.10
func (scen *Scenario) WithGrabTokopedia(modifier GrabTokopediaModifier, handler GrabTokopediaHandler)
func (*Scenario) WithMarkupConfig ¶ added in v1.1.10
func (scen *Scenario) WithMarkupConfig(modifier MarkupConfigModifier, handler MarkupConfigHandler)
func (*Scenario) WithMongoDatabase ¶ added in v1.0.2
func (scen *Scenario) WithMongoDatabase(cfg *config.UploadBaseConfig, handler func(mongodb *mongo.Database))
func (*Scenario) WithSqliteDatabase ¶ added in v1.0.2
func (*Scenario) WithUploadConfig ¶ added in v1.0.2
func (scen *Scenario) WithUploadConfig(cfgmodifier func(cfg *config.UploadBaseConfig) error, handler func(cfg *config.UploadBaseConfig))
type SendRequest ¶ added in v1.0.1
type SendRequest func(req *v2_gots_sdk.Api) *httptest.ResponseRecorder
Click to show internal directories.
Click to hide internal directories.