ting

package
v0.0.0-...-44adb0e Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDb

func CloseDb() error

func InitDb

func InitDb(config DbConfig) error

func RunTask

func RunTask(channel Channel) error

Types

type Channel

type Channel struct {
	Url string
	Tag Tag
}

type DbConfig

type DbConfig struct {
	UserName string
	Password string
	Host     string
	Port     int
}

func ParseDbConfig

func ParseDbConfig() (DbConfig, error)

type Tag

type Tag struct {
	Id   int
	Name string
}

type Ting

type Ting struct {
	ProgramId   int
	Title       string
	Description string
	AudioUrl    string
	Content     string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type Voa

type Voa struct {
	Title          string
	Description    string
	Url            string
	PublishedAtUtc time.Time
	Body           string
	BodyWithHtml   string
	ImageUrl       string
	AudioUrl       string
	Words          []Word
}

type Word

type Word struct {
	Word         string
	PartOfSpeech string
	Definition   string
}

Jump to

Keyboard shortcuts

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