models

package
v0.0.0-...-c2e183a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2016 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Id                uint64         `json:"id"`
	Event             string         `json:"event"`
	TargetId          uint64         `json:"target_id"`
	SourceId          uint64         `json:"source_id"`
	TargetObjectId    uint64         `json:"target_object_id"`
	RetweetedStatusId JsonNullUInt64 `json:"retweeted_status_id"`
	CreatedAt         int            `json:"created_at"`
}

type JsonNullUInt64

type JsonNullUInt64 struct {
	NullUint64
}

func (JsonNullUInt64) MarshalJSON

func (v JsonNullUInt64) MarshalJSON() ([]byte, error)

type Model

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

func New

func New(dbSource string) *Model

func (*Model) CreateAccount

func (m *Model) CreateAccount(userIdStr string, name string, screenName string, accessToken string, accessTokenSecret string) string

func (*Model) LoadActivities

func (m *Model) LoadActivities(userIdStr string, maxIdStr string, sinceIdStr string) []*Activity

func (*Model) LoadFavoriterIds

func (m *Model) LoadFavoriterIds(userIdStr string, idStr string) []string

func (*Model) Open

func (m *Model) Open() (*sql.DB, error)

type NullUint64

type NullUint64 struct {
	Uint64 uint64
	Valid  bool
}

NullUint64 is a sql.Scanner for unsigned ints.

func (*NullUint64) Scan

func (n *NullUint64) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

Jump to

Keyboard shortcuts

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