rx

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SUCCESS = "\u2713"
	ERROR   = "\u2718"
	WARNING = "\u26A0"
)

Variables

View Source
var BuffaloMinimums = []string{">=0.14.10"}
View Source
var CockroachMinimums = []string{">=1.1.1", ">=2.0.x"}
View Source
var GoMinimums = []string{">=1.13"}
View Source
var MySQLMinimums = []string{">=3.5"}
View Source
var NodeMinimums = []string{">=1.11"}
View Source
var NpmMinimums = []string{">=6.0.0", ">=7.0.0"}
View Source
var PGMinimums = []string{">=9.3", ">=10.0", ">=11.0"}
View Source
var SQLiteMinimums = []string{">=3.0"}
View Source
var YarnMinimums = []string{">=1.12"}

Functions

func Context

func Context(opts interface{}) *plush.Context

func New

func New(opts *Options) (*genny.Generator, error)

Types

type Helpers

type Helpers struct{}

func (Helpers) Error

func (Helpers) Error(help plush.HelperContext) (string, error)

func (Helpers) Success

func (Helpers) Success(help plush.HelperContext) (string, error)

func (Helpers) Warning

func (Helpers) Warning(help plush.HelperContext) (string, error)

type Options

type Options struct {
	App         meta.App
	Versions    StringMap
	Out         Writer
	SkipBuffalo bool
	SkipNode    bool
	SkipDB      bool
}

func (*Options) Validate

func (opts *Options) Validate() error

Validate that options are usuable

type StringMap

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

StringMap wraps sync.Map and uses the following types: key: string value: string

func (*StringMap) Delete

func (m *StringMap) Delete(key string)

Delete the key from the map

func (*StringMap) Keys

func (m *StringMap) Keys() []string

Keys returns a list of keys in the map

func (*StringMap) Load

func (m *StringMap) Load(key string) (string, bool)

Load the key from the map. Returns string or bool. A false return indicates either the key was not found or the value is not of type string

func (*StringMap) LoadOrStore

func (m *StringMap) LoadOrStore(key string, value string) (string, bool)

LoadOrStore will return an existing key or store the value if not already in the map

func (*StringMap) Range

func (m *StringMap) Range(f func(key string, value string) bool)

Range over the string values in the map

func (*StringMap) Store

func (m *StringMap) Store(key string, value string)

Store a string in the map

type Tool

type Tool struct {
	Name    string
	Bin     string
	Version func(*genny.Runner) (string, error)
	Partial string
	Minimum []string
}

func (Tool) AcceptVersion

func (t Tool) AcceptVersion(v string) (bool, error)

func (Tool) Generator

func (t Tool) Generator(opts *Options) *genny.Generator

type Writer

type Writer struct {
	io.Writer
}

func NewWriter

func NewWriter(w io.Writer) Writer

func (Writer) Error

func (w Writer) Error(s string)

func (Writer) Header

func (w Writer) Header(s string)

func (Writer) Render

func (w Writer) Render(s string, ctx *plush.Context) error

func (Writer) RenderE

func (w Writer) RenderE(err error) error

func (Writer) Success

func (w Writer) Success(s string)

func (Writer) Tabs

func (w Writer) Tabs(lines [][]string) error

func (Writer) Warning

func (w Writer) Warning(s string)

func (Writer) WriteString

func (w Writer) WriteString(s string) error

Jump to

Keyboard shortcuts

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