resource

package
v0.0.0-...-d04afad Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Login(request LoginRequest) error
	Logout() error
}

type Image

type Image struct {
	ImageID string
	URL     string
	Width   int
	Height  int
}

type LoginRequest

type LoginRequest map[string]string

type Post

type Post struct {
	PostID            string
	Images            []Image
	ThumbnailImageURL string
	Tags              []Tag
}

type Resource

type Resource interface {
	ID() string
	Name() string

	SearchByKeyword(keyword string, pageNumber int) ([]Post, error)
	SearchByTags(tags []Tag, pageNumber int) ([]Post, error)
	AutoComplete(input string) ([]Tag, error)
}

type Tag

type Tag string

type Tiqav

type Tiqav struct{}

func (*Tiqav) AutoComplete

func (t *Tiqav) AutoComplete(input string) ([]Tag, error)

func (*Tiqav) ID

func (t *Tiqav) ID() string

func (*Tiqav) Name

func (t *Tiqav) Name() string

func (*Tiqav) SearchByKeyword

func (t *Tiqav) SearchByKeyword(keyword string, pageNumber int) ([]Post, error)

func (*Tiqav) SearchByTags

func (t *Tiqav) SearchByTags(tags []Tag, pageNumber int) ([]Post, error)

Jump to

Keyboard shortcuts

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