insta

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoldFont

func BoldFont() *text.Font

func RegularFont

func RegularFont() *text.Font

Types

type App

type App struct {
	Stack Stack
	Posts []*Post
}

func NewApp

func NewApp() *App

type Comment

type Comment struct {
	Id       int64
	UserId   int64
	UserName string
	Text     string
}

func GenerateComment

func GenerateComment() *Comment

type CommentsView

type CommentsView struct {
	view.Embed
	Comments []*Comment
}

func NewCommentsView

func NewCommentsView() *CommentsView

func (*CommentsView) Build

func (v *CommentsView) Build(ctx view.Context) view.Model

type Post

type Post struct {
	Id int64
	// UserId       int64
	UserName     string
	UserImageURL string
	Location     string
	ImageURL     string
	LikeCount    int
	// CommentIds   []int64
	Comments []*Comment

	Liked      bool
	Bookmarked bool
}

func GeneratePost

func GeneratePost() *Post

type PostButtonsView

type PostButtonsView struct {
	view.Embed
	LikeCount       int
	Liked           bool
	Bookmarked      bool
	OnTouchLike     func(bool)
	OnTouchComment  func()
	OnTouchShare    func()
	OnTouchBookmark func(bool)
}

func NewPostButtonsView

func NewPostButtonsView() *PostButtonsView

func (*PostButtonsView) Build

func (v *PostButtonsView) Build(ctx view.Context) view.Model

type PostHeaderView

type PostHeaderView struct {
	view.Embed
	Title    string
	ImageURL string
}

func NewPostHeaderView

func NewPostHeaderView() *PostHeaderView

func (*PostHeaderView) Build

func (v *PostHeaderView) Build(ctx view.Context) view.Model

type PostImageView

type PostImageView struct {
	view.Embed
	ImageURL      string
	OnDoubleTouch func()
	// contains filtered or unexported fields
}

func NewPostImageView

func NewPostImageView() *PostImageView

func (*PostImageView) Build

func (v *PostImageView) Build(ctx view.Context) view.Model

type PostView

type PostView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewPostView

func NewPostView(p *Post) *PostView

func (*PostView) Build

func (v *PostView) Build(ctx view.Context) view.Model

type RootView

type RootView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewRootView

func NewRootView(app *App) *RootView

func (*RootView) Build

func (v *RootView) Build(ctx view.Context) view.Model

type Stack

type Stack interface {
	SetViews(...view.View)
	Views() []view.View
	Push(vs view.View)
	Pop()
}

type User

type User struct {
	Id       int64
	Name     string
	ImageURL string
}

Jump to

Keyboard shortcuts

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