services

package
v0.0.0-...-95d1981 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterClickHouseDBFlags

func RegisterClickHouseDBFlags(f []cli.Flag) []cli.Flag

func RegisterUrlBuilderFlags

func RegisterUrlBuilderFlags(f []cli.Flag) []cli.Flag

Types

type ClickHouse

type ClickHouse struct {
	// contains filtered or unexported fields
}

func NewClickHouse

func NewClickHouse(c *cli.Context, db DBProvider) *ClickHouse

func (*ClickHouse) GetTopContent

func (s *ClickHouse) GetTopContent() ([]StatRecord, error)

type ClickHouseDB

type ClickHouseDB struct {
	// contains filtered or unexported fields
}

func NewClickHouseDB

func NewClickHouseDB(c *cli.Context) *ClickHouseDB

func (*ClickHouseDB) Close

func (s *ClickHouseDB) Close()

func (*ClickHouseDB) Get

func (s *ClickHouseDB) Get() (*sql.DB, error)

type DBProvider

type DBProvider interface {
	Get() (*sql.DB, error)
}

type StatRecord

type StatRecord struct {
	BytesWrittenGB         float64
	InfoHash, OriginalPath string
}

type UrlBuilder

type UrlBuilder struct {
	// contains filtered or unexported fields
}

func NewUrlBuilder

func NewUrlBuilder(c *cli.Context) *UrlBuilder

func (*UrlBuilder) BuildDoneUrl

func (s *UrlBuilder) BuildDoneUrl(sr *StatRecord) string

func (*UrlBuilder) BuildInvokeUrl

func (s *UrlBuilder) BuildInvokeUrl(sr *StatRecord) string

Jump to

Keyboard shortcuts

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