cmd

package
v0.0.0-...-c5679b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserAgent = "arbitrage/2017-04-08"

Functions

func ParseSourceId

func ParseSourceId(source string) (string, int)

Types

type API

type API interface {
	Login(username, password string) error
	Do(typ string, id int) (resp *arbitrage.Response, err error)
	Download(id int) ([]byte, error)
	ParseResponseReleases(resp arbitrage.Response) (interface{}, error)
}

type App

type App struct {
	HasDatabase bool
	ConfigDir   string
	Config      Config
	ApiClients  map[string]API
}

func (*App) APIForSource

func (app *App) APIForSource(source string) API

func (*App) DoLogin

func (app *App) DoLogin(source string) API

func (*App) Init

func (app *App) Init()

type Config

type Config struct {
	Server       string            `toml:"server"`
	DatabaseType string            `toml:"database_type,omitempty"`
	Database     string            `toml:"database,omitempty"`
	Sources      map[string]Source `toml:"sources"`
}

type GazelleAPI

type GazelleAPI struct {
	*gazelle.API
	Source string
}

func (*GazelleAPI) Do

func (w *GazelleAPI) Do(typ string, id int) (resp *arbitrage.Response, err error)

func (*GazelleAPI) Download

func (w *GazelleAPI) Download(id int) ([]byte, error)

func (*GazelleAPI) ParseResponseReleases

func (w *GazelleAPI) ParseResponseReleases(resp arbitrage.Response) (interface{}, error)

type Source

type Source struct {
	Url      string `toml:"url"`
	User     string `toml:"user"`
	Password string `toml:"password"`
}

type WafflesAPI

type WafflesAPI struct {
	*waffles.API
	Source string
}

func (*WafflesAPI) Do

func (w *WafflesAPI) Do(typ string, id int) (resp *arbitrage.Response, err error)

func (*WafflesAPI) Download

func (w *WafflesAPI) Download(id int) ([]byte, error)

func (*WafflesAPI) ParseResponseReleases

func (w *WafflesAPI) ParseResponseReleases(resp arbitrage.Response) (interface{}, error)

func (*WafflesAPI) ResponseToInfo

func (w *WafflesAPI) ResponseToInfo(resp *arbitrage.Response) arbitrage.InfoRelease

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL