Documentation ¶
Index ¶
Constants ¶
View Source
const GitHubNotifyEntityKind = "GitHubNotify"
GitHubNotifyEntityKind is Kind Name
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
AppConfig is Application Config
func GetAppConfig ¶
GetAppConfig is Application Configを取得する
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
func NewGitHubClient ¶
func NewGitHubClient(ctx context.Context, token string) *GitHubClient
func (*GitHubClient) ListNotifications ¶
func (c *GitHubClient) ListNotifications(ctx context.Context) ([]*github.Notification, error)
type GitHubNotifyEntity ¶
type GitHubNotifyEntity struct { ID string `json:"id" datastore:"-"` Reason string `json:"reason"` Title string `json:"title"` URL string `json:"url"` LatestCommentURL string `json:"latest_comment_url"` Type string `json:"type"` NotifyCount int `json:"notifyCount"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` NotifyAt time.Time `json:"notifyAt"` }
GitHubNotifyEntity is GitHubNotifyをDatastoreに保存するためのEntity
type GitHubNotifyStore ¶
type GitHubNotifyStore struct {
// contains filtered or unexported fields
}
GitHubNotifyStore is GitHubNotify Entity Store
func NewGitHubNotifyStore ¶
func (*GitHubNotifyStore) Get ¶
func (store *GitHubNotifyStore) Get(ctx context.Context, key datastore.Key) (*GitHubNotifyEntity, error)
Get from Datastore
func (*GitHubNotifyStore) Key ¶
func (store *GitHubNotifyStore) Key(gitHubNotifyID string) datastore.Key
Key is Create Key
func (*GitHubNotifyStore) Put ¶
func (store *GitHubNotifyStore) Put(ctx context.Context, n *GitHubNotifyEntity) (*GitHubNotifyEntity, error)
Put to Datastore
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func NewHandlers ¶
func NewHandlers(ctx context.Context, gitHubNotifyStore *GitHubNotifyStore) (*Handlers, error)
func (*Handlers) CronNotificationsHandler ¶
func (h *Handlers) CronNotificationsHandler(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.