controller

package
v0.0.0-...-3d57586 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionRSSChannels = "RssChannels"
	CollectionRSSItems    = "RssItems"
)
View Source
const (
	TwitterCollection          = "twitter"
	TwitterListDoc             = "lists"
	TwitterListItemsCollection = "items"
)

Variables

This section is empty.

Functions

func ResponseBadRequest

func ResponseBadRequest(c *gin.Context, msg string)

func ResponseCreated

func ResponseCreated(c *gin.Context, data interface{})

func ResponseInternalServerError

func ResponseInternalServerError(c *gin.Context, msg string)

func ResponseOK

func ResponseOK(c *gin.Context, data interface{})

Types

type APIErrorResponse

type APIErrorResponse struct {
	Message string `json:"message"`
}

type APIResponse

type APIResponse struct {
	Data interface{} `json:"data"`
}

type PostListParams

type PostListParams struct {
	ListID int64 `json:"listId"`
}

type RSSChannel

type RSSChannel struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Link        string `json:"link"`
	RSSLink     string `json:"rssLink"`
	Description string `json:"description"`
}

type RSSChannelFeeds

type RSSChannelFeeds struct {
	Channel *RSSChannel `json:"channel"`
	Items   []*RSSItem  `json:"items"`
}

type RSSContoroller

type RSSContoroller struct {
	FsClient *firestore.Client
}

func (*RSSContoroller) CollectAndSaveFeeds

func (ctrl *RSSContoroller) CollectAndSaveFeeds(c *gin.Context)

func (*RSSContoroller) GetChannelFeeds

func (ctrl *RSSContoroller) GetChannelFeeds(c *gin.Context)

func (*RSSContoroller) GetChannels

func (ctrl *RSSContoroller) GetChannels(c *gin.Context)

func (*RSSContoroller) PostChannel

func (ctrl *RSSContoroller) PostChannel(c *gin.Context)

type RSSItem

type RSSItem struct {
	Title       string     `json:"title"`
	Description string     `json:"description"`
	Link        string     `json:"link"`
	Published   *time.Time `json:"published"`
	GUID        string     `json:"guid"`
	Read        bool       `json:"read"`
	ImageURL    string     `json:"imageURL"`
	ImageWidth  string     `json:"imageWidth"`
	ImageHeight string     `json:"imageHeight"`
	ImageAlt    string     `json:"imageAlt"`
	DocID       string
}

type TweetController

type TweetController struct {
	FsClient      *firestore.Client
	TwitterClient *twitter.Client
}

func (*TweetController) GetHomeTimeline

func (ctrl *TweetController) GetHomeTimeline(c *gin.Context)

func (*TweetController) GetListTimeline

func (ctrl *TweetController) GetListTimeline(c *gin.Context)

func (*TweetController) GetLists

func (ctrl *TweetController) GetLists(c *gin.Context)

func (*TweetController) PostList

func (ctrl *TweetController) PostList(c *gin.Context)

Jump to

Keyboard shortcuts

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