gpreview

package
v0.0.0-...-4cc6b3f Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2015 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifyTranslatedReviews

func NotifyTranslatedReviews(dbName, fileName, from, to string) error

func OpenReviewDatabase

func OpenReviewDatabase(dbName string) *sql.DB

func PostSlack

func PostSlack(d SlackData, url string) error

PostSlack ...

func Translate

func Translate(word, from, to string, atmc *MsAccessTokenMessageCache) (string, error)

Types

type Config

type Config struct {
	MsTranslatorClientID     string `toml:"ms_tranlator_client_id"`
	MsTranslatorClientSecret string `toml:"ms_tranlator_client_secret"`

	SlackURL string `toml:"slack_url"`
}

Config ...

var GPReview Config

GPReview : Global information of configuration.

func Load

func Load() Config

Load : load config

type MsAccessTokenMessage

type MsAccessTokenMessage struct {
	TokenType   string `json:"token_type"`
	AccessToken string `json:"access_token"`
	ExpiresIn   string `json:"expires_in"`
	Scope       string `json:"scope"`
}

type MsAccessTokenMessageCache

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

type Result

type Result struct {
	String string `xml:"string"`
}

type Review

type Review struct {
	PackageName string
	AppVersion  string
	// ReviewerLanguage                 string
	// ReviewerHardwareModel            string
	ReviewSubmitDateAndTime string
	// ReviewSubmitMillisSinceEpoch     string
	// ReviewLastUpdateDateAndTime      string
	// ReviewLastUpdateMillisSinceEpoch string
	StarRating  string
	ReviewTitle string
	ReviewText  string
}

Review ...

func (*Review) Insert

func (r *Review) Insert(db *sql.DB) error

type SlackData

type SlackData struct {
	Text      string `json:"text"`
	Username  string `json:"username"`
	IconEmoji string `json:"icon_emoji"`
}

SlackData ...

Jump to

Keyboard shortcuts

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