command

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command added in v0.1.1

type Command struct {
	Client api.Client
	Out    io.Writer
	Error  io.Writer

	Application  *kingpin.Application
	Generate     *kingpin.CmdClause
	GenerateFile *kingpin.CmdClause
	Create       *kingpin.CmdClause
	CreatePost   *kingpin.CmdClause
	Show         *kingpin.CmdClause
	ShowPost     *kingpin.CmdClause
	ShowPosts    *kingpin.CmdClause
	Fetch        *kingpin.CmdClause
	FetchPost    *kingpin.CmdClause
	FetchPosts   *kingpin.CmdClause
	Update       *kingpin.CmdClause
	UpdatePost   *kingpin.CmdClause
	Delete       *kingpin.CmdClause
	DeletePost   *kingpin.CmdClause

	GlobalOptions      GlobalOptions
	GenerateFileRunner GenerateFileRunner
	CreatePostRunner   CreatePostRunner
	ShowPostRunner     ShowPostRunner
	ShowPostsRunner    ShowPostsRunner
	FetchPostRunner    FetchPostRunner
	FetchPostsRunner   FetchPostsRunner
	UpdatePostRunner   UpdatePostRunner
	DeletePostRunner   DeletePostRunner
}

func New added in v0.1.1

func New(info info.Info, client api.Client, out io.Writer, err io.Writer) (c Command)

func (Command) Run added in v0.1.1

func (c Command) Run(args []string)

type CreatePostRunner added in v0.1.1

type CreatePostRunner struct {
	File  **os.File
	Tweet *bool
	Gist  *bool
}

func (CreatePostRunner) Run added in v0.1.1

func (r CreatePostRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

CreatePost creates a new post in Qiita with a specified file.

type DeletePostRunner added in v0.1.1

type DeletePostRunner struct {
	File **os.File
}

func (DeletePostRunner) Run added in v0.1.1

func (r DeletePostRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

DeletePost deletes your post from Qiita with a specified file.

type FetchPostRunner added in v0.1.1

type FetchPostRunner struct {
	ID   *string
	File **os.File
}

func (FetchPostRunner) Run added in v0.1.1

func (r FetchPostRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

FetchPost fetches your post from Qiita to current working directory.

type FetchPostsRunner added in v0.1.1

type FetchPostsRunner struct{}

func (FetchPostsRunner) Run added in v0.1.1

func (r FetchPostsRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

FetchPosts fetches your posts from Qiita to current working directory.

type GenerateFileRunner added in v0.1.1

type GenerateFileRunner struct {
	Title *string
	Team  *string
}

func (GenerateFileRunner) Run added in v0.1.1

func (r GenerateFileRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

GenerateFile generates markdown file at current working directory.

type GlobalOptions added in v0.1.1

type GlobalOptions struct {
	Debug *bool
}

type ShowPostRunner added in v0.1.1

type ShowPostRunner struct {
	ID   *string
	File **os.File
}

func (ShowPostRunner) Run added in v0.1.1

func (r ShowPostRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

ShowPost outputs your post fetched from Qiita to stdout.

type ShowPostsRunner added in v0.1.1

type ShowPostsRunner struct{}

func (ShowPostsRunner) Run added in v0.1.1

func (r ShowPostsRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

ShowPosts outputs your posts fetched from Qiita to stdout.

type UpdatePostRunner added in v0.1.1

type UpdatePostRunner struct {
	File **os.File
}

func (UpdatePostRunner) Run added in v0.1.1

func (r UpdatePostRunner) Run(c api.Client, o GlobalOptions, w io.Writer) (err error)

UpdatePost updates your post in Qiita with a specified file.

Jump to

Keyboard shortcuts

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