cli

package
v0.0.0-...-fb79b61 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commit = func() string {
	if info, ok := debug.ReadBuildInfo(); ok {
		for _, setting := range info.Settings {
			if setting.Key == "vcs.revision" {
				return setting.Value
			}
		}
	}
	return "dev"
}()

Functions

func CommandSet

func CommandSet() *commander.CommandSet

func RunImage

func RunImage(ctx context.Context, cfg BuildConfig) error

func RunJDef

func RunJDef(ctx context.Context, cfg BuildConfig) error

func RunSwagger

func RunSwagger(ctx context.Context, cfg BuildConfig) error

Types

type BuildConfig

type BuildConfig struct {
	Source string `flag:"src" default:"." description:"Source directory containing jsonapi.yaml and buf.lock.yaml"`
	Output string `flag:"output" default:"-" description:"Destination to push image to. - for stdout, s3://bucket/prefix, otherwise a file"`
}

type DiscardFS

type DiscardFS struct{}

func NewDiscardFS

func NewDiscardFS() *DiscardFS

func (*DiscardFS) Put

func (d *DiscardFS) Put(ctx context.Context, subPath string, body io.Reader) error

type LocalFS

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

func NewLocalFS

func NewLocalFS(root string) (*LocalFS, error)

func (*LocalFS) Put

func (local *LocalFS) Put(ctx context.Context, subPath string, body io.Reader) error

type SourceConfig

type SourceConfig struct {
	Source        string   `flag:"src" default:"." description:"Source directory containing j5.yaml and buf.lock.yaml"`
	CommitHash    string   `flag:"commit-hash" env:"COMMIT_HASH" default:""`
	CommitTime    string   `flag:"commit-time" env:"COMMIT_TIME" default:""`
	CommitAliases []string `flag:"commit-alias" env:"COMMIT_ALIAS" default:""`

	GitAuto bool `flag:"git-auto" env:"COMMIT_INFO_GIT_AUTO" default:"false" description:"Automatically pull commit info from git"`
}

func (SourceConfig) GetSource

func (cfg SourceConfig) GetSource(ctx context.Context) (builder.Source, error)

Jump to

Keyboard shortcuts

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