post

package
v0.0.0-...-5fd3f30 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Id    int    `json:"id"`
	Title string `json:"title"`
}

type Post

type Post struct {
	Id       int    `json:"id"`
	Title    string `json:"title"`
	Text     string `json:"text"`
	Category int    `json:"category"`
	Created  string `json:"created"`
}

type PostClient

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

func (*PostClient) Categories

func (p *PostClient) Categories() ([]Category, error)

Categories get all categories

func (*PostClient) Posts

func (p *PostClient) Posts(category int) ([]Post, error)

Posts get all posts

type PostService

type PostService interface {
	Categories() ([]Category, error)
	Posts(category int) ([]Post, error)
}

func NewPostClient

func NewPostClient(ip string, port int) PostService

NewPostService make new struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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