context

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OperationListCommands operation
	OperationListCommands = "list-commands"
	// OperationListPlatforms operation
	OperationListPlatforms = "list-platforms"
	// OperationRenderPage operation
	OperationRenderPage = "render-page"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Location string
	Remote   string
	TTL      time.Duration
}

Cache struct for working with the cache

type Context

type Context struct {
	ctx.Context
	PurgeCache         bool
	Platform           string
	Random             bool
	Cache              Cache
	PagesDirectory     string
	PageSuffix         string
	FoundPlatform      string
	Reader             io.ReadCloser
	Page               string
	Args               string
	AvailablePlatforms []string
	Color              bool
	Writer             io.Writer
	Operation          string
}

Context carries state through pipes

func New

func New() *Context

New creates a new context

func (*Context) RenderPlatform

func (ctx *Context) RenderPlatform() string

RenderPlatform formats the platform as `requested (actual)`

Jump to

Keyboard shortcuts

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