model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Id         int64
	Token      string
	Secret     string
	Expiration time.Time
	Expired    bool
	Created    time.Time
}

type AnacondaTweet

type AnacondaTweet struct {
	*anaconda.Tweet
}

func (*AnacondaTweet) URL

func (t *AnacondaTweet) URL() string

added tweet function

type Service

type Service struct {
	ServiceId int64
	Name      string
}

type Share

type Share struct {
	Id        int64
	UserId    int64
	ServiceId int64
}

type Sharing

type Sharing interface {
	Share(anaconda.Tweet) error
}

type SlackShare

type SlackShare struct {
	WebHookURL string
}

func (SlackShare) Share

func (s SlackShare) Share(atweet anaconda.Tweet) error

type Tweet

type Tweet struct {
	Id         int64
	ScreenName string
}

func (*Tweet) URL

func (m *Tweet) URL() string

type TweetRepository

type TweetRepository struct {
	// contains filtered or unexported fields
}

func GetTweetRepository

func GetTweetRepository(db *sql.DB) TweetRepository

func (*TweetRepository) Add

func (r *TweetRepository) Add(tweet Tweet) error

func (*TweetRepository) Exists

func (r *TweetRepository) Exists(tweet Tweet) (bool, error)

func (*TweetRepository) Find

func (r *TweetRepository) Find(limit int) (*[]Tweet, error)

func (*TweetRepository) FindByOrder

func (r *TweetRepository) FindByOrder(tweet Tweet, order bool, limit int) (*[]Tweet, error)

type User

type User struct {
	Id          int64
	ScreenName  string
	AccessToken AccessToken
	Created     time.Time
}

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func GetUserRepository

func GetUserRepository(db *sql.DB) UserRepository

func (UserRepository) Add

func (r UserRepository) Add(user User) error

func (UserRepository) Exists

func (r UserRepository) Exists(Id int64) bool

func (UserRepository) Get

func (r UserRepository) Get(user_id int64) (*User, error)

func (UserRepository) GetAll

func (r UserRepository) GetAll() (*[]User, error)

func (UserRepository) SaveToken

func (r UserRepository) SaveToken(user User) error

Jump to

Keyboard shortcuts

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