Documentation
¶
Overview ¶
Package garbanzo is a generated GoMock package.
Index ¶
- Constants
- func NewProxyRouter(c *Config) *echo.Echo
- func NewRouter(c *Config, templDir string, publicDir string) *echo.Echo
- type Config
- type Env
- type Event
- type Events
- type GitHub
- type GitHubEventType
- type GitHubSubjectType
- type MockclientI
- type MockclientIMockRecorder
- type Stats
- type TemplateRenderer
Constants ¶
View Source
const ( AppDir = ".garbanzo" FeedFile = "feeds.yml" TokenFile = "token" SaveFile = "mark.csv" )
View Source
const ( GitHubNotification sourceType = iota Feed )
Variables ¶
This section is empty.
Functions ¶
func NewProxyRouter ¶
func NewProxyRouter(c *Config) *echo.Echo
Types ¶
type Config ¶ added in v0.2.0
type Config struct {
// contains filtered or unexported fields
}
func (*Config) PutConfDir ¶ added in v0.2.1
func (c *Config) PutConfDir()
設定ディレクトリを初期化する。すでにあれば何もしない
type Env ¶
type Env struct {
AppHost string `envconfig:"APP_HOST" default:"http://localhost"`
AppPort uint16 `envconfig:"APP_PORT" default:"8080"`
ProxyHost string `envconfig:"PROXY_HOST" default:"http://localhost"`
ProxyPort uint16 `envconfig:"PROXY_PORT" default:"8081"`
GitHubToken string `envconfig:"GH_TOKEN"`
}
var Envar Env
type Event ¶
type Event struct {
Source sourceType // イベント種別
NotificationID string // 通知ID。HTML要素指定に使うので、数字だけを含むのが安全。記号が含まれるとクリックできなくなる
UserName string // GitHubユーザの名前
AvatarURL string // GitHubユーザのアイコン画像
Title string // 通知のタイトル(プレーンテキスト)
TitleHTML string // 通知のタイトル(HTML)
Body string // 通知の本文
BodyHTML string // 通知の本文(HTML)
HTMLURL string // 通常の、ホストがgithub.comのURL
ProxyURL string // iframe遷移に使う、ホストがリバースプロキシ先で置き換えられたURL
RepoName string // フルリポジトリ名 golang/go
UpdatedAt time.Time // 更新時刻
UpdatedAtStr string // 更新時間(updated_at)
Category string // 種別
IsNotifyBrowser bool // ブラウザ通知するかどうか
}
Eventはフロント側で1つ1つの通知表示に必要な項目 将来的にGitHubだけじゃなくなるかもなので、汎用的にしておく
type GitHubEventType ¶ added in v0.2.2
type GitHubEventType string
const ( IssuesEventType GitHubEventType = "issues" CommentsEventType GitHubEventType = "comments" PullrequestsEventType GitHubEventType = "pulls" ReleasesEventType GitHubEventType = "releases" )
type GitHubSubjectType ¶ added in v0.2.2
type GitHubSubjectType string
const ( DiscussionSubjectType GitHubSubjectType = "Discussion" CheckSuitSubjectType GitHubSubjectType = "CheckSuite" PullRequestSubjectType GitHubSubjectType = "PullRequest" )
type MockclientI ¶
type MockclientI struct {
// contains filtered or unexported fields
}
MockclientI is a mock of clientI interface.
func NewMockclientI ¶
func NewMockclientI(ctrl *gomock.Controller) *MockclientI
NewMockclientI creates a new mock instance.
func (*MockclientI) EXPECT ¶
func (m *MockclientI) EXPECT() *MockclientIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockclientIMockRecorder ¶
type MockclientIMockRecorder struct {
// contains filtered or unexported fields
}
MockclientIMockRecorder is the mock recorder for MockclientI.
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.