cmd

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Commit    = "none"
	Date      = "unknown"
	GoVersion = runtime.Version()
)

Set via compiler flags

View Source
var (
	AnnotationSyncID     = "incident.io/catalog-importer/sync-id"
	AnnotationLastSyncAt = "incident.io/catalog-importer/last-sync-at"
	AnnotationVersion    = "incident.io/catalog-importer/version"
)

Functions

func BANNER(msg string, args ...any)

func DIFF

func DIFF[Type any](prefix string, this, that Type)

func OUT

func OUT(msg string, args ...any)

OUT prints progress output to stderr.

func Run

func Run(ctx context.Context) (err error)

func Version

func Version() string

Types

type BackstageOptions

type BackstageOptions struct {
	APIEndpoint       string
	APIKey            string
	BackstageEndpoint string
}

func (*BackstageOptions) Bind

func (opt *BackstageOptions) Bind(cmd *kingpin.CmdClause) *BackstageOptions

func (*BackstageOptions) Run

func (opt *BackstageOptions) Run(ctx context.Context, logger kitlog.Logger) error

type ImportOptions

type ImportOptions struct {
	APIEndpoint      string
	APIKey           string
	RunSync          bool
	RunSyncDryRun    bool
	Files            []string
	Name             string
	Description      string
	TypeName         string
	SourceExternalID string
	SourceName       string
}

func (*ImportOptions) Bind

func (opt *ImportOptions) Bind(cmd *kingpin.CmdClause) *ImportOptions

func (*ImportOptions) Run

func (opt *ImportOptions) Run(ctx context.Context, logger kitlog.Logger) error

type InitOptions

type InitOptions struct {
}

func (*InitOptions) Bind

func (opt *InitOptions) Bind(cmd *kingpin.CmdClause) *InitOptions

func (*InitOptions) Run

func (opt *InitOptions) Run(ctx context.Context, logger kitlog.Logger) error

type JsonnetOptions

type JsonnetOptions struct {
	Filename string
}

func (*JsonnetOptions) Bind

func (opt *JsonnetOptions) Bind(cmd *kingpin.CmdClause) *JsonnetOptions

func (*JsonnetOptions) Run

func (opt *JsonnetOptions) Run(ctx context.Context, logger kitlog.Logger) error

type SourceOptions

type SourceOptions struct {
	ConfigFile   string
	SampleLength int
}

func (*SourceOptions) Bind

func (opt *SourceOptions) Bind(cmd *kingpin.CmdClause) *SourceOptions

func (*SourceOptions) Run

func (opt *SourceOptions) Run(ctx context.Context, logger kitlog.Logger) error

type SyncOptions

type SyncOptions struct {
	ConfigFile     string
	APIEndpoint    string
	APIKey         string
	Targets        []string
	SampleLength   int
	DryRun         bool
	Prune          bool
	AllowDeleteAll bool
	SourceRepoUrl  string
}

func (*SyncOptions) Bind

func (opt *SyncOptions) Bind(cmd *kingpin.CmdClause) *SyncOptions

func (*SyncOptions) Run

func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *config.Config) error

type TypesOptions

type TypesOptions struct {
	APIEndpoint string
	APIKey      string
}

func (*TypesOptions) Bind

func (opt *TypesOptions) Bind(cmd *kingpin.CmdClause) *TypesOptions

func (*TypesOptions) Run

func (opt *TypesOptions) Run(ctx context.Context, logger kitlog.Logger) error

type ValidateOptions

type ValidateOptions struct {
	ConfigFile string
}

func (*ValidateOptions) Bind

func (opt *ValidateOptions) Bind(cmd *kingpin.CmdClause) *ValidateOptions

func (*ValidateOptions) Run

func (opt *ValidateOptions) Run(ctx context.Context, logger kitlog.Logger) error

Jump to

Keyboard shortcuts

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