commands

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CmdDefault      = "cmd_default"
	CmdThemesList   = "cmd_themes_list"
	CmdThemesGet    = "cmd_themes_get"
	CmdThemesDelete = "cmd_themes_delete"
	CmdUnknown      = "cmd_unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Is(name string) bool
	Do() error
}

type Default

type Default struct {
	Config *configuration.Configuration `inject:""`
	Themes interface {
		Open(themeName string) (*themes.Theme, error)
		Download(themeName string) error
	} `inject:""`
	CollectionBuilder interface {
		FromFile(file string, options postman.BuilderOptions) (postman.Collection, error)
	} `inject:""`
	EnvironmentBuilder interface {
		FromFile(file string) (postman.Environment, error)
	} `inject:""`
	Renderer interface {
		Render(w io.Writer, theme *themes.Theme, collection postman.Collection) error
	} `inject:""`
}

func (*Default) Do

func (c *Default) Do() error

func (*Default) Is

func (c *Default) Is(name string) bool

type DeleteTheme

type DeleteTheme struct {
	Config *configuration.Configuration `inject:""`
	Themes interface {
		Delete(theme string) error
	} `inject:""`
}

func (*DeleteTheme) Do

func (c *DeleteTheme) Do() error

func (*DeleteTheme) Is

func (c *DeleteTheme) Is(name string) bool

type GetTheme

type GetTheme struct {
	Config *configuration.Configuration `inject:""`
	Themes interface {
		Download(themeName string) error
	} `inject:""`
}

func (*GetTheme) Do

func (c *GetTheme) Do() error

func (*GetTheme) Is

func (c *GetTheme) Is(name string) bool

type ListThemes

type ListThemes struct {
	Config *configuration.Configuration `inject:""`
	Themes interface {
		List() ([]string, error)
	} `inject:""`
}

func (*ListThemes) Do

func (c *ListThemes) Do() error

func (*ListThemes) Is

func (c *ListThemes) Is(name string) bool

Jump to

Keyboard shortcuts

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