database

package
v0.0.0-...-c1795f6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultMaxResults of Youtube API
	DefaultMaxResults = int64(25)
)

Functions

func ChannelInfo

func ChannelInfo(channelID string, resultChan chan *youtube.ChannelListResponse)

ChannelInfo returns info about a channel

func SearchOnChannel

func SearchOnChannel(q string, channel string, resultChannel chan []*youtube.SearchResult, wg *sync.WaitGroup, MaxResults int64)

Types

type AppDatabase

type AppDatabase interface {
	// contains filtered or unexported methods
}

type Channel

type Channel struct {
	Name   string `json:"name"`
	Ytid   string `json:"ytid"`
	IsTuts bool   `json:"isTuts"`
}

Channel type

type YouCodeDB

type YouCodeDB struct {
	*sql.DB
}

func InitDB

func InitDB() *YouCodeDB

func (*YouCodeDB) AddChannel

func (db *YouCodeDB) AddChannel(name string, ytid string, isTuts bool) bool

AddChannels provide a simple way for admin to add channels

func (*YouCodeDB) GetChannels

func (db *YouCodeDB) GetChannels() []Channel

func (*YouCodeDB) StartRefreshData

func (db *YouCodeDB) StartRefreshData()

Jump to

Keyboard shortcuts

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