controller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(ctx context.Context)

Types

type QueryResolver

type QueryResolver struct{}

func (*QueryResolver) TwitterStatues

func (r *QueryResolver) TwitterStatues(ctx context.Context,
	page *global.Pagination,
	tweetID string,
	username string,
	viewerID string,
	sort *global.Sort,
	topic string,
	regexp string,
) (results []*model.Tweet, err error)

func (*QueryResolver) TwitterThreads

func (r *QueryResolver) TwitterThreads(ctx context.Context, tweetID string) ([]*model.Tweet, error)

type TweetResolver

type TweetResolver struct{}

func (*TweetResolver) CreatedAt

func (t *TweetResolver) CreatedAt(ctx context.Context, obj *model.Tweet) (*library.Datetime, error)

func (*TweetResolver) ID

func (t *TweetResolver) ID(ctx context.Context, obj *model.Tweet) (string, error)

func (*TweetResolver) Images

func (t *TweetResolver) Images(ctx context.Context, obj *model.Tweet) (imgs []string, err error)

func (*TweetResolver) IsQuoteStatus

func (t *TweetResolver) IsQuoteStatus(ctx context.Context, obj *model.Tweet) (bool, error)

func (*TweetResolver) QuotedStatus

func (t *TweetResolver) QuotedStatus(ctx context.Context, obj *model.Tweet) (*model.Tweet, error)

func (*TweetResolver) ReplyTo

func (t *TweetResolver) ReplyTo(ctx context.Context, obj *model.Tweet) (tweet *model.Tweet, err error)

func (*TweetResolver) Replys

func (t *TweetResolver) Replys(ctx context.Context, obj *model.Tweet) ([]*model.Tweet, error)

func (*TweetResolver) URL

func (t *TweetResolver) URL(ctx context.Context, obj *model.Tweet) (string, error)

func (*TweetResolver) Viewers

func (t *TweetResolver) Viewers(ctx context.Context, obj *model.Tweet) (us []*model.User, err error)

type TwitterUserResolver

type TwitterUserResolver struct{}

func (*TwitterUserResolver) Description

func (t *TwitterUserResolver) Description(ctx context.Context, obj *model.User) (string, error)

type Type

type Type struct {
	TweetResolver       *TweetResolver
	TwitterUserResolver *TwitterUserResolver
}
var Instance *Type

func New

func New() *Type

Jump to

Keyboard shortcuts

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