fmt

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerPrefix = "hof-fmt-"

Variables

View Source
var (
	FORMAT_DISABLED        = false
	DOCKER_FORMAT_DISABLED = false
)
View Source
var CONTAINER_REPO = "ghcr.io/hofstadter-io"

(CONSIDER) make this comma separated, so we can have fallback?

Functions

func FormatSource

func FormatSource(filename string, content []byte, fmtrName string, config interface{}, formatData bool) ([]byte, error)

func Info

func Info(which string) (err error)

func Pull

func Pull(fmtr string) error

func Run

func Run(args []string, rflags flags.RootPflagpole, cflags flags.FmtFlagpole) (err error)

func Start

func Start(fmtr string, replace bool) error

func Stop

func Stop(fmtr string) error

func Test added in v0.6.8

func Test(fmtr string) error

func UpdateFormatterStatus added in v0.6.8

func UpdateFormatterStatus() error

Types

type Formatter

type Formatter struct {
	// name, same as tools/%
	Name      string
	Version   string
	Available []string

	// Info
	Status    string
	Running   bool
	Ready     bool
	Host      string
	Port      string
	Container *container.Container
	Images    []*container.Image

	Config  interface{}
	Default interface{}
}

func (*Formatter) Call added in v0.6.8

func (fmtr *Formatter) Call(filename string, content []byte, config any) ([]byte, error)

func (*Formatter) WaitForReady added in v0.6.8

func (fmtr *Formatter) WaitForReady(retry int, delay time.Duration) error

func (*Formatter) WaitForRunning added in v0.6.8

func (fmtr *Formatter) WaitForRunning(retry int, delay time.Duration) error

Jump to

Keyboard shortcuts

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