printer

package
v0.0.0-...-b3686c0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TimeLayout = "Mon Jan 02 15:04:05 -0700 2006"

TimeLayout represents the timelayout

Variables

This section is empty.

Functions

func PrintRelationship

func PrintRelationship(relationship twitter.Relationship, opts *PrintOptions)

PrintRelationship prints a relationship

func PrintRelationships

func PrintRelationships(relationships []twitter.Relationship, opts *PrintOptions)

PrintRelationships prints an array of relationships

func PrintTweet

func PrintTweet(tweet twitter.Tweet, opts *PrintOptions)

PrintTweet prints a tweet

func PrintTweets

func PrintTweets(tweets []twitter.Tweet, opts *PrintOptions)

PrintTweets prints an array of tweets

func PrintUser

func PrintUser(user twitter.User, opts *PrintOptions)

PrintUser prints a user

func PrintUsers

func PrintUsers(users []twitter.User, opts *PrintOptions)

PrintUsers prints an array of users

Types

type PrintOptions

type PrintOptions struct {
	Output string
	AsList bool
	Count  int
	Head   int
	Tail   int
	Sort   string
}

PrintOptions represents several display options passed via cli flags

type RelationshipJSONPrinter

type RelationshipJSONPrinter struct{}

RelationshipJSONPrinter represents an relationship json printer

func (*RelationshipJSONPrinter) Print

func (t *RelationshipJSONPrinter) Print(relationship twitter.Relationship)

Print prints a relationship

func (*RelationshipJSONPrinter) PrintAll

func (t *RelationshipJSONPrinter) PrintAll(relationships []twitter.Relationship)

PrintAll prints an array of relationships

type RelationshipListPrinter

type RelationshipListPrinter struct{}

RelationshipListPrinter represents an relationship list printer

func (*RelationshipListPrinter) Print

func (t *RelationshipListPrinter) Print(relationship twitter.Relationship)

Print prints a relationship

func (*RelationshipListPrinter) PrintAll

func (t *RelationshipListPrinter) PrintAll(relationships []twitter.Relationship)

PrintAll prints an array of relationships

type RelationshipPrinter

type RelationshipPrinter interface {
	PrintAll(relationships []twitter.Relationship)
	Print(relationship twitter.Relationship)
}

RelationshipPrinter represents an relationship printer

type RelationshipTextPrinter

type RelationshipTextPrinter struct{}

RelationshipTextPrinter represents an relationship text printer

func (*RelationshipTextPrinter) Print

func (t *RelationshipTextPrinter) Print(relationship twitter.Relationship)

Print prints a relationship

func (*RelationshipTextPrinter) PrintAll

func (t *RelationshipTextPrinter) PrintAll(relationships []twitter.Relationship)

PrintAll prints an array of relationships

type RelationshipYAMLPrinter

type RelationshipYAMLPrinter struct{}

RelationshipYAMLPrinter represents an relationship yaml printer

func (*RelationshipYAMLPrinter) Print

func (t *RelationshipYAMLPrinter) Print(relationship twitter.Relationship)

Print prints a relationship

func (*RelationshipYAMLPrinter) PrintAll

func (t *RelationshipYAMLPrinter) PrintAll(relationships []twitter.Relationship)

PrintAll prints an array of relationships

type TweetJSONPrinter

type TweetJSONPrinter struct{}

TweetJSONPrinter represents a tweet json printer

func (*TweetJSONPrinter) Print

func (t *TweetJSONPrinter) Print(tweet twitter.Tweet)

Print prints a tweet

func (*TweetJSONPrinter) PrintAll

func (t *TweetJSONPrinter) PrintAll(tweets []twitter.Tweet)

PrintAll prints an array of tweets

type TweetListPrinter

type TweetListPrinter struct{}

TweetListPrinter represents a tweet list printer

func (*TweetListPrinter) Print

func (t *TweetListPrinter) Print(tweet twitter.Tweet)

Print prints a tweet

func (*TweetListPrinter) PrintAll

func (t *TweetListPrinter) PrintAll(tweets []twitter.Tweet)

PrintAll prints an array of tweets

type TweetPrinter

type TweetPrinter interface {
	PrintAll(tweets []twitter.Tweet)
	Print(tweets twitter.Tweet)
}

TweetPrinter represents a tweet printer

type TweetTextPrinter

type TweetTextPrinter struct{}

TweetTextPrinter represents a tweet text printer

func (*TweetTextPrinter) Print

func (t *TweetTextPrinter) Print(tweet twitter.Tweet)

Print prints a tweet

func (*TweetTextPrinter) PrintAll

func (t *TweetTextPrinter) PrintAll(tweets []twitter.Tweet)

PrintAll prints an array of tweets

type TweetYAMLPrinter

type TweetYAMLPrinter struct{}

TweetYAMLPrinter represents a tweet yaml printer

func (*TweetYAMLPrinter) Print

func (t *TweetYAMLPrinter) Print(tweet twitter.Tweet)

Print prints a tweet

func (*TweetYAMLPrinter) PrintAll

func (t *TweetYAMLPrinter) PrintAll(tweets []twitter.Tweet)

PrintAll prints an array of tweets

type UserJSONPrinter

type UserJSONPrinter struct{}

UserJSONPrinter represents a user json printer

func (*UserJSONPrinter) Print

func (t *UserJSONPrinter) Print(users twitter.User)

Print prints a user

func (*UserJSONPrinter) PrintAll

func (t *UserJSONPrinter) PrintAll(users []twitter.User)

PrintAll prints an array of users

type UserListPrinter

type UserListPrinter struct{}

UserListPrinter represents a user list printer

func (*UserListPrinter) Print

func (t *UserListPrinter) Print(user twitter.User)

Print prints a user

func (*UserListPrinter) PrintAll

func (t *UserListPrinter) PrintAll(users []twitter.User)

PrintAll prints an array of users

type UserPrinter

type UserPrinter interface {
	PrintAll(users []twitter.User)
	Print(user twitter.User)
}

UserPrinter represents a user printer

type UserTextPrinter

type UserTextPrinter struct{}

UserTextPrinter represents a user text printer

func (*UserTextPrinter) Print

func (t *UserTextPrinter) Print(user twitter.User)

Print prints a user

func (*UserTextPrinter) PrintAll

func (t *UserTextPrinter) PrintAll(users []twitter.User)

PrintAll prints an array of users

type UserYAMLPrinter

type UserYAMLPrinter struct{}

UserYAMLPrinter represents a user yaml printer

func (*UserYAMLPrinter) Print

func (t *UserYAMLPrinter) Print(users twitter.User)

Print prints a user

func (*UserYAMLPrinter) PrintAll

func (t *UserYAMLPrinter) PrintAll(users []twitter.User)

PrintAll an array of users

Jump to

Keyboard shortcuts

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