fmt

package
v0.6.8-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerPrefix = "hof-fmt-"

Variables

View Source
var CONTAINER_REPO = "ghcr.io/hofstadter-io"

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

View Source
var DOCKER_FORMAT_DISABLED = false
View Source
var FORMAT_DISABLED = false

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 Init

func Init() 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

Types

type Formatter

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

	// Info
	Status    string
	Running   bool
	Ready     bool
	Port      string
	Container *types.Container
	Images    []*types.ImageSummary

	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